/* Clean landing family: header, stage overlays, paywall sheet, footer. Palette from the portal. */
:root {
  --bg: #0a1f1b;
  --bg2: #10302a;
  --ink: #eafff6;
  --mute: #9cc7b9;
  --mint: #75f0bd;
  --amber: #ffc247;
  --coral: #ff7a59;
  --hdr: 46px;
  --strip: 52px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overscroll-behavior: none; }
body {
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.hdr {
  height: var(--hdr); display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 12px; background: var(--bg); position: relative; z-index: 5;
  border-bottom: 1px solid rgba(117, 240, 189, .14);
}
.brand { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 17px; letter-spacing: .2px; text-decoration: none; pointer-events: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--mint); box-shadow: 0 0 10px rgba(117, 240, 189, .7); transform: rotate(45deg); }
.chip {
  display: flex; flex-direction: column; justify-content: center; text-align: right;
  min-height: 36px; padding: 3px 11px; border-radius: 10px; text-decoration: none; line-height: 1.12;
  background: linear-gradient(180deg, #ffd06a, var(--amber)); color: #2a1c00;
}
.chip b { font-size: 13px; font-weight: 800; }
.chip span { font-size: 11px; font-weight: 600; opacity: .85; }

/* ---------- stage ---------- */
.stage {
  position: relative; width: 100%; overflow: hidden; background: #0d2a25;
  height: calc(100vh - var(--hdr) - var(--strip));
  height: calc(100svh - var(--hdr) - var(--strip));
  min-height: 360px; max-height: 900px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.stage.locked { touch-action: pan-y; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hud { position: absolute; inset: 0; pointer-events: none; font-weight: 800; }
.score {
  position: absolute; top: 8px; left: 12px; font-size: 30px; line-height: 1; letter-spacing: .5px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 0 14px rgba(0, 0, 0, .45);
  font-variant-numeric: tabular-nums; transform-origin: 0 50%;
}
.score small { font-size: 14px; margin-left: 3px; opacity: .8; }
.score.pop { animation: pop .14s ease-out; }
@keyframes pop { from { transform: scale(1.3); } to { transform: scale(1); } }
.best { position: absolute; top: 40px; left: 13px; font-size: 12px; color: var(--mute); text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.mult {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 18px; color: var(--amber);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4); font-style: italic;
}
.mult.pop { animation: pop .18s ease-out; }
.snd {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); pointer-events: auto; display: grid; place-items: center; cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
}
.snd svg { fill: currentColor; }
.snd .snd-off { display: none; }
.snd[aria-pressed="false"] .snd-wave { display: none; }
.snd[aria-pressed="false"] .snd-off { display: block; }

.prog {
  position: absolute; top: 62px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; pointer-events: none;
}
.prog-label { text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.prog-bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .4); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.prog-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--amber)); border-radius: 4px; }

/* hint: swipe hand */
.hint { position: absolute; left: 0; right: 0; top: 22%; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; }
.hint-txt {
  font-size: 21px; font-weight: 800; text-shadow: 0 2px 0 rgba(0, 0, 0, .45), 0 0 18px rgba(0, 0, 0, .55);
  padding: 6px 14px; border-radius: 12px; background: rgba(6, 20, 17, .45); letter-spacing: .2px;
}
.hint.big .hint-txt { font-size: 26px; }
.hand {
  position: relative; width: 150px; height: 64px;
}
.hand::before, .hand::after { /* arrows */
  content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -11px; opacity: .75;
  border: 11px solid transparent;
}
.hand::before { left: 0; border-right: 16px solid var(--mint); border-left: 0; }
.hand::after { right: 0; border-left: 16px solid var(--mint); border-right: 0; }
.hand i {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #d8fff0 55%, rgba(117, 240, 189, .85));
  box-shadow: 0 0 0 6px rgba(117, 240, 189, .28), 0 4px 14px rgba(0, 0, 0, .45);
  animation: swipeh 1.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
.hint.up .hand { width: 64px; height: 130px; }
.hint.up .hand::before { left: 50%; top: 0; margin: 0 0 0 -11px; border: 11px solid transparent; border-bottom: 16px solid var(--mint); border-top: 0; right: auto; }
.hint.up .hand::after { left: 50%; right: auto; top: auto; bottom: auto; display: none; }
.hint.up .hand i { animation: swipev 1.2s cubic-bezier(.3, 0, .4, 1) infinite; }
@keyframes swipeh { 0% { transform: translateX(-46px); opacity: 0; } 15% { opacity: 1; } 50% { transform: translateX(46px); } 85% { opacity: 1; } 100% { transform: translateX(-46px); opacity: 0; } }
@keyframes swipev { 0% { transform: translateY(40px); opacity: 0; } 20% { opacity: 1; } 75% { transform: translateY(-40px); opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }

.toast {
  position: absolute; left: 0; right: 0; top: 26%; text-align: center; font-size: 28px; font-weight: 900; font-style: italic;
  color: var(--amber); text-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 0 20px rgba(0, 0, 0, .4); pointer-events: none; opacity: 0;
}
.toast.show { animation: toast .9s ease-out forwards; }
.toast.warn { color: var(--coral); }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.12); } 30% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scale(1); } }

