:root { --g: #1fa34a; --y: #f2c200; --b: #2f6fd0; --ink: #f4f6ff; --mut: #aab4dc; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0a0e1e; color: var(--ink); font-family: "Segoe UI", system-ui, sans-serif; }
canvas { position: fixed; inset: 0; display: none; }
#gl.on { display: block; z-index: 1; }
#hud.on { display: block; z-index: 2; cursor: crosshair; }

#lobby { position: fixed; inset: 0; z-index: 10; overflow-y: auto; display: flex; justify-content: center;
  background: radial-gradient(ellipse at 15% 0%, #1b4d6e 0%, transparent 55%), radial-gradient(ellipse at 90% 100%, #14502e 0%, transparent 50%), #0a0e1e; }
#lobby.hidden { display: none; }
.flagbar { position: fixed; left: 0; right: 0; top: 0; height: 8px; display: flex; z-index: 11; }
.flagbar i { flex: 1; } .flagbar i:nth-child(1) { background: var(--g); } .flagbar i:nth-child(2) { background: var(--y); } .flagbar i:nth-child(3) { background: var(--b); }
.wrap { width: 100%; max-width: 980px; padding: 34px 20px 28px; display: flex; flex-direction: column; gap: 22px; }
header { text-align: center; }
.tag { display: inline-block; background: rgba(255,255,255,.1); border-radius: 99px; padding: 5px 14px; font-weight: 700; font-size: .85rem; color: var(--y); }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; margin-top: 10px; text-shadow: 0 5px 0 rgba(0,0,0,.35); }
h1 span { color: var(--y); }
.sub { color: var(--mut); margin-top: 6px; font-size: 1.05rem; }
.panel { background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.13); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(8px); }
label { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--mut); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
label.chk { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink); }
input[type=text], input:not([type]) { background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; padding: 10px 12px; font-size: 1rem; font-family: inherit; outline: none; }
input:focus { border-color: var(--y); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } }
.mode { background: rgba(0,0,0,.22); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mode h2 { font-size: 1.3rem; } .mode p { color: #d3d9f5; font-size: .93rem; line-height: 1.4; }
details { background: rgba(0,0,0,.2); border-radius: 10px; padding: 8px 10px; } summary { cursor: pointer; font-weight: 700; color: var(--mut); }
details label { margin-top: 8px; }
button { font-family: inherit; cursor: pointer; border: 0; font-weight: 900; }
.big { margin-top: auto; padding: 13px; border-radius: 12px; font-size: 1.1rem; color: #1b1b2f; background: linear-gradient(180deg, #ffe27a, #f2b300); box-shadow: 0 5px 0 #a67a00; }
.big.alt { background: linear-gradient(180deg, #8dffb4, #1fa34a); box-shadow: 0 5px 0 #0e6a2c; }
.big:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.small { margin-top: 8px; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: .8rem; }
.err { min-height: 1.3em; color: #ff9b9b; font-weight: 700; text-align: center; }
.scen h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } @media (max-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: rgba(255,255,255,.05); border: 2px dashed rgba(255,255,255,.15); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; opacity: .6; }
.card.on { opacity: 1; border: 2px solid var(--y); background: rgba(242,194,0,.12); }
.card span { color: var(--mut); font-size: .85rem; } .card em { color: var(--g); font-style: normal; font-weight: 800; font-size: .8rem; }
footer { text-align: center; color: var(--mut); font-size: .86rem; line-height: 1.8; }
kbd { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; font-family: inherit; font-size: .8rem; color: #fff; font-weight: 700; }
