/* Gem Rush - full-window canvas + HUD + menu / cards. Everything scales with rem / clamp from phones to 4K. */
:root { --gm-sun: #FFD23F; --gm-ink: #0F0C22; --wacc: #FFD23F; }
html { font-size: clamp(14px, calc(9px + .45vw), 26px); height: 100%; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: #0F0C22; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
button, a { -webkit-tap-highlight-color: transparent; }
kbd { font: inherit; font-weight: 800; padding: .05em .45em; border-radius: 6px; background: rgba(255, 255, 255, .16); }

.gm { position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #0F0C22; --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); }
.gm-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- top bar ---------- */
.gm-top { position: absolute; z-index: 45; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: max(10px, var(--safe-t)) max(12px, var(--safe-r)) 0 max(12px, var(--safe-l)); pointer-events: none; }
.gm-top > * { pointer-events: auto; }
.gm-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px 14px 6px 6px; border-radius: 14px; background: rgba(15, 12, 34, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; transition: background .15s, transform .12s; }
.gm-brand:hover { background: rgba(15, 12, 34, .8); transform: translateY(-1px); }
.gm-brand img { width: 34px; height: 34px; }
.gm-brand b { font-family: var(--font-d); font-size: .95rem; font-weight: 400; letter-spacing: .02em; line-height: 1; }
.gm-brand b i { font-style: normal; color: var(--lime); }
.gm.is-play .gm-brand { display: none; }
.gm-tools { display: flex; gap: 8px; margin-left: auto; }
.gm-tool { width: 46px; height: 46px; border: 0; padding: 0; display: grid; place-items: center; border-radius: 13px; background: rgba(15, 12, 34, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; transition: background .15s, transform .12s; text-decoration: none; color: #fff; }
.gm-tool:hover { background: rgba(15, 12, 34, .85); transform: translateY(-1px); }
.gm-tool svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gm.is-menu .gm-tool--home, .gm.is-menu #bPause { display: none; }
.gm.is-play .gm-tool--home { display: grid; }
.gm.has-ov.is-play #bPause { visibility: hidden; }
@media (pointer: coarse) { .gm-tool { width: 50px; height: 50px; } .gm-tool--full { display: none; } }

/* ---------- play HUD: portrait = top info / board slot / booster dock ---------- */
.gm-play { position: absolute; inset: 0; z-index: 10; pointer-events: none; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; color: #fff; font-size: 1rem; padding: calc(max(10px, var(--safe-t)) + 54px) max(10px, var(--safe-r)) max(10px, var(--safe-b)) max(10px, var(--safe-l)); }
.gm-play[hidden] { display: none; }
.gm-play > * { pointer-events: none; }
.gm-info { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr); grid-template-areas: "lvl moves score" "goals goals goals"; gap: .5rem; align-items: stretch; width: min(100%, 36em); margin: 0 auto; }
.gm-lvl { grid-area: lvl; display: grid; align-content: center; line-height: 1.05; padding: 0 .2em; min-width: 0; }
.gm-lvl small { font-size: max(12px, .7rem); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--wacc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.gm-lvl b { font-family: var(--font-d); font-weight: 400; font-size: 1.3rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .4); white-space: nowrap; }
.gm-stat { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: .4em .9em .5em; border-radius: 14px; background: rgba(15, 12, 34, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1; min-width: 0; }
.gm-stat small { font-size: max(11px, .62rem); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--mute); }
.gm-stat b { font-family: var(--font-d); font-weight: 400; font-size: 1.55rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-moves { grid-area: moves; min-width: 4.8em; text-align: center; align-items: center; }
.gm-moves b { font-size: 1.9rem; color: var(--gm-sun); }
.gm-moves.low b { color: #FF6B5E; animation: gmblink .8s ease-in-out infinite; }
.gm-score { grid-area: score; }
.gm-sbar { position: relative; height: .5rem; margin-top: .3em; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: visible; }
.gm-sbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #FF9A1F, #FFE238); box-shadow: 0 0 .8em rgba(255, 200, 40, .7); transition: width .35s var(--ease); }
.gm-sbar span { position: absolute; top: 50%; width: .95rem; height: .95rem; transform: translate(-50%, -50%) scale(.85); border-radius: 50%; background: #3a336a; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) inset; }
.gm-sbar .t3 { left: 100%; } .gm-sbar .t2 { left: 60%; }
.gm-sbar.s2 .t2, .gm-sbar.s3 .t3 { background: radial-gradient(circle at 35% 30%, #fff, #FFD23F 55%, #FF9A1F); box-shadow: 0 0 .8em rgba(255, 210, 63, .9); transform: translate(-50%, -50%) scale(1.15); }
.gm.no-sbar .gm-sbar { visibility: hidden; }
.gm-goals { grid-area: goals; display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; min-height: 2.2rem; }
.gm-goal { position: relative; display: inline-flex; align-items: center; gap: .45em; padding: .22em .85em .22em .35em; border-radius: 99px; background: rgba(15, 12, 34, .66); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .13) inset; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gm-goal img { width: 1.9rem; height: 1.9rem; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.gm-goal b { font-family: var(--font-d); font-weight: 400; font-size: .98rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-goal.done { box-shadow: 0 0 0 2px #5CFF9A inset, 0 0 1em rgba(92, 255, 154, .35); } .gm-goal.done b { color: #8CFFB8; }
.gm-goal .ck { position: absolute; right: -.25rem; top: -.35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #3DE07A; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.gm-goal .ck::after { content: ""; position: absolute; left: .36rem; top: .17rem; width: .26rem; height: .5rem; border: solid #0F0C22; border-width: 0 .18rem .18rem 0; transform: rotate(40deg); }
.gm-goal.rush { padding: .32em 1em; } .gm-goal.rush b { font-family: var(--font-b); font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.gm-slot { min-height: 0; min-width: 0; }
.gm-dock { display: flex; justify-content: center; gap: .6rem; }
.gm-boost { pointer-events: auto; position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic lab"; align-items: center; column-gap: .5rem; min-width: 7.8rem; min-height: 3.4rem; padding: .35em .9em .35em .55em; border: 0; border-radius: 16px; color: #fff; text-align: left; background: linear-gradient(180deg, rgba(60, 48, 130, .9), rgba(30, 24, 76, .92)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset, 0 .3em 0 rgba(0, 0, 0, .35); transition: transform .12s var(--ease), box-shadow .15s, filter .15s; }
.gm-boost:hover { transform: translateY(-2px); filter: brightness(1.12); }
.gm-boost:active { transform: translateY(2px); }
.gm-boost .ic { grid-area: ic; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 30% 25%, #fff3, transparent 60%), var(--bc, #FF9A1F); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .3) inset; }
.gm-boost#bHammer { --bc: #FF5B2E; } .gm-boost#bShuffle { --bc: #2FD6FF; } .gm-boost#bExtra { --bc: #3DE07A; }
.gm-boost .ic svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gm-boost small { grid-area: lab; font-weight: 800; font-size: max(12px, .74rem); letter-spacing: .02em; white-space: nowrap; }
.gm-boost .n { position: absolute; right: -.35rem; top: -.5rem; min-width: 1.55rem; height: 1.55rem; padding: 0 .3em; display: grid; place-items: center; border-radius: 99px; background: var(--gm-sun); color: #2A1B00; font-family: var(--font-d); font-weight: 400; font-size: .85rem; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.gm-boost kbd { display: none; position: absolute; left: .35rem; bottom: .12rem; font-size: .6rem; opacity: .6; background: none; padding: 0; }
.gm:not(.is-touch) .gm-boost kbd { display: block; }
.gm-boost.empty { filter: saturate(.3) brightness(.7); } .gm-boost.empty .n { background: #555; color: #bbb; }
.gm-boost.on { box-shadow: 0 0 0 2.5px #FF5B2E inset, 0 0 1.4em rgba(255, 91, 46, .7); animation: gmpulse .7s ease-in-out infinite; }
.gm.is-hammer .gm-cv { cursor: crosshair; }
.gm.has-ov .gm-boost { pointer-events: none; }
@keyframes gmblink { 50% { opacity: .5; } }
@keyframes gmpulse { 50% { transform: scale(1.05); } }

/* landscape: info panel left, board centre, boosters right */
@media (min-aspect-ratio: 23/20) {
  .gm-play { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: clamp(.8rem, 2.4vw, 2.6rem); padding: max(12px, var(--safe-t)) max(12px, var(--safe-r)) max(12px, var(--safe-b)) max(12px, var(--safe-l)); align-items: center; }
  .gm-slot { height: 100%; aspect-ratio: 1 / 1; max-height: 100%; }
  .gm-info { width: min(100%, 17em); margin: 0 0 0 auto; grid-template-columns: 1fr 1fr; grid-template-areas: "lvl lvl" "moves score" "goals goals"; align-content: center; }
  .gm-lvl { padding: 0 .2em .3em; } .gm-lvl b { font-size: 1.6rem; }
  .gm-moves { min-width: 0; } .gm-goals { justify-content: flex-start; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .gm-score { min-width: 0; } .gm-score b { font-size: 1.25rem; }
  .gm-dock { flex-direction: column; align-items: flex-start; justify-self: start; gap: .9rem; }
  .gm-boost { min-width: 9.5em; }
}
@media (min-aspect-ratio: 23/20) and (max-height: 520px) {
  .gm-info { width: min(100%, 14em); gap: .35rem; } .gm-lvl b { font-size: 1.15rem; } .gm-stat b { font-size: 1.2rem; } .gm-moves b { font-size: 1.5rem; }
  .gm-goal img { width: 1.5rem; height: 1.5rem; } .gm-goal b { font-size: .85rem; }
  .gm-boost { min-width: 0; min-height: 3rem; padding: .25em .55em .25em .4em; } .gm-boost small { display: none; } .gm-boost kbd { display: none !important; }
  .gm-dock { gap: .7rem; }
}
@media (max-aspect-ratio: 23/20) and (max-height: 700px) {
  .gm-play { padding-top: calc(max(8px, var(--safe-t)) + 50px); gap: 6px; } .gm-lvl b { font-size: 1.05rem; } .gm-stat b { font-size: 1.25rem; } .gm-moves b { font-size: 1.5rem; }
  .gm-goal img { width: 1.6rem; height: 1.6rem; } .gm-boost { min-height: 3rem; min-width: 7rem; }
}

/* ---------- banners ---------- */
.gm-banner { --bc: #FFD23F; position: absolute; z-index: 20; left: 50%; top: 14%; width: min(92vw, 40em); transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; }
.gm-banner small { display: block; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; font-size: clamp(.7rem, .6rem + .5vw, 1rem); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.gm-banner h2 { margin: .1em 0 .12em; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .95; font-size: clamp(1.6rem, .9rem + 3.2vw, 3.8rem); color: var(--bc); text-shadow: 0 .05em 0 rgba(0, 0, 0, .5), 0 0 .5em color-mix(in srgb, var(--bc) 55%, transparent), 0 .1em .4em rgba(0, 0, 0, .5); }
.gm-banner p { display: inline-block; margin: .2em 0 0; padding: .35em 1.1em; border-radius: 99px; background: rgba(15, 12, 34, .6); font-weight: 800; font-size: clamp(.8rem, .6rem + .6vw, 1.15rem); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.gm-banner.show { animation: gmbanner 2.8s var(--ease) forwards; }
@keyframes gmbanner { 0% { opacity: 0; transform: translate(-50%, 24px) scale(.82); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 20% { transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1); } }
.gm-pop { position: absolute; z-index: 21; left: 50%; top: 44%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; font-family: var(--font-d); text-transform: uppercase; font-size: clamp(1.8rem, 1rem + 3.6vw, 4rem); white-space: nowrap; color: #fff; background: linear-gradient(180deg, #fff, #FFE56B 45%, #FF9A3D); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 .06em 0 rgba(90, 20, 0, .8)) drop-shadow(0 0 .35em rgba(255, 160, 40, .7)); }
.gm-pop.show { animation: gmpopb 1.25s var(--ease) forwards; }
@keyframes gmpopb { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(-2deg); } 26% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); } 74% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1) rotate(-2deg); } }
.gm-toast { position: absolute; z-index: 22; left: 50%; bottom: max(14%, calc(var(--safe-b) + 90px)); transform: translate(-50%, 12px); max-width: min(92vw, 34em); padding: .6em 1.3em; border-radius: 18px; text-align: center; font-weight: 800; font-size: clamp(.85rem, .6rem + .6vw, 1.15rem); line-height: 1.3; background: rgba(15, 12, 34, .88); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset; pointer-events: none; opacity: 0; transition: opacity .3s, transform .3s var(--ease); }
.gm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.gm-toast.new { box-shadow: 0 0 0 2px var(--gm-sun) inset, 0 0 1.4em rgba(255, 210, 63, .35); }

/* ---------- overlays ---------- */
.gm-ov { position: absolute; inset: 0; z-index: 40; display: none; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; }
.gm-ov::-webkit-scrollbar { display: none; }
.gm-ov.show { display: block; animation: gmfade .3s ease; }
.gm-ov--screen.show { background: rgba(10, 8, 28, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gm-ov--center.show { background: rgba(15, 12, 34, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gm-ov--final.show { background: radial-gradient(ellipse at 50% 40%, rgba(40, 14, 90, .18), rgba(15, 12, 34, .4)); backdrop-filter: none; -webkit-backdrop-filter: none; }
.gm-ov--menu.show { background: linear-gradient(90deg, rgba(15, 12, 34, .9) 0%, rgba(15, 12, 34, .6) 30%, rgba(15, 12, 34, .05) 50%, rgba(15, 12, 34, 0) 70%), linear-gradient(0deg, rgba(15, 12, 34, .5), rgba(15, 12, 34, 0) 28%); overflow: hidden; pointer-events: none; }
.gm-ov--menu .gm-menu__l { pointer-events: auto; }
@keyframes gmfade { from { opacity: 0; } }
@keyframes gmpop2 { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.gm-fade { position: absolute; inset: 0; z-index: 60; background: #0F0C22; opacity: 0; pointer-events: none; transition: opacity .4s; }

/* ---------- menu ---------- */
.gm-menu { position: absolute; inset: 0; display: flex; align-items: center; padding: clamp(64px, 9vh, 120px) clamp(20px, 5vw, 110px) clamp(16px, 3vh, 40px) max(clamp(20px, 5vw, 110px), var(--safe-l)); }
.gm-menu__l { animation: gmpop2 .5s var(--ease); max-width: min(34em, 100%, 46vw); min-width: 0; }
.gm-kicker { display: inline-flex; align-items: center; gap: .6em; flex-wrap: wrap; font-weight: 800; font-size: clamp(.7rem, .55vw + .45rem, 1rem); letter-spacing: .16em; text-transform: uppercase; color: var(--gm-sun); }
.gm-kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.gm-kicker span { color: #CFC9F5; letter-spacing: .1em; padding: .15em .7em; border-radius: 99px; background: rgba(255, 255, 255, .09); }
.gm-title { margin: .08em 0 .14em; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .86; font-size: clamp(3rem, min(8vw, 15vh), 10rem); letter-spacing: .005em; display: grid; justify-items: start; }
.gm-title b { font-weight: 400; display: block; background: linear-gradient(100deg, #FFB3F0 0%, #FF5B8A 18%, #FFD23F 38%, #3DE07A 58%, #2FD6FF 78%, #B45CFF 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: gmslide 8s linear infinite; filter: drop-shadow(0 .05em 0 rgba(0, 0, 0, .55)) drop-shadow(0 0 .4em rgba(255, 150, 220, .35)); }
.gm-title b.b2 { margin-left: .35em; animation-delay: -1.5s; }
@keyframes gmslide { to { background-position: -240% 0; } }
.gm-tag { margin: 0 0 clamp(14px, 2.4vh, 28px); font-size: clamp(.95rem, .5vw + .75rem, 1.35rem); font-weight: 600; color: #DCD7FF; max-width: 28em; line-height: 1.45; }
.gm-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: clamp(6px, 1.6vh, 20px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.f { fill: currentColor; stroke: none; }
.btn em { font-style: normal; font-size: .7em; opacity: .75; }
.gm-cta .btn--big { font-size: clamp(1.05rem, .5vw + .9rem, 1.6rem); }
.gm-btn-rush { --bg: #E83A7A; --sh: #8F1448; --fg: #fff; }
.gm-sub { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.gm-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: clamp(14px, 2.4vh, 28px); }
.gm-chip { padding: .5em 1em; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1.05; text-align: left; }
.gm-chip small { display: block; font-size: max(11px, .6rem); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--mute); }
.gm-chip b { font-family: var(--font-d); font-weight: 400; font-size: 1.3rem; } .gm-chip b i { font-style: normal; font-size: .62em; color: var(--mute); }

/* ---------- world map ---------- */
.gm-screen { position: relative; min-height: 100%; padding: max(72px, calc(var(--safe-t) + 64px)) max(16px, var(--safe-r)) max(30px, var(--safe-b)) max(16px, var(--safe-l)); }
.gm-screen--center { display: grid; place-items: center; padding-top: max(24px, var(--safe-t)); }
.gm-head { position: sticky; top: calc(max(10px, var(--safe-t)) + 50px); z-index: 5; padding: .45rem 0 .7rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(80em, 100%); margin: 0 auto .5rem; background: linear-gradient(180deg, rgba(10, 8, 28, .93) 72%, rgba(10, 8, 28, 0)); }
.gm-head h2 { margin: 0; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 1rem + 1.8vw, 3rem); text-shadow: 0 4px 0 rgba(0, 0, 0, .4); }
.gm-pill { display: inline-flex; flex-direction: column; gap: 2px; padding: .4em .9em; border-radius: 14px; background: rgba(15, 12, 34, .6); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1; }
.gm-pill small { font-size: .6rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--mute); } .gm-pill b { font-family: var(--font-d); font-weight: 400; font-size: 1.05rem; }
.gm-worlds { width: min(80em, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21em), 1fr)); gap: 1rem; }
.gm-world { --acc: #FFD23F; position: relative; isolation: isolate; padding: .9rem 1rem 1rem; border-radius: 22px; overflow: hidden; background: var(--img) center / cover, #181338; box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 60%, transparent) inset, 0 .4em 0 rgba(0, 0, 0, .35); }
.gm-world::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15, 12, 34, .35), rgba(15, 12, 34, .8)); }
.gm-world.lock { filter: saturate(.45) brightness(.8); }
.gm-world__h { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .8rem; }
.gm-world__h small { display: block; font-size: max(11px, .62rem); font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--acc); text-shadow: 0 1px 4px #000; }
.gm-world__h b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.gm-world__h span { display: block; font-size: .8rem; font-weight: 700; color: #E5E0FF; text-shadow: 0 1px 4px #000; }
.gm-world__h em { font-style: normal; font-family: var(--font-d); font-size: 1rem; padding: .25em .7em; border-radius: 99px; background: rgba(15, 12, 34, .7); white-space: nowrap; } .gm-world__h em i { font-style: normal; font-size: .7em; color: var(--mute); }
.gm-nodes { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.gm-node { --acc: inherit; display: grid; justify-items: center; gap: .25em; border: 0; background: none; padding: .2em 0; color: #fff; }
.gm-node .num { width: 3.1em; height: 3.1em; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-d); font-size: 1.1rem; color: #1B1340; background: radial-gradient(circle at 35% 28%, #fff, color-mix(in srgb, var(--acc) 75%, #fff) 38%, var(--acc) 75%); box-shadow: 0 4px 0 rgba(0, 0, 0, .4), 0 0 0 3px rgba(15, 12, 34, .75), 0 0 16px color-mix(in srgb, var(--acc) 50%, transparent); transition: transform .14s var(--ease); }
.gm-node:hover .num { transform: translateY(-3px) scale(1.06); }
.gm-node .num svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gm-node .sts { display: flex; gap: 0; } .gm-node .sts svg { width: .95rem; height: .95rem; }
.gm-node.lock .num { background: #3a3566; color: #9a94c7; box-shadow: 0 4px 0 rgba(0, 0, 0, .4), 0 0 0 3px rgba(15, 12, 34, .75); } .gm-node.lock { cursor: not-allowed; } .gm-node.lock:hover .num { transform: none; }
.gm-node.cur .num { animation: gmpulse2 1.4s ease-in-out infinite; }
.gm-node.shake { animation: gmshake .35s; }
@keyframes gmpulse2 { 50% { box-shadow: 0 4px 0 rgba(0, 0, 0, .4), 0 0 0 3px rgba(15, 12, 34, .75), 0 0 0 9px color-mix(in srgb, var(--acc) 45%, transparent), 0 0 28px var(--acc); } }
@keyframes gmshake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.gm-mapfoot { width: min(80em, 100%); margin: 1.2rem auto 0; display: flex; justify-content: center; }
.star { width: 1.5em; height: 1.5em; fill: rgba(255, 255, 255, .2); stroke: none; } .star.on { fill: #FFD23F; filter: drop-shadow(0 0 .35em rgba(255, 200, 40, .6)); }

/* ---------- cards ---------- */
.gm-card { --acc: #FFD23F; width: min(34em, 100%); text-align: center; padding: 1.8rem 1.8rem 1.5rem; border-radius: 28px; background: linear-gradient(180deg, #2A2260, #1B1540); box-shadow: 0 0 0 2px rgba(255, 255, 255, .12) inset, 0 30px 80px rgba(0, 0, 0, .55); animation: gmpop2 .4s var(--ease); margin: auto; }
.gm-card h2 { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.7rem, 1.1rem + 1.7vw, 3rem); line-height: 1; margin: .1em 0 .3em; text-transform: uppercase; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.gm-card h3, .gm-h3 { font-family: var(--font-d); font-weight: 400; text-transform: uppercase; font-size: 1rem; color: var(--gm-sun); margin: 1.1em 0 .5em; text-align: left; }
.gm-k { display: block; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: var(--acc); }
.gm-sub2 { margin: 0 0 1rem; color: #CFC9F5; font-weight: 600; }
.gm-note { margin: .8rem 0 0; font-size: .82rem; color: var(--mute); font-weight: 600; }
.gm-p { margin: 0; font-weight: 600; color: #E2DEFF; font-size: .95rem; line-height: 1.45; text-align: left; }
.gm-hint { margin: .9rem 0 0; padding: .6em 1em; border-radius: 14px; background: rgba(255, 210, 63, .12); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .35) inset; font-weight: 700; font-size: .92rem; color: #FFEFA8; }
.gm-acts { display: grid; gap: .65rem; margin-top: 1.1rem; }
.gm-acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.gm-acts .btn { width: 100%; }
.gm-danger { --bg: #5a1a3a; --sh: #2d0a1d; opacity: .85; }
.gm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.4em, 1fr)); gap: .6rem; margin: 1rem 0 .4rem; }
.gm-stats .gm-chip { text-align: center; padding: .6em .4em; } .gm-mini { display: inline-flex; } .gm-mini .star { width: 1.1rem; height: 1.1rem; }
.gm-goallist { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; text-align: left; }
.gm-goallist li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .8rem; align-items: center; padding: .4em .9em .4em .5em; border-radius: 16px; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .09) inset; font-weight: 700; }
.gm-goallist img { width: 2.6rem; height: 2.6rem; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)); } .gm-goallist b { font-family: var(--font-d); font-weight: 400; color: var(--acc); }
.gm-big { font-family: var(--font-d); font-size: clamp(3.2rem, 2rem + 5vw, 5.4rem); line-height: 1; color: var(--gm-sun); text-shadow: 0 5px 0 rgba(0, 0, 0, .4); } .gm-biglab { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin-top: 2px; }
.gm-rec { display: inline-block; margin: .6rem 0 0; padding: .35em 1em; border-radius: 99px; background: var(--gm-sun); color: var(--gm-ink); font-family: var(--font-d); font-size: .9rem; transform: rotate(-3deg); box-shadow: 0 3px 0 #B68A00; animation: gmpop2 .5s .3s both var(--ease); }
.gm-bigstars { display: flex; justify-content: center; gap: .4rem; margin: .5rem 0 .2rem; }
.gm-bigstars .bs { display: inline-block; transform: scale(0); animation: gmstar .6s var(--d) forwards cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .3)); }
.gm-bigstars .bs:nth-child(2) { margin-top: -.9rem; }
.gm-bigstars .bs svg { width: clamp(3.4rem, 2.4rem + 3vw, 5.2rem); height: clamp(3.4rem, 2.4rem + 3vw, 5.2rem); } .gm-bigstars--sm .bs svg { width: 3rem; height: 3rem; }
@keyframes gmstar { 0% { transform: scale(0) rotate(-60deg); } 100% { transform: scale(1) rotate(0); } }
.gm-gains { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: .7rem; } .gm-gains small { width: 100%; font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.gm-gain { display: inline-flex; align-items: center; gap: .45em; padding: .3em .9em .3em .35em; border-radius: 99px; background: rgba(61, 224, 122, .16); box-shadow: 0 0 0 1.5px rgba(61, 224, 122, .5) inset; font-weight: 800; font-size: .85rem; animation: gmpop2 .5s .9s both var(--ease); }
.gm-gain .ic { width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: #3DE07A; } .gm-gain .ic svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: #0F0C22; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.gm-progress { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; } .gm-progress li { display: flex; justify-content: space-between; padding: .5em 1em; border-radius: 12px; background: rgba(255, 255, 255, .07); font-weight: 700; } .gm-progress li b { font-family: var(--font-d); font-weight: 400; color: #FF8F7A; } .gm-progress li.ok b { color: #5CFF9A; }
.gm-best { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.gm-best li { display: flex; justify-content: space-between; padding: .35em 1em; border-radius: 10px; background: rgba(255, 255, 255, .06); font-weight: 700; } ol.gm-best li.me { background: rgba(255, 210, 63, .22); box-shadow: 0 0 0 1.5px var(--gm-sun) inset; } ol.gm-best li b { font-family: var(--font-d); font-weight: 400; }
.gm-trophy .trophy { width: 6rem; height: 6rem; margin: -.4rem auto .2rem; filter: drop-shadow(0 .5em 0 rgba(0, 0, 0, .3)) drop-shadow(0 0 1em rgba(255, 200, 60, .5)); animation: gmtrophy 2.4s ease-in-out infinite; }
@keyframes gmtrophy { 50% { transform: translateY(-.3em) rotate(2deg); } }
.gm-card--final { width: min(36em, 100%); box-shadow: 0 0 0 3px #FFD23F inset, 0 30px 80px rgba(0, 0, 0, .55), 0 0 100px rgba(255, 200, 60, .35); }
.gm-card--how { text-align: left; width: min(42em, 100%); } .gm-card--how h2 { text-align: center; }
.gm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.gm-steps li { display: grid; grid-template-columns: 2.2em 1fr; gap: .8rem; align-items: center; } .gm-steps li b { width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; background: var(--gm-sun); color: var(--gm-ink); font-family: var(--font-d); font-weight: 400; }
.gm-steps p, .gm-twists p { margin: 0; font-weight: 600; color: #E2DEFF; font-size: .93rem; line-height: 1.38; }
.gm-twists { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; } .gm-twists li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .8rem; align-items: center; } .gm-twists .ic { display: grid; place-items: center; } .gm-twists img, .gm-twists canvas { width: 2.9rem; height: 2.9rem; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)); }
.gm-opt { text-align: left; margin: .7rem 0; display: grid; gap: .35rem; } .gm-opt small { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.gm-seg { display: flex; gap: 6px; flex-wrap: wrap; } .gm-seg button { flex: 1; min-width: 4.4em; min-height: 44px; padding: .55em .9em; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .08); font-weight: 800; font-size: .9rem; color: #D6D1FA; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; transition: background .15s, transform .1s; }
.gm-seg button:hover { background: rgba(255, 255, 255, .14); transform: translateY(-1px); } .gm-seg button.on { background: var(--gm-sun); color: var(--gm-ink); box-shadow: none; }
.gm-setbox--mini { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; } .gm-setbox--mini .gm-opt { margin: 0; }
.gm-card--clear .gm-acts .btn svg, .gm-card--over .btn svg.s { width: 1.2em; height: 1.2em; }

/* ---------- responsive ---------- */
@media (max-aspect-ratio: 23/20) {
  .gm-ov--menu.show { background: linear-gradient(180deg, rgba(15, 12, 34, .72), rgba(15, 12, 34, 0) 32%), linear-gradient(0deg, rgba(15, 12, 34, .9) 0%, rgba(15, 12, 34, .55) 24%, rgba(15, 12, 34, 0) 42%); }
  .gm-menu { padding: max(66px, calc(var(--safe-t) + 58px)) max(18px, var(--safe-r)) max(18px, var(--safe-b)) max(18px, var(--safe-l)); text-align: center; }
  .gm-menu__l { display: flex; flex-direction: column; align-items: center; height: 100%; width: 100%; max-width: 30em; margin: 0 auto; }
  .gm-title { justify-items: center; font-size: clamp(3.2rem, 17vw, 6.4rem); } .gm-title b.b2 { margin-left: 0; }
  .gm-kicker { justify-content: center; } .gm-kicker span { display: none; }
  .gm-tag, .gm-chips { display: none; }
  .gm-cta { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; } .gm-cta .btn { width: 100%; padding-left: .6em; padding-right: .6em; font-size: clamp(.95rem, 4vw, 1.3rem); }
  .gm-cta .btn { grid-column: 1 / -1; }
  .gm-sub { justify-content: center; margin-top: .9rem; flex-wrap: nowrap; } .gm-sub .btn { padding-left: .7em; padding-right: .7em; font-size: .75rem; }
  .gm-brand b { display: none; } .gm-brand { padding: 6px; }
  .gm-toast { bottom: calc(max(10px, var(--safe-b)) + 5.4rem); }
  .gm-banner { top: 25%; }
}
@media (max-height: 560px) and (min-aspect-ratio: 23/20) {
  .gm-menu { padding-top: 56px; } .gm-tag, .gm-chips, .gm-kicker span { display: none; } .gm-title { font-size: clamp(2.4rem, 17vh, 4.4rem); } .gm-sub { margin-top: .6rem; }
  .gm-cta .btn--big { font-size: 1rem; padding: .6em 1.2em; }
  .gm-card { padding: 1rem 1.2rem; border-radius: 22px; } .gm-acts { margin-top: .6rem; } .gm-bigstars svg { width: 2.6rem !important; height: 2.6rem !important; } .gm-bigstars .bs:nth-child(2) { margin-top: -.5rem; }
  .gm-stats { margin: .5rem 0 .2rem; } .gm-trophy .trophy { width: 3.6rem; height: 3.6rem; } .gm-big { font-size: 2.6rem; } .gm-card h2 { margin-bottom: .1em; } .gm-sub2 { margin-bottom: .4rem; font-size: .85rem; }
  .gm-screen { padding-top: 60px; } .gm-head { margin-bottom: .6rem; } .gm-goallist { margin-top: .5rem; } .gm-goallist li { padding-top: .2em; padding-bottom: .2em; } .gm-hint { display: none; }
  .gm-banner { top: 10%; }
}

/* short landscape phones: tools move to the top-left, cards turn compact */
@media (min-aspect-ratio: 23/20) and (max-width: 760px) {
  .gm.is-play .gm-top { justify-content: flex-start; } .gm.is-play .gm-tools { margin-left: 0; }
  .gm-tool { width: 40px; height: 40px; border-radius: 11px; } .gm-tool svg { width: 18px; height: 18px; }
}
@media (min-aspect-ratio: 23/20) and (max-height: 460px) {
  .gm-screen--center { padding: 8px max(12px, var(--safe-r)) 8px max(12px, var(--safe-l)); }
  .gm-card { padding: .7rem 1.1rem .8rem; border-radius: 20px; width: min(36em, 100%); }
  .gm-card h2 { font-size: 1.5rem; margin: 0 0 .15em; } .gm-k { font-size: .62rem; }
  .gm-bigstars .bs svg { width: 2.4rem; height: 2.4rem; } .gm-bigstars .bs:nth-child(2) { margin-top: -.4rem; } .gm-bigstars { margin: .2rem 0 0; }
  .gm-stats { margin: .4rem 0 .1rem; gap: .4rem; } .gm-stats .gm-chip { padding: .35em .3em; } .gm-chip b { font-size: 1.05rem; }
  .gm-gains { margin-top: .4rem; } .gm-note, .gm-rec { display: none; } .gm-big { font-size: 2.4rem; }
  .gm-acts { grid-template-columns: 1.5fr 1fr 1fr; align-items: center; gap: .45rem; margin-top: .5rem; } .gm-acts .row { display: contents; } .gm-acts .btn { font-size: .78rem; padding: .6em .5em; }
  .gm-goallist { margin-top: .4rem; gap: .3rem; } .gm-goallist li { grid-template-columns: 2rem 1fr; padding: .15em .6em .15em .3em; } .gm-goallist img { width: 2rem; height: 2rem; }
  .gm-progress { margin-top: .4rem; gap: .25rem; } .gm-progress li { padding: .25em .8em; }
  .gm-card--how { padding: .8rem 1.1rem; } .gm-best li { padding: .15em .8em; } .gm-h3 { margin: .5em 0 .3em; }
  .gm-setbox--mini { margin-top: .5rem; } .gm-sub2 { margin: 0 0 .3rem; }
  .gm-acts .btn--big { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { .gm-title b, .gm-node.cur .num, .gm-trophy .trophy, .gm-boost.on, .gm-moves.low b { animation: none; } }
@media (max-width: 520px) { .gm-stats { grid-template-columns: 1fr 1fr; } .gm-setbox--mini { grid-template-columns: 1fr; } .gm-card { padding: 1.3rem 1.1rem 1.1rem; } }
