/* SuperStrong landing — the Keycap Wall, on the web.
   The world is the app's (DESIGN.md): cool white ground, candy keycap tiles built
   as a three-stop gradient body with a raised face, one yellow action color, the
   system face at 800/900, and the measured DROP / POP / RUBBER springs. */

:root {
  --ink: #1C1B33;
  --ink-rgb: 28, 27, 51;
  --ink-soft: rgba(28, 27, 51, .72);
  --ink-fixed: #1C1B33;
  --paper: #FFFFFF;
  --paper-2: #EEF0F6;
  --paper-3: #DCDFE9;
  --ground: #F4F5F9;
  --ground-rgb: 244, 245, 249;
  --shadow-rgb: 28, 27, 51;
  --on-bg: linear-gradient(180deg, #34325A, #1C1B33);
  --on-fg: #FFFFFF;

  /* candy palette: light / base / shade */
  --yellow: #FFD23F; --yellow-light: #FFE58A; --yellow-shade: #E0AE00;
  --pink:   #E2105B; --pink-light:   #FF7AB0; --pink-shade:   #B30D48;
  --mint:   #1ED9A0; --mint-light:   #7CF0CB; --mint-shade:   #0FA878;
  --lime:   #8FE03A; --lime-light:   #C3F37E; --lime-shade:   #5FB312;
  --orange: #FF8E1F; --orange-light: #FFB766; --orange-shade: #D96A00;
  --purple: #7A47E8; --purple-light: #B99BFF; --purple-shade: #5A2CC9;
  --coral:  #D83636; --coral-light:  #FF9B9B; --coral-shade:  #AB2A2A;

  --font-display: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;

  --ease-pop: cubic-bezier(.2, .9, .2, 1.05);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-drop: .17s;
  --ease-drop: linear(0, .11 11%, .22 33%, .43 55%, .67 76%, .93 87%, 1);
  --t-spring: .6s;
  --ease-spring: linear(0, .09 3%, .26 6%, .37 9%, .48 12%, .63 15%, .89 18.5%, 1.05 23%, 1.2 28%, 1.43 31%, 1.54 37%, 1.59 40%, 1.57 46%, 1.5 49%, 1.37 52.5%, 1.22 55.5%, .95 59%, .72 62%, .65 65%, .65 71%, .67 74%, .72 77%, .78 80%, .85 83%, .98 89.5%, 1);
  --t-rubber: .51s;
  --ease-rubber: linear(0, 0.42 3.9%, 0.777 7.8%, 1.06 11.8%, 1.267 15.7%, 1.403 19.6%, 1.475 23.5%, 1.495 27.5%, 1.473 31.4%, 1.423 35.3%, 1.355 39.2%, 1.239 45.1%, 1.128 51%, 1.036 56.9%, 0.972 62.7%, 0.927 70.6%, 0.92 78.4%, 0.936 86.3%, 0.961 94.1%, 1);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;

  accent-color: var(--ink);
  color-scheme: light dark;
}

@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-drop: cubic-bezier(.5, 0, .9, .5);
    --ease-spring: cubic-bezier(.3, 1.6, .4, 1);
    --ease-rubber: cubic-bezier(.34, 1.56, .64, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F2F2F8;
    --ink-rgb: 242, 242, 248;
    --ink-soft: rgba(242, 242, 248, .72);
    --paper: #24253B;
    --paper-2: #2E2F49;
    --paper-3: #1A1B2E;
    --ground: #14152A;
    --ground-rgb: 20, 21, 42;
    --shadow-rgb: 0, 0, 0;
    --on-bg: linear-gradient(180deg, #FFFFFF, #DADCE8);
    --on-fg: #1C1B33;
  }
}

* { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  padding-bottom: 120px;               /* room for the dock fade */
}

::selection { background: var(--yellow); color: var(--ink-fixed); }

@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: thin; scrollbar-color: rgba(var(--ink-rgb), .3) transparent; }
}

button, a {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
}

