* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a0f2e; color: #f4ecff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
canvas { display: block; }

.overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at bottom, #ff5a1a55, transparent 60%), #1a0f2e; z-index: 10; }
.card { width: min(420px, 100%); background: #2a1a46ee; border: 1px solid #5b3d8a; border-radius: 16px; padding: 24px; }
h1 { margin: 0; font-size: 2.2rem; color: #ff8a3d; letter-spacing: .02em; }
h2 { font-size: 1rem; margin: 24px 0 8px; color: #c9b5ff; }
.tag { margin: 4px 0 20px; color: #c9b5ff; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; background: transparent; color: #c9b5ff; border: 1px solid #5b3d8a; }
.tabs button.active { background: #5b3d8a; color: #fff; }

.tab { display: none; flex-direction: column; gap: 12px; }
.tab.active { display: flex; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: #c9b5ff; }
input { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid #5b3d8a; background: #1a0f2e; color: #fff; }
button { font: inherit; padding: 12px 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: #ff6a2a; color: #1a0f2e; font-weight: 700; }
button:hover { filter: brightness(1.1); }
.hint { margin: 0; font-size: .8rem; color: #9d8bc4; }
.error { color: #ff6b81; min-height: 1.2em; margin: 12px 0 0; }
.muted { color: #9d8bc4; }
ol { margin: 0; padding-left: 1.5em; }
ol li { padding: 2px 0; }
ol li span { float: right; color: #ff8a3d; font-variant-numeric: tabular-nums; }

#whats-new { z-index: 20; background: #1a0f2ecc; }
#whats-new .card { display: flex; flex-direction: column; }
.news { margin: 0 0 20px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; line-height: 1.4; }
.news b { color: #ff8a3d; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud-top { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; align-items: center; pointer-events: auto; }
#hud-top button { padding: 6px 12px; font-size: .85rem; }
#hud-stats { position: absolute; top: 12px; left: 12px; background: #0008; padding: 8px 12px; border-radius: 10px;
  font-variant-numeric: tabular-nums; }
#hud-feed { position: absolute; top: 56px; left: 12px; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
#hud-feed div { background: #0008; padding: 4px 10px; border-radius: 8px; }
#hud-help { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 32px));
  text-align: center; font-size: .85rem; background: #0008; padding: 8px 12px; border-radius: 10px; }