.banner {
  position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 34px; font-weight: 900; font-style: italic;
  color: #fff; text-shadow: 0 4px 0 var(--coral), 0 0 26px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0; letter-spacing: .3px;
}
.banner.show { animation: banner 2.1s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: scale(.4) rotate(-4deg); } 12% { opacity: 1; transform: scale(1.18) rotate(-2deg); } 22% { transform: scale(1) rotate(-2deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05) rotate(-2deg) translateY(-18px); } }

.pn {
  position: absolute; transform: translate(-50%, 0); font-weight: 900; font-size: 20px; color: var(--amber);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5); pointer-events: none; opacity: 0;
}
.pn.go { animation: pn .7s ease-out forwards; }
@keyframes pn { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -8px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }

.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .3; } 100% { opacity: 0; } }

.pause {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 16, 14, .6); text-align: center;
  font-size: 22px; font-weight: 800; cursor: pointer;
}

/* ---------- paywall sheet ---------- */
.sheet {
  position: absolute; inset: 0; display: flex; align-items: flex-end; background: rgba(4, 14, 12, .58);
  touch-action: pan-y; animation: dim .25s ease-out;
}
@keyframes dim { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  position: relative; width: 100%; max-height: 100%; overflow-y: auto; padding: 14px 16px 16px; text-align: center;
  background: linear-gradient(180deg, #123a32, #0b2520); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(117, 240, 189, .3);
  animation: rise .34s cubic-bezier(.2, .9, .25, 1);
}
@keyframes rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
.sheet-x {
  position: absolute; top: 2px; right: 2px; width: 48px; height: 48px; border: 0; background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer; border-radius: 50%; opacity: .9;
}
.pw-result { margin: 6px 40px 0; font-size: 15px; font-weight: 700; color: var(--mute); }
.pw-result b { color: var(--amber); font-size: 22px; }
.pw-record { margin: 2px 0 0; font-size: 12px; color: var(--mute); }
.pw-title { margin: 8px 6px 10px; font-size: 21px; line-height: 1.18; font-weight: 800; }
.pw-tiles { display: flex; gap: 8px; justify-content: center; margin: 4px 0 6px; }
.pw-tiles i {
  width: 62px; height: 62px; border-radius: 14px; position: relative; overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.pw-tiles i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; background: rgba(255, 255, 255, .85); }
.pw-tiles .t1 { background: linear-gradient(135deg, #2f7dff, #7d4dff); } .pw-tiles .t1::after { border-radius: 50%; }
.pw-tiles .t2 { background: linear-gradient(135deg, #ff8a3d, #ff4d6d); } .pw-tiles .t2::after { border-radius: 6px; transform: rotate(45deg); }
.pw-tiles .t3 { background: linear-gradient(135deg, #1fd38a, #0fa3a3); } .pw-tiles .t3::after { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pw-tiles .t4 { background: linear-gradient(135deg, #ffc247, #ff7a59); } .pw-tiles .t4::after { border-radius: 4px; }
.pw-more { margin: 2px 0 12px; font-size: 13px; color: var(--mute); }
.cta {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px;
  font-size: 19px; font-weight: 900; letter-spacing: .3px; text-decoration: none; color: #0a1f1b;
  background: linear-gradient(180deg, #92ffd0, var(--mint)); box-shadow: 0 4px 0 #2e9f78, 0 10px 24px rgba(117, 240, 189, .28);
  animation: cta 1.8s ease-in-out infinite;
}
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #2e9f78; animation: none; }
@keyframes cta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.pw-terms { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.35; color: #d3efe6; }
.pw-pix { margin: 6px 0 0; font-size: 12.5px; color: var(--mute); }
.pw-again {
  margin-top: 6px; min-height: 46px; padding: 0 18px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.sheet.compact .pw-title, .sheet.compact .pw-tiles, .sheet.compact .pw-more { display: none; }
.sheet.compact .pw-result { margin-top: 8px; }
.sheet.compact .cta { margin-top: 12px; }

/* ---------- strip + info + footer ---------- */
.strip {
  height: var(--strip); display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 12px; background: var(--bg2); color: #d3efe6; text-decoration: none; font-size: 12.5px; line-height: 1.3;
  border-top: 1px solid rgba(117, 240, 189, .18);
}
.strip-txt { flex: 1; }
.strip svg { flex: none; opacity: .8; }
.info { padding: 22px 16px 6px; color: #d3efe6; }
.info h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.info p { margin: 0 0 10px; font-size: 14px; }
.foot { padding: 14px 16px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(117, 240, 189, .14); margin-top: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-block; padding: 10px 0; font-size: 14px; color: var(--mint); }
.foot-note { margin: 10px 0 0; font-size: 12px; color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  .cta, .hand i { animation: none; }
  .flash.go { animation: none; }
}
@media (min-width: 481px) {
  body { border-left: 1px solid rgba(117, 240, 189, .12); border-right: 1px solid rgba(117, 240, 189, .12); }
}
