:root {
  --bg: #07080f; --panel: #141726; --panel2: #20253a; --line: #2e3450; --text: #f1f3ff; --dim: #98a0c4;
  --accent: #ffcc33; --accent2: #3ee0a8; --danger: #ff5577; --brand: #ffcc33;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); --sar: env(safe-area-inset-right);
  /* System fonts only (rule 1). Android maps sans-serif-condensed to its built-in condensed face. */
  --display: "Roboto Condensed", sans-serif-condensed, "Arial Narrow", "Bahnschrift", Impact, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; background: radial-gradient(ellipse 70% 60% at 15% -10%, #1f2b55 0%, transparent 60%), radial-gradient(ellipse 60% 60% at 100% 110%, #3a1846 0%, transparent 60%), var(--bg); background-attachment: fixed; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.label { font: 600 12px/1.3 system-ui, sans-serif; letter-spacing: .2px; color: var(--dim); }
.eyebrow { font: 800 12px/1.2 system-ui, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.title { font-family: var(--display); font-stretch: condensed; font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: .2px; }

/* Menu: the hero spans 2x2 cells of the tile grid */
#menu { min-height: 100%; padding: calc(8px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); max-width: 1180px; margin: 0 auto; }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand .label { white-space: nowrap; }
@media (max-width: 480px) { .menu-head .brand h1 { font-size: 21px; } }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 16px #000a, 0 0 0 1px #ffffff1a; }
.menu-head h1 { margin: 0 0 3px; font: italic 900 25px/1 var(--display); font-stretch: condensed; text-transform: uppercase; letter-spacing: .5px; }
.menu-head h1 span { color: var(--brand); margin-left: .22em; }
.btn.ghost { background: #ffffff0d; border-color: #ffffff1f; font-size: 14px; border-radius: 999px; padding: 0 18px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

.tile, .hero { position: relative; display: block; isolation: isolate; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #151827; cursor: pointer; text-align: left; box-shadow: 0 10px 26px #000a; transition: transform .3s var(--ease), box-shadow .3s; }
.tile { aspect-ratio: 16 / 10; container-type: inline-size; }
.tile.hero { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 220px; border-radius: 20px; }
@media (max-width: 639px) { /* portrait: a taller hero fills the screen; text sits on a bottom scrim, art above it */
  .tile.hero { min-height: clamp(220px, 38vh, 360px); }
  .tile.hero.tile::before { background: linear-gradient(to top, #05060cf5 0%, #05060cb3 42%, transparent 72%); }
  .tile.hero .title { font-size: clamp(30px, 9vw, 40px); }
}
/* hero + 7 tiles leave one cell over in both 2- and 4-column grids: the last tile takes it */
.tile:last-child { grid-column: span 2; aspect-ratio: 16 / 5; }
.art { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.art svg, .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.art img { transform-origin: 60% 40%; transition: transform 1s var(--ease); }
/* legibility gradient, then a glossy rim with the accent baseline on top */
.tile::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, #05060ce6 0%, #05060c73 26%, transparent 48%); }
.tile.hero::before { background: linear-gradient(90deg, #05060cf0 0%, #05060cb0 38%, transparent 72%), linear-gradient(to top, #05060ccc, transparent 45%); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; background: linear-gradient(155deg, #ffffff26 0%, transparent 28%); box-shadow: inset 0 0 0 1px #ffffff1c, inset 0 -3px 0 var(--accent); transition: box-shadow .3s; }
.tile-top { position: absolute; z-index: 2; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: center; }
.tile-top > * { display: inline-flex; align-items: center; height: 24px; border-radius: 999px; background: #05060c99; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip { gap: 4px; padding: 0 10px 0 6px; font: 700 12px/1 system-ui, sans-serif; color: #e4e8ff; }
.best { color: var(--accent); font: italic 900 13px/1 var(--display); font-stretch: condensed; font-variant-numeric: tabular-nums; padding: 0 9px; letter-spacing: .3px; }
.ori { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2.2; color: #fff; }
.ori.landscape { transform: rotate(90deg); }
.tile-body { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 11px; display: flex; flex-direction: column; gap: 3px; }
.tile .title { font-size: clamp(15px, 8.4cqw, 24px); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px #000; }
.tile .label { color: #dde1f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px #000; }
.play-badge { position: absolute; z-index: 2; left: 50%; top: 40%; margin: -24px 0 0 -24px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0b0b12; font-size: 17px; padding-left: 3px; box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 60%, transparent); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .3s var(--ease); }

/* hero */
.hero-body { position: absolute; z-index: 2; left: 0; bottom: 0; top: 0; width: min(100%, 420px); padding: 18px 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; }
.hero .eyebrow::before { content: ''; width: 18px; height: 3px; border-radius: 2px; background: var(--accent); }
.tile.hero .title { font-size: clamp(34px, 5.4vw, 56px); white-space: normal; overflow: visible; line-height: .9; text-shadow: 0 4px 24px #000c; }
.hero-foot { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.play { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); color: #0b0b12; font: italic 900 18px/1 var(--display); font-stretch: condensed; letter-spacing: 1.5px; text-transform: uppercase; box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 1px 0 #fff8; }
.play::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff8c 50%, transparent 70%); transform: translateX(-120%); animation: sheen 3.2s var(--ease) 1s infinite; }
@keyframes sheen { 35%, 100% { transform: translateX(120%); } }
.hero .best { padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hero .best i { font-style: italic; font-size: 30px; line-height: 1; color: #fff; }
.hero .best small { color: var(--accent); }
.hero .label { white-space: normal; }
.hero .art img { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.2) translate(-4%, -3%); } }

/* press, and a slow pan preview on hover / keyboard focus */
@media (hover: hover) {
  .tile:hover { transform: translateY(-3px); box-shadow: 0 16px 36px #000c, 0 0 28px color-mix(in srgb, var(--accent) 30%, transparent); }
  .tile:hover::after { box-shadow: inset 0 0 0 2px var(--accent), inset 0 -3px 0 var(--accent); }
  .tile:hover .art img { transform: scale(1.16) translate(-3%, -2%); transition: transform 6s linear; }
  .tile:hover .play-badge { opacity: 1; transform: none; }
}
.tile:focus-visible, .hero:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tile:focus-visible .art img { transform: scale(1.16) translate(-3%, -2%); transition: transform 6s linear; }
.tile:focus-visible .play-badge, .tile:active .play-badge { opacity: 1; transform: none; }
.tile:active, .hero:active { transform: scale(.955); transition-duration: .08s; }

/* Buttons (also used by game hubs via lib/hud.js) */
.btn { min-height: 48px; min-width: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; cursor: pointer; transition: transform .1s, filter .2s; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); color: #140f00; border-color: transparent; box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 45%, transparent); letter-spacing: 1.5px; text-transform: uppercase; min-width: 140px; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .4; }
.btn:active:not(:disabled) { transform: scale(.96); }

/* Game host */
#game { position: fixed; inset: 0; background: #000; touch-action: none; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#game.launching { visibility: hidden; }
#loading:not([hidden]) ~ #pause-btn { visibility: hidden; }
#menu { transition: transform .38s cubic-bezier(.3, 0, .2, 1), filter .38s; }
#menu.receding { transform: scale(.96); filter: brightness(.5); will-change: transform, filter; }
.launch-zoom { position: fixed; z-index: 100; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform-origin: 50% 50%; will-change: transform, clip-path; }
#stage { position: absolute; inset: 0; overflow: hidden; }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#pause-btn { position: absolute; z-index: 60; top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); width: 48px; height: 48px; border-radius: 14px; border: 1px solid #ffffff26; background: #05060c99; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 14px; letter-spacing: -1px; }
#fps { position: absolute; z-index: 61; top: calc(60px + var(--sat)); left: calc(8px + var(--sal)); background: #000a; color: #3f3; font: 700 12px monospace; padding: 2px 6px; border-radius: 4px; pointer-events: none; }

/* Loading splash: the game's own render, blurred, with its name and a filling bar */
#loading { position: absolute; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #07080f; transition: opacity .3s; }
#loading.done { opacity: 0; }
#loading::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, #07080f8c 0%, #07080fd9 80%), linear-gradient(to top, color-mix(in srgb, var(--accent) 22%, transparent), transparent 50%); }
/* same geometry as the launch zoom's last frame (cover, centred, scale 1), so the crossfade never doubles objects */
.splash-bg { position: absolute; inset: 0; background: center / cover no-repeat; filter: blur(4px) saturate(1.2) brightness(.85); animation: splashkb 12s ease-in-out .4s infinite alternate; }
@keyframes splashkb { to { transform: scale(1.12); } }
/* portrait: the 16:9 art as a full-width band (cover would show a blurry sliver); zoom and splash share it */
@media (orientation: portrait) {
  .splash-bg, .launch-zoom { inset: auto 0; top: calc(50% - 28.125vw); height: 56.25vw; }
}
.splash-body { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: calc(16px + var(--sat)) 24px calc(16px + var(--sab)); text-align: center; animation: rise .5s var(--ease) .1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
/* after a launch zoom: text and bar start once the zoom has handed over, so nothing shows through it and the bar starts empty */
#loading.late .splash-body, #loading.late .loadbar div { animation-delay: .45s; }
#splash-name { margin: 0; font: italic 900 clamp(44px, 10vw, 84px)/.9 var(--display); font-stretch: condensed; text-transform: uppercase; letter-spacing: .5px; text-shadow: 0 6px 40px #000, 0 0 60px color-mix(in srgb, var(--accent) 45%, transparent); }
#splash-genre { color: var(--accent); font-size: 14px; }
.loadbar { width: min(320px, 70vw); height: 6px; margin-top: 16px; border-radius: 3px; background: #ffffff1f; overflow: hidden; }
.loadbar div { height: 100%; transform: scaleX(0); transform-origin: left; border-radius: 3px; /* transform, not width: keeps moving while the game builds its scene */ background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #fff)); box-shadow: 0 0 14px var(--accent); animation: fill 1.6s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes fill { to { transform: scaleX(.85); } }
#splash-tip { margin: 10px 0 0; max-width: 44ch; color: #d6daf0; font-size: 14px; line-height: 1.4; }
#splash-tip::before { content: 'Tip'; margin-right: 8px; color: var(--accent); font: 800 12px system-ui, sans-serif; letter-spacing: 2px; text-transform: uppercase; }

/* Overlays (pause, how to play, rotate, about) */
.overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: calc(8px + var(--sat)) calc(16px + var(--sar)) calc(8px + var(--sab)) calc(16px + var(--sal)); background: radial-gradient(ellipse at center, #05060c59, #05060cd9); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.card { position: relative; background: linear-gradient(160deg, #1b2036f2, #0d1020f7); border: 1px solid #ffffff1c; border-radius: 22px; padding: 20px 22px; width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; max-height: 100%; overflow: auto; box-shadow: 0 24px 70px #000d, inset 0 1px 0 #ffffff14; animation: pop .3s var(--ease); }
.card::before { content: ''; position: absolute; top: 0; left: 22px; right: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.card > .eyebrow { text-align: center; }
.card h2 { margin: 0 0 6px; text-align: center; font: italic 900 36px/1 var(--display); font-stretch: condensed; text-transform: uppercase; letter-spacing: .5px; }
.card .btn { width: 100%; }
.card .btn:not(.primary) { background: #ffffff0a; border-color: #ffffff1a; font-size: 15px; }
.card .btn:not(.primary):active { background: #ffffff1a; }
.card.about { width: min(560px, 100%); font-size: 14px; line-height: 1.45; color: #d6dbf5; overflow: hidden; }
.about-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #ffffff14; }
.about-head img { border-radius: 12px; box-shadow: 0 6px 16px #000a; }
.about-head .title { display: block; font-size: 26px; line-height: 1; margin-bottom: 4px; }
.about-head .title span { color: var(--brand); }
.about-body { overflow: auto; min-height: 0; flex: 1; -webkit-mask-image: linear-gradient(#000 calc(100% - 48px), transparent); mask-image: linear-gradient(#000 calc(100% - 48px), transparent); }
.about-body.end { -webkit-mask-image: none; mask-image: none; }
.about-body h2 { font-size: 26px; margin-top: 6px; }
#howto .card { width: min(460px, 100%); }
#howto-list { list-style: none; counter-reset: step; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; }
#howto-list li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; font-size: 15px; line-height: 1.35; }
#howto-list li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; text-align: center; font: italic 900 18px/30px var(--display); color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.rotate-icon { display: flex; justify-content: center; }
.rotate-icon svg { width: 60px; height: 60px; fill: none; stroke: var(--accent); stroke-width: 1.6; animation: rot 1.6s ease-in-out infinite; }
@keyframes rot { 50% { transform: rotate(90deg); } }
#rotate .card p { text-align: center; color: var(--dim); margin: 0; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
#update { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--sab)); min-height: 48px; padding: 0 18px; border-radius: 24px; border: 0; background: var(--accent2); color: #002b1c; font-weight: 800; }

/* Reduced motion: shell only (game HUD animations carry information) */
@media (prefers-reduced-motion: reduce) {
  #menu *, #menu *::before, #menu *::after, #loading, #loading *, .overlay, .overlay * { animation: none !important; transition: none !important; }
  .tile:active, .hero:active { transform: none; }
}

/* In-game HUD + controls (shared by games) */
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; padding: calc(8px + var(--sat)) calc(10px + var(--sar)) calc(8px + var(--sab)) calc(64px + var(--sal)); font-weight: 800; text-shadow: 0 2px 3px #000a; color: #fff; }
.hud .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hud .pill { background: #0007; border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.hud .big { font-size: 28px; }
.hud .center { position: absolute; left: 0; right: 0; text-align: center; }
.gbar { height: 10px; background: #0008; border-radius: 6px; overflow: hidden; border: 1px solid #fff4; display: inline-block; vertical-align: middle; }
.gbar > div { height: 100%; transition: width .15s; }
.ctl-zone { position: absolute; z-index: 25; touch-action: none; }
.joy-base { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: #ffffff1a; border: 2px solid #ffffff44; pointer-events: none; }
.joy-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: #ffffffaa; }
.ctl-btn { position: absolute; z-index: 30; border-radius: 50%; border: 2px solid #ffffff66; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 1px 2px #000; touch-action: none; user-select: none; backdrop-filter: blur(2px); }
.ctl-btn.on { transform: scale(.92); filter: brightness(1.5); }
.ctl-btn.wide { border-radius: 16px; }
.gpanel-wrap { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: flex-start; background: linear-gradient(90deg, #05070ee6 0%, #05070ea0 45%, #05070a20 75%, transparent 100%); padding: calc(8px + var(--sat)) calc(8px + var(--sar)) calc(8px + var(--sab)) calc(64px + var(--sal)); }
.gpanel-wrap[data-q=results] { justify-content: center; background: radial-gradient(ellipse at center, #05070e99, #05070ee0); }
.gpanel { background: linear-gradient(160deg, #1b2034d9, #0e1120e6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid #ffffff1f; border-radius: 20px; padding: 16px 18px; width: min(440px, 100%); max-height: 100%; overflow: auto; box-shadow: 0 20px 60px #000c, inset 0 1px 0 #ffffff14; animation: pop .35s cubic-bezier(.2,.9,.3,1.2); }
.gpanel.wide { width: min(720px, 100%); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.gpanel h2 { margin: 0 0 10px; font: italic 900 34px/1 var(--display); font-stretch: condensed; text-transform: uppercase; letter-spacing: .5px; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gpanel-wrap[data-q=results] .gpanel h2 { text-align: center; }
.gpanel-body { font-size: 14px; }
.gpanel-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.gpanel .stat { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #ffffff12; }
.gpanel .coins { color: var(--accent); font-weight: 800; }
.gpanel .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .gpanel .cols { grid-template-columns: 1fr; } }
.gpanel h3 { margin: 12px 0 6px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 2.5px; font-weight: 700; }
.uprow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 3px 0; }
.pips { display: flex; gap: 3px; }
.pips i { width: 8px; height: 14px; border-radius: 2px; background: #ffffff22; }
.pips i.on { background: var(--accent2); }
.seg { display: flex; gap: 4px; background: #0006; padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--dim); }
.seg button.on { background: var(--panel2); color: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.pick button { min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); padding: 6px; font-size: 13px; font-weight: 700; }
.pick button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pick button:disabled { opacity: .45; }
.pick small { display: block; color: var(--dim); font-weight: 500; }
.gtoast { position: absolute; z-index: 35; left: 50%; top: 22%; transform: translateX(-50%); background: #000b; padding: 8px 18px; border-radius: 999px; font-weight: 900; font-size: 20px; pointer-events: none; animation: toast 1.4s ease-out forwards; white-space: nowrap; }
.gtoast.gold { color: var(--accent); font-size: 26px; }
.gtoast.red { color: var(--danger); }
@keyframes toast { 0% { transform: translate(-50%, 10px) scale(.7); opacity: 0; } 12% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 20% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
.gfloat { position: absolute; z-index: 34; pointer-events: none; font-weight: 900; transform: translate(-50%, -50%); text-shadow: 0 2px 3px #000; animation: flt .9s ease-out forwards; }
@keyframes flt { to { transform: translate(-50%, -150%); opacity: 0; } }
.flash { position: absolute; inset: 0; z-index: 19; pointer-events: none; background: #ff2244; opacity: 0; transition: opacity .25s; }
.minimap { position: absolute; border-radius: 50%; background: #0008; border: 2px solid #fff5; }

/* Vignette over every game (look-and-controls V6) */
#stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 18; background: radial-gradient(ellipse at center, transparent 55%, #0008 100%); }
.hud .pill { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid #ffffff1a; letter-spacing: .5px; }
.hud .big { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.gtoast { font-style: italic; letter-spacing: 1px; text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 70%, transparent), 0 2px 4px #000; }
.hint { position: absolute; z-index: 36; left: 50%; bottom: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; font-weight: 900; letter-spacing: 6px; font-size: 22px; color: #fff; text-shadow: 0 0 20px var(--accent); animation: hint 1.2s ease-in-out infinite; }
.hint small { display: block; letter-spacing: 1px; font-size: 13px; font-weight: 600; opacity: .8; }
@keyframes hint { 50% { transform: translateX(-50%) scale(1.08); opacity: .75; } }
.ctl-btn { box-shadow: 0 0 0 1px #0004, 0 6px 18px #0006, inset 0 1px 0 #fff3; letter-spacing: 1px; font-size: 13px; }
