/* landing.css — front page, direction A (docs/landing-design.md §7.5). */

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/barlow-condensed-600-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/barlow-condensed-700-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-var-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0e1218;
  --bg2: #151b25;
  --line: #242c39;
  --text: #e8ecf1;
  --muted: #8b95a5;
  --accent: #5aa8ff;
  --accent-ink: #061020;
  --radius: 4px;
  --p1: #e5484d;
  --p2: #3b82f6;
  --p3: #f5c518;
  --p4: #3fb950;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-text-size-adjust: 100%;
}
a {
  color: var(--accent);
}
button {
  font: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}
.m {
  color: var(--muted);
}

/* ---------- header ---------- */
.hero {
  padding-block: 40px 28px;
}
.name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.letters .L {
  display: inline-block;
  animation: arrive 1.6s ease-out both;
  animation-delay: calc(var(--i) * 70ms);
}
.letters .hy {
  --c-end: var(--accent);
}
@keyframes arrive {
  0% {
    opacity: 0;
    transform: translateY(-0.35em);
    color: var(--c);
  }
  25% {
    opacity: 1;
    transform: translateY(0);
    color: var(--c);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: var(--c-end, var(--text));
  }
}
.hdr-mark {
  display: inline-flex;
  width: 0.82em;
  height: 0.82em;
  margin-right: 0.22em;
  cursor: pointer;
  transition: opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.hdr-mark:empty {
  display: none;
}
.hdr-mark.wide {
  width: 1.5em;
}
.hdr-mark.fade {
  opacity: 0;
}
.hdr-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.line {
  margin: 12px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 42ch;
}
.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- board ---------- */
.board {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  /* No layout shift between states (§7.7). */
  min-height: 260px;
}
.board-h {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.board-h h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.board-h .live {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.board-h .wk {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.board-h .st {
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: 1px;
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.rooms {
  display: grid;
}
.room {
  display: grid;
  /* Fixed tracks: every row is its own grid, so columns line up across rows
     even when a row has no Join or Watch. */
  grid-template-columns: 72px minmax(0, 1.4fr) minmax(0, 1fr) 96px minmax(0, 1.2fr) 132px;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.room:last-child {
  border-bottom: 0;
}
.room .g {
  font-weight: 600;
}
.room .h {
  color: var(--muted);
}
/* Host names and game titles can be one long word; wrap them rather than
   push the actions off a phone screen. */
.room .g,
.room .h,
.featured h3,
.featured .meta {
  overflow-wrap: anywhere;
  min-width: 0;
}
.slots {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.slot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--muted);
  opacity: 0.55;
  display: inline-block;
}
.slot.on {
  opacity: 1;
  border-color: transparent;
}
.slot.p1 {
  background: var(--p1);
}
.slot.p2 {
  background: var(--p2);
}
.slot.p3 {
  background: var(--p3);
}
.slot.p4 {
  background: var(--p4);
}
.slots.bounce .slot.on {
  animation: bounce 0.5s ease-out;
}
@keyframes bounce {
  40% {
    transform: translateY(-3px);
  }
}
.cnt {
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
  color: var(--muted);
}
.st {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.st.ingame {
  color: var(--text);
}
.st.ingame::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
}
.acts {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.thumb {
  width: 72px;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1c2431, #0a0d12);
  position: relative;
  overflow: hidden;
  align-self: center;
}
.thumb img,
.screen-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s;
}
.thumb.live::after,
.screen-box.live::after {
  content: 'LIVE';
  position: absolute;
  left: 5px;
  top: 5px;
  font: 700 9px/1 var(--font-display);
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--p1);
  padding: 3px 4px;
  border-radius: 2px;
  z-index: 1;
}
.thumb.stale img,
.screen-box.stale img {
  opacity: 0.45;
}

.featured {
  display: grid;
  grid-template-columns: minmax(200px, 380px) 1fr;
  gap: 20px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.screen-box {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(80% 70% at 50% 40%, #243247, #0a0d12 85%);
  position: relative;
  overflow: hidden;
}
.screen-box.live::after {
  font-size: 11px;
  padding: 4px 6px;
  left: 8px;
  top: 8px;
}
.kicker {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.featured h3 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}
.featured .meta {
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.featured .meta .cnt {
  margin-left: 0;
}
.featured .acts {
  justify-content: flex-start;
}
.featured .why {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 44ch;
}

.empty,
.error {
  padding: 26px 16px;
}
.empty h3,
.waking h3,
.waking h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.empty p,
.waking p,
.error p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 60ch;
}
.empty p b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ms {
  width: 48px;
  height: 32px;
  display: block;
  margin-bottom: 10px;
}
.ms rect {
  transform-box: fill-box;
}
.ms .outline {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
}
.ms .o4 {
  stroke: var(--muted);
}
.ms .fill {
  transform-origin: bottom center;
  animation: ms-fill 2.4s ease-out 1 both;
}
.ms .f1 {
  fill: var(--p1);
}
.ms .f2 {
  fill: var(--p2);
  animation-delay: 0.3s;
}
.ms .f3 {
  fill: var(--p3);
  animation-delay: 0.6s;
}
.ms .f4 {
  fill: var(--p4);
  animation-delay: 1.1s;
}
@keyframes ms-fill {
  0% {
    transform: scaleY(0);
  }
  30% {
    transform: scaleY(1);
  }
  60% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

.waking {
  padding: 18px 16px 20px;
}
.waking h3,
.waking h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.waking h3 small,
.waking h1 small {
  font: 500 13px/1 var(--font-body);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prog {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin: 14px 0;
}
.prog i {
  display: block;
  height: 100%;
  width: 30%;
  background: var(--accent);
  animation: slide 1.6s ease-in-out infinite;
}
@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(340%);
  }
}
.viz {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.viz-row {
  display: grid;
  grid-template-columns: 78px 1fr 84px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}
.viz-row span {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.track {
  position: relative;
  height: 28px;
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
}
.pulse {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  opacity: 0;
  box-shadow: 0 0 18px var(--accent);
}
.pulse.lit {
  animation: pfade 0.6s ease-out forwards;
}
.pulse.late {
  background: var(--p1);
  box-shadow: 0 0 18px var(--p1);
}
@keyframes pfade {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(0.5);
  }
  50% {
    opacity: 0.85;
    transform: translateY(-50%) scale(1.35);
  }
  100% {
    opacity: 0.25;
    transform: translateY(-50%) scale(1);
  }
}
.viz-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.verdict {
  margin-top: 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}
.verdict.ok {
  color: var(--p4);
}
.verdict.bad {
  color: var(--p1);
}
.verdict-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.viz-ctl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.viz-ctl label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.viz-ctl input[type='range'] {
  width: 140px;
  accent-color: var(--accent);
}
.viz-ctl input[type='checkbox'] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}
.viz-ctl output {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 5ch;
}
.loading {
  min-height: 200px;
}

/* ---------- buttons, calls to action ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--text);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.big {
  padding: 13px 22px;
  font-size: 16px;
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  margin-top: 18px;
}
.code {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.code input {
  width: 130px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.code input.shake {
  animation: shake 0.3s;
  border-color: var(--p1);
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.code .btn {
  padding: 9px 12px;
}
.code-link {
  display: none;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  font-size: 14px;
  min-height: 44px;
}
.need {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.need b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- sections ---------- */
.sec {
  padding-block: 34px;
  border-top: 1px solid var(--line);
}
.sec h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sec p {
  margin: 0 0 10px;
  max-width: 62ch;
}
.two {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: start;
}
/* Grid items default to min-width: auto, so the phone screenshot strip
   (fixed 160 px columns) would widen the page instead of scrolling. */
.two > * {
  min-width: 0;
}
.supported-roms {
  color: var(--muted);
  margin: 0 0 10px;
  max-width: 62ch;
}
.supported-roms ul {
  display: inline;
  margin: 0;
  padding: 0;
  list-style: none;
}
.supported-roms li {
  display: inline;
}
.supported-roms li + li::before {
  content: ' · ';
}
.supported-roms li:last-child::after {
  content: '.';
}
.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}
/* A landscape capture (both screens side by side) gets its own row. */
.shots img.wide {
  grid-column: 1 / -1;
}
.lite {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg2), var(--bg)) center / cover no-repeat;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
}
.lite button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 22px;
}
.lite .cap {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lite iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 16px;
}
.rb-fig {
  max-width: 440px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
}
.rb-fig figcaption {
  font-size: 13px;
  margin-top: 8px;
}
.rb {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.rb .axis,
.rb .t {
  fill: var(--line);
}
.rb .head {
  fill: var(--accent);
  animation: rb-head 8s infinite;
}
.rb .t6 {
  animation: rb-bad 8s infinite;
}
.rb .t4,
.rb .t5 {
  animation: rb-replay 8s infinite;
}
.rb .lbl {
  font: 600 4.2px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
}
.rb .lbl.bad {
  fill: var(--p1);
  animation: rb-lblbad 8s infinite;
}
.rb .lbl.re {
  fill: var(--accent);
  animation: rb-lblre 8s infinite;
}
@keyframes rb-head {
  0% {
    transform: translateX(0);
    animation-timing-function: steps(6, end);
  }
  36% {
    transform: translateX(36px);
    animation-timing-function: linear;
  }
  40% {
    transform: translateX(36px);
    animation-timing-function: linear;
  }
  43% {
    transform: translateX(18px);
    animation-timing-function: steps(3, end);
  }
  55% {
    transform: translateX(36px);
    animation-timing-function: steps(4, end);
  }
  79% {
    transform: translateX(60px);
    opacity: 1;
  }
  88% {
    transform: translateX(60px);
    opacity: 1;
  }
  90% {
    opacity: 0;
    transform: translateX(0);
  }
  98% {
    opacity: 0;
    transform: translateX(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes rb-bad {
  0%,
  35% {
    fill: #242c39;
  }
  37%,
  42% {
    fill: #e5484d;
  }
  55%,
  88% {
    fill: #5aa8ff;
  }
  90%,
  100% {
    fill: #242c39;
  }
}
@keyframes rb-replay {
  0%,
  43% {
    fill: #242c39;
  }
  55%,
  88% {
    fill: #5aa8ff;
  }
  90%,
  100% {
    fill: #242c39;
  }
}
@keyframes rb-lblbad {
  0%,
  35% {
    opacity: 0;
  }
  37%,
  41% {
    opacity: 1;
  }
  43%,
  100% {
    opacity: 0;
  }
}
@keyframes rb-lblre {
  0%,
  44% {
    opacity: 0;
  }
  46%,
  56% {
    opacity: 1;
  }
  60%,
  100% {
    opacity: 0;
  }
}
.ribbon {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px 0 4px;
  margin: 0 0 10px;
  list-style: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  scrollbar-width: thin;
}
.ribbon li::after {
  content: '→';
  margin-left: 10px;
  color: var(--line);
}
.ribbon li:last-child {
  color: var(--accent);
}
.ribbon li:last-child::after {
  content: '';
}

/* ---------- header marks (KO + stick keep the mockup's motion) ---------- */
.ko rect,
.ko g,
.ko circle {
  transform-box: fill-box;
}
.ko .stick {
  transform-origin: center;
  animation: ko-stick 3.6s ease-out infinite;
}
.ko .foe {
  transform-origin: center;
  animation: ko-fly 3.6s cubic-bezier(0.3, 0, 0.9, 0.6) infinite;
}
.ko .foe.t1 {
  animation-delay: 0.06s;
}
.ko .foe.t2 {
  animation-delay: 0.12s;
}
.ko .spark {
  transform-origin: center;
  animation: ko-spark 3.6s ease-out infinite;
}
.ko .stock3 {
  animation: ko-stock 3.6s steps(1, end) infinite;
}
.ko .hit {
  transform-origin: center;
  animation: ko-hit 3.6s ease-out infinite;
}
@keyframes ko-stick {
  0%,
  11% {
    transform: translate(0, 0);
  }
  14% {
    transform: translate(6px, 0);
  }
  18% {
    transform: translate(5px, 0);
  }
  26%,
  100% {
    transform: translate(0, 0);
  }
}
@keyframes ko-fly {
  0%,
  13% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  34% {
    transform: translate(30px, -30px) rotate(540deg);
    opacity: 1;
  }
  36% {
    transform: translate(33px, -33px) rotate(580deg);
    opacity: 0;
  }
  80% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  90%,
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}
@keyframes ko-hit {
  0%,
  12% {
    transform: scale(0);
    opacity: 0;
  }
  14% {
    transform: scale(1);
    opacity: 1;
  }
  19% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
@keyframes ko-spark {
  0%,
  30% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  34% {
    transform: scale(1.3) rotate(20deg);
    opacity: 1;
  }
  42% {
    transform: scale(0.4) rotate(40deg);
    opacity: 0;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
@keyframes ko-stock {
  0%,
  37% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  43% {
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.istick {
  touch-action: none;
}
.istick .cap {
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.3, 1);
}
.istick .ring {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
}
.istick .ring.fire {
  animation: ifire 0.45s ease-out;
}
@keyframes ifire {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

/* ---------- footer ---------- */
.foot {
  padding-block: 20px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot .wrap {
  display: grid;
  gap: 4px;
}
.foot a {
  color: var(--muted);
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  font-size: inherit;
}

/* ---------- invite page (W3) ---------- */
.wrap.narrow {
  width: min(640px, 100%);
}
.brand-sm {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 26px;
}
.brand-sm .hy {
  color: var(--accent);
}
.name.sm {
  font-size: clamp(28px, 4vw, 40px);
  margin-top: 6px;
}
.inv-loading {
  min-height: 320px;
}
.inv-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  color: var(--muted);
  margin: 12px 0 22px;
  font-variant-numeric: tabular-nums;
}
.slots.fill-in .slot.on {
  animation: slot-in 0.35s ease-out both;
  animation-delay: calc(var(--n) * 120ms);
}
@keyframes slot-in {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}
.stack {
  display: grid;
  gap: 6px;
  max-width: 420px;
}
.stack .hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.inv-fullline {
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 48ch;
}
.inv-next {
  margin: 22px 0 6px;
  max-width: 52ch;
}
.inv-closed .m {
  margin: 10px 0 22px;
  max-width: 52ch;
}
.inv-sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0 14px;
}
.banner {
  border: 1px solid var(--p3);
  background: color-mix(in srgb, var(--p3) 12%, var(--bg2));
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}
.banner .btn {
  flex: none;
}
.invite .waking {
  padding: 0;
}

/* ---------- phones (W2) ---------- */
@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
  .hero {
    padding-block: 28px 22px;
  }
  .sub {
    display: none;
  }
  .room {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas: 'th g acts' 'th h acts' 'th sl acts' 'th st acts';
    gap: 4px 12px;
  }
  .room .thumb {
    grid-area: th;
  }
  .room .g {
    grid-area: g;
  }
  .room .h {
    grid-area: h;
  }
  .room .sl {
    grid-area: sl;
  }
  .room .st {
    grid-area: st;
  }
  .room .acts {
    grid-area: acts;
    flex-direction: column;
  }
  .featured {
    grid-template-columns: 1fr;
  }
  .featured .acts {
    flex-direction: column;
  }
  .btn {
    min-height: 44px;
  }
  .featured .acts .btn,
  .cta .btn.big {
    width: 100%;
  }
  .cta {
    flex-direction: column;
    align-items: stretch;
  }
  .code {
    display: none;
  }
  .code.open {
    display: flex;
  }
  .code-link {
    display: inline;
    align-self: flex-start;
  }
  .two {
    grid-template-columns: 1fr;
  }
  /* Phones: one swipe row at a common height, so shape tells them apart. */
  .shots {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 6px;
  }
  .shots img {
    flex: none;
    width: auto;
    height: 240px;
  }
  /* Both screens must be visible at once: fit the wide shot to the column. */
  .shots img.wide {
    width: 100%;
    height: auto;
  }
  .viz-row {
    grid-template-columns: 64px 1fr 64px;
  }
  .board {
    min-height: 320px;
  }
}

/* ---------- reduced motion: still frames everywhere (§7.6, §7.11) ---------- */
@media (prefers-reduced-motion: reduce) {
  .letters .L,
  .dot,
  .prog i,
  .ms .fill,
  .slots.bounce .slot.on,
  .slots.fill-in .slot.on,
  .rb *,
  .ko *,
  .code input.shake {
    animation: none !important;
  }
  .pulse.lit {
    animation: none;
    opacity: 1;
  }
  .rb .lbl.bad {
    opacity: 1;
  }
  .rb .t6 {
    fill: var(--p1);
  }
  .thumb img,
  .screen-box img,
  .hdr-mark,
  .istick .cap {
    transition: none;
  }
}