.wordmark {
  margin: 0;
  font: 800 26px/1 var(--font-display);
  letter-spacing: -.03em;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 11px;
  box-shadow: 0 2px 8px -2px rgba(var(--shadow-rgb), .18);
  white-space: nowrap;
}

.pill--sample {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-2);
  box-shadow: none;
  padding: 6px 10px;
}

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

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px var(--gutter) 0;
  text-align: center;
}

.hero__hook {
  margin: 0 auto;
  max-width: 14ch;
  font: 800 clamp(44px, 8.5vw, 88px)/1 var(--font-display);
  letter-spacing: -.03em;
  text-wrap: balance;
}

.hero__sub {
  margin: 18px auto 0;
  max-width: 52ch;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- Bench: five seats, one open ---------- */

.bench {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 34px);
  padding: 34px 0 6px;
}

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.seat__name {
  max-width: 76px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font: 800 20px/1 var(--font-display);
  letter-spacing: -.02em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: 0 4px 0 var(--paper-3), 0 10px 14px -8px rgba(var(--shadow-rgb), .3), inset 0 1px 0 rgba(255, 255, 255, .8);
  user-select: none;
  -webkit-user-select: none;
}

.avatar--me {
  background: var(--on-bg);
  color: var(--on-fg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .38), 0 10px 14px -8px rgba(var(--shadow-rgb), .4), inset 0 1px 0 rgba(255, 255, 255, .18);
}

/* the open seat: a recessed socket, an invitation */
.avatar--open {
  background: var(--paper-2);
  color: var(--ink-soft);
  box-shadow: inset 0 2px 6px rgba(var(--shadow-rgb), .14);
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}
.avatar--open svg { width: 24px; height: 24px; }
.seat--open { cursor: pointer; }
.seat--open:active .avatar--open {
  transform: scale(.94);
  box-shadow: inset 0 3px 8px rgba(var(--shadow-rgb), .22);
  transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}
.seat--open:focus-visible { outline: none; }
.seat--open:focus-visible .avatar--open { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- Section head (on the wall) ---------- */

.section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: 1080px;
  margin: 26px auto 0;
  padding: 8px 0 12px;
  text-align: left;
}

.section__title {
  margin: 0;
  font: 800 20px/1 var(--font-display);
  letter-spacing: -.02em;
}

.section__meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Wall ---------- */

.wall { position: relative; }

/* zoom tokens: face inset (top / sides / bottom), travel, radius, type, sticker scale */
.wall[data-zoom="days"]   { --cols: 4;  --gap: 12px;  --ft: 4px;   --fx: 6px;   --fb: 12px;  --lift: 4px;   --r: 22px;  --reps: 30px; --word: 13px; --sk: 1; }
.wall[data-zoom="weeks"]  { --cols: 8;  --gap: 7px;   --ft: 2.5px; --fx: 3.5px; --fb: 7px;   --lift: 2.5px; --r: 12px;  --reps: 15px; --word: 0px;  --sk: .48; }
.wall[data-zoom="months"] { --cols: 14; --gap: 4px;   --ft: 1.5px; --fx: 2px;   --fb: 4px;   --lift: 1.5px; --r: 6px;   --reps: 0px;  --word: 0px;  --sk: 0; }
.wall[data-zoom="year"]   { --cols: 24; --gap: 2.5px; --ft: 1px;   --fx: 1px;   --fb: 2.5px; --lift: 1px;   --r: 3.5px; --reps: 0px;  --word: 0px;  --sk: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: var(--cell, 80px);
  gap: var(--gap);
  grid-auto-flow: row dense;
}

.wall--hero { max-width: 1080px; margin: 0 auto; }

