/* hinak.app landing page: a deck of 13 cards on the felt. The app's look (apps/mobile/src/theme.ts): dark felt panels, the amber
   two-tone key, paper for cards and questions, the logo in paper and never shadowed. /privacy and /terms use .wrap, .logo,
   .footer-logo, .title and the colours from here too. */
@font-face { font-family: 'DG Bebo'; src: url('/landing/fonts/DGBeboBold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Mada'; src: url('/landing/fonts/Mada_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Mada'; src: url('/landing/fonts/Mada_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --felt: #1C5A2A;
  --felt-light: #2A7137;
  --felt-deep: #0F3518;
  --night: #0C3517;
  --amber: #EAB463;
  --amber-edge: #B98533;
  --amber-top: #E9C68C;
  --paper: #EAD8B3;
  --paper-light: #F6ECD6;
  --paper-edge: #C2A673;
  --paper-muted: #7A4A08;
  --ink: #060504;
  --cream: #F9F4E8;
  --muted: #BFE3C4;
  --panel: rgba(9, 38, 17, 0.8);
  --panel-edge: #06200D;
  --rim: rgba(191, 227, 196, 0.14);
  --radius: 18px;
  --display: 'DG Bebo', 'Mada', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.open { overflow: hidden; }
body {
  margin: 0; overflow-x: hidden;
  font: 500 18px/1.65 'Mada', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color: var(--cream); background: var(--felt-deep);
}
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 700; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--amber); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #FFE7B3; outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 10; background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
html:not(.js) .js-only { display: none !important; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* The stacked logo is a white drawing, painted paper through a mask. */
.logo {
  display: block; width: 150px; aspect-ratio: 1000 / 635; background: var(--paper);
  -webkit-mask: url('/landing/logo-stacked.png') center / contain no-repeat; mask: url('/landing/logo-stacked.png') center / contain no-repeat;
}
.title { font-family: var(--display); font-size: 32px; line-height: 1.35; color: var(--amber); }
.lead { color: var(--muted); }
.panel { background: var(--panel); border: 2px solid var(--rim); border-bottom: 4px solid var(--panel-edge); border-radius: 20px; }

/* The app's amber key. */
.key {
  display: inline-flex; align-items: center; justify-content: center; min-height: 62px; padding: 4px 30px;
  border: 2px solid var(--amber-edge); border-bottom-width: 6px; border-radius: 18px;
  background: linear-gradient(var(--amber-top) 0 50%, var(--amber) 50%); color: var(--ink);
  font: 700 28px/1.2 var(--display); text-decoration: none; white-space: nowrap;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.key:hover { filter: brightness(1.05); }
.key:active { transform: translateY(2px); border-bottom-width: 4px; }
.key-s { min-height: 50px; padding: 2px 20px; font-size: 21px; border-radius: 15px; border-bottom-width: 4px; }
.key-o { background: transparent; border-color: rgba(191, 227, 196, 0.5); color: var(--cream); }

/* Cover */
.cover { background: radial-gradient(ellipse 110% 80% at 50% 0%, var(--felt-light), var(--felt) 75%); overflow: hidden; }
.cover-in { padding: 22px 18px 26px; text-align: center; }
.cover .logo { margin: 0 auto; }
.logo-h { line-height: 0; }
.cover-line { font: 700 min(32px, 8.6vw)/1.3 var(--display); }
.cover-line span { display: inline-block; }
.sub { color: #D6EFD9; text-wrap: balance; }
.small { font-size: 16px; }
.acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 380px; margin: 16px auto 0; }
.acts .key { width: 100%; }
.code { display: flex; gap: 8px; align-items: center; padding: 7px; }
.code label { padding-inline-start: 8px; font: 700 18px/1.2 var(--display); white-space: nowrap; }
.code input {
  flex: 1; min-width: 0; height: 50px; border: 2px solid transparent; border-radius: 14px; padding: 0 8px; text-align: center;
  font: 700 21px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream); background: rgba(0, 0, 0, 0.3);
}
.code input::placeholder { color: rgba(191, 227, 196, 0.72); opacity: 1; }
.code .key { width: auto; min-height: 50px; }
.code.bad input { border-color: #FF9A8A; }
.code-msg { color: #FFB4A7; font-weight: 700; font-size: 16px; }
.code-msg:empty { display: none; }

/* A playing card: paper, the game's number in the corners. */
.card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  width: 100%; aspect-ratio: 0.7; padding: 24px 6px 12px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: linear-gradient(var(--paper-light), var(--paper)); border-bottom: 5px solid var(--paper-edge); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.card::before { content: ''; position: absolute; inset: 5px; border: 2px solid rgba(194, 166, 115, 0.6); border-radius: 10px; pointer-events: none; }
.card img { width: 60%; }
.card b { font: 700 16px/1.25 var(--display); margin-top: 6px; text-wrap: balance; }
.card .pitch { display: none; }
.card .no { position: absolute; top: 11px; right: 12px; font: 700 18px/1 var(--display); color: var(--paper-muted); }
.card .no.low { display: none; }
.card.back { background: var(--felt); border-bottom-color: #0A2B12; color: var(--cream); padding: 10px 6px; }
.card.back::before { inset: 6px; border: 2px solid var(--amber); background: repeating-linear-gradient(45deg, rgba(234, 180, 99, 0.13) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(234, 180, 99, 0.13) 0 2px, transparent 2px 9px); }
.card.back .logo { position: relative; width: 62%; }
.card.back b { position: relative; color: var(--amber); }

/* Sections */
.main { min-width: 0; padding: 0 18px 20px; }
.sec { padding-top: 40px; scroll-margin-top: 0; }
.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin-top: 16px; }
.deck li { display: grid; grid-template-columns: minmax(0, 1fr); }
.deck .card { max-width: 100%; }
.deck .js-only { grid-column: span 2; display: grid; }
.deck .back { aspect-ratio: auto; height: 100%; }
.deck .back .logo { width: 110px; }
.deck .card { transition: transform 0.16s ease, box-shadow 0.16s ease; }
.deck .card.away { visibility: hidden; }

/* The players ask the game's own questions. */
.talk { max-width: 400px; margin: 24px auto 4px; }
.bubble { position: relative; display: grid; place-content: center; width: 100%; min-height: 106px; margin-bottom: 18px; padding: 16px 14px 10px; border-radius: 20px; background: var(--cream); color: var(--ink); text-align: center; }
.bubble b { max-width: 15em; font: 700 21px/1.35 var(--display); text-wrap: balance; }
.bubble-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 99px; background: var(--amber); font: 700 14px/1 'Mada'; white-space: nowrap; }
.bubble::after { content: ''; position: absolute; top: calc(100% - 1px); right: var(--t, 10%); width: 22px; height: 13px; margin-right: -11px; background: inherit; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: right 0.3s ease; }
.crowd { display: flex; justify-content: center; }
.crowd img { flex: 1; min-width: 0; width: 20%; transition: transform 0.25s ease; transform-origin: 50% 100%; }
.crowd img.on { transform: translateY(-6px) scale(1.14); }

/* How the evening goes: a paper sheet. */
.sheet { padding: 16px 14px 18px; border-radius: 22px; background: linear-gradient(var(--paper-light), var(--paper)); border-bottom: 6px solid var(--paper-edge); color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); text-align: center; }
.sheet .title { color: var(--paper-muted); font-size: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.steps li { min-width: 0; }
.steps i { display: inline-grid; place-content: center; width: 26px; height: 26px; margin-inline-end: 5px; border-radius: 50%; background: var(--amber); font: 700 16px/1 var(--display); vertical-align: 2px; }
.steps h3 { margin-top: 8px; font: 700 18px/1.3 var(--display); white-space: nowrap; }
.steps p { font-size: 16px; line-height: 1.3; color: #43330F; text-wrap: balance; }
.peek { display: block; height: 124px; overflow: hidden; border-radius: 16px; border: 4px solid #06200D; background: var(--felt-deep); }
.peek img { width: 100%; }

/* One thought, lit word by word as it scrolls in. */
.glow { padding-block: 64px 24px; }
.glow p { font: 700 28px/1.45 var(--display); color: var(--cream); text-align: center; text-wrap: balance; }
.glow b { display: block; font-weight: 700; }
.glow span { display: inline-block; transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
html.js .glow span { opacity: 0.3; }
html.js .glow .lit { opacity: 1; }

/* Questions */
.qas { display: grid; gap: 8px; margin-top: 16px; }
.qas details { border-radius: 16px; background: var(--panel); border: 2px solid var(--rim); }
.qas summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 8px 16px; border-radius: 14px; cursor: pointer; list-style: none; font: 700 18px/1.4 var(--display); }
.qas summary::-webkit-details-marker { display: none; }
.qas summary:hover { color: var(--amber); }
.qas i { flex: none; position: relative; width: 16px; height: 16px; }
.qas i::before, .qas i::after { content: ''; position: absolute; inset: 7px 0 auto; height: 2px; border-radius: 2px; background: var(--amber); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.qas i::after { transform: rotate(90deg); }
.qas [open] i::after { transform: none; }
.qas p { padding: 0 16px 14px; font-size: 16px; line-height: 1.6; color: var(--muted); }

.also { margin-top: 30px; font: 700 21px/1.35 var(--display); color: var(--amber); }
.extras { display: grid; gap: 0 40px; margin-top: 6px; }
.extras li { padding: 10px 0; border-bottom: 1px solid var(--rim); font-size: 16px; color: var(--muted); }
.extras b { color: var(--cream); font: 700 18px/1.3 var(--display); margin-inline-end: 6px; }
.last { text-align: center; padding-bottom: 46px; }
.trio { display: flex; justify-content: center; height: 250px; margin: 0 -18px 18px; padding-top: 14px; overflow: hidden; }
.trio span { flex: none; align-self: flex-start; width: 170px; padding: 5px; border-radius: 24px; background: #06200D; }
.trio img { width: 100%; border-radius: 19px; }
.trio span:nth-child(1) { transform: translate(-46px, 26px) rotate(7deg) scale(0.92); }
.trio span:nth-child(2) { position: relative; z-index: 1; box-shadow: 0 0 24px rgba(0, 0, 0, 0.45); }
.trio span:nth-child(3) { transform: translate(46px, 26px) rotate(-7deg) scale(0.92); }
.last .key { margin-top: 12px; min-width: min(100%, 320px); }

.laws h3 { font: 700 21px/1.35 var(--display); }
.laws p { color: var(--muted); font-size: 16px; line-height: 1.5; }
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; margin-top: 22px; }
.packs li { position: relative; text-align: center; line-height: 1.25; }
.packs img { width: 58px; margin: 0 auto 4px; }
.packs b { font-size: 16px; }
.season { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font: 700 14px/1 'Mada'; font-style: normal; padding: 4px 9px; border-radius: 99px; background: var(--amber); color: var(--ink); }

.laws { display: grid; gap: 18px; margin-top: 18px; }
.laws li { display: flex; gap: 14px; align-items: flex-start; }
.laws img { width: 54px; flex: none; }

/* Written rules. With JavaScript they only show on a card's back. */
html.js .abouts { display: none; }
.about { padding: 16px 18px; margin-top: 14px; }
.about h3 { font: 700 24px/1.35 var(--display); color: var(--amber); }
.about h4, .full h4 { font: 700 20px/1.35 var(--display); margin-top: 12px; }
.about ol, .full ol { list-style: decimal; padding-inline-start: 24px; }
.example { border-radius: 12px; padding: 8px 12px; margin-top: 4px; background: rgba(234, 180, 99, 0.28); font-weight: 700; }

.footer { background: var(--night); border-top: 2px solid var(--rim); padding: 28px 18px 110px; }
.footer-in { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; justify-content: center; text-align: center; font-size: 16px; }
.footer-logo { width: 110px; }
.soon { color: var(--muted); }
.badge { display: inline-block; padding: 1px 11px; border-radius: 99px; border: 1px solid rgba(191, 227, 196, 0.35); font-weight: 700; color: var(--cream); }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.legal-links a { padding: 10px 0; }
.copy { color: var(--muted); padding: 8px 0; }

.dock { position: fixed; z-index: 4; inset: auto 0 0; display: flex; gap: 10px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); background: var(--night); border-top: 2px solid var(--rim); }
.dock .key { flex: 1; padding: 2px 8px; }

@media (max-width: 999px) {
  .sec > .title, .sec > .lead, .also { text-align: center; text-wrap: balance; }
}
/* Desktop: the cover stays at the side while the deck scrolls. */
@media (min-width: 600px) and (max-width: 999px) {
  .main { padding: 0 32px 20px; }
  .deck { gap: 16px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .laws { grid-template-columns: 1fr 1fr; gap: 22px 30px; }
  .extras { grid-template-columns: 1fr 1fr; }
  .packs { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: max(400px, calc((100vw - 1480px) / 2 + 420px)) minmax(0, 1fr); }
  .cover-in { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; max-width: 420px; margin-inline-start: auto; padding: 24px 34px; display: flex; flex-direction: column; justify-content: center; }
  .cover { overflow: clip; }
  .cover .logo { width: 210px; }
  .cover-line { font-size: 34px; }
  .acts { width: 100%; }
  .main { padding: 18px 40px 60px; max-width: 1100px; }
  .sec { padding-top: 46px; }
  .sec:first-child { padding-top: 24px; }
  .title { font-size: 42px; }
  .lead { font-size: 20px; }
  .deck { gap: 18px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .deck .card { padding: 24px 12px 22px; border-radius: 18px; }
  .deck .card::before { inset: 6px; border-radius: 13px; }
  .deck .card b { font-size: 21px; }
  .deck .card .pitch { display: block; margin-top: 3px; font-size: 15px; line-height: 1.35; color: #43330F; text-wrap: balance; }
  .deck .card .no { font-size: 24px; top: 15px; right: 16px; }
  .deck .card .no.low { display: block; top: auto; right: auto; bottom: 13px; left: 16px; transform: rotate(180deg); }
  .cover .talk { width: 100%; }
  .sheet { padding: 20px 30px 22px; }
  .sheet .title { font-size: 32px; }
  .steps { gap: 24px; margin-top: 14px; }
  .steps h3 { font-size: 21px; }
  .peek { height: 172px; max-width: 220px; margin: 0 auto; border-bottom: 0; border-radius: 22px 22px 0 0; }
  .glow { padding-block: 84px 34px; }
  .glow p { font-size: 42px; }
  .qas { grid-template-columns: 1fr 1fr; align-items: start; gap: 10px 14px; }
  .trio { height: 330px; }
  .trio span { width: 220px; }
  .extras { grid-template-columns: 1fr 1fr; }
  .packs { grid-template-columns: repeat(8, 1fr); gap: 14px; }
  .packs img { width: 74px; }
  .packs b { font-size: 18px; }
  .laws { grid-template-columns: 1fr 1fr; gap: 24px 40px; }
  .laws img { width: 60px; }
  .dock { display: none; }
  .footer { padding-bottom: 28px; }
  .footer-in { justify-content: space-between; }
}
@media (min-width: 1000px) and (max-width: 1359px) {
  .deck { gap: 14px; }
  .deck .card .pitch { display: none; }
  .deck .card b { font-size: 18px; }
  .sheet { padding-inline: 16px; }
  .steps h3 { font-size: 18px; }
  .steps { gap: 12px; }
}
@media (hover: hover) {
  .deck .card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 14px 22px rgba(0, 0, 0, 0.45); }
}
@media (min-width: 1000px) and (max-height: 760px) {
  .cover .logo { width: 110px; }
  .cover .talk { margin-top: 18px; }
  .bubble { min-height: 88px; }
  .cover-in { padding-block: 14px; }
  .acts { gap: 8px; margin-top: 10px; }
}

/* ---------- The card that opens: it grows out of its place, turns over, and plays its game. ---------- */
.show { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: var(--ink); touch-action: pan-y; }
.show::backdrop { background: rgba(4, 20, 8, 0); transition: background 0.4s; }
.show.up::backdrop { background: rgba(4, 20, 8, 0.84); }
.lift { position: absolute; perspective: 1800px; }
.turn { position: absolute; inset: 0; transform-style: preserve-3d; }
.lift, .turn { transition: 0.62s cubic-bezier(0.2, 0.8, 0.2, 1); transition-property: left, top, width, height, transform; }
.show.up .turn { transform: rotateY(180deg); }
.side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front .card { width: 100%; height: 100%; aspect-ratio: auto; }
.bk {
  transform: rotateY(180deg); display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 14px; border-radius: 24px;
  background: linear-gradient(var(--paper-light), var(--paper)); border-bottom: 6px solid var(--paper-edge); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.bars { display: flex; gap: 6px; }
.bars button { flex: 1; height: 24px; display: grid; align-items: center; }
.bars i { display: block; height: 6px; border-radius: 9px; overflow: hidden; background: rgba(194, 166, 115, 0.5); }
.bars i::after { content: ''; display: block; height: 100%; width: 100%; border-radius: 9px; background: #8A5F16; transform: scaleX(0); transform-origin: right; }
.bars .done i::after { transform: none; }
.bars .now i::after { animation: bar var(--step) linear both; }
@keyframes bar { to { transform: none; } }
.hd { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.hd img { width: 46px; }
.hd h2 { flex: 1; font: 700 23px/1.2 var(--display); outline: 0; }
.ic { flex: none; width: 44px; height: 44px; display: grid; place-content: center; border-radius: 50%; background: rgba(138, 95, 22, 0.16); }
.ic svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ic path[class] { display: none; }
.show[data-state='run'] .p-pause, .show[data-state='hold'] .p-play, .show[data-state='end'] .p-again { display: inline; }
.p-play { fill: var(--ink); }
.scene { flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: 18px; color: var(--cream); background: radial-gradient(ellipse at 50% 0%, var(--felt-light), var(--felt)); cursor: pointer; }
.sc { position: absolute; inset: auto 16px auto; top: 50%; transform: translateY(-50%) scale(var(--fit, 1)); text-align: center; }
.say { flex: none; min-height: 66px; display: grid; place-content: center; text-align: center; font: 700 24px/1.35 var(--display); text-wrap: balance; }
.more { align-self: center; min-height: 44px; padding: 0 14px; font-weight: 700; font-size: 17px; color: #5C3A08; text-decoration: underline; text-underline-offset: 5px; margin: -8px 0; }
.full { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px; font-size: 18px; line-height: 1.65; }
.full h4 { color: var(--paper-muted); }
.full h4:first-child { margin-top: 0; }
.nav { display: flex; gap: 10px; align-items: center; }
.nav .key { flex: 1; min-height: 56px; padding: 2px 8px; font-size: 24px; border-bottom-width: 5px; }
.ar { width: 56px; height: 56px; border-radius: 16px; }
.show.text .scene, .show.text .say, .show.text .bars, .show.text [data-pause] { display: none; }
.show.text .bk { padding-top: 14px; }

/* A phone on its side: the scene beside the words. */
@media (max-height: 520px) and (min-width: 560px) {
  .bk { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 24px auto 1fr auto auto; gap: 6px 14px; padding: 8px 14px 12px; }
  .scene, .full { grid-column: 1; grid-row: 1 / -1; }
  .bars, .hd, .say, .more, .nav { grid-column: 2; }
  .more { justify-self: center; margin: 0; }
  .show.text .bk { grid-template-rows: auto auto 1fr auto; }
}

/* Scenes */
.sc .big { width: 108px; margin: 0 auto 14px; }
.q { background: var(--paper); color: var(--ink); border-radius: 16px; border-bottom: 5px solid var(--paper-edge); box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3); padding: 12px 14px; font: 700 24px/1.4 var(--display); rotate: -1deg; margin-bottom: 12px; text-wrap: balance; }
.who { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; }
.who img { width: 64px; }
.rows { display: grid; gap: 8px; }
.rows li { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 11px; text-align: start; font-weight: 700; font-size: 17px; line-height: 1.2; border-radius: 13px; background: #11311A; border: 2px solid var(--rim); border-bottom: 4px solid var(--panel-edge); }
.rows i { flex: none; width: 25px; height: 25px; border-radius: 50%; display: grid; place-content: center; background: var(--amber); color: var(--ink); font: 700 16px/1 var(--display); }
.rows span { flex: 1; min-width: 0; }
.rows .hit, .seat.hit, .link.hit { background: #4F5E33; border-color: var(--amber); }
.rows .up { position: relative; z-index: 2; animation: up 2s 0.7s both ease-in-out; }
.rows .down { animation: down 0.5s 1.7s both ease-in-out; }
@keyframes up { 20% { transform: scale(1.04) rotate(-2deg); background: #2C6136; } 75% { transform: translateY(-104px) scale(1.04) rotate(-2deg); background: #2C6136; } 100% { transform: translateY(-104px); } }
@keyframes down { to { transform: translateY(52px); } }
.swap s { grid-area: 1 / 1; text-decoration: none; }
.swap s:first-child { animation: out 0.01s 2.1s both; }
.swap s:last-child { animation: show 0.01s 2.1s both; }
@keyframes out { to { opacity: 0; } }
@keyframes show { from { opacity: 0; } }
.pts { flex: none; display: inline-block; padding: 1px 11px; border-radius: 99px; background: var(--amber); color: var(--ink); font: 700 18px/1.5 var(--display); }
.pts.soft { background: var(--paper); }
.pts.none { background: transparent; color: var(--muted); }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seat { position: relative; min-height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 6px; border-radius: 16px; background: #11311A; border: 2px solid var(--rim); border-bottom: 4px solid var(--panel-edge); }
.seat > img { width: 76px; }
.seat > b:not([class]) { font: 700 19px/1.2 var(--display); }
.seat .crown { position: absolute; top: -14px; width: 44px; }
.seat .mark { width: 30px; }
.tag { padding: 2px 10px; border-radius: 10px; background: var(--paper); color: var(--ink); font: 700 18px/1.4 var(--display); }
.tag.amber { background: var(--amber); }
.bubble { display: inline-block; padding: 4px 11px; border-radius: 13px; background: var(--cream); color: var(--ink); font: 700 17px/1.35 'Mada'; }
.bubble.huge { font: 700 40px/1.4 var(--display); padding: 4px 30px; border-radius: 20px; }
.votes { display: inline-flex; gap: 2px; min-height: 32px; justify-content: center; }
.votes img { width: 32px; }
.boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.box { position: relative; aspect-ratio: 0.82; display: grid; place-content: center; border-radius: 10px; border: 2px solid rgba(191, 227, 196, 0.5); background: rgba(191, 227, 196, 0.12); font: 700 19px/1 var(--display); color: rgba(191, 227, 196, 0.7); }
.flip { position: absolute; inset: -2px; display: grid; place-content: center; border-radius: 10px; background: var(--paper); border-bottom: 4px solid var(--paper-edge); color: var(--ink); font: 700 28px/1 var(--display); animation: flip 0.4s var(--d, 0s) both; }
@keyframes flip { from { transform: rotateY(90deg); } }
.field { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px; padding: 4px 14px; border-radius: 14px; background: #11311A; border: 2px solid var(--rim); border-bottom: 4px solid var(--panel-edge); text-align: start; }
.field small { flex: none; font-size: 15px; color: var(--muted); }
.field span { flex: 1; font: 700 22px/1.3 var(--display); }
.typed { display: inline-block; animation: type 0.8s var(--d, 0s) steps(8) both; }
@keyframes type { from { clip-path: inset(-10px 0 -10px 100%); } to { clip-path: inset(-10px 0 -10px 0); } }
.letter { width: 96px; height: 96px; margin: 0 auto 10px; display: grid; place-content: center; border-radius: 20px; background: var(--amber); border-bottom: 6px solid var(--amber-edge); color: var(--ink); font: 700 58px/1 var(--display); }
.pair { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pair > b:not([class]) { width: 52px; height: 56px; display: grid; place-content: center; border-radius: 13px; background: var(--paper); border-bottom: 4px solid var(--paper-edge); color: var(--ink); font: 700 30px/1 var(--display); }
.pair span { flex: 1; min-height: 56px; display: grid; place-content: center; border-radius: 13px; border: 2px dashed rgba(191, 227, 196, 0.45); font: 700 25px/1 var(--display); }
.pair .typed { border: 0; min-height: 0; }
.chain { display: grid; gap: 7px; }
.link { position: relative; justify-self: start; min-width: 62%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 14px; border-radius: 14px; background: var(--paper); border: 2px solid transparent; border-bottom: 4px solid var(--paper-edge); color: var(--ink); font: 700 23px/1.2 var(--display); }
.link:nth-child(even) { justify-self: end; }
.link.start { background: var(--amber); border-bottom-color: var(--amber-edge); }
.link.hit { color: var(--cream); }
.link em { font-style: normal; color: #7A5A1E; }
.two { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.two .q { min-height: 150px; margin: 0; display: grid; place-content: center; justify-items: center; gap: 8px; rotate: 0deg; }
.two i { font: 700 20px/1 var(--display); font-style: normal; color: var(--amber); }
.q.win { background: var(--amber); border-bottom-color: var(--amber-edge); }
.q.win .pts { background: var(--ink); color: var(--amber); }
.q.lose { opacity: 0.55; }
.nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.nums b { aspect-ratio: 1; display: grid; place-content: center; border-radius: 13px; background: #11311A; border: 2px solid var(--rim); font: 700 24px/1 var(--display); }
.nums .pick { animation: pick 0.4s var(--d) both; }
@keyframes pick { to { background: var(--amber); color: var(--ink); transform: scale(1.12); } }
.sc .line { font: inherit; display: grid; gap: 8px; }
.sc .line p { display: flex; align-items: center; gap: 8px; }
.sc .line p > b:not([class]) { width: 34px; height: 34px; flex: none; display: grid; place-content: center; border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 20px/1 var(--display); }
.sc .line p::after { content: ''; order: 2; height: 12px; border-radius: 9px; background: rgba(234, 180, 99, 0.6); width: calc(var(--x) * 5%); }
.sc .line img { width: 44px; order: 1; }
.sc .line .pts { order: 4; margin-inline-start: auto; }
.sc .line u { justify-self: center; text-decoration: none; padding: 4px 18px; border-radius: 99px; background: var(--amber); color: var(--ink); font: 700 22px/1.4 var(--display); margin-top: 6px; }
.prices { display: grid; gap: 8px; }
.prices li { display: flex; align-items: center; gap: 12px; padding: 4px 12px; border-radius: 14px; background: #11311A; border: 2px solid var(--rim); }
.prices img { width: 46px; }
.prices li > b:nth-of-type(1) { flex: 1; text-align: start; font: 700 22px/1.3 var(--display); }
.sc .in { animation: in 0.42s var(--d, 0s) both cubic-bezier(0.2, 1.4, 0.4, 1); }
.sc .pop { animation: in 0.5s var(--d, 0s) both cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes in { from { opacity: 0; transform: translateY(16px) scale(0.85); } }
.show[data-state='hold'] .sc *, .show[data-state='hold'] .bars i::after { animation-play-state: paused; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes deal { from { opacity: 0; transform: translateY(40px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lift, .turn, .show::backdrop, .key, .deck .card { transition: none; }
  .sc *, .bars i::after { animation-duration: 0.01s !important; animation-delay: 0s !important; }
}
@media (max-width: 419px) {
  .sheet { padding-inline: 10px; }
  .steps { gap: 6px; }
  .steps h3 { font-size: 16px; }
  .steps i { width: 22px; height: 22px; margin-inline-end: 3px; font-size: 14px; }
}
@media (max-width: 339px) { .steps i { display: none; } }
