@font-face { font-family: "Lucky"; src: url("../assets/fonts/Luckiest.ttf"); font-display: swap; }
@font-face { font-family: "Fred"; src: url("../assets/fonts/Fredoka.ttf"); font-display: swap; }

:root { --alt: 0; --r: 22px; }
body[data-theme="cosmic"]   { --sky0: #3b7dd8; --sky1: #1a2a6c; --space: #07061a; --ink: #f4f1ff; --mute: #a9a3d6; --card: rgba(20,16,58,.82); --line: rgba(255,255,255,.14); --accent: #ff4f8b; --accent2: #ffd23f; --btn-ink: #1b1035; }
body[data-theme="daylight"] { --sky0: #bfe7ff; --sky1: #7ec8ff; --space: #2b3a8f; --ink: #1b1035; --mute: #55508a; --card: rgba(255,255,255,.9); --line: rgba(27,16,53,.14); --accent: #ff3d7f; --accent2: #ffb400; --btn-ink: #1b1035; }
body[data-theme="sunset"]   { --sky0: #ffb36b; --sky1: #d9487d; --space: #1e0b2e; --ink: #fff6ee; --mute: #f2c6d8; --card: rgba(46,12,52,.8); --line: rgba(255,255,255,.18); --accent: #ffd23f; --accent2: #7df9ff; --btn-ink: #2a0b26; }
body[data-theme="contrast"] { --sky0: #000; --sky1: #000; --space: #000; --ink: #fff; --mute: #fff; --card: #000; --line: #fff; --accent: #ffff00; --accent2: #00ffff; --btn-ink: #000; }
body[data-size="s"] { font-size: 15px; } body[data-size="m"] { font-size: 17px; }
body[data-size="l"] { font-size: 19px; } body[data-size="xl"] { font-size: 22px; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Fred", system-ui, sans-serif; color: var(--ink); background: var(--space); overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }

/* sky: blends from blue sky to space as --alt goes 0 -> 1 */
#sky { position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, var(--space) calc(-60% + var(--alt) * 160%), var(--sky1) calc(10% + var(--alt) * 120%), var(--sky0) calc(70% + var(--alt) * 100%));
  transition: background 1.2s ease; }
#stars { position: absolute; inset: 0; opacity: calc(.15 + var(--alt) * .85); transition: opacity 1.2s; }
#stars i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; animation: tw var(--d) ease-in-out infinite alternate; }
@keyframes tw { from { opacity: .25 } to { opacity: 1 } }
#planet { position: absolute; right: -90px; bottom: calc(-240px + var(--alt) * 300px); width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe3a3, #ff9f6b 45%, #b8476d 75%, #4a1d4f); box-shadow: 0 0 80px rgba(255,180,120,.35);
  opacity: calc(var(--alt) * .55); transition: bottom 1.2s, opacity 1.2s; }
body[data-theme="contrast"] #planet, body[data-theme="contrast"] #stars { display: none; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; max-width: 760px; margin: 0 auto; }
.brand { text-align: center; line-height: 1; }
.brand .b1 { display: block; font-family: "Lucky"; font-size: 2rem; letter-spacing: 2px; color: var(--accent2); -webkit-text-stroke: 1.5px rgba(0,0,0,.35); }
.brand .b2 { display: block; font-size: .72rem; color: var(--mute); letter-spacing: .5px; margin-top: 3px; }
.top-right { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--accent2); }

main { max-width: 640px; margin: 0 auto; padding: 0 14px 40px; }
.screen { display: none; animation: in .35s ease; } .screen.active { display: block; }
@keyframes in { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.reduced * { animation: none !important; transition: none !important; }
h1 { font-family: "Lucky"; font-size: 2.3rem; letter-spacing: 1px; margin: .2em 0; line-height: 1.05; }
h2 { font-family: "Lucky"; font-size: 1.7rem; letter-spacing: 1px; margin: .6em 0 .3em; }
h3 { font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--mute); margin: 1.2em 0 .5em; }
.sub { color: var(--mute); line-height: 1.45; }
.fine { font-size: .8rem; color: var(--mute); }

/* home */
.hero { text-align: center; padding: 10px 0 6px; }
.mascot { width: 150px; filter: drop-shadow(0 10px 0 rgba(0,0,0,.25)); }
.bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-4deg) } }
.nomascot .mascot, .nomascot .rocket img { visibility: hidden; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.mode { text-align: left; padding: 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); cursor: pointer; display: grid; gap: 3px; transition: transform .15s, border-color .15s; }
.mode:hover { transform: translateY(-3px); border-color: var(--accent2); }
.mode.daily { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent), #8a4bff); border: none; color: #fff; }
.mi { font-size: 1.6rem; } .mt { font-family: "Lucky"; font-size: 1.35rem; letter-spacing: 1px; } .md { font-size: .85rem; opacity: .85; }
.streak { text-align: center; margin-top: 14px; color: var(--mute); }

