/* The home page: a little desktop that's alive, things sliding in from both sides, a day played
   like a film. Light and soft, no heavy shadows. Everything that moves moves on transform and
   opacity only, and stops off screen (home.js) or for reduced motion. */

.home {
  --peach: #ffd3b8;
  --coral: #f2825c;
  --lav: #d9d3ff;
  --lav-ink: #6b5bd6;
  --sky: #cfe7fb;
  --sun: #ffd76e;
  --rose: #ffd0dc;
  --line: rgba(20, 40, 36, 0.08);
  --soft: 0 1px 2px rgba(20, 40, 36, 0.05), 0 10px 30px -18px rgba(20, 40, 36, 0.18);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --glide: cubic-bezier(0.16, 1, 0.3, 1);
  --common: #9fd8c9;
  --rare: #7db8f2;
  --epic: #a48cf0;
  --legendary: #f3bf3c;
}

/* ---------- Coming in: from the side, from below, popping ---------- */

.js [data-in] {
  opacity: 0;
  transition: opacity 0.7s var(--glide), transform 0.9s var(--spring);
  transition-delay: var(--d, 0ms);
}
.js [data-in="up"] { transform: translateY(34px); }
.js [data-in="left"] { transform: translateX(-64px) rotate(-1.5deg); }
.js [data-in="right"] { transform: translateX(64px) rotate(1.5deg); }
.js [data-in="zoom"] { transform: translateY(40px) scale(0.94); }
.js [data-in="pop"] { transform: scale(0.6); }
.js [data-in].in { opacity: 1; transform: none; }

/* ---------- Soft colour, drifting ---------- */