/* the zoom demo: a fixed window; zooming shows more time, never more window */
.window {
  height: 480px;
  overflow: hidden;
  padding-top: 8px;
  border-radius: 24px;
  mask-image: linear-gradient(#000 76%, transparent);
  -webkit-mask-image: linear-gradient(#000 76%, transparent);
}

.wall--zoom .zsection { margin-top: 14px; }
.wall--zoom .zsection:first-child { margin-top: 0; }
.wall--zoom .zsection__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 8px;
}
.wall--zoom .zsection__title {
  margin: 0;
  font: 800 16px/1 var(--font-display);
  letter-spacing: -.02em;
}
.wall--zoom .zsection__meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.wall--zoom[data-zoom="days"] .zsection__title { font-size: 20px; }
.wall--zoom[data-zoom="year"] .zsection { margin-top: 8px; }
.wall--zoom[data-zoom="year"] .zsection__head { padding: 2px 0 5px; }

/* ---------- Tile: a keycap ---------- */

.tile {
  --c: var(--pink);
  --cl: var(--pink-light);
  --cs: var(--pink-shade);
  --ti: #FFFFFF;
  position: relative;
  grid-column: span var(--w, 1);
  grid-row: span var(--h, 1);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  corner-shape: squircle;
  background: linear-gradient(180deg, var(--cl) 0%, var(--c) 30%, var(--cs) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 2px 4px rgba(var(--shadow-rgb), .08),
    0 calc(var(--lift) * 4) calc(var(--lift) * 5.5) calc(var(--lift) * -3) rgba(var(--shadow-rgb), .42);
  color: var(--ti);
  cursor: pointer;
  text-align: left;
  overflow: visible;
  transform-origin: 50% 100%;
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}

div.tile { cursor: default; }

/* the raised top face */
.tile::before {
  content: "";
  position: absolute;
  inset: var(--ft) var(--fx) var(--fb) var(--fx);
  border-radius: calc(var(--r) - var(--fx) * .8);
  corner-shape: squircle;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 92%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .12);
  pointer-events: none;
  transition: inset var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}

/* press = DROP; release = POP */
.tile:active,
.tile.is-pressed {
  transform: translateY(calc(var(--fb) * .7)) scale(1.05, .96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 1px 2px rgba(var(--shadow-rgb), .08),
    0 calc(var(--lift) * 1.5) calc(var(--lift) * 2.5) calc(var(--lift) * -2) rgba(var(--shadow-rgb), .3);
  transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}
div.tile:active { transform: none; }
.tile:active::before,
.tile.is-pressed::before {
  inset: var(--ft) var(--fx) calc(var(--fb) * .3) var(--fx);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: inset var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}
div.tile:active::before { inset: var(--ft) var(--fx) var(--fb) var(--fx); }
.tile.no-anim,
.tile.no-anim::before { transition: none; }

.tile__inner {
  position: absolute;
  inset: var(--ft) var(--fx) var(--fb) var(--fx);
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 8px 7px;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

/* the exercise word: a keycap legend, top-left */
.tile__word {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: var(--word);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--ti);
  opacity: .93;
}

.tile__reps {
  display: block;
  font: 800 var(--reps)/.95 var(--font-display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ti);
  transform-origin: 0 100%;
}

/* size variants */
.tile[data-w="1"][data-h="1"] .tile__reps { font-size: calc(var(--reps) * .85); }
.tile[data-w="1"][data-h="1"] .tile__word { display: none; }
.tile[data-w="1"][data-h="1"] .tile__inner { padding: 6px 6px 5px; }
.tile[data-w="1"][data-h="2"] .tile__word { font-size: calc(var(--word) * .96); top: 7px; left: 7px; }
.tile[data-w="2"][data-h="2"] .tile__reps,
.tile[data-w="3"][data-h="2"] .tile__reps,
.tile[data-w="4"][data-h="2"] .tile__reps,
.tile[data-w="2"][data-h="3"] .tile__reps,
.tile[data-w="2"][data-h="4"] .tile__reps { font-size: calc(var(--reps) * 1.45); }
.tile[data-w="2"][data-h="2"] .tile__word,
.tile[data-w="3"][data-h="2"] .tile__word,
.tile[data-w="4"][data-h="2"] .tile__word,
.tile[data-w="2"][data-h="3"] .tile__word,
.tile[data-w="2"][data-h="4"] .tile__word { font-size: calc(var(--word) * 1.23); top: 10px; left: 10px; }
.tile[data-w="2"][data-h="2"] .tile__inner,
.tile[data-w="3"][data-h="2"] .tile__inner,
.tile[data-w="4"][data-h="2"] .tile__inner,
.tile[data-w="2"][data-h="3"] .tile__inner,
.tile[data-w="2"][data-h="4"] .tile__inner { padding: 10px 10px 9px; }

/* text leaves the tile as the wall zooms out */
.wall[data-zoom="weeks"] .tile__word { display: none; }
.wall[data-zoom="weeks"] .tile__inner { padding: 3px 5px 3px; }
.wall[data-zoom="weeks"] .tile[data-w="1"] .tile__reps { display: none; }
.wall[data-zoom="months"] .tile__inner,
.wall[data-zoom="year"] .tile__inner { display: none; }

/* one hue per exercise; ink text on the light hues */
.tile[data-color="pink"],   .mini[data-color="pink"]   { --c: var(--pink);   --cl: var(--pink-light);   --cs: var(--pink-shade); }
.tile[data-color="purple"], .mini[data-color="purple"] { --c: var(--purple); --cl: var(--purple-light); --cs: var(--purple-shade); }
.tile[data-color="coral"],  .mini[data-color="coral"]  { --c: var(--coral);  --cl: var(--coral-light);  --cs: var(--coral-shade); }
.tile[data-color="mint"],   .mini[data-color="mint"]   { --c: var(--mint);   --cl: var(--mint-light);   --cs: var(--mint-shade);   --ti: var(--ink-fixed); }
.tile[data-color="lime"],   .mini[data-color="lime"]   { --c: var(--lime);   --cl: var(--lime-light);   --cs: var(--lime-shade);   --ti: var(--ink-fixed); }
.tile[data-color="orange"], .mini[data-color="orange"] { --c: var(--orange); --cl: var(--orange-light); --cs: var(--orange-shade); --ti: var(--ink-fixed); }

/* the small key naming a friend on their tile: the top-right corner is the one nothing owns */
.who {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font: 800 11.5px/1 var(--font-display);
  letter-spacing: -.02em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: 0 2px 0 var(--paper-3), 0 4px 6px -3px rgba(var(--shadow-rgb), .4), inset 0 1px 0 rgba(255, 255, 255, .8);
  pointer-events: none;
}
.tile[data-w="1"][data-h="1"] .who { top: 5px; right: 5px; width: 22px; height: 22px; font-size: 11px; }
/* the record badge outranks the corner: the initial queues left of it, after the word */
/* the badge takes the top-right corner, so the initial queues after the word
   (the queue point clears the widest word, "burpee") */
.tile.has-badge .who { right: auto; top: 11px; left: 70px; }
.tile.has-badge[data-w="1"][data-h="2"] .who { top: 30px; left: 6px; }
.tile.has-badge[data-w="1"][data-h="1"] .who { display: none; }
.tile.has-badge[data-h="1"][data-w="2"] .who { display: none; }
/* the initial is covered last: when the top-left sticker corner fills on a
   badged tile, the queued initial gives way rather than sit under vinyl */
.tile.has-badge:has(.reaction[data-slot="1"]) .who { display: none; }
.wall[data-zoom="weeks"] .who,
.wall[data-zoom="months"] .who,
.wall[data-zoom="year"] .who { display: none; }

/* ---------- Record badge: a small yellow key pinned on the corner ---------- */

.badge {
  position: absolute;
  top: -9px;
  right: -7px;
  z-index: 4;
  pointer-events: none;
  transform: rotate(var(--rot, -6deg));
  transform-origin: 50% 50%;
}

.badge__body {
  display: block;
  padding: 0 4px 7px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--yellow-light) 0%, var(--yellow) 30%, var(--yellow-shade) 100%);
  box-shadow: 0 10px 14px -8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.badge__face {
  display: grid;
  place-items: center;
  height: 26px;
  margin-top: 3px;
  padding: 0 9px;
  border-radius: 9px;
  font: 800 12px/1 var(--font-display);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--ink-fixed);
  background: linear-gradient(180deg, color-mix(in srgb, var(--yellow) 70%, #fff), var(--yellow) 50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.tile[data-w="1"] .badge__face { height: 22px; padding: 0 7px; font-size: 11px; }
.tile[data-w="1"] .badge__body { padding-bottom: 6px; }

.wall[data-zoom="weeks"] .badge { top: -5px; right: -4px; }
.wall[data-zoom="weeks"] .badge__body { padding: 0 2px 4px; border-radius: 7px; }
.wall[data-zoom="weeks"] .badge__face { height: 10px; width: 12px; padding: 0; margin-top: 2px; font-size: 0; border-radius: 5px; }
.wall[data-zoom="months"] .badge,
.wall[data-zoom="year"] .badge { display: none; }

/* ---------- Reaction stickers: die-cut vinyl on the key ---------- */

.reaction {
  --sk: 1;
  position: absolute;
  z-index: 3;
  width: calc(var(--sz, 72px) * var(--sk));
  aspect-ratio: 1;
  pointer-events: none;
  transform: rotate(var(--tilt, 10deg));
  transform-origin: 50% 50%;
  filter: drop-shadow(0 calc(5px * var(--sk)) calc(5px * var(--sk)) rgba(var(--shadow-rgb), .32));
}
.reaction img { display: block; width: 100%; height: 100%; object-fit: contain; }

.reaction[data-slot="0"] { right: calc(-10px * var(--sk)); bottom: calc(-14px * var(--sk)); }
.reaction[data-slot="1"] { left: calc(-12px * var(--sk)); top: calc(-14px * var(--sk)); }
.reaction[data-slot="2"] { right: calc(-10px * var(--sk)); top: calc(-16px * var(--sk)); z-index: 2; }
.reaction[data-slot="3"] { left: calc(-12px * var(--sk)); bottom: calc(-14px * var(--sk)); }

.wall[data-zoom="weeks"] .reaction { --sk: .48; }
.wall[data-zoom="weeks"] .tile[data-w="1"] .reaction { display: none; }
.wall[data-zoom="months"] .reaction,
.wall[data-zoom="year"] .reaction { display: none; }
.preview .reaction { --sk: .84; }

/* ---------- The charge: rim light and face shimmer on a tile you laid ---------- */

.charge-rim {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.charge-shine {
  position: absolute;
  inset: var(--ft) var(--fx) var(--fb) var(--fx);
  z-index: 2;
  border-radius: calc(var(--r) - var(--fx) * .8);
  corner-shape: squircle;
  overflow: hidden;
  pointer-events: none;
}
.charge-shine i {
  position: absolute;
  top: -30%;
  left: 0;
  height: 160%;
  transform: translateX(-160%);
}

/* ---------- Landing sections ---------- */

.lp {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  max-width: 1080px;
  margin: 110px auto 0;
  padding: 0 var(--gutter);
}

.lp--flip .lp__copy { order: 2; }

.lp__title {
  margin: 0;
  font: 800 clamp(30px, 4.2vw, 46px)/1.05 var(--font-display);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.lp__body {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.lp__body--soft { font-size: 15px; }

.hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ---------- Effort demo ---------- */

.preview {
  --cell: 66px;
  --gap: 8px;
  --ft: 4px; --fx: 6px; --fb: 12px; --lift: 5px; --r: 20px; --reps: 34px; --word: 14px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--cell) * 4 + var(--gap) * 3 + 10px);
}

.preview .tile {
  flex: none;
  width: calc(var(--cell) * var(--w) + var(--gap) * (var(--w) - 1));
  height: calc(var(--cell) * var(--h) + var(--gap) * (var(--h) - 1));
}

.preview--react { min-height: calc(var(--cell) * 2 + var(--gap) + 24px); align-items: center; }

.counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 0;
}

.counter__num {
  min-width: 120px;
  text-align: center;
  font: 800 64px/1 var(--font-display);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.counter__unit {
  display: block;
  text-align: center;
  font: 800 12px/1 var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}

.round {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: 0 4px 0 var(--paper-3), 0 10px 14px -8px rgba(var(--shadow-rgb), .3), inset 0 1px 0 rgba(255, 255, 255, .8);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}
.round svg { width: 22px; height: 22px; }
.round:active {
  transform: translateY(4px) scale(1.05, .96);
  box-shadow: 0 0 0 var(--paper-3), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}

/* the six exercise keys, miniature */
.minis {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.mini {
  --c: var(--pink); --cl: var(--pink-light); --cs: var(--pink-shade); --ti: #fff;
  position: relative;
  width: 76px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  corner-shape: squircle;
  background: linear-gradient(180deg, var(--cl) 0%, var(--c) 30%, var(--cs) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 16px -10px rgba(var(--shadow-rgb), .45);
  color: var(--ti);
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}
.mini::before {
  content: "";
  position: absolute;
  inset: 3px 4px 9px 4px;
  border-radius: 13px;
  corner-shape: squircle;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 92%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .12);
  pointer-events: none;
  transition: inset var(--t-spring) var(--ease-spring);
}
.mini span {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.05em;
  text-transform: lowercase;
}
.mini:active,
.mini[aria-pressed="true"] {
  transform: translateY(5px) scale(1.04, .95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 8px -6px rgba(var(--shadow-rgb), .4);
}
.mini:active::before,
.mini[aria-pressed="true"]::before {
  inset: 3px 4px 4px 4px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.mini:active { transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop); }

/* ---------- Zoom bar: a paper key bed ---------- */

.zoom {
  display: flex;
  gap: 4px;
  max-width: 380px;
  margin: 22px 0 0;
  background: linear-gradient(180deg, var(--paper), var(--paper-3));
  border-radius: 999px;
  padding: 4px 5px 8px;
  box-shadow: 0 14px 22px -12px rgba(var(--shadow-rgb), .45), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.zoom__btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: var(--paper);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .08), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: background .18s var(--ease-out), color .18s var(--ease-out), transform .12s var(--ease-out);
}

.zoom__btn[aria-pressed="true"] {
  background: var(--on-bg);
  color: var(--on-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.zoom__btn:active { transform: translateY(2px); }

/* ---------- Sticker picker: ten paper keys ---------- */

.stk {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: 460px;
  margin: 20px auto 0;
}

.stk__btn {
  aspect-ratio: 1;
  min-width: 0;
  padding: 6px;
  border: 0;
  border-radius: 22px;
  corner-shape: squircle;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  box-shadow: 0 4px 0 var(--paper-3), 0 10px 14px -8px rgba(var(--shadow-rgb), .3), inset 0 1px 0 rgba(255, 255, 255, .8);
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out), background .2s var(--ease-out);
}
.stk__btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(var(--shadow-rgb), .22));
  pointer-events: none;
}
.stk__btn:active {
  transform: translateY(4px) scale(1.05, .96);
  box-shadow: 0 0 0 var(--paper-3), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}
.stk__btn[aria-pressed="true"] {
  transform: translateY(4px);
  background: var(--paper-2);
  box-shadow: 0 0 0 var(--paper-3), inset 0 2px 6px rgba(var(--shadow-rgb), .16);
}

/* ---------- Close + dock: the one yellow key ---------- */

.close {
  max-width: 1080px;
  margin: 120px auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}

.close__title { font-size: clamp(36px, 5.5vw, 60px); }

.close__body { margin: 14px auto 0; }

.commit {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 24px;
  corner-shape: squircle;
  background: linear-gradient(180deg, var(--yellow-light) 0%, var(--yellow) 30%, var(--yellow-shade) 100%);
  box-shadow: 0 18px 26px -12px rgba(var(--shadow-rgb), .45), inset 0 1px 0 rgba(255, 255, 255, .6);
  font: 800 20px/1 var(--font-display);
  letter-spacing: -.01em;
  color: var(--ink-fixed);
  text-decoration: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}

.commit::before {
  content: "";
  position: absolute;
  inset: 4px 6px 12px 6px;
  border-radius: 19px;
  corner-shape: squircle;
  background: linear-gradient(180deg, color-mix(in srgb, var(--yellow) 68%, #fff), var(--yellow) 50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(0, 0, 0, .12);
  pointer-events: none;
  z-index: -1;
  transition: inset var(--t-spring) var(--ease-spring), box-shadow .3s var(--ease-out);
}

.commit:focus-visible { outline-color: var(--ink); outline-offset: 4px; }
.commit:active {
  transform: translateY(6px) scale(1.02, .95);
  box-shadow: 0 8px 14px -8px rgba(var(--shadow-rgb), .4), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}
.commit:active::before {
  inset: 4px 6px 5px 6px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: inset var(--t-drop) var(--ease-drop), box-shadow var(--t-drop) var(--ease-drop);
}

.close__cta {
  min-height: 66px;
  min-width: min(340px, 100%);
  padding: 0 30px 8px;
  margin-top: 26px;
}

.close__small {
  margin: 22px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  max-width: none;
  padding: 44px var(--gutter) calc(14px + var(--safe-bottom));
  /* no scrim: the key's own seat shadow separates it from the wall */
  pointer-events: none;
}

.dock .commit {
  pointer-events: auto;
  min-height: 56px;
  padding: 0 24px 8px;
  border-radius: 20px;
  font-size: 17px;
}
.dock .commit::before { border-radius: 15px; inset: 3px 5px 10px 5px; }
.dock .commit:active::before { inset: 3px 5px 4px 5px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transform: translate(-50%, 20px) scale(.9);
  opacity: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  background: var(--paper);
  border-radius: 999px;
  padding: 11px 16px;
  box-shadow: 0 3px 0 var(--paper-3), 0 14px 20px -8px rgba(var(--shadow-rgb), .35);
  pointer-events: none;
  transition: transform .3s var(--ease-pop), opacity .2s var(--ease-out);
}

.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast img { width: 30px; height: 30px; margin: -6px 0; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(var(--shadow-rgb), .25)); }

/* ---------- Footer ---------- */

.footer {
  max-width: 1080px;
  margin: 90px auto 0;
  /* the fixed dock floats bottom-right; keep the last line clear of it */
  padding: 0 var(--gutter) 104px;
  text-align: center;
}

.footer p {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* three quiet chips, a wall in miniature */
.footer__mark {
  display: inline-flex;
  gap: 5px;
}
.footer__mark::before,
.footer__mark::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4.5px;
  background: linear-gradient(180deg, var(--pink-light), var(--pink) 30%, var(--pink-shade));
}
.footer__mark::after {
  background: linear-gradient(180deg, var(--mint-light), var(--mint) 30%, var(--mint-shade));
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .lp {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 84px;
  }
  .lp--flip .lp__copy { order: 0; }
  .hero { padding-top: 30px; }
  .window { height: 420px; }
  .zoom { max-width: none; }
  .counter__num { font-size: 56px; }
  .preview { min-height: calc(var(--cell) * 4 + var(--gap) * 3 - 40px); }
  body { padding-bottom: 104px; }
}

/* ---------- Motion ---------- */

/* ---------- Hover: under a fine pointer a key rises 1px; the press stays DROP ---------- */

@media (hover: hover) and (pointer: fine) {
  button.tile:not(:active):not(.is-pressed):hover,
  .mini:not(:active):not([aria-pressed="true"]):hover,
  .stk__btn:not(:active):not([aria-pressed="true"]):hover,
  .zoom__btn:not(:active):not([aria-pressed="true"]):hover,
  .round:not(:active):hover,
  .commit:not(:active):hover { transform: translateY(-1px); }
  .seat--open:not(:active):hover .avatar--open { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
