/* Gully Arcade (gullystudio.xyz/arcade/): Neon Chrome on the Studio Night tokens. Mobile first, 44 px targets. */
:root { --ab-bg: #05070d; --ab-panel: #0b1120; --ab-line: #18233a; --ab-text: #eef3ff; --ab-text2: #9fb0cf; --ab-muted: #6f80a0; --ab-blue: #1fa3ff; --ab-cyan: #33d6ff; --ab-gold: #f2c14e; --ab-green: #2bd67b; --ab-red: #ff4d5e; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body.ab { background: var(--ab-bg); color: var(--ab-text); font: 500 15px/1.5 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100svh; display: flex; flex-direction: column; }
.ai { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ab-skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ab-text); color: #06121F; padding: 10px 14px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.ab-skip:focus { left: 8px; }
a { color: var(--ab-cyan); }
:focus-visible { outline: 2px solid var(--ab-cyan); outline-offset: 2px; }
.ab-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--ab-line); background: rgba(6, 18, 31, .92); position: sticky; top: 0; z-index: 20; }
.ab-brand { line-height: 0; flex: none; }
.ab-top .gs-tile img { width: 140px !important; }
.ab-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--ab-line); border-radius: 999px; color: var(--ab-text); text-decoration: none; font-weight: 700; font-size: 14px; }
.ab-back:hover { border-color: var(--ab-blue); }
.ab-r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 420px) { .ab-top .gs-tile img { width: 112px !important; } .ab-back span { display: none; } .ab-back { width: 44px; justify-content: center; padding: 0; } }
main { flex: 1; width: 100%; }
.ab-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--ab-line); color: var(--ab-muted); font-size: 13px; }
.ab-foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ab-foot nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ab-text2); text-decoration: none; }
.ab-foot nav a:hover { color: var(--ab-text); }
.ab-foot .ai { width: 16px; height: 16px; }
.ab-badge { display: inline-flex; align-items: center; min-height: 44px; }
.ab-badge img { width: 127px; height: 32px; }
.ab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ab-line); background: var(--ab-panel); color: var(--ab-text); font: 700 14px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.ab-btn:hover { border-color: var(--ab-blue); }
.ab-btn.pri { background: linear-gradient(180deg, #5cc8ff, #1f8fff); color: #001425; border-color: transparent; }
.ab-btn[aria-pressed="true"] { border-color: var(--ab-cyan); box-shadow: inset 0 0 0 1px var(--ab-cyan); }
.ab-btn:disabled { opacity: .5; cursor: default; }
/* hub */
.ab-hub { max-width: 1200px; margin: 0 auto; padding: 28px 16px 40px; }
.ab-hub h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.03em; margin: 6px 0 8px; }
.ab-hub > p { color: var(--ab-text2); max-width: 640px; margin: 0 0 20px; }
.ab-eb { display: inline-flex; align-items: center; gap: 8px; color: var(--ab-cyan); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ab-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .ab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ab-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ab-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--ab-line); border-radius: 18px; background: linear-gradient(135deg, #0d1d36, #08101f); color: inherit; text-decoration: none; }
a.ab-card:hover { border-color: var(--ab-blue); }
.ab-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.ab-card h2 .ai { color: var(--ab-cyan); width: 24px; height: 24px; }
.ab-card p { margin: 0; color: var(--ab-text2); font-size: 14px; }
.ab-st { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.ab-st.live { background: var(--ab-green); color: #03140a; }
.ab-st.soon { border: 1px solid var(--ab-line); color: var(--ab-text2); }
.ab-st .ai { width: 14px; height: 14px; }
/* game layout: canvas fills the stage, HUD on top, panel below on phones / beside on desktop */
.ab-game main { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
@media (min-width: 960px) { .ab-game main { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: none; } }
.stage { position: relative; min-height: min(100vw, 62svh); background: radial-gradient(700px 400px at 50% 30%, rgba(31, 163, 255, .22), transparent 70%), linear-gradient(#060a14, #03050a); overflow: hidden; touch-action: none; }
@media (min-width: 960px) { .stage { min-height: calc(100svh - 61px - 69px); } }
.stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 2; }
.hud > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(7, 18, 31, .86); border: 1px solid var(--ab-line); font-weight: 700; font-size: 13px; }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ab-cyan); box-shadow: 0 0 8px var(--ab-cyan); }
.pill .dot.w { background: #e8eef6; box-shadow: 0 0 8px #e8eef6; }
.pill .dot.think { animation: ab-pulse 1s ease-in-out infinite; }
@keyframes ab-pulse { 50% { opacity: .3; } }
.load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ab-text2); font-weight: 700; z-index: 1; }
.panel { border-top: 1px solid var(--ab-line); background: var(--ab-panel); padding: 14px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 960px) { .panel { border-top: 0; border-left: 1px solid var(--ab-line); overflow: auto; max-height: calc(100svh - 61px - 69px); } }
.panel h1 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel h1 .ai { color: var(--ab-cyan); }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ab-muted); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.panel h2 .ai { width: 16px; height: 16px; }
.panel p { margin: 0; color: var(--ab-text2); font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seg .ab-btn { padding: 0; }
.lb { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.lb th, .lb td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--ab-line); }
.lb th { color: var(--ab-muted); font-weight: 700; font-size: 12px; }
.lb td.r, .lb th.r { text-align: right; }
.lb .empty td { color: var(--ab-muted); }
.note { font-size: 12.5px !important; color: var(--ab-muted) !important; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(120px); background: var(--ab-text); color: #06121F; padding: 12px 16px; border-radius: 12px; font-weight: 700; z-index: 60; transition: transform .3s; max-width: calc(100vw - 32px); }
.toast.on { transform: translateX(-50%) translateY(0); }
.banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; background: rgba(7, 18, 31, .94); border: 1px solid var(--ab-blue); border-radius: 18px; padding: 18px 20px; text-align: center; box-shadow: 0 0 40px rgba(31, 163, 255, .45); display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 240px; }
.banner b { font-size: 22px; }
.banner[hidden] { display: none; }
/* docs (licences) */
.ab-doc { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.ab-doc h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin: 0 0 10px; }
.ab-doc h2 { font-size: 18px; margin: 24px 0 8px; }
.ab-doc p { color: var(--ab-text2); }
.ab-tw { overflow-x: auto; border: 1px solid var(--ab-line); border-radius: 12px; }
.ab-tw table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.ab-tw th, .ab-tw td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--ab-line); vertical-align: top; }
.ab-tw thead th { color: var(--ab-muted); font-size: 12px; }
.ab-tw tbody th a { display: inline-flex; align-items: center; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .pill .dot.think { animation: none; } .toast { transition: none; } }
/* Neon Blocks colour swatches */
.ab-btn.sw { width: 44px; padding: 0; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 12px var(--c); }
.ab-btn.sw[aria-pressed="true"] { border-color: #fff; outline: 2px solid var(--c); outline-offset: 2px; }