.blob {
  position: absolute;
  z-index: -1;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-mint { background: #bfeee2; top: -12vw; left: -10vw; }
.blob-peach { background: var(--peach); top: 4vw; right: -14vw; animation-delay: -6s; }
.blob-lav { background: var(--lav); bottom: -16vw; left: 30vw; animation-delay: -11s; }
@keyframes drift {
  to { transform: translate(4vw, 3vw) scale(1.08); }
}

/* ---------- Hero ---------- */

.hx {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(104px, 11vw, 136px) 0 clamp(64px, 8vw, 104px);
}
.hx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.pill-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--mint-ink);
  backdrop-filter: blur(12px);
}
.pill-new .i { width: 16px; height: 16px; }
.pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(15, 159, 134, 0.5);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(15, 159, 134, 0.45); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(15, 159, 134, 0); }
}
.hx-title {
  margin-top: 22px;
  font-size: clamp(52px, 6.4vw, 88px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.hx-line { display: block; white-space: nowrap; }
.hx-title .word { display: inline-block; }
.hx-title .tint { color: var(--mint); }
.squiggle { position: relative; }
.squiggle svg {
  position: absolute;
  left: 2%; right: 4%; bottom: -0.16em;
  width: 94%; height: 0.2em;
  fill: none; stroke: var(--coral); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  /* The wave dips past its box, the round ends too: drawn whole. */
  overflow: visible;
}
.squiggle.in svg { animation: draw 1.1s 0.6s var(--glide) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hx-lead {
  margin-top: 22px;
  max-width: 520px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
}
.hx-cta { margin-top: 28px; justify-content: flex-start; }
.hx .fineprint { margin-top: 18px; }

.hx-desk-wrap { position: relative; }
.hx-desk-wrap .desk2 { z-index: 1; }
.sticker {
  position: absolute;
  z-index: 2;
  width: clamp(64px, 9vw, 112px);
  height: auto;
  pointer-events: none;
  animation: bob 6s ease-in-out infinite;
}
.sticker-a { top: 30%; left: -9%; rotate: -12deg; }
.sticker-b { bottom: -11%; left: 34%; rotate: 9deg; animation-delay: -2.5s; width: clamp(54px, 6.5vw, 84px); }
/* Peeking from behind the desk, at its top edge. */
.sticker-c { z-index: 0; top: -13%; right: 12%; rotate: 8deg; animation: peekout 7s ease-in-out infinite; width: clamp(60px, 7vw, 92px); }
@keyframes peekout {
  0%, 18%, 100% { transform: translateY(70%); }
  30%, 70% { transform: translateY(0); }
  82% { transform: translateY(70%); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- The hero's little desktop ---------- */

.desk2 {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(70% 60% at 12% 18%, #c9f1e6 0%, rgba(201, 241, 230, 0) 70%),
    radial-gradient(60% 60% at 92% 90%, #ffd9c2 0%, rgba(255, 217, 194, 0) 70%),
    radial-gradient(60% 50% at 88% 8%, #e3dcff 0%, rgba(227, 220, 255, 0) 70%),
    #eef4f6;
  box-shadow: var(--soft);
  user-select: none;
  -webkit-user-select: none;
}
.hx-desk { aspect-ratio: 16 / 12.2; }
.mbar {
  position: absolute; inset: 0 0 auto; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  height: 6.2cqw;
  padding: 0 2.6cqw;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 2.15cqw;
  font-weight: 600;
  color: var(--ink-2);
}
.mbar-app::before {
  content: "";
  display: inline-block;
  width: 1.7cqw; height: 1.7cqw;
  margin-right: 1.6cqw;
  border-radius: 50%;
  background: var(--ink-2);
  vertical-align: -0.1cqw;
}
.mbar-end { display: flex; align-items: center; gap: 1.8cqw; }
.mbar .i { width: 2.8cqw; height: 2.8cqw; stroke-width: 2; }
.mbar .i-batt { width: 3.4cqw; }
.mbar-flexor {
  display: inline-flex; align-items: center; gap: 0.8cqw;
  padding: 0.5cqw 1.3cqw;
  border-radius: 1.4cqw;
  background: rgba(15, 159, 134, 0.12);
  color: var(--mint-ink);
}
.mbar-flexor b { font-variant-numeric: tabular-nums; font-weight: 700; }
.mbar-clock { font-variant-numeric: tabular-nums; }

.win {
  position: absolute;
  z-index: 2;
  border-radius: 2.2cqw;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 40, 36, 0.07);
  box-shadow: 0 1px 2px rgba(20, 40, 36, 0.05), 0 2.5cqw 5cqw -3cqw rgba(20, 40, 36, 0.18);
  overflow: hidden;
}
.win-bar {
  display: flex; align-items: center; gap: 1cqw;
  height: 5.2cqw;
  padding: 0 2cqw;
  border-bottom: 1px solid rgba(20, 40, 36, 0.06);
  font-size: 1.9cqw;
  font-weight: 600;
  color: var(--muted);
}
.win-bar i { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: #e3e6e8; }
.win-bar span { margin-left: 1.4cqw; }

.hx-win { left: 5%; top: 12%; width: 66%; height: 58%; }
.hx-lines { display: grid; align-content: start; gap: 2.3cqw; height: 25cqw; padding: 3.6cqw 3.6cqw 0; overflow: hidden; }
.hx-lines span {
  display: block;
  height: 2.5cqw;
  width: var(--w);
  max-width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #d7e5e1, #e6ecef);
  transition: width 0.12s linear;
}
.hx-lines span.grow { background: linear-gradient(90deg, #a9e2d3, #d5ece6); }
.win-note {
  margin: 1.6cqw 3.6cqw 0;
  padding-top: 2cqw;
  border-top: 1px dashed rgba(20, 40, 36, 0.1);
  max-width: 34cqw;
  font-size: 2cqw; line-height: 1.4; color: var(--faint);
}
.win-note b { color: var(--mint-ink); }

.hx-meter {
  position: absolute; z-index: 3;
  left: 5%; bottom: 7%;
  display: flex; align-items: center; gap: 1.4cqw;
  padding: 1.4cqw 2.2cqw;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  font-size: 2cqw; font-weight: 600; color: var(--ink-2);
}
.hx-meter i { display: block; width: 14cqw; height: 1.3cqw; border-radius: 99px; background: #e5ebed; overflow: hidden; }
.hx-meter b {
  display: block; height: 100%; width: var(--t);
  border-radius: inherit;
  background: linear-gradient(var(--to-end), var(--mint), #f2b25c);
  transition: width 1.2s var(--glide);
}
.hx-meter em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4.6cqw; }

.hx-mascot {
  position: absolute; z-index: 4;
  right: 1%; bottom: -2%;
  width: 36%;
}
.hx-mascot video { width: 100%; height: auto; }

.bubble {
  position: absolute;
  z-index: 5;
  padding: 1.6cqw 2.2cqw;
  border-radius: 2.4cqw;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1cqw 3cqw -1.6cqw rgba(20, 40, 36, 0.2);
  font-size: 2.15cqw;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}
.bubble b { display: block; font-size: 0.82em; color: var(--mint-ink); font-weight: 700; margin-bottom: 0.2em; }
.bubble::after {
  content: "";
  position: absolute;
  bottom: -1.2cqw; right: 22%;
  width: 2.4cqw; height: 2.4cqw;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
  border-bottom-right-radius: 0.4cqw;
}
.hx-bubble { right: 8%; bottom: 94%; width: 44cqw; transform-origin: 80% 100%; }
.hx-bubble::after { right: 26%; }
.bubble.pop { animation: pop 0.55s var(--spring); }
@keyframes pop {
  from { opacity: 0; transform: translateY(1.5cqw) scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* ---------- The film: a day on a MacBook ---------- */
/* Sizes on the screen are in cqw of the screen, so it all scales as one. What moves is played
   by home.js (Web Animations): here is only where things are, and how they look before. */

.film { max-width: 1000px; margin-inline: auto; }
.mac { container-type: inline-size; width: 100%; }
.mac-lid {
  position: relative;
  width: 86%;
  margin: 0 auto;
  padding: 1.4cqw 1.4cqw 2cqw;
  border-radius: 3cqw 3cqw 1.1cqw 1.1cqw;
  background: linear-gradient(180deg, #2c2e33, #141518);
  box-shadow: 0 0 0 0.2cqw #c9ccd1, 0 2.4cqw 4cqw -3cqw rgba(20, 40, 36, 0.4);
}
/* The notch, and the camera in it. */
.mac-cam {
  position: absolute; left: 50%; top: 1.4cqw; z-index: 20;
  width: 10.5cqw; height: 2.15cqw;
  translate: -50% 0;
  border-radius: 0 0 1cqw 1cqw;
  background: #141518;
}
.mac-cam::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 0.55cqw; height: 0.55cqw; translate: -50% -50%;
  border-radius: 50%; background: #2c3138; box-shadow: inset 0 0 0 0.12cqw #3b4250;
}
.mac-base {
  position: relative;
  height: 1.9cqw;
  margin-top: -0.15cqw;
  border-radius: 0.3cqw 0.3cqw 50% 50% / 0.3cqw 0.3cqw 100% 100%;
  background: linear-gradient(180deg, #eceef1 0%, #cfd2d7 50%, #a9adb3 100%);
}
.mac-base i {
  position: absolute; left: 50%; top: 0;
  width: 13%; height: 42%;
  translate: -50% 0;
  border-radius: 0 0 1cqw 1cqw;
  background: linear-gradient(180deg, #b4b8be, #d6d9dd);
}

.scr {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 0.8cqw;
  background: #e3ecef;
  user-select: none; -webkit-user-select: none;
  isolation: isolate;
}
.scr-wall {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 18% 30%, #bfeee2 0%, rgba(191, 238, 226, 0) 70%),
    radial-gradient(55% 60% at 85% 20%, #dcd5ff 0%, rgba(220, 213, 255, 0) 70%),
    radial-gradient(70% 70% at 70% 100%, #ffd5bd 0%, rgba(255, 213, 189, 0) 70%),
    linear-gradient(160deg, #e8f3f1, #f1ecf7);
}

/* The menu bar, with flexor's count in it. */
.mb {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 3.1cqw; padding: 0 1.8cqw;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 1.4cqw; font-weight: 500; color: #2a2f33;
}
.mb-l, .mb-r { display: flex; align-items: center; gap: 1.7cqw; }
.mb-l b { font-weight: 700; }
.mb-r { gap: 1.3cqw; font-variant-numeric: tabular-nums; }
.mb .i { width: 1.9cqw; height: 1.9cqw; stroke-width: 1.9; }
.mb .i-batt { width: 2.3cqw; }
.mb-fx { display: inline-flex; align-items: center; gap: 0.5cqw; padding: 0.25cqw 0.8cqw; border-radius: 0.8cqw; background: rgba(15, 159, 134, 0.13); color: var(--mint-ink); }
.mb-fx b { font-weight: 700; }

/* Windows. */
.w {
  position: absolute; overflow: hidden;
  border-radius: 1.1cqw;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(20, 40, 36, 0.08);
  box-shadow: 0 0.2cqw 0.5cqw rgba(20, 40, 36, 0.05), 0 1.6cqw 3.4cqw -2cqw rgba(20, 40, 36, 0.28);
}
.w-bar {
  display: flex; align-items: center; gap: 0.65cqw;
  height: 2.9cqw; padding: 0 1.1cqw;
  border-bottom: 1px solid rgba(20, 40, 36, 0.06);
  font-size: 1.25cqw; font-weight: 600; color: var(--muted);
}
.w-bar i { width: 0.95cqw; height: 0.95cqw; border-radius: 50%; background: #ff5f57; }
.w-bar i:nth-child(2) { background: #febc2e; }
.w-bar i:nth-child(3) { background: #28c840; }
.w-bar span { margin-left: 0.8cqw; }
.w-main { left: 8%; top: 9.5%; width: 55%; height: 62%; z-index: 2; }
.w-side { left: 60%; top: 15%; width: 31%; height: 33%; z-index: 1; }
.w-side-body { display: flex; gap: 1.4cqw; padding: 1.6cqw; }
.w-side-body .cover { width: 9cqw; aspect-ratio: 1; border-radius: 0.8cqw; background: linear-gradient(135deg, #ffb48a, #f28aa6); flex: none; }
.w-side-body .track { display: grid; align-content: center; gap: 1cqw; flex: 1; }
.w-side-body .track i { display: block; height: 1.1cqw; border-radius: 99px; background: #e4e9ec; }
.w-side-body .track i:first-child { width: 80%; background: #cfd9dd; }
.w-body { position: absolute; inset: 2.9cqw 0 0; }
.pane { position: absolute; inset: 0; padding: 2.4cqw; opacity: 0; transition: opacity 0.45s ease; }
.pane.on { opacity: 1; }
.pane[data-pane="notes"] { display: grid; align-content: start; gap: 1.5cqw; }
.pane[data-pane="notes"] span { display: block; height: 1.3cqw; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #d6e4e0, #e7edf0); }
.pane[data-pane="notes"] .typing { background: linear-gradient(90deg, #a6e0d1, #d4ece5); animation: typing 5s steps(28) infinite; }
@keyframes typing { from { width: 4%; } to { width: 70%; } }
.pane-canvas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; background: #f3f4f8; }
.pane-canvas i { border-radius: 1cqw; background: #fff; border: 1px solid #e3e5ee; }
.pane-canvas i:nth-child(1) { background: linear-gradient(135deg, #ffe1d1, #ffd0dc); }
.pane-canvas i:nth-child(4) { background: linear-gradient(135deg, #ddd7ff, #cfe7fb); }
.pane-term { display: grid; align-content: start; gap: 0.4cqw; background: #1d2629; color: #a6e0d1; font: 600 1.45cqw/1.7 ui-monospace, "SF Mono", Menlo, monospace; text-transform: none; }
.pane-term .cur::after { content: "▌"; margin-left: 0.3cqw; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pane-web { display: grid; align-content: start; gap: 1.4cqw; }
.pane-web .url { display: block; height: 2.2cqw; border-radius: 99px; background: #eef1f3; }
.pane-web i { display: block; height: 7cqw; border-radius: 1cqw; background: linear-gradient(135deg, #e8f3ff, #f4efff); }
.pane-web i:nth-child(n + 3) { height: 1.3cqw; width: 80%; border-radius: 99px; background: #e4e9ec; }

/* Flexor's own window: its mascot, and what it has to say. */
.fxw { left: 3.5%; bottom: 13%; width: 37%; z-index: 4; opacity: 0; transform: translateY(16%); }
.fxw-body { display: flex; align-items: flex-end; gap: 1.2cqw; padding: 1.4cqw 1.6cqw 1.2cqw; }
.fxw-body img { width: 7.5cqw; height: 7.5cqw; flex: none; object-fit: contain; }
.fxw-say {
  position: relative; margin-bottom: 2.4cqw;
  padding: 0.9cqw 1.2cqw;
  border-radius: 1.2cqw;
  background: #f6f8f9; border: 1px solid var(--line);
  font-size: 1.45cqw; line-height: 1.35; font-weight: 500; color: var(--ink);
}

/* The dock: anything sits above it, as on a real screen. */
.dock {
  position: absolute; left: 50%; bottom: 0.9cqw; z-index: 3;
  display: flex; align-items: center; gap: 0.8cqw;
  padding: 0.8cqw;
  translate: -50% 0;
  border-radius: 1.9cqw;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.dock i, .dock img { width: 4.3cqw; height: 4.3cqw; border-radius: 1.05cqw; flex: none; }
.dock .d1 { background: linear-gradient(160deg, #7fd6ff, #3d8ef0); }
.dock .d2 { background: linear-gradient(160deg, #ffe08a, #f7b733); }
.dock .d3 { background: linear-gradient(160deg, #b8f0c9, #39b867); }
.dock .d4 { background: linear-gradient(160deg, #ffc1d3, #f26d8f); }
.dock .d5 { background: linear-gradient(160deg, #d6ccff, #8b74f0); }
.dock .d6 { background: linear-gradient(160deg, #4b5258, #1f2427); }
.dock .d7 { background: linear-gradient(160deg, #f1f3f4, #c9cdd1); }
.dock b { width: 1px; height: 3.6cqw; background: rgba(20, 40, 36, 0.18); }

/* A friend's visitor: its window at a corner, the mascot at its foot, the bubble beside it. */
.vis { position: absolute; bottom: 7.4cqw; z-index: 6; width: 34cqw; height: 22cqw; pointer-events: none; }
.vis-r { right: 0.4cqw; }
.vis-l { left: 0.4cqw; }
.vbody { position: absolute; bottom: 0; width: 11.5cqw; aspect-ratio: 1; transform-origin: 50% 100%; pointer-events: auto; cursor: pointer; }
.vis-r .vbody { right: 1.2cqw; transform: translate(150%, 0); }
.vis-l .vbody { left: 1.2cqw; transform: translate(-150%, 0); }
.vbody img { width: 100%; height: 100%; object-fit: contain; }
.vbub {
  position: absolute; bottom: 10.4cqw;
  max-width: 19cqw;
  padding: 0.8cqw 1.2cqw 0.9cqw;
  border-radius: 1.2cqw;
  background: #fff; border: 1px solid rgba(20, 40, 36, 0.1);
  box-shadow: 0 0.4cqw 1.2cqw -0.4cqw rgba(20, 40, 36, 0.22);
  font-size: 1.5cqw; line-height: 1.32; font-weight: 500; color: var(--ink);
  opacity: 0;
}
.vbub b { display: block; font-size: 1.15cqw; font-weight: 600; color: var(--mint-ink); }
.vbub::after {
  content: ""; position: absolute; bottom: -0.65cqw;
  width: 1.2cqw; height: 1.2cqw; background: #fff;
  border-right: 1px solid rgba(20, 40, 36, 0.1); border-bottom: 1px solid rgba(20, 40, 36, 0.1);
  transform: rotate(45deg); border-bottom-right-radius: 0.25cqw;
}
.vis-r .vbub { right: 7.6cqw; transform-origin: 100% 100%; }
.vis-r .vbub::after { right: 1.4cqw; }
.vis-l .vbub { left: 7.6cqw; transform-origin: 0 100%; }
.vis-l .vbub::after { left: 1.4cqw; }
.vout { display: flex; align-items: center; gap: 0.5cqw; max-height: 0; overflow: hidden; opacity: 0; font-style: normal; font-size: 1.2cqw; font-weight: 600; color: #8e44d6; }
.vout .i { width: 1.4cqw; height: 1.4cqw; }
.caught { position: absolute; right: 3.6cqw; bottom: 11cqw; font-weight: 800; font-size: 1.7cqw; color: #c98f00; opacity: 0; white-space: nowrap; }

/* The gift, set down beside the visitor: the lid lifts, and what's inside rises out on you. */
.gbox { position: absolute; left: 11.6cqw; bottom: 0.5cqw; width: 5.4cqw; height: 13cqw; opacity: 0; }
.gbase { position: absolute; bottom: 0; left: 0.4cqw; right: 0.4cqw; height: 3.4cqw; border-radius: 0.5cqw; background: linear-gradient(90deg, rgba(142, 68, 214, 0.85) 0 42%, rgba(255, 255, 255, 0.85) 42% 58%, rgba(142, 68, 214, 0.85) 58%); }
.glid { position: absolute; bottom: 3.4cqw; left: 0; right: 0; height: 1.15cqw; border-radius: 0.4cqw; background: linear-gradient(90deg, #8e44d6 0 43%, rgba(255, 255, 255, 0.9) 43% 57%, #8e44d6 57%); transform-origin: 0 100%; }
.gitem { position: absolute; z-index: 2; left: 50%; bottom: 3.8cqw; width: 6cqw; height: 6cqw; margin-left: -3cqw; opacity: 0; filter: drop-shadow(0 0 0.7cqw rgba(142, 68, 214, 0.55)); }
/* What's inside comes out in front of the box and its lid, never behind them. */
.gbase, .glid { z-index: 1; }

.cursor { position: absolute; left: 0; top: 0; z-index: 8; width: 2.1cqw; height: 2.1cqw; fill: #141516; stroke: #fff; stroke-width: 1.4; opacity: 0; pointer-events: none; }
.dim { position: absolute; inset: 0; z-index: 9; background: #0e141b; opacity: 0; pointer-events: none; }

/* Flexor's notifications, as the Mac shows them. */
.note {
  position: absolute; top: 4.1cqw; right: 1.1cqw; z-index: 11;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1cqw; align-items: start;
  width: 30cqw;
  padding: 1.15cqw 1.3cqw;
  border-radius: 1.7cqw;
  background: rgba(246, 246, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 0.6cqw 2cqw -1cqw rgba(20, 40, 36, 0.3);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 1.3cqw; line-height: 1.32; color: #2a2f33;
  opacity: 0; transform: translateX(115%);
}
.note img { width: 3cqw; height: 3cqw; border-radius: 0.7cqw; }
.note b { display: block; font-weight: 700; color: var(--ink); }
.note em { font-style: normal; font-size: 1.1cqw; color: var(--faint); }

/* The player under it. */
.film-bar { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.film-play { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--ink); color: var(--white); }
.film-play .i { width: 18px; height: 18px; }
.film-play .i-play { display: none; }
.film.paused .film-play .i-play { display: block; }
.film.paused .film-play .i-pause { display: none; }
.chips { display: flex; gap: 8px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1 0 auto;
  padding: 11px 16px;
  border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.chip i { position: absolute; inset: 0; z-index: -1; background: var(--mint-wash); transform: scaleX(0); transform-origin: left; }
.chip.on { color: var(--mint-ink); border-color: rgba(15, 159, 134, 0.35); }
.chip.done i { transform: scaleX(1); }
.film-caption { margin-top: 14px; text-align: center; font-size: 16px; color: var(--muted); min-height: 3em; text-wrap: balance; }

@media (max-width: 640px) {
  .mac-lid { width: 100%; }
  .vis { width: 46cqw; height: 30cqw; }
  .vbody { width: 15cqw; }
  .vbub { bottom: 14cqw; max-width: 30cqw; font-size: 2.5cqw; padding: 1.2cqw 1.6cqw; }
  .vbub b { font-size: 2cqw; }
  .vis-r .vbub { right: 9cqw; }
  .vis-l .vbub { left: 9cqw; }
  .vout { font-size: 2cqw; }
  .gbox { left: 15cqw; width: 7cqw; }
  .note { width: 56cqw; font-size: 2.4cqw; top: 4.6cqw; }
  .note img { width: 4.6cqw; height: 4.6cqw; }
  .note em { font-size: 2cqw; }
  .mb { height: 4cqw; font-size: 2.1cqw; }
  .mb-l span { display: none; }
  .mb .i { width: 2.6cqw; height: 2.6cqw; }
  .fxw { width: 64cqw; }
  .fxw-say { font-size: 2.5cqw; }
  .fxw-body img { width: 11cqw; height: 11cqw; }
  .w-side { display: none; }
  .w-main { left: 5%; width: 90%; }
  .chip { padding: 10px 14px; font-size: 14px; }
}

/* ---------- Try it: a keyboard that counts ---------- */

.try-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.try-copy .lead { margin-top: 18px; }
.try-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; justify-content: start; margin-top: 30px; }
.try-stats dt { font-size: 14px; color: var(--faint); }
.try-stats dd { margin: 4px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.try-stats div:nth-child(3) dd { color: var(--mint); }
/* After someone else's typing: what came up most, and an invitation. */
.try-said { max-width: 470px; margin-top: 22px; font-size: 16px; line-height: 1.5; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.try-said.on { opacity: 1; transform: none; }

.kb-wrap { position: relative; }
/* A keyboard's keys are where they are, whichever way the page reads. */
[dir="rtl"] .kb { direction: ltr; }
.kb {
  position: relative;
  display: grid; gap: 7px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft);
  outline: none;
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.kb:focus-visible, .kb.live { border-color: rgba(15, 159, 134, 0.45); box-shadow: 0 0 0 4px rgba(15, 159, 134, 0.12), var(--soft); }
.kb-row { display: grid; gap: 7px; }
.kb-key {
  --h: 0;
  position: relative;
  height: clamp(36px, 4.6vw, 52px);
  border-radius: 10px;
  background: color-mix(in oklab, #f1f4f5, var(--heat) calc(var(--h) * 100%));
  border: 1px solid rgba(20, 40, 36, 0.08);
  border-bottom-width: 3px;
  font-size: clamp(12px, 1.2vw, 15px); font-weight: 600;
  color: color-mix(in oklab, var(--ink-2), #fff calc(min(1, var(--h) * 1.6) * 100%));
  transition: transform 0.08s, background-color 0.3s;
}
.kb-key.down { transform: translateY(2px); border-bottom-width: 1px; }
.kb-key::after {
  content: attr(data-n);
  position: absolute; top: -9px; right: -5px;
  padding: 1px 6px; border-radius: 99px;
  background: var(--ink); color: var(--white);
  font-size: 11px; font-weight: 700;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.2s, transform 0.25s var(--spring);
}
.kb-key.counted::after { opacity: 1; transform: none; }
.kb { --heat: #e0603c; }
.kb-hint {
  position: absolute; inset: auto 0 -40px;
  text-align: center; font-size: 14px; color: var(--faint);
}
.kb.live .kb-hint { color: var(--mint-ink); }
/* In a line where there's room; the bar gives first, then the buttons go under (longer words). */
.kb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 56px; font-size: 13px; color: var(--faint); }
.kb-sound { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; font: inherit; font-weight: 600; color: var(--faint); }
.kb-sound .i { width: 16px; height: 16px; }
.kb-sound:hover, .kb-sound.on { color: var(--mint-ink); }
.kb-legend i { flex: 0 1 120px; min-width: 40px; height: 8px; border-radius: 99px; background: linear-gradient(var(--to-end), #f1f4f5, #f6c08f, #e0603c); }
.kb-reset { margin-inline-start: 16px; color: var(--mint-ink); font-weight: 600; font-size: 14px; }

/* ---------- Features ---------- */

.feats { background: var(--paper); overflow: clip; }
.fgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.fcard {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.fcard h3 { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; text-wrap: pretty; }
.ftag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--mint-ink); }
.ftag .i { width: 20px; height: 20px; }
.ftag .plus-tag, .ticks .plus-tag { position: static; margin-left: 4px; }
em.plus-tag { font-style: normal; }
.fnote { font-size: 14px; color: var(--faint); }
.fc-tired { grid-column: span 3; background: linear-gradient(160deg, #fff, #f2fbf8); }
.fc-nudge { grid-column: span 3; }
.fc-eyes { grid-column: span 2; background: linear-gradient(170deg, #fff, #f6f3ff); }
.fc-wheel { grid-column: span 2; }
.fc-points { grid-column: span 2; background: linear-gradient(170deg, #fff, #fff8ef); }
.fc-darts { grid-column: span 2; }
.fc-sound { grid-column: span 2; background: linear-gradient(170deg, #fff, #f0f8ff); }
.fc-tips { grid-column: span 2; }

.tired-pal { position: relative; display: flex; align-items: flex-end; gap: 14px; margin-top: auto; }
.tired-pal img { width: 92px; height: 92px; object-fit: contain; transform-origin: bottom; transition: transform 2.6s var(--glide) 1.2s, filter 2.6s 1.2s; }
.fc-tired.in .tired-pal img { transform: scale(1.04, 0.9); filter: saturate(0.75); }
.tired-say {
  position: relative; margin-bottom: 44px;
  padding: 10px 14px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500;
  opacity: 0; transform: scale(0.7); transform-origin: 0 100%;
  transition: opacity 0.4s 2.6s, transform 0.6s var(--spring) 2.6s;
}
.fc-tired.in .tired-say { opacity: 1; transform: none; }
.tired-demo { margin-top: 4px; }
.tired-track { height: 18px; border-radius: 99px; background: #e8eef0; overflow: hidden; }
.tired-track b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(var(--to-end), #6fd3bd, var(--sun) 60%, var(--coral)); transition: width 3.2s var(--glide) 0.4s; }
.fc-tired.in .tired-track b { width: 84%; }
.tired-moods { display: flex; justify-content: space-between; margin-top: 10px; font-size: 14px; color: var(--faint); }
.tired-moods span { transition: color 0.4s; }
.fc-tired.in .tired-moods span:nth-child(1) { color: var(--mint-ink); transition-delay: 0.6s; }
.fc-tired.in .tired-moods span:nth-child(2) { color: var(--mint-ink); transition-delay: 1.4s; }
.fc-tired.in .tired-moods span:nth-child(3) { color: var(--coral); transition-delay: 2.4s; }

.nudges { display: grid; gap: 8px; margin-top: auto; }
.nudges p {
  padding: 10px 12px; border-radius: 14px;
  background: #f5f7f8; border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.35; color: var(--ink-2);
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.5s, transform 0.7s var(--spring);
}
.nudges b { display: block; font-size: 12px; color: var(--ink); }
.fc-nudge.in .nudges p { opacity: 1; transform: none; }
.fc-nudge.in .nudges p:nth-child(2) { transition-delay: 0.5s; }
.fc-nudge.in .nudges p:nth-child(3) { transition-delay: 1s; }

.eyes-demo { position: relative; margin-top: auto; height: 150px; }
.eyes-screen { position: absolute; inset: 0 22% 0 0; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #eef3ff 100%); border: 1px solid var(--line); overflow: hidden; }
.eyes-screen { display: grid; align-content: start; gap: 10px; padding: 18px; }
.eyes-screen span { display: block; height: 9px; width: 80%; border-radius: 99px; background: #dfe6f5; }
.eyes-screen span:nth-child(2) { width: 62%; }
.eyes-screen span:nth-child(3) { width: 72%; }
.eyes-screen i { position: absolute; inset: 0; background: #2a2f4a; opacity: 0; animation: dimmer 7s ease-in-out infinite alternate; }
@keyframes dimmer { 0%, 15% { opacity: 0; } 85%, 100% { opacity: 0.42; } }
.eyes-sun { position: absolute; right: 2%; top: 8%; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); animation: sunset 7s ease-in-out infinite alternate; }
@keyframes sunset {
  0%, 15% { transform: none; background: var(--sun); box-shadow: none; }
  85%, 100% { transform: translateY(46px); background: transparent; box-shadow: inset -10px -4px 0 0 #b9b0ff; }
}

.wheel-demo { position: relative; width: 150px; height: 150px; margin: 4px auto 0; }
.wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--common) 0 22%, var(--rare) 0 40%, var(--common) 0 56%, var(--epic) 0 70%, var(--rare) 0 84%, var(--legendary) 0 90%, var(--common) 0 100%);
  border: 6px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  animation: spin 6s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.wheel-hub { position: absolute; inset: 38%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.wheel-pin { position: absolute; left: 50%; top: -6px; translate: -50% 0; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 16px solid var(--ink); }
@keyframes spin {
  0% { transform: rotate(0); }
  55%, 100% { transform: rotate(1440deg); }
}
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.mini-grid dt { font-size: 12px; color: var(--faint); }
.mini-grid dd { margin: 0; font-size: 20px; font-weight: 700; }

.receipt { display: grid; gap: 6px; margin-top: auto; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.receipt li {
  display: flex; justify-content: space-between; gap: 10px;
  padding-bottom: 6px; border-bottom: 1px dashed rgba(20, 40, 36, 0.12);
  color: var(--ink-2);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s, transform 0.5s var(--spring);
}
.receipt b { color: var(--ink); }
.receipt-total { border-bottom: 0 !important; font-weight: 700; font-size: 16px; }
.receipt-total b { color: var(--mint-ink); }
.fc-points.in .receipt li { opacity: 1; transform: none; }
.fc-points.in .receipt li:nth-child(2) { transition-delay: 0.15s; }
.fc-points.in .receipt li:nth-child(3) { transition-delay: 0.3s; }
.fc-points.in .receipt li:nth-child(4) { transition-delay: 0.45s; }
.fc-points.in .receipt li:nth-child(5) { transition-delay: 0.6s; }
.fc-points.in .receipt li:nth-child(6) { transition-delay: 0.75s; }
.fc-points.in .receipt li:nth-child(7) { transition-delay: 1s; }

.darts-demo { height: 150px; margin-top: auto; display: grid; place-items: center; }
.darts-room { position: relative; width: 280px; height: 150px; }
.board { position: absolute; left: 150px; top: 10px; width: 120px; height: 120px; border-radius: 50%; background: #f2825c; display: grid; place-items: center; }
.board i { grid-area: 1 / 1; border-radius: 50%; }
.board i:nth-child(1) { width: 82%; height: 82%; background: #fff3e8; }
.board i:nth-child(2) { width: 52%; height: 52%; background: #f2825c; }
.board i:nth-child(3) { width: 22%; height: 22%; background: #1d1d1f; }
.dart { position: absolute; left: 0; top: 128px; width: 46px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--lav-ink) 0 30%, #c5cdd1 30%); transform: rotate(-30deg); animation: throw 4s var(--glide) infinite; }
.dart::after { content: ""; position: absolute; right: -6px; top: -2px; border-left: 8px solid #8e979b; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
/* Its tip to the bull: the turn comes after the throw, or the throw goes off at its angle. */
@keyframes throw {
  0% { transform: translate(0, 0) rotate(-30deg); opacity: 1; }
  35%, 80% { transform: translate(162px, -47px) rotate(-30deg); opacity: 1; }
  92%, 100% { transform: translate(162px, -47px) rotate(-30deg); opacity: 0; }
}
.won { position: absolute; left: 236px; top: -6px; font-weight: 800; color: var(--mint); font-size: 22px; animation: won 4s ease-out infinite; }
@keyframes won {
  0%, 34% { opacity: 0; transform: translateY(10px) scale(0.7); }
  42% { opacity: 1; transform: translateY(-6px) scale(1.15); }
  75% { opacity: 1; transform: translateY(-12px) scale(1); }
  85%, 100% { opacity: 0; transform: translateY(-20px); }
}

.eq { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin-top: auto; }
.eq i { flex: 1; height: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #7db8f2, #bfe0fb); transform-origin: bottom; animation: eq 1.1s ease-in-out infinite alternate; }
.eq i:nth-child(3n) { animation-delay: -0.4s; }
.eq i:nth-child(3n + 1) { animation-delay: -0.8s; }
.eq i:nth-child(4n) { animation-duration: 0.8s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

.tips { position: relative; height: 92px; margin-top: auto; }
.tips p {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 14px 16px; border-radius: 18px;
  background: #f6f4ff; border: 1px solid #e6e1ff;
  font-size: 15px; line-height: 1.35; color: var(--ink-2);
  opacity: 0;
  animation: tipcycle 12s infinite;
}
.tips p:nth-child(2) { animation-delay: 3s; }
.tips p:nth-child(3) { animation-delay: 6s; }
.tips p:nth-child(4) { animation-delay: 9s; }
@keyframes tipcycle {
  0% { opacity: 0; transform: translateY(14px); }
  4%, 22% { opacity: 1; transform: none; }
  26%, 100% { opacity: 0; transform: translateY(-14px); }
}
.tips kbd { margin-right: 4px; font: inherit; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: #fff; border: 1px solid #ddd6ff; color: var(--lav-ink); text-transform: none; }

/* The apps it has a word for, drifting by both ways. */
.apps { margin-top: clamp(48px, 6vw, 72px); }
.apps-title { text-align: center; font-size: 15px; font-weight: 600; color: var(--faint); margin-bottom: 18px; }
.lane { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.lane + .lane { margin-top: 12px; }
.lane-track { display: flex; gap: 12px; width: max-content; animation: lane 40s linear infinite; }
.lane-back .lane-track { animation-direction: reverse; animation-duration: 70s; }
.lane span { flex: none; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 16px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.lane-back span { font-weight: 500; color: var(--muted); font-size: 15px; }
@keyframes lane { to { transform: translateX(-50%); } }

/* ---------- Friends ---------- */

.friends2 { overflow: clip; }
.blob-friends { top: 10%; left: auto; right: -10vw; bottom: auto; }
.friends-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.friends-copy .lead { margin-top: 18px; }
.ticks { display: grid; gap: 14px; margin-top: 28px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; color: var(--ink-2); }
.ticks .i { width: 22px; height: 22px; color: var(--mint); margin-top: 1px; }
.ticks b { color: var(--ink); font-weight: 600; }
.ticks .plus-tag { font-style: normal; margin-left: 4px; vertical-align: 1px; }

.friends-ui { position: relative; display: grid; gap: 16px; }
.fu-card { padding: 22px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--soft); }
.fu-head { display: flex; align-items: center; gap: 12px; }
.fu-head img { width: 52px; height: 52px; border-radius: 16px; background: var(--mint-wash); object-fit: contain; }
.fu-head p { display: grid; }
.fu-head b { font-size: 18px; }
.fu-head span { font-size: 13px; color: var(--faint); }
.fu-code { margin-inline-start: auto; padding: 6px 10px; border-radius: 10px; border: 1.5px dashed #b8ddd4; font: 700 14px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--mint-ink); text-transform: none; }
.fu-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.fu-tiles div { padding: 12px 14px; border-radius: 16px; background: #f6f8f9; }
.fu-tiles dt { font-size: 12.5px; color: var(--faint); }
.fu-tiles dd { margin: 2px 0 8px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.fu-tiles i { display: block; height: 5px; border-radius: 99px; background: linear-gradient(var(--to-end), var(--mint) var(--v), #e3e9eb var(--v)); }
.fu-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.fu-lately ul { display: grid; gap: 4px; }
.fu-lately li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 8px 4px;
  opacity: 0; transform: translateX(30px);
  transition: opacity 0.5s, transform 0.7s var(--spring);
  transition-delay: calc(var(--d) + 0.3s);
}
.fu-lately.in li { opacity: 1; transform: none; }
.fu-lately p { display: grid; font-size: 15px; }
.fu-lately p span { font-size: 13px; color: var(--faint); }
.fu-lately p .who { font-size: 15px; color: var(--ink-2); }
.fu-lately .legend { color: #b88a12; font-weight: 600; }
.fu-lately em { font-style: normal; font-size: 13px; color: var(--faint); }
.dir { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.dir::before { font-size: 15px; font-weight: 800; }
.dir.in { background: #e6f6f1; color: var(--mint-ink); }
.dir.in::before { content: "↙"; }
.dir.out { background: #fff0e8; color: var(--coral); }
.dir.out::before { content: "↗"; }
.dir.found { background: #fff6dc; color: #c8960e; }
.dir.found::before { content: "★"; }

/* ---------- Dashboard ---------- */

.cast-note { max-width: 560px; margin: 18px auto 0; font-size: 15px; line-height: 1.5; color: var(--faint); }
.dash { padding-top: clamp(48px, 6vw, 88px); }
/* A pill; on a phone too narrow for four tabs in a line (longer words), two lines, rounded the same. */
.seg-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; max-width: 100%; gap: 4px; margin-top: 26px; padding: 4px; border-radius: 22px; background: #eef1f2; }
.seg-tabs button { padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); transition: background 0.25s, color 0.25s; }
.seg-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.seg-tabs button { white-space: nowrap; }
/* Four tabs on a phone: smaller, so they stay on one line each. */
@media (max-width: 520px) {
  .seg-tabs { gap: 2px; padding: 3px; }
  .seg-tabs button { padding: 8px 11px; font-size: 13.5px; }
}
.shots { display: grid; overflow: hidden; }
.shot { grid-area: 1 / 1; transition: opacity 0.6s var(--glide), transform 0.8s var(--glide); opacity: 0; transform: translateX(6%) scale(0.98); }
.shots[data-shown="activity"] .shot-activity,
.shots[data-shown="keys"] .shot-keys,
.shots[data-shown="time"] .shot-time,
.shots[data-shown="friends"] .shot-friends { opacity: 1; transform: none; }
.dash-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 15px; color: var(--muted); }
.dash-note .i { width: 18px; height: 18px; color: var(--gold); }
/* The app by day or after dark: it follows the page, and the button under it shows the other. */
.dash-look { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 6px; margin-top: 6px; font-size: 15px; color: var(--muted); text-align: center; }
.link-btn { font: inherit; font-weight: 600; color: var(--mint-ink); }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.shot-night, .look-night { display: none; }
[data-theme="dark"] .dash:not([data-look="day"]) .shot-night,
.dash[data-look="night"] .shot-night { display: block; }
[data-theme="dark"] .dash:not([data-look="day"]) .shot-day,
.dash[data-look="night"] .shot-day { display: none; }
[data-theme="dark"] .dash:not([data-look="day"]) .look-night,
.dash[data-look="night"] .look-night { display: inline; }
[data-theme="dark"] .dash:not([data-look="day"]) .look-day,
.dash[data-look="night"] .look-day { display: none; }

/* ---------- Up in the menu bar ----------
   A strip of menu bar with the count by the clock, and the panel a right-click opens hanging under it,
   against the right edge as it opens near the screen's. */
.mb-show {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center;
  gap: clamp(32px, 6vw, 88px);
  max-width: 1000px; margin: clamp(80px, 10vw, 136px) auto 0;
}
.mb-copy h3 span { display: inline-block; }
.mb-copy h3 { margin-top: 10px; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.06; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); }
.mb-copy h3 + p { margin-top: 18px; max-width: 460px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.mb-look { display: flex; flex-direction: column; align-items: flex-end; }
.mb-strip {
  align-self: stretch;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  height: 36px; padding: 0 16px; border-radius: 12px;
  background: var(--glass); box-shadow: var(--lift-sm);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.mb-strip .i { width: 17px; height: 17px; stroke-width: 2; }
.mb-strip-app { margin-inline-end: auto; font-weight: 700; color: var(--ink); }
.mb-strip .i-batt { width: 23px; }
.mb-strip-fx { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; background: var(--mint-wash); color: var(--mint-ink); }
.mb-strip-fx b { font-variant-numeric: tabular-nums; font-weight: 700; }
.mb-strip-clock { font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { .mb-strip { gap: 10px; padding: 0 12px; } }
.mb-panel { width: min(300px, 100%); height: auto; margin: 8px 8px 0 0; border-radius: 14px; box-shadow: var(--lift-sm); }


/* ---------- The cast ---------- */

.cast2 { overflow: clip; }
.crew {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 6px;
  max-width: 980px; margin: 0 auto;
}
.crew li { width: 104px; text-align: center; }
.crew img {
  width: 96px; height: 96px; margin: 0 auto;
  transform-origin: 50% 100%;
  opacity: 0; transform: translateY(24px) scale(0.7);
  transition: opacity 0.4s, transform 0.6s var(--spring);
  transition-delay: calc(var(--i) * 45ms);
}
.crew.in img { opacity: 1; transform: none; }
.crew li:hover img { animation: hop 0.6s var(--spring); }
@keyframes hop {
  0% { transform: none; }
  25% { transform: scale(1.1, 0.88); }
  55% { transform: translateY(-22%) scale(0.95, 1.06); }
  80% { transform: scale(1.05, 0.95); }
  100% { transform: none; }
}
.crew span { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.wardrobe { margin-top: clamp(44px, 6vw, 64px); }
.wardrobe .lane + .lane { margin-top: 14px; }
.wardrobe .lane-track { gap: 14px; animation-duration: 60s; }
.wardrobe .lane-back .lane-track { animation-duration: 75s; }
.wardrobe figure {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
}
.wardrobe img { width: 64px; height: 64px; border-radius: 50%; background: #f2f6f7; }
.wardrobe figcaption { display: grid; font-size: 13px; line-height: 1.3; color: var(--faint); white-space: nowrap; }
.wardrobe figcaption b { font-size: 15px; color: var(--ink); }

/* ---------- Friends: the app's send panel, to try ---------- */

.cp { position: relative; padding: 20px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--soft); }
/* Hello or gift goes under the name where there's no room beside it (a narrow phone, longer words). */
.cp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cp-head img { width: 48px; height: 48px; border-radius: 14px; background: #f2f6f7; }
.cp-head p { display: grid; }
.cp-head b { font-size: 18px; }
.cp-head p span { font-size: 13px; color: var(--faint); }
.cp-mode { margin-inline-start: auto; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: #eef1f2; font-size: 13px; font-weight: 600; color: var(--muted); }
.cp-mode > * { padding: 5px 12px; border-radius: 99px; }
.cp-mode b { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.cp-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; margin-top: 16px; }
.cp-preview { position: relative; display: grid; place-items: end center; height: 220px; padding-bottom: 8px; border-radius: 18px; background: linear-gradient(180deg, #f3f6ff, #eef7f4); overflow: hidden; }
.cp-preview img { width: 104px; height: 104px; transform-origin: 50% 100%; }
.cp-say {
  position: absolute; top: 14px; left: 10px; right: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; line-height: 1.3; text-align: center; text-wrap: balance;
}
.cp-steps { display: grid; align-content: start; gap: 8px; min-width: 0; }
.cp-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cp-label i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.cp-label .plus-tag { position: static; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.cp-chips button {
  padding: 6px 11px; border-radius: 99px;
  background: #f5f7f8; border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.cp-chips button:hover { border-color: rgba(15, 159, 134, 0.35); }
.cp-chips button:active { transform: scale(0.96); }
.cp-chips button.epic { color: #8e44d6; }
.cp-chips button.legendary { color: #b88a12; }
.cp-chips button.on { background: var(--mint-wash); border-color: var(--mint); color: var(--mint-ink); font-weight: 600; }
.cp-where {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  width: 168px; aspect-ratio: 16 / 10; padding: 10px 12px 8px;
  border-radius: 12px; border: 1.5px solid var(--line); background: #f8fafb;
  box-shadow: inset 0 9px 0 -1px #e7ecee;
}
.cp-where button { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1.5px solid #cfd8db; transition: transform 0.2s var(--spring), background 0.2s; }
.cp-where button:hover { transform: scale(1.2); }
.cp-where button.on { background: var(--mint); border-color: var(--mint); transform: scale(1.35); }
.cp-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.cp-foot p { flex: 1; font-size: 14px; color: var(--faint); }
.cp-send { gap: 8px; }
.cp-send .i { width: 16px; height: 16px; }
.cp-send span { padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); font-size: 13px; }

.friends-more { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.friends-more .fu-card { align-self: start; }

/* ---------- Visitors on this page ---------- */

/* Someone peeking in at the edge now and then. */
.peek {
  position: fixed; z-index: 40; top: 50%;
  width: 104px;
  pointer-events: none;
  opacity: 0;
}
.peek img { width: 104px; height: 104px; pointer-events: auto; cursor: pointer; }
.peek.left { left: 0; }
.peek.right { right: 0; }
.peek-say {
  position: absolute; bottom: 92%; white-space: nowrap;
  padding: 7px 11px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--soft);
  font-size: 13.5px; font-weight: 500;
  opacity: 0;
}
.peek.left .peek-say { left: 54px; }
.peek.right .peek-say { right: 54px; }
.peek-caught, .tour-caught { position: absolute; left: 50%; top: -8px; translate: -50% 0; font-weight: 800; font-size: 16px; color: #c98f00; opacity: 0; white-space: nowrap; pointer-events: none; }

/* Your own mascot, come to say what you sent: at the corner you picked. */
.tour { position: fixed; z-index: 45; width: 300px; height: 210px; pointer-events: none; display: none; }
.tour.on { display: block; }
.tour-body { position: absolute; bottom: 0; width: 112px; height: 112px; transform-origin: 50% 100%; pointer-events: auto; cursor: pointer; }
.tour-body img { width: 100%; height: 100%; }
.tour-say {
  position: absolute; bottom: 100px; max-width: 190px;
  padding: 8px 12px 9px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px -8px rgba(20, 40, 36, 0.28);
  font-size: 14px; line-height: 1.3; font-weight: 500;
  opacity: 0;
}
.tour-say b { display: block; font-size: 11.5px; color: var(--mint-ink); }
.tour[data-side="right"] .tour-body { right: 18px; }
.tour[data-side="right"] .tour-say { right: 78px; }
.tour[data-side="left"] .tour-body { left: 18px; }
.tour[data-side="left"] .tour-say { left: 78px; }
.tour[data-side="middle"] .tour-body { left: 50%; margin-left: -56px; }
.tour[data-side="middle"] .tour-say { left: 50%; translate: -50% 0; bottom: 118px; }
.tour-caught { top: auto; bottom: 120px; }
.tour[data-side="right"] .tour-caught { left: auto; right: 60px; translate: 50% 0; }
.tour[data-side="left"] .tour-caught { left: 74px; }

/* ---------- Final ---------- */

.final2 { position: relative; isolation: isolate; overflow: clip; text-align: center; }
.blob-final { top: 10%; left: 26vw; }
.final2 .h2 { margin-top: 18px; }
.final2 .cta-row { margin-top: 28px; justify-content: center; }
.final2 .fineprint { margin-top: 16px; }
.orbit { position: relative; width: 300px; height: 300px; margin: 0 auto; }
.orbit-me { position: absolute; inset: 22%; width: 56%; height: auto; animation: bob 4s ease-in-out infinite; }
.orbit-o { position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px; animation: orbit 16s linear infinite; }
.o2 { animation-delay: -3.2s; }
.o3 { animation-delay: -6.4s; }
.o4 { animation-delay: -9.6s; }
.o5 { animation-delay: -12.8s; }
@keyframes orbit {
  from { transform: rotate(0) translateX(138px) rotate(0); }
  to { transform: rotate(360deg) translateX(138px) rotate(-360deg); }
}

/* ---------- Off screen: nothing moves ---------- */

.home .off, .home .off * { animation-play-state: paused !important; }

/* ---------- Smaller screens ---------- */

@media (max-width: 980px) {
  .hx-grid, .try-grid, .friends-grid, .mb-show { grid-template-columns: 1fr; }
  .mb-copy { text-align: center; }
  .mb-copy h3 + p { margin-inline: auto; }
  .mb-look { width: min(440px, 100%); justify-self: center; }
  .hx-copy { text-align: center; }
  .hx-lead { margin-inline: auto; }
  .hx-cta { justify-content: center; }
  .hx-desk-wrap { max-width: 640px; margin: 12px auto 0; width: 100%; }
  .fc-tired, .fc-nudge, .fc-eyes, .fc-wheel, .fc-points, .fc-darts, .fc-sound, .fc-tips { grid-column: span 3; }
  .fc-tired { grid-column: span 6; }
  .try-copy { text-align: center; }
  .try-stats { justify-content: center; }
  .friends-copy { text-align: center; }
  .friends-more { grid-template-columns: 1fr; }
  .ticks { text-align: left; max-width: 520px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .hx { padding-top: 100px; }
  .hx-title { font-size: clamp(46px, 13vw, 64px); }
  /* Its lines are eight wide letters long: a size they fit at. */
  :lang(ja) .hx-title { font-size: clamp(38px, 10.5vw, 64px); }
  .fgrid { grid-template-columns: 1fr; }
  .fc-tired, .fc-nudge, .fc-eyes, .fc-wheel, .fc-points, .fc-darts, .fc-sound, .fc-tips { grid-column: auto; }
  .bubble { font-size: 3.2cqw; }
  .mbar { height: 8cqw; font-size: 3cqw; }
  .mbar .i { width: 3.6cqw; height: 3.6cqw; }
  .win-bar { height: 7cqw; font-size: 2.8cqw; }
  .hx-bubble { width: 56cqw; font-size: 3cqw; right: 50%; }
  .hx-meter { font-size: 2.8cqw; }
  .win-note { font-size: 2.8cqw; }
  .chip { padding: 10px 14px; font-size: 14px; }
  .try-stats { gap: 18px; }
  .try-stats dd { font-size: 28px; }
  .orbit { width: 240px; height: 240px; }
  .cp-body { grid-template-columns: 1fr; }
  .cp-preview { height: 170px; }
  .cp-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .crew li { width: 84px; }
  .crew img { width: 76px; height: 76px; }
  .peek, .peek img { width: 76px; }
  .peek img { height: 76px; }
  .tour { width: 240px; }
  .tour-body { width: 90px; height: 90px; }
  @keyframes orbit {
    from { transform: rotate(0) translateX(110px) rotate(0); }
    to { transform: rotate(360deg) translateX(110px) rotate(-360deg); }
  }
}

/* ---------- Reduced motion: things are simply there ---------- */

@media (prefers-reduced-motion: reduce) {
  .js [data-in] { opacity: 1; transform: none; transition: none; }
  .blob, .sticker, .pill-dot, .lane-track, .wheel, .dart, .won, .eq i, .orbit-o, .orbit-me, .eyes-screen i, .eyes-sun, .crew img { animation: none !important; }
  .peek, .tour { display: none; }
  .tips p { animation: none; }
  .tips p:first-child { opacity: 1; }
  .squiggle svg { stroke-dashoffset: 0; }
}

/* The pictures of a Mac (the hero's desk, the day's screen) stay light, words and all: the page's dark
   colors stop at their edge, so a bubble or a note on them never turns to light ink on white. */
[data-theme="dark"] :is(.desk2, .scr) {
  color-scheme: light;
  --white: #ffffff;
  --paper: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6e6e73;
  --faint: #86868b;
  --hair: rgba(0, 0, 0, 0.08);
  --mint: #0f9f86;
  --mint-ink: #0b806c;
  --mint-wash: #eaf7f3;
  --orange: #e07a1f;
  --gold: #d39a12;
  --gold-ink: #a87908;
  --gold-wash: #fbf3df;
  --card: #ffffff;
  --card-2: #f5f7f8;
  --track: #e4e9ec;
  --line: rgba(20, 40, 36, 0.08);
  --soft: 0 1px 2px rgba(20, 40, 36, 0.05), 0 10px 30px -18px rgba(20, 40, 36, 0.18);
}

/* ---------- Dark ----------
   The cards and what's on them go dark; the pictures of a Mac (the desk, its windows, the dock) stay
   as they are, as a photo would. */
[data-theme="dark"] {
  --line: rgba(255, 255, 255, 0.08);
  --soft: 0 0 0 0.5px rgba(255, 255, 255, 0.06), 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}
/* The blobs behind, deep rather than pale: pale ones turn to fog on a dark page. */
[data-theme="dark"] .blob { opacity: 0.4; }
[data-theme="dark"] .blob-mint { background: #0f6f5e; }
[data-theme="dark"] .blob-peach { background: #7a3f17; }
[data-theme="dark"] .blob-lav { background: #3d3480; }
[data-theme="dark"] .pill-new { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .fcard { background: var(--card); }
[data-theme="dark"] .fc-tired { background: linear-gradient(160deg, var(--card), #142420); }
[data-theme="dark"] .fc-eyes { background: linear-gradient(170deg, var(--card), #1a1a2a); }
[data-theme="dark"] .fc-points { background: linear-gradient(170deg, var(--card), #221d14); }
[data-theme="dark"] .fc-sound { background: linear-gradient(170deg, var(--card), #142030); }
[data-theme="dark"] .tired-say,
[data-theme="dark"] .nudges p { background: var(--card-2); }
[data-theme="dark"] .tired-track { background: var(--track); }
[data-theme="dark"] .wheel { border-color: var(--card); }
[data-theme="dark"] .wheel-hub { background: var(--card); }
[data-theme="dark"] .receipt li { border-bottom-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .tips p { background: rgba(164, 140, 240, 0.1); border-color: rgba(164, 140, 240, 0.25); }
[data-theme="dark"] .tips kbd { background: var(--card-2); border-color: rgba(164, 140, 240, 0.35); }
[data-theme="dark"] .lane span { background: var(--card); }
[data-theme="dark"] .chip { background: var(--card); }
[data-theme="dark"] .chip.on { border-color: rgba(82, 211, 184, 0.45); }
[data-theme="dark"] .kb { background: var(--card); }
[data-theme="dark"] .kb-key {
  background: color-mix(in oklab, #232d2c, var(--heat) calc(var(--h) * 100%));
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .kb-legend i { background: linear-gradient(var(--to-end), #232d2c, #f6c08f, #e0603c); }
[data-theme="dark"] .fu-card { background: var(--card); }
[data-theme="dark"] .fu-code { border-color: rgba(82, 211, 184, 0.35); }
[data-theme="dark"] .fu-tiles div { background: var(--card-2); }
[data-theme="dark"] .fu-tiles i { background: linear-gradient(var(--to-end), var(--mint) var(--v), var(--track) var(--v)); }
[data-theme="dark"] .fu-lately .legend { color: var(--gold-ink); }
[data-theme="dark"] .dir.in { background: rgba(31, 180, 151, 0.16); }
[data-theme="dark"] .dir.out { background: rgba(240, 143, 58, 0.16); }
[data-theme="dark"] .dir.found { background: rgba(227, 173, 42, 0.16); color: var(--gold-ink); }
[data-theme="dark"] .seg-tabs { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .seg-tabs button[aria-selected="true"] { background: var(--card-2); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .wardrobe figure { background: var(--card); }
[data-theme="dark"] .wardrobe img,
[data-theme="dark"] .cp-head img { background: var(--card-2); }
[data-theme="dark"] .cp { background: var(--card); }
[data-theme="dark"] .cp-mode { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .cp-mode b { background: var(--card-2); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .cp-preview { background: linear-gradient(180deg, #18202c, #152220); }
[data-theme="dark"] .cp-say,
[data-theme="dark"] .cp-chips button { background: var(--card-2); }
[data-theme="dark"] .cp-chips button:hover { border-color: rgba(82, 211, 184, 0.45); }
[data-theme="dark"] .cp-chips button.epic { color: #b9a2f7; }
[data-theme="dark"] .cp-chips button.legendary { color: var(--gold-ink); }
[data-theme="dark"] .cp-where { background: var(--card-2); box-shadow: inset 0 9px 0 -1px rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .cp-where button { background: var(--card); border-color: rgba(255, 255, 255, 0.18); }
[data-theme="dark"] .peek-say,
[data-theme="dark"] .tour-say { background: var(--card); }
[data-theme="dark"] .peek-caught,
[data-theme="dark"] .tour-caught,
[data-theme="dark"] .caught { color: var(--gold-ink); }
