/* Grok Tower Siege - one-screen neon layout (shared base with Grok Prism Temples, Skyfleet, Kaiju Rampage, Coaster and Mini Golf). No page scroll: panels scroll inside themselves. */
html, body.gm-body { height: 100%; overflow: hidden; margin: 0; }
body.gm-body { height: 100vh; height: 100dvh; font-family: Inter, system-ui, sans-serif; --gm-neon: #3dff8a; --gm-hot: #ff5ab4; --gm-cyan: #4ae0ff; --gm-glass: rgba(8, 30, 22, .66); --gm-edge: rgba(61, 255, 138, .26); }
.gm-app { box-sizing: border-box; height: 100%; max-width: 1680px; margin: 0 auto; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.gm-top { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; flex: 0 0 auto; position: relative; z-index: 40; }
.gm-back { font-weight: 600; text-decoration: none; white-space: nowrap; color: #e6fff0; }
.gm-title { margin: 0; font-family: Chango, Georgia, serif; font-weight: 400; font-size: clamp(1.2rem, 2.4vw, 1.8rem); line-height: 1.1; white-space: nowrap; color: #f2fff6; text-shadow: 0 0 18px rgba(61,255,138,.45); }
.gm-links { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.gm-links a, .gm-scores-btn { font: 600 .9rem Inter, system-ui, sans-serif; color: #dfffea; text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--gm-edge); background: rgba(6, 26, 18, .6); cursor: pointer; }
.gm-scores-btn { display: none; }
.gm-choices-wrap { position: relative; }
.gm-choices-btn { font: 600 .92rem Inter, system-ui, sans-serif; cursor: pointer; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--gm-neon); background: rgba(10, 40, 26, .8); color: #e6fff0; }
.gm-choices-btn[aria-expanded=true] { background: #134d30; }
.gm-choices { position: absolute; top: calc(100% + 8px); left: 0; width: 270px; padding: 10px; border-radius: 16px; background: rgba(6, 22, 16, .97); border: 1px solid var(--gm-edge); box-shadow: 0 18px 50px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 4px; max-height: calc(100dvh - 80px); overflow: auto; }
.gm-choices[hidden] { display: none; }
.gm-ch-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 6px; font-family: Chango, Georgia, serif; }
.gm-x { font-size: 1.3rem; line-height: 1; border: 0; background: transparent; cursor: pointer; color: #e6fff0; }
.gm-ch-item { font: 600 .9rem Inter, system-ui, sans-serif; text-align: left; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: #e6fff0; }
.gm-ch-item:hover, .gm-ch-item:focus-visible { background: rgba(61,255,138,.12); border-color: var(--gm-edge); outline: none; }
.gm-ch-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #8ff7b8; margin: 6px 2px 2px; }
.gm-seg { display: flex; gap: 3px; flex-wrap: wrap; }
.gm-seg button { flex: 1 1 0; font: 600 .8rem Inter, system-ui, sans-serif; padding: 5px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #d9f5e4; cursor: pointer; }
.gm-seg button.on { background: linear-gradient(180deg, #3dff8a, #17a456); color: #04140b; border-color: transparent; }
.gm-small { font-size: .78rem; line-height: 1.35; }
.gm-muted { color: #9fcfb2; }
.gm-body main.gm-main { max-width: none; width: 100%; margin: 0; padding: 0; box-sizing: border-box; }
.gm-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) minmax(220px, 290px); grid-template-areas: "left center right"; gap: 10px; }
.gm-panel { min-height: 0; overflow: auto; padding: 10px 12px; border-radius: 16px; background: var(--gm-glass); border: 1px solid var(--gm-edge); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-sizing: border-box; }
.gm-left { grid-area: left; display: flex; flex-direction: column; gap: 8px; }
.gm-right { grid-area: right; }
.gm-center { grid-area: center; min-height: 0; min-width: 0; display: flex; }
.gm-status { padding: 8px 10px; border-radius: 12px; background: linear-gradient(135deg, rgba(30,120,80,.5), rgba(4,16,28,.6)); border: 1px solid rgba(255,255,255,.1); font-size: .86rem; line-height: 1.3; }
.gm-row { display: flex; gap: 6px; }
.gm-row input { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--gm-edge); background: rgba(0,0,0,.35); color: #fff; }
.gm-me { font-size: .88rem; }
.gm-mini { font: 600 .72rem Inter, sans-serif; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--gm-edge); background: transparent; color: #bdf5d2; cursor: pointer; }
.gm-btn { font: 700 .92rem Inter, system-ui, sans-serif; padding: 8px 12px; border-radius: 12px; border: 0; cursor: pointer; color: #04140b; background: linear-gradient(180deg, #5dffa0, #19b85e); box-shadow: 0 4px 14px rgba(61,255,138,.25); }
.gm-btn:hover, .gm-btn:focus-visible { filter: brightness(1.1); outline: 2px solid #eafff2; outline-offset: 1px; }
.gm-btn.ghost { background: rgba(255,255,255,.06); color: #e6fff0; border: 1px solid var(--gm-edge); box-shadow: none; }
.gm-btn.hot { background: linear-gradient(180deg, #ff8ac8, #e0338c); color: #1a0010; }
.gm-btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.gm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.gm-career { font-size: .84rem; line-height: 1.45; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.25); }
.gm-career b { color: #ffd166; }
.gm-paints { display: flex; flex-wrap: wrap; gap: 5px; }
.gm-paints button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; position: relative; }
.gm-paints button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gm-neon); }
.gm-paints button[disabled] { opacity: .3; cursor: not-allowed; }
.gm-paints button[disabled]::after { content: "\1F512"; position: absolute; inset: 0; font-size: 11px; display: grid; place-items: center; }
.gm-keys { color: #b9e8cb; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.08); }
.gm-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.gm-tab { flex: 1; font: 600 .76rem Inter, sans-serif; padding: 5px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #d9f5e4; cursor: pointer; }
.gm-tab.on { background: rgba(61,255,138,.18); border-color: var(--gm-neon); }
.gm-board table.board { font-size: .84rem; }
.gm-board table.board td, .gm-board table.board th { padding: 4px 5px; border-bottom: 1px solid rgba(255,255,255,.08); }
.gm-board table.board th { color: #8ff7b8; }
/* stage */
.gm-stage { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; background: #05060f; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08), 0 0 40px rgba(61,255,138,.12); user-select: none; -webkit-user-select: none; touch-action: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gm-load { position: absolute; inset: 0; display: grid; place-items: center; font: 400 1.3rem Chango, Georgia, serif; color: #bfffd8; background: radial-gradient(circle at 50% 40%, #13301f, #05060f); }
.gm-load[hidden] { display: none; }
.gm-hud { position: absolute; inset: 0; pointer-events: none; color: #fff; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.gm-hud[hidden] { display: none; }
.gm-hud-tl { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; gap: 1px; font-size: .86rem; }
.gm-hud-tl b { font-family: Chango, Georgia, serif; font-weight: 400; font-size: 1rem; color: #bfffd8; }
.gm-time { font: 800 1.45rem/1.1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.gm-hud-tr { position: absolute; right: 12px; top: 10px; text-align: right; display: flex; flex-direction: column; font-size: .84rem; }
.gm-pos { font: 400 2rem/1 Chango, Georgia, serif; color: #ffd166; }
.gm-hud-bl { position: absolute; left: 12px; bottom: 30px; display: flex; align-items: flex-end; gap: 14px; }
.gm-temp span { font-size: .68rem; letter-spacing: .14em; }
.gm-tbar { width: 170px; height: 14px; border-radius: 7px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.3); overflow: hidden; }
.gm-tbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3dff8a, #ffd166 60%, #ff3b3b); transition: width .08s linear; }
.gm-tbar i.hot { animation: gm-blink .25s steps(2) infinite; }
@keyframes gm-blink { 50% { opacity: .35; } }
.gm-speed { font-size: .8rem; } .gm-speed b { font: 800 1.6rem/1 Inter, sans-serif; font-variant-numeric: tabular-nums; }
.gm-prog { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); }
.gm-prog i { position: absolute; top: -4px; width: 10px; height: 14px; margin-left: -5px; border-radius: 4px; border: 1px solid rgba(0,0,0,.6); }
.gm-prog .gm-prog-fin { right: -2px; width: 4px; margin: 0; background: repeating-linear-gradient(0deg, #fff 0 3px, #111 3px 6px); }
.gm-call { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font: 400 clamp(1.4rem, 4vw, 2.8rem) Chango, Georgia, serif; color: #fff; text-shadow: 0 0 20px rgba(61,255,138,.8), 0 3px 6px #000; opacity: 0; transition: opacity .2s; }
.gm-call.on { opacity: 1; }
.gm-call small { display: block; font: 700 .95rem Inter, sans-serif; margin-top: 6px; }
/* touch */
.gm-touch { position: absolute; inset: auto 0 26px 0; display: flex; justify-content: space-between; padding: 0 10px; pointer-events: none; }
.gm-touch[hidden] { display: none; }
.gm-touch button { pointer-events: auto; touch-action: none; font: 800 1rem Inter, sans-serif; color: #fff; border-radius: 50%; width: 58px; height: 58px; border: 2px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); }
.gm-touch button.on { background: rgba(61,255,138,.5); }
.gm-tl { display: grid; grid-template-columns: 58px 58px; gap: 6px; }
.gm-tr { display: flex; gap: 10px; align-items: flex-end; }
.gm-tr .gs { width: 84px; height: 84px; background: rgba(25,184,94,.45); }
.gm-tr .tb { width: 70px; height: 70px; font-size: .78rem; background: rgba(224,51,140,.45); }
/* menu overlay */
.gm-menu { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box; background: radial-gradient(ellipse at 50% 30%, rgba(5,10,20,.35), rgba(3,6,12,.82)); overflow: auto; }
.gm-menu[hidden] { display: none; }
.gm-card { width: min(760px, 100%); max-height: 100%; overflow: auto; box-sizing: border-box; padding: 16px 18px; border-radius: 18px; background: rgba(6, 20, 16, .88); border: 1px solid var(--gm-edge); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.gm-card h2 { margin: 0 0 6px; font: 400 clamp(1.3rem, 3.2vw, 2.2rem) Chango, Georgia, serif; color: #f2fff6; text-shadow: 0 0 22px rgba(61,255,138,.5); }
.gm-card h3 { margin: 10px 0 6px; font: 700 .8rem Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8ff7b8; }
.gm-card p { margin: 4px 0 10px; font-size: .92rem; line-height: 1.4; color: #d7f4e2; }
.gm-logo { font: 400 clamp(2rem, 7vw, 4.4rem)/1 Chango, Georgia, serif; background: linear-gradient(180deg, #fff 10%, #7dffb0 55%, #18a85a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(61,255,138,.45)); margin: 0 0 4px; }
.gm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gm-circs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.gm-circs button { font: 700 .84rem Inter, sans-serif; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gm-edge); background: transparent; color: #e6fff0; cursor: pointer; }
.gm-circs button.on { background: rgba(61,255,138,.22); border-color: var(--gm-neon); }
.gm-tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.gm-trk { text-align: left; font: 600 .84rem Inter, sans-serif; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e6fff0; cursor: pointer; min-height: 70px; }
.gm-trk:hover, .gm-trk:focus-visible { border-color: var(--gm-neon); background: rgba(61,255,138,.1); outline: none; }
.gm-trk b { display: block; font-size: .95rem; margin-bottom: 3px; }
.gm-trk small { display: block; color: #a9d9bd; font-weight: 500; }
.gm-trk[disabled] { opacity: .4; cursor: not-allowed; }
.gm-med { font-size: 1rem; }
.gm-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.gm-res div { padding: 8px; border-radius: 12px; background: rgba(255,255,255,.05); text-align: center; font-size: .78rem; color: #a9d9bd; }
.gm-res b { display: block; font: 800 1.3rem Inter, sans-serif; color: #fff; }
.gm-how { columns: 2 260px; font-size: .88rem; line-height: 1.45; color: #d7f4e2; }
.gm-how p { break-inside: avoid; margin: 0 0 8px; }
/* designer */
.gm-ed { width: min(980px, 100%); }
.gm-pal { display: flex; flex-wrap: wrap; gap: 4px; }
.gm-pal button, .gm-edtools button { font: 600 .76rem Inter, sans-serif; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #e6fff0; cursor: pointer; }
.gm-pal button:hover, .gm-edtools button:hover { border-color: var(--gm-neon); }
.gm-edtools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.gm-edtools button.on { background: rgba(61,255,138,.3); }
.gm-chips { display: flex; flex-wrap: wrap; gap: 3px; max-height: 92px; overflow: auto; padding: 4px; border-radius: 10px; background: rgba(0,0,0,.3); }
.gm-chips span { font: 700 .72rem ui-monospace, Consolas, monospace; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.08); cursor: pointer; }
.gm-chips span.sel { background: #3dff8a; color: #04140b; }
#edProf { width: 100%; height: 110px; display: block; border-radius: 10px; background: #0a1420; margin: 6px 0; }
.gm-ed textarea { width: 100%; box-sizing: border-box; font: .76rem ui-monospace, Consolas, monospace; background: rgba(0,0,0,.4); color: #dfffea; border: 1px solid var(--gm-edge); border-radius: 8px; padding: 6px; resize: vertical; }
.gm-ed input[type=text] { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--gm-edge); background: rgba(0,0,0,.35); color: #fff; }
.gm-fpsline { color: #9fcfb2; margin: 6px 2px 0; }
/* narrower screens: scores go under the board */
@media (max-width: 1180px) {
  .gm-main { grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(120px, 28%); grid-template-areas: "left center" "right right"; }
  .gm-right { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 34%); grid-template-rows: auto minmax(0, 1fr); gap: 0 14px; } .gm-right .gm-tabs { grid-column: 1; } .gm-right .gm-board { grid-column: 1; overflow: auto; min-height: 0; } .gm-right > p { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: start; }
}
@media (max-width: 760px) {
  .gm-main { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(130px, 34%); grid-template-areas: "center center" "left right"; gap: 6px; }
  .gm-app { padding: 6px; gap: 6px; }
  .gm-hide-s { display: none; }
  .gm-links a { display: none; }
  .gm-panel { padding: 8px; }
  .gm-keys, .gm-card-wrap { display: none; } .gm-right { display: block; } .gm-right > p { display: none; } .gm-bar { gap: 2px; } .gm-bar button { padding: 4px 6px; min-width: 30px; } .gm-pow { width: 56px; }
  .gm-tbar { width: 110px; }
}
@media (max-height: 560px) and (min-width: 761px) { .gm-keys { display: none; } .gm-title { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .gm-tbar i.hot { animation: none; } }

/* --- golf additions --- */
.gm-strokes { font: 800 1.5rem/1.1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.gm-hud-tr b { font: 400 1.1rem Chango, Georgia, serif; color: #ffd166; }
.gm-bar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 16px; background: rgba(6, 18, 24, .62); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; }
.gm-bar button { font: 700 .82rem Inter, system-ui, sans-serif; color: #eafff4; min-width: 34px; padding: 6px 9px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); cursor: pointer; text-shadow: none; }
.gm-bar button:hover, .gm-bar button:focus-visible { border-color: var(--gm-neon); outline: none; background: rgba(61,255,138,.14); }
.gm-bar button.on { background: rgba(61,255,138,.3); border-color: var(--gm-neon); }
.gm-bar .gm-putt { background: linear-gradient(180deg, #5dffa0, #19b85e); color: #04140b; border: 0; padding: 6px 14px; }
.gm-bar .gm-putt[disabled] { opacity: .45; }
.gm-pow { position: relative; width: 90px; height: 16px; border-radius: 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); overflow: hidden; }
.gm-pow i { position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, #3dff8a, #ffd166 60%, #ff4a4a); }
.gm-pow span { position: relative; display: block; text-align: center; font: 700 .68rem/16px Inter, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.gm-hud .gm-call { top: 26%; }
.gm-hud .gm-call.big { font-size: clamp(1.8rem, 5.5vw, 3.6rem); color: #ffe27a; text-shadow: 0 0 26px rgba(255,210,80,.9), 0 3px 6px #000; }
.gm-card-wrap { min-height: 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.gm-scorecard { overflow: auto; min-height: 0; }
.gm-scorecard table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.gm-scorecard td, .gm-scorecard th { padding: 2px 4px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.gm-scorecard th { color: #8ff7b8; font-weight: 700; }
.gm-scorecard td:first-child, .gm-scorecard th:first-child { text-align: left; }
.gm-scorecard tr.cur { background: rgba(61,255,138,.14); }
.gm-u { color: #6dffb0; font-weight: 800; } .gm-o { color: #ff9a9a; } .gm-e { color: #fff; }
.gm-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.gm-course { text-align: left; font: 600 .84rem Inter, sans-serif; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); color: #fff; cursor: pointer; min-height: 96px; position: relative; overflow: hidden; }
.gm-course b { display: block; font: 400 1.02rem Chango, Georgia, serif; margin-bottom: 4px; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.gm-course small { display: block; color: rgba(255,255,255,.88); font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.gm-course:hover, .gm-course:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.gm-holes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.gm-holes button { font: 700 .78rem Inter, sans-serif; padding: 6px 2px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #e6fff0; cursor: pointer; line-height: 1.15; }
.gm-holes button small { display: block; font-weight: 500; font-size: .66rem; color: #a9d9bd; }
.gm-holes button:hover, .gm-holes button:focus-visible { border-color: var(--gm-neon); outline: none; }
.gm-holes button.done { background: rgba(61,255,138,.14); }
.gm-sc { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; margin: 6px 0; }
.gm-sc td, .gm-sc th { padding: 3px 4px; text-align: center; border: 1px solid rgba(255,255,255,.1); }
.gm-sc th { color: #8ff7b8; }
/* builder */
.gm-ed { width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; }
.gm-ed-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#edCv { width: 100%; height: auto; max-height: calc(100dvh - 220px); aspect-ratio: auto; display: block; border-radius: 12px; background: #081018; cursor: crosshair; touch-action: none; }
.gm-pal { display: flex; flex-wrap: wrap; gap: 3px; }
.gm-pal button, .gm-edtools button { font: 600 .72rem Inter, sans-serif; padding: 4px 6px; border-radius: 7px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #e6fff0; cursor: pointer; }
.gm-pal button.on { background: rgba(61,255,138,.35); border-color: var(--gm-neon); color: #fff; }
.gm-edtools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gm-ed label { font-size: .74rem; color: #a9d9bd; }
.gm-ed select, .gm-ed input[type=text], .gm-ed input[type=number] { font: inherit; font-size: .8rem; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--gm-edge); background: rgba(0,0,0,.35); color: #fff; }
.gm-ed textarea { width: 100%; box-sizing: border-box; font: .72rem ui-monospace, Consolas, monospace; background: rgba(0,0,0,.4); color: #dfffea; border: 1px solid var(--gm-edge); border-radius: 8px; padding: 6px; resize: vertical; height: 54px; }
.gm-edmsg { font-size: .78rem; min-height: 1.2em; color: #ffe27a; }
.gm-saved { max-height: 90px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.gm-saved div { display: flex; gap: 4px; align-items: center; font-size: .76rem; }
.gm-saved div span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .gm-ed { grid-template-columns: 1fr; } }

/* --- shared builder bits --- */
#code { width: 100%; box-sizing: border-box; font: .72rem ui-monospace, Consolas, monospace; background: rgba(0,0,0,.4); color: #dfffea; border: 1px solid var(--gm-edge); border-radius: 8px; padding: 5px; resize: vertical; height: 44px; }
.gm-stage.nohud .gm-hud { display: none; }
.gm-course .gc-med { position: absolute; right: 8px; top: 6px; font-size: 1.2rem; }


/* ---------- Grok Tower Siege ---------- */
body.gt-body { --gm-neon: #ffc24a; --gm-hot: #ff6a3d; --gm-cyan: #7ad8ff; --gm-glass: rgba(26, 18, 10, .72); --gm-edge: rgba(255, 194, 74, .3); }
.gt-body .gm-title { text-shadow: 0 0 18px rgba(255,194,74,.55); }
.gt-body .gm-back, .gt-body .gm-links a, .gt-body .gm-scores-btn, .gt-body .gm-choices-btn, .gt-body .gm-ch-item, .gt-body .gm-x { color: #fff4dc; }
.gt-body .gm-links a, .gt-body .gm-scores-btn { background: rgba(30, 20, 8, .6); }
.gt-body .gm-choices-btn { background: rgba(48, 32, 10, .85); }
.gt-body .gm-choices-btn[aria-expanded=true] { background: #5a3d10; }
.gt-body .gm-choices { background: rgba(24, 16, 8, .97); }
.gt-body .gm-ch-item:hover, .gt-body .gm-ch-item:focus-visible { background: rgba(255,194,74,.12); }
.gt-body .gm-btn { background: linear-gradient(180deg, #ffe08a, #e09a1e); box-shadow: 0 4px 14px rgba(255,194,74,.25); color: #241400; }
.gt-body .gm-btn.hot { background: linear-gradient(180deg, #ff9c72, #e0482a); color: #200800; }
.gt-body .gm-btn.ghost { background: rgba(255,255,255,.06); color: #fff4dc; border: 1px solid var(--gm-edge); box-shadow: none; }
.gt-body .gm-btn:hover, .gt-body .gm-btn:focus-visible { outline-color: #fff4dc; }
.gt-body .gm-seg button { color: #f6ead2; }
.gt-body .gm-seg button.on { background: linear-gradient(180deg, #ffe08a, #e09a1e); color: #241400; }
.gt-body .gm-status { background: linear-gradient(135deg, rgba(140,90,20,.55), rgba(20,12,6,.6)); }
.gt-body .gm-ch-label, .gt-body .gm-card h3, .gt-body .gm-board table.board th { color: #ffd98a; }
.gt-body .gm-tab { color: #f6ead2; }
.gt-body .gm-tab.on { background: rgba(255,194,74,.2); border-color: var(--gm-neon); }
.gt-body .gm-keys { color: #ead9b8; }
.gt-body .gm-muted, .gt-body .gm-fpsline { color: #cdb894; }
.gt-body .gm-mini { color: #ffe3a6; }
.gt-body .gm-stage { background: #0a0806; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08), 0 0 40px rgba(255,194,74,.12); }
.gt-body .gm-load { color: #ffe3a6; background: radial-gradient(circle at 50% 40%, #3a2a10, #0a0806); }
.gt-body .gm-card { background: rgba(26, 18, 10, .93); }
.gt-body .gm-card h2 { color: #fff6e2; text-shadow: 0 0 22px rgba(255,194,74,.6); }
.gt-body .gm-card p, .gt-body .gm-how { color: #f0e2c6; }
.gt-body .gm-logo { background: linear-gradient(180deg, #fff 10%, #ffd36a 55%, #c26a10); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255,194,74,.45)); }
.gt-body .gm-hud-tl b { color: #ffe3a6; }
.gt-body .gm-call { text-shadow: 0 0 20px rgba(255,194,74,.85), 0 3px 6px #000; }
.gt-body .gm-call.boss { color: #ff8a6a; text-shadow: 0 0 26px rgba(255,60,30,.9), 0 3px 6px #000; }
.gt-body .gm-res div { color: #d8c4a0; }
.gt-body .gm-trk { color: #fff4dc; }
.gt-body .gm-trk small { color: #d8c4a0; }
.gt-body .gm-trk:hover, .gt-body .gm-trk:focus-visible { background: rgba(255,194,74,.1); }
.gt-body .gm-circs button { color: #fff4dc; }
.gt-body .gm-circs button.on { background: rgba(255,194,74,.22); }
.gt-box { padding: 7px 9px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); }
.gt-prog { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: .8rem; }
.gt-prog span { display: block; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: #d8c4a0; }
.gt-prog b { font-size: .95rem; color: #ffd36a; font-variant-numeric: tabular-nums; }
/* HUD */
.gt-body .gm-hud-tl { font-size: .84rem; }
.gt-next { color: #ffe3a6; font-size: .78rem; }
.gt-body .gm-hud-tr { flex-direction: row; gap: 10px; align-items: center; }
.gt-gold, .gt-lives { font: 800 1.15rem/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18); }
.gt-gold::before { content: "\1FA99 "; } .gt-lives::before { content: "\2764\FE0F "; }
.gt-gold { color: #ffd36a; } .gt-lives { color: #ff9a9a; }
.gt-lives.hit { animation: gt-hit .4s; }
@keyframes gt-hit { 30% { background: rgba(255,40,40,.7); transform: scale(1.12); } }
.gt-boss { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: min(380px, 44%); text-align: center; font-size: .78rem; }
.gt-boss[hidden] { display: none; }
.gt-boss b { display: block; font: 400 .92rem Chango, Georgia, serif; color: #ff9a7a; }
.gt-boss i { display: block; height: 10px; border-radius: 5px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,140,100,.6); overflow: hidden; margin-top: 2px; }
.gt-boss u { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff3a2a, #ffb44a); text-decoration: none; transition: width .15s linear; }
.gt-tip { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: min(470px, calc(100% - 24px)); box-sizing: border-box; padding: 8px 30px 8px 12px; border-radius: 12px; background: rgba(28, 18, 6, .88); border: 1px solid var(--gm-neon); font: 600 .84rem/1.35 Inter, sans-serif; color: #fff4dc; text-shadow: none; pointer-events: auto; }
.gt-tip[hidden] { display: none; }
.gt-tip b { color: #ffd36a; }
.gt-tip button { position: absolute; right: 6px; top: 4px; border: 0; background: transparent; color: #fff4dc; font-size: 1.1rem; cursor: pointer; }
.gt-build, .gt-ctrl { position: absolute; bottom: 8px; display: flex; gap: 4px; padding: 5px 6px; border-radius: 14px; background: rgba(22, 14, 6, .7); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; text-shadow: none; }
.gt-build { left: 8px; max-width: calc(100% - 330px); flex-wrap: wrap; }
.gt-ctrl { right: 8px; align-items: center; }
.gt-build button, .gt-ctrl button { position: relative; font: 700 .8rem Inter, system-ui, sans-serif; color: #fff4dc; min-width: 34px; padding: 5px 7px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); cursor: pointer; line-height: 1.1; }
.gt-build button { width: 52px; padding: 4px 2px 3px; }
.gt-build button span { display: block; font-size: 1.25rem; line-height: 1.2; }
.gt-build button small { display: block; font-size: .7rem; color: #ffd36a; font-variant-numeric: tabular-nums; }
.gt-build button kbd { position: absolute; left: 3px; top: 1px; font: 700 .58rem Inter, sans-serif; color: #cdb894; }
.gt-build button:hover, .gt-ctrl button:hover, .gt-build button:focus-visible, .gt-ctrl button:focus-visible { border-color: var(--gm-neon); outline: none; background: rgba(255,194,74,.14); }
.gt-build button.on { background: rgba(255,194,74,.32); border-color: var(--gm-neon); box-shadow: 0 0 12px rgba(255,194,74,.4); }
.gt-build button.no { opacity: .5; }
.gt-build button.no small { color: #ff8a7a; }
.gt-build button.lock { opacity: .3; }
.gt-ctrl .gt-go { background: linear-gradient(180deg, #ffe08a, #e09a1e); color: #241400; border: 0; padding: 7px 12px; }
.gt-ctrl .gt-go.call { background: linear-gradient(180deg, #ff9c72, #e0482a); color: #200800; }
.gt-ctrl .gt-go[disabled] { opacity: .45; cursor: default; }
.gt-ctrl button.on { background: rgba(255,194,74,.32); border-color: var(--gm-neon); }
.gt-ab { width: 44px; height: 40px; padding: 0 !important; overflow: hidden; }
.gt-ab span { font-size: 1.25rem; position: relative; z-index: 1; }
.gt-ab i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0,0,0,.65); }
.gt-ab small { position: absolute; right: 3px; bottom: 1px; font-size: .58rem; color: #cdb894; z-index: 2; }
.gt-ab.ready { border-color: #ffd36a !important; box-shadow: 0 0 10px rgba(255,211,106,.45); }
.gt-ab[disabled] { opacity: .35; }
.gt-tpanel { position: absolute; right: 8px; top: 52px; width: 236px; max-height: calc(100% - 120px); overflow: auto; box-sizing: border-box; padding: 9px 10px; border-radius: 14px; background: rgba(24, 16, 8, .9); border: 1px solid var(--gm-edge); pointer-events: auto; text-shadow: none; font: 500 .78rem/1.35 Inter, sans-serif; color: #f6ead2; }
.gt-tpanel[hidden] { display: none; }
.gt-tpanel h4 { margin: 0 0 2px; font: 400 .98rem Chango, Georgia, serif; color: #ffe3a6; padding-right: 18px; }
.gt-tpanel .x { position: absolute; right: 6px; top: 4px; border: 0; background: transparent; color: #fff4dc; font-size: 1.1rem; cursor: pointer; }
.gt-tpanel .st { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.gt-tpanel .st span { color: #cdb894; } .gt-tpanel .st b { color: #fff; font-weight: 700; }
.gt-tpanel button { display: block; width: 100%; margin-top: 4px; text-align: left; font: 700 .78rem Inter, sans-serif; padding: 6px 8px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #fff4dc; cursor: pointer; }
.gt-tpanel button small { display: block; font-weight: 500; color: #d8c4a0; }
.gt-tpanel button.up { background: linear-gradient(180deg, rgba(255,224,138,.25), rgba(224,154,30,.2)); border-color: var(--gm-neon); }
.gt-tpanel button[disabled] { opacity: .45; cursor: default; }
.gt-tpanel button:hover:not([disabled]) { border-color: #fff4dc; }
.gt-tpanel .row { display: flex; gap: 4px; } .gt-tpanel .row button { flex: 1; text-align: center; }
.gt-tpanel .lvl { color: #ffd36a; font-weight: 700; }
.gt-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gt-float { position: absolute; left: 0; top: 0; width: 90px; margin: -10px 0 0 -45px; text-align: center; font: 800 .82rem Inter, sans-serif; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; white-space: nowrap; will-change: transform; }
.gt-float.g { color: #ffd36a; }
.gt-float.lv { font: 400 1.05rem Chango, Georgia, serif; color: #8affc0; width: 160px; margin-left: -80px; }
.gt-float[hidden] { display: none; }
/* menus */
.gt-regions { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.gt-regions button { font: 700 .82rem Inter, sans-serif; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--gm-edge); background: transparent; color: #fff4dc; cursor: pointer; }
.gt-regions button.on { background: rgba(255,194,74,.24); border-color: var(--gm-neon); }
.gt-regions button[disabled] { opacity: .4; cursor: not-allowed; }
.gt-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.gt-map { position: relative; text-align: left; font: 600 .8rem Inter, sans-serif; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); color: #fff; cursor: pointer; min-height: 92px; overflow: hidden; }
.gt-map b { display: block; font: 400 .98rem Chango, Georgia, serif; margin-bottom: 3px; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.gt-map small { display: block; color: rgba(255,255,255,.9); font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.gt-map .stars { position: absolute; right: 8px; top: 6px; font-size: .9rem; letter-spacing: 1px; }
.gt-map:hover, .gt-map:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.gt-map[disabled] { opacity: .38; cursor: not-allowed; filter: grayscale(.6); }
.gt-map.r0 { background: linear-gradient(150deg, #4c9a3a, #22561e); }
.gt-map.r1 { background: linear-gradient(150deg, #5a6a34, #2a2a18 70%, #6a3a20); }
.gt-map.r2 { background: linear-gradient(150deg, #8a5030, #3a2420 60%, #c04a10); }
.gt-map.r3 { background: linear-gradient(150deg, #34306a, #141230 70%, #4a2a6a); }
.gt-heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.gt-hero { text-align: left; font: 500 .78rem/1.35 Inter, sans-serif; padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #f6ead2; cursor: pointer; }
.gt-hero b { display: block; font: 400 1rem Chango, Georgia, serif; color: #ffe3a6; margin-bottom: 3px; }
.gt-hero .em { font-size: 1.8rem; float: right; }
.gt-hero.on { border-color: var(--gm-neon); background: rgba(255,194,74,.16); box-shadow: 0 0 14px rgba(255,194,74,.3); }
.gt-diff { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.gt-diff button { flex: 1 1 0; font: 700 .84rem Inter, sans-serif; padding: 8px; border-radius: 12px; border: 1px solid var(--gm-edge); background: transparent; color: #fff4dc; cursor: pointer; }
.gt-diff button small { display: block; font-weight: 500; font-size: .7rem; color: #d8c4a0; }
.gt-diff button.on { background: rgba(255,194,74,.24); border-color: var(--gm-neon); }
.gt-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.gt-branch { padding: 8px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 5px; }
.gt-branch h5 { margin: 0 0 2px; font: 700 .74rem Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ffd98a; }
.gt-perk { text-align: left; font: 600 .76rem/1.3 Inter, sans-serif; padding: 6px 7px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #f6ead2; cursor: pointer; }
.gt-perk small { display: block; font-weight: 500; color: #cdb894; }
.gt-perk.own { background: rgba(255,194,74,.22); border-color: var(--gm-neon); color: #fff; }
.gt-perk[disabled] { opacity: .4; cursor: not-allowed; }
.gt-big-stars { font-size: 2.4rem; letter-spacing: 6px; text-align: center; margin: 6px 0; }
.gt-foes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; font-size: .8rem; color: #f0e2c6; }
.gt-foes div b { color: #ffd36a; }
@media (max-width: 1180px) { .gt-build { max-width: calc(100% - 300px); } }
@media (max-width: 900px) { .gt-build button { width: 44px; } .gt-build button span { font-size: 1.05rem; } .gt-ctrl button { padding: 4px 5px; min-width: 28px; } .gt-ab { width: 36px; height: 34px; } }
@media (max-width: 760px) {
  .gt-build { left: 4px; right: 4px; bottom: 48px; max-width: none; justify-content: center; padding: 3px; gap: 2px; }
  .gt-build button { width: 40px; padding: 2px 1px; } .gt-build button span { font-size: .95rem; } .gt-build button small { font-size: .62rem; } .gt-build button kbd { display: none; }
  .gt-ctrl { left: 4px; right: 4px; bottom: 4px; justify-content: center; padding: 3px; gap: 3px; }
  .gt-tpanel { top: 44px; right: 4px; width: 200px; max-height: calc(100% - 150px); font-size: .72rem; }
  .gt-tip { top: 44px; font-size: .74rem; }
  .gt-gold, .gt-lives { font-size: .9rem; padding: 3px 7px; }
  .gt-boss { top: 40px; width: 60%; }
  .gt-body .gm-hud-tl { font-size: .72rem; } .gt-body .gm-hud-tl b { font-size: .82rem; }
}
/* short landscape phones: board beside a slim side panel, scores hidden (portrait shows them) */
@media (max-height: 520px) and (orientation: landscape) {
  .gm-app { padding: 4px 6px; gap: 4px; }
  .gm-top { flex-wrap: nowrap; gap: 6px; } .gm-hide-s { display: none; } .gm-title { font-size: 1rem; } .gm-links a { display: none; } .gm-choices-btn { padding: 4px 10px; font-size: .82rem; }
  .gm-main { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "left center"; gap: 6px; }
  .gm-right { display: none; } .gm-keys, .gt-prog { display: none; } .gm-panel { padding: 6px 8px; }
  .gm-modes .gm-btn { padding: 6px 6px; font-size: .78rem; }
  .gt-build { max-width: calc(100% - 64px); left: 4px; bottom: 4px; padding: 3px; gap: 2px; } .gt-build button { width: 40px; padding: 2px 1px; } .gt-build button span { font-size: .95rem; } .gt-build button kbd { display: none; }
  .gt-ctrl { flex-direction: column; right: 4px; bottom: 4px; padding: 3px; gap: 2px; } .gt-ctrl button { min-width: 0; padding: 3px 4px; font-size: .7rem; } .gt-ab { width: 40px; height: 30px; } .gt-ctrl .gt-go { padding: 4px; }
  .gt-tpanel { top: 36px; right: 58px; width: 200px; max-height: calc(100% - 44px); font-size: .72rem; }
  .gt-tip { top: 36px; font-size: .74rem; }
  .gt-gold, .gt-lives { font-size: .85rem; padding: 2px 7px; }
  .gt-body .gm-hud-tl { font-size: .7rem; } .gt-body .gm-hud-tl b { font-size: .8rem; }
  .gm-card { padding: 10px 12px; } .gm-card h2 { font-size: 1.2rem; } .gm-logo { font-size: 2rem; }
}
/* the bars follow the size of the board itself */
.gt-body .gm-stage { container-type: inline-size; container-name: stage; }
@container stage (max-width: 760px) {
  .gt-build { left: 50%; right: auto; transform: translateX(-50%); width: max-content; bottom: 50px; max-width: calc(100% - 12px); justify-content: center; }
  .gt-build button { width: 46px; }
  .gt-ctrl { left: 50%; right: auto; transform: translateX(-50%); bottom: 6px; }
}
@container stage (max-width: 420px) { .gt-build { bottom: 46px; gap: 2px; padding: 3px; } .gt-build button { width: 40px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .gt-build { left: 4px; right: auto; transform: none; bottom: 4px; max-width: calc(100% - 64px); justify-content: flex-start; } .gt-build button { width: 40px; }
  .gt-ctrl { top: 34px; bottom: auto; left: auto; right: 4px; transform: none; }
}
.gt-ctrl button { white-space: nowrap; }