.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pack { padding: 18px 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); cursor: pointer; text-align: left; display: grid; gap: 4px; }
.pack:hover { border-color: var(--accent2); } .pack small { color: var(--mute); }

.pl { display: flex; gap: 8px; margin-bottom: 8px; }
.pl input { flex: 1; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); }
.row { display: flex; gap: 10px; justify-content: center; margin: 14px 0; } .row.wrap { flex-wrap: wrap; justify-content: flex-start; }

/* buttons */
.btn { padding: 13px 22px; border-radius: 16px; border: none; cursor: pointer; font-family: "Lucky"; letter-spacing: 1px; font-size: 1.05rem;
  background: var(--accent2); color: var(--btn-ink); box-shadow: 0 5px 0 rgba(0,0,0,.3); transition: transform .1s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.danger { background: #ff5a6e; color: #fff; }
.btn.small { padding: 9px 16px; font-size: .9rem; }
.btn:disabled { opacity: .5; }
.hide { display: none !important; }

/* game */
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 12px; }
.hud-box { display: grid; } .hud-box.r { text-align: right; }
.hl { font-size: .68rem; letter-spacing: 2px; color: var(--mute); } .hv { font-family: "Lucky"; font-size: 1.5rem; letter-spacing: 1px; }
.hud-mid { text-align: center; display: grid; gap: 4px; justify-items: center; }
#dots { display: flex; gap: 4px; } .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--line); border: 1px solid var(--line); }
.dot.cur { outline: 2px solid var(--accent2); }
.track { position: fixed; left: max(8px, calc(50% - 360px)); top: 90px; bottom: 30px; width: 10px; border-radius: 10px; background: var(--line); z-index: 1; }
.track-fill { position: absolute; bottom: 0; left: 0; right: 0; height: 0; border-radius: 10px; background: linear-gradient(0deg, var(--accent), var(--accent2)); transition: height 1s cubic-bezier(.2,.8,.2,1); }
.rocket { position: absolute; left: -26px; bottom: calc(var(--alt) * (100% - 60px)); width: 62px; transition: bottom 1s cubic-bezier(.2,.8,.2,1); }
.rocket img { width: 62px; transform: rotate(-90deg); filter: drop-shadow(0 4px 0 rgba(0,0,0,.3)); }
.flame { position: absolute; left: 22px; bottom: -14px; width: 18px; height: 22px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(#fff6b0, #ffb400 50%, #ff4f8b); opacity: 0; }
.rocket.boost .flame { animation: flame .9s ease-out; } @keyframes flame { 0%,70% { opacity: 1; transform: scaleY(1.6) } 100% { opacity: 0 } }
@media (max-width: 760px) { .track { display: none; } }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 18px 20px; backdrop-filter: blur(6px); }
.prompt-card .pk { font-size: .72rem; letter-spacing: 3px; color: var(--accent); font-weight: 700; }
.prompt-card .pq { font-family: "Lucky"; font-size: 2rem; letter-spacing: .5px; line-height: 1.1; margin: 6px 0 4px; }
.prompt-card .ph { font-size: .8rem; color: var(--mute); }
.pop { animation: pop .45s cubic-bezier(.2,1.4,.4,1); } @keyframes pop { from { transform: scale(.9); opacity: 0 } }
.turn { display: none; margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--accent); color: #fff; text-align: center; }
.turn.on { display: block; }

.answer { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 16px; }
.answer input { width: 100%; padding: 16px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-size: 1.15rem; outline: none; }
.answer input:focus { border-color: var(--accent2); }
.timer { position: relative; width: 54px; height: 54px; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tbg { fill: none; stroke: var(--line); stroke-width: 4; } .tfg { fill: none; stroke: var(--accent2); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.timer span { font-family: "Lucky"; font-size: 1.2rem; }
.timer.low .tfg { stroke: #ff5a6e; } .timer.low span { color: #ff5a6e; animation: throb .5s infinite alternate; }
@keyframes throb { to { transform: scale(1.2) } }
.timer.off .tfg { stroke: var(--line); }
.btn.go { padding: 16px 18px; }
.msg { min-height: 1.4em; text-align: center; margin-top: 8px; color: var(--accent2); }
.game-actions { justify-content: space-between; }

.reveal { display: none; margin-top: 14px; } .reveal.on { display: block; animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.rv-row { text-align: center; padding: 6px 0 12px; border-bottom: 1px dashed var(--line); }
.rv-row:last-of-type { border-bottom: none; }
.rv-who { font-size: .8rem; letter-spacing: 2px; color: var(--mute); text-transform: uppercase; }
.rv-ans { font-size: 1.4rem; margin-top: 8px; text-transform: capitalize; } .rv-pts { font-family: "Lucky"; font-size: 1.3rem; color: var(--accent2); }
.rv-pct, .rv-note { font-size: .82rem; color: var(--mute); }
.rv-pass { text-align: center; font-size: 1.4rem; padding: 18px 0; }
.badge { display: inline-flex; gap: 6px; align-items: center; font-family: "Lucky"; letter-spacing: 2px; font-size: 1.25rem; color: var(--c); text-shadow: 0 0 18px var(--c); }
.badge .cbm { display: none; font-family: "Fred"; } .cb .badge .cbm { display: inline; }
.rv-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; text-align: left; }
.rv-lists h4 { margin: 0 0 6px; font-size: .72rem; letter-spacing: 2px; color: var(--mute); text-transform: uppercase; }
.rv-lists ol { margin: 0; padding-left: 18px; font-size: .9rem; } .rv-lists li { margin: 2px 0; }
.rv-lists li span { text-transform: capitalize; } .rv-lists em { font-style: normal; color: var(--mute); font-size: .75rem; margin-left: 6px; }

/* results */
.res-head { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 10px; }
.res-head .mascot { width: 110px; }
.res-stage { font-size: .85rem; letter-spacing: 2px; color: var(--mute); text-transform: uppercase; }
.res-score { font-family: "Lucky"; font-size: 3.6rem; line-height: 1; } .res-score small { font-size: 1.3rem; color: var(--mute); }
.grid-emoji { text-align: center; font-size: 2rem; letter-spacing: 4px; margin: 14px 0 0; }
.cb .grid-emoji { font-family: "Fred"; font-size: 1.8rem; }
.pl-row { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); margin: 6px 0; font-size: 1rem; letter-spacing: 0; }
.review { margin-top: 8px; } .rev { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rq { font-size: .85rem; color: var(--mute); } .ra { margin-top: 3px; text-transform: capitalize; } .ra .badge { text-transform: none; } .ra .badge { font-size: .9rem; margin: 0 6px; }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(5,4,20,.6); display: none; align-items: flex-end; justify-content: center; z-index: 50; backdrop-filter: blur(3px); }
.modal.on { display: flex; }
.sheet { width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--space); border: 2px solid var(--line); border-bottom: none; border-radius: 26px 26px 0 0; animation: up .3s ease; }
body[data-theme="daylight"] .sheet { background: #f4f8ff; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 26px; border-bottom: 2px solid var(--line); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 0; }
.sheet-head h2 { margin: .4em 0; }
.sheet-body { overflow: auto; padding: 0 18px 22px; line-height: 1.45; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set span small { display: block; font-size: .75rem; color: var(--mute); }
.set-col { flex-direction: column; align-items: flex-start; }
.set select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); max-width: 55%; }
.set input[type=range] { width: 45%; accent-color: var(--accent2); }
.sw { position: relative; width: 50px; height: 28px; flex: none; } .sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; border-radius: 20px; background: var(--line); cursor: pointer; transition: background .2s; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw input:checked + span { background: var(--accent); } .sw input:checked + span::after { transform: translateX(22px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 20px; border: 1px solid var(--line); font-size: .85rem; cursor: pointer; }
.chip input { accent-color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.stat-grid b { display: block; font-family: "Lucky"; font-size: 1.8rem; } .stat-grid span { font-size: .7rem; color: var(--mute); }
.bar { display: grid; grid-template-columns: 150px 1fr 34px; gap: 8px; align-items: center; margin: 5px 0; }
.bar .badge { font-size: .85rem; }
.bar i { display: block; height: 12px; border-radius: 6px; width: var(--w); background: var(--c); min-width: 3px; }
.tiers > div { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tiers .badge { font-size: 1rem; } .tiers span { color: var(--mute); font-size: .85rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--accent2); color: var(--btn-ink); padding: 10px 18px; border-radius: 14px; opacity: 0; transition: .25s; z-index: 60; pointer-events: none; font-weight: 600; text-align: center; max-width: 90vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; } .prompt-card .pq { font-size: 1.6rem; }
  .modes { grid-template-columns: 1fr 1fr; } .mode { padding: 13px; }
  .answer { grid-template-columns: auto 1fr; } .btn.go { grid-column: 1 / -1; }
  .rv-lists { grid-template-columns: 1fr; } .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .bar { grid-template-columns: 120px 1fr 30px; }
}

/* light themes: tier colours need contrast on a pale card */
body[data-theme="daylight"] .badge { filter: brightness(.62) saturate(1.6); text-shadow: none; }
body[data-theme="daylight"] .bar i { filter: brightness(.8) saturate(1.4); }

/* ---------- answer bar docked at the bottom ---------- */
#game.active { padding-bottom: 170px; }
.dock { display: none; position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 30;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(5,4,20,.75) 28%, rgba(5,4,20,.92));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
#game.active .dock { display: block; }
body[data-theme="daylight"] .dock { background: linear-gradient(180deg, transparent, rgba(255,255,255,.8) 28%, rgba(255,255,255,.95)); }
.dock-in { max-width: 640px; margin: 0 auto; }
.dock .answer { margin-top: 0; grid-template-columns: auto 1fr auto; }
.dock .btn.go { grid-column: auto; }
.dock .msg { margin: 0 0 6px; min-height: 0; } .dock .msg:empty { display: none; }
.dock .game-actions { margin-top: 8px; } .dock .game-actions .btn { flex: 1; }
.dock .answer.hide + .game-actions { margin-top: 0; }
.dock #btnNext { font-size: 1.15rem; padding: 15px; }
@media (max-width: 480px) { .dock .btn.go { padding: 14px 12px; font-size: .95rem; } .dock .timer { width: 46px; height: 46px; } .dock .answer input { padding: 13px 12px; } }

/* ---------- falling cards ---------- */
.drop { animation: dropIn .6s cubic-bezier(.25,1.45,.45,1); }
@keyframes dropIn { 0% { transform: translateY(-70vh) rotate(-3deg); opacity: 0 } 55% { opacity: 1 } 100% { transform: none } }
.reveal.on { animation: dropIn .55s cubic-bezier(.25,1.4,.45,1); }
.reveal.on .rv-lists li { animation: fallIn .45s cubic-bezier(.25,1.5,.5,1) both; }
.reveal.on .rv-lists li:nth-child(2) { animation-delay: .07s } .reveal.on .rv-lists li:nth-child(3) { animation-delay: .14s }
.reveal.on .rv-lists li:nth-child(4) { animation-delay: .21s } .reveal.on .rv-lists li:nth-child(5) { animation-delay: .28s }
@keyframes fallIn { from { transform: translateY(-40px); opacity: 0 } }
.grid-emoji .ge { display: inline-block; animation: geFall .5s cubic-bezier(.25,1.6,.5,1) both; }
@keyframes geFall { from { transform: translateY(-120px) rotate(-30deg); opacity: 0 } }
.res-score .bump, #resScore.bump { display: inline-block; animation: bump .4s cubic-bezier(.2,1.8,.4,1); }
@keyframes bump { 40% { transform: scale(1.25) } }

/* ---------- launch sequence overlay ---------- */
#flight { display: none; position: fixed; inset: 0; z-index: 55; place-items: center; cursor: pointer;
  background: radial-gradient(ellipse at 50% 110%, rgba(255,120,80,.25), transparent 55%), linear-gradient(180deg, #03021a 0%, #0d0b3a 55%, #1c3f8f 100%); }
#flight.on { display: grid; animation: flIn .2s ease; } #flight.out { animation: flOut .26s ease forwards; }
@keyframes flIn { from { opacity: 0 } } @keyframes flOut { to { opacity: 0; transform: scale(1.04) } }
.fl-shaft { --H: min(66vh, 540px); position: relative; height: var(--H); width: min(94vw, 520px); }
#flight.quake .fl-shaft { animation: quake .45s ease-out; }
@keyframes quake { 15% { transform: translate(-7px, 4px) } 30% { transform: translate(6px, -5px) } 45% { transform: translate(-4px, 3px) } 60% { transform: translate(3px, -2px) } 80% { transform: translate(-1px, 1px) } }
.fl-lv { position: absolute; left: 0; right: 0; bottom: calc((var(--k) + 1) * var(--H) / 7); display: grid; grid-template-columns: 108px 1fr 118px; align-items: center; gap: 8px; transform: translateY(50%); opacity: .45; transition: opacity .2s, transform .2s; }
.fl-name { font-family: "Lucky"; letter-spacing: 1.5px; font-size: .95rem; color: var(--c); text-align: right; }
.fl-place { font-size: .72rem; color: #b9b4e8; letter-spacing: .5px; }
.fl-line { height: 2px; background: repeating-linear-gradient(90deg, var(--c) 0 10px, transparent 10px 18px); opacity: .6; border-radius: 2px; }
.fl-lv.hit { opacity: 1; } .fl-lv.hit .fl-line { opacity: 1; background: var(--c); box-shadow: 0 0 14px var(--c); animation: zap .35s ease-out; }
@keyframes zap { from { transform: scaleX(.2) } }
.fl-lv.here { transform: translateY(50%) scale(1.06); } .fl-lv.here .fl-name { text-shadow: 0 0 16px var(--c); font-size: 1.1rem; }
.fl-pad { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); width: 150px; padding: 6px 0; text-align: center; font-size: .7rem; letter-spacing: 3px; color: #b9b4e8;
  border-top: 4px solid #6c66a8; border-radius: 4px; }
.fl-rocket { --y: 0; position: absolute; left: 50%; bottom: 0; width: 70px; margin-left: -35px; transform: translateY(calc(var(--y) * var(--H) / -7)); z-index: 2; }
.fl-body { position: relative; transform: translateY(-62%); }
.fl-body img { width: 70px; display: block; transform: rotate(-90deg); filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.fl-fire { position: absolute; left: 50%; top: 88%; width: 22px; height: 30px; margin-left: -11px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: radial-gradient(circle at 50% 30%, #fff 0 18%, #ffd23f 35%, #ff6b3d 70%, transparent 72%); opacity: 0; transform-origin: 50% 0; }
.fl-rocket.lit .fl-fire { opacity: 1; animation: fire .09s infinite alternate; }
.fl-rocket.moving .fl-fire { height: 52px; }
@keyframes fire { to { transform: scaleY(1.35) scaleX(.85) } }
.fl-trail { position: absolute; left: 50%; top: 10px; width: 6px; margin-left: -3px; height: 0; border-radius: 3px; background: linear-gradient(180deg, rgba(255,210,63,.9), rgba(255,255,255,.0)); transition: height .3s; }
.fl-rocket.moving .fl-trail { height: 220px; }
.fl-rocket.shake .fl-body { animation: rumble .06s infinite alternate; }
@keyframes rumble { from { transform: translate(-2px, -62%) } to { transform: translate(2px, -61%) } }
.fl-rocket.stall .fl-body { animation: stall .32s ease-in-out; }
@keyframes stall { 30% { transform: translateY(-62%) rotate(-14deg) } 70% { transform: translateY(-62%) rotate(12deg) } }
.fl-rocket.fall .fl-body { animation: tumble .76s linear forwards; }
@keyframes tumble { to { transform: translateY(-62%) rotate(540deg) } }
.fl-stamp { position: fixed; left: 50%; top: 22%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; opacity: 0; z-index: 3; }
.fl-stamp b { display: block; font-family: "Lucky"; font-size: clamp(2.6rem, 11vw, 4.6rem); letter-spacing: 3px; color: var(--c); line-height: 1;
  -webkit-text-stroke: 2px rgba(0,0,0,.45); text-shadow: 0 0 30px var(--c), 0 6px 0 rgba(0,0,0,.35); }
.fl-stamp span { display: block; margin-top: 6px; font-size: 1.2rem; color: #fff; }
.fl-stamp em { display: inline-block; margin-top: 8px; font-style: normal; font-family: "Lucky"; letter-spacing: 1px; padding: 4px 12px; border-radius: 12px; background: var(--c); color: #1b1035; }
.fl-stamp.on { animation: stampDrop .5s cubic-bezier(.3,1.6,.5,1) forwards; }
.fl-stamp.crooked { animation: stampCrooked 1s cubic-bezier(.3,1.5,.5,1) forwards; }
@keyframes stampDrop { 0% { opacity: 0; transform: translate(-50%, -160%) scale(1.8) rotate(-10deg) } 60% { opacity: 1 } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) } }
@keyframes stampCrooked { 0% { opacity: 0; transform: translate(-50%, -180%) rotate(0) } 40% { opacity: 1; transform: translate(-50%, -50%) rotate(0) } 60% { transform: translate(-50%, -46%) rotate(16deg) } 80% { transform: translate(-50%, -48%) rotate(9deg) } 100% { opacity: 1; transform: translate(-50%, -47%) rotate(12deg) } }
.fl-rays { position: absolute; inset: -50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,210,63,.18) 0 8deg, transparent 8deg 20deg); }
#flight.rays .fl-rays { opacity: 1; animation: spin 6s linear infinite, flIn .4s ease; }
@keyframes spin { to { transform: rotate(360deg) } }
.fl-skip { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: .75rem; letter-spacing: 2px; color: #8d88c4; }
@media (max-width: 480px) { .fl-lv { grid-template-columns: 92px 1fr 96px; } .fl-name { font-size: .8rem; } .fl-place { font-size: .62rem; } }
.toast.top { bottom: auto; top: 76px; transform: translate(-50%, -20px); } .toast.top.on { transform: translate(-50%, 0); }
.heart { font-size: 1.15rem; color: #ff4f6e; text-shadow: 0 0 10px rgba(255,79,110,.6); transition: .3s; }
.heart.lost { color: var(--line); text-shadow: none; transform: scale(.8); filter: grayscale(1); }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ach div { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); opacity: .45; filter: grayscale(1); }
.ach div.got { opacity: 1; filter: none; border-color: var(--accent2); }
.ach i { grid-row: span 2; font-style: normal; font-size: 1.5rem; text-align: center; } .ach b { font-size: .85rem; } .ach small { font-size: .7rem; color: var(--mute); }
.install { display: block; margin: 14px auto 0; } .install.hide { display: none; }
/* ad offers (Android app only) */
.ad-offer { display: block; width: 100%; margin-top: 12px; background: linear-gradient(135deg, #ff4f8b, #ff8a3d); color: #fff; }
.ad-offer small, #btnHint small { opacity: .75; font-weight: 400; }
.bonus { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; background: rgba(5,4,20,.72); }
.bonus-card { width: min(88vw, 360px); padding: 22px; border-radius: 22px; text-align: center; background: var(--space); border: 2px solid var(--accent2); }
.bonus-card b:first-child { font-family: "Lucky"; font-size: 1.6rem; color: var(--accent2); letter-spacing: 1px; }
.bonus-n { color: var(--mute); }
