@charset "UTF-8";
/* Decree of Fury — shared UI design system (lobby + construction).
   CSP: no inline styles; everything is classes + custom properties. System fonts only. */
:root {
  --bg: #0b1118; --bg-2: #101923; --panel: rgba(14, 21, 30, .88); --panel-solid: #121b26;
  --line: rgba(196, 165, 107, .22); --line-strong: rgba(196, 165, 107, .5);
  --text: #efe7d6; --muted: #9ba6b3; --gold: #d8b36a; --gold-2: #f0cf8a; --gold-dark: #8a6a2e;
  --north: #7cc9ff; --south: #ff9c6b; --good: #8fd39b; --bad: #f08a7a; --warn: #f2c66d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px; --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  font-family: var(--sans); color: var(--text); background: var(--bg); color-scheme: dark; font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; overflow-x: hidden; line-height: 1.45; }
button, input, select, a, summary { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: .01em; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small-text { font-size: .82rem; }
.eyebrow, .micro, .kicker { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.micro { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Backdrop */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop-art { position: absolute; inset: -4%; background: url('/assets/arena-hero.webp') center 40% / cover no-repeat; filter: saturate(1.05) brightness(.78); transform: scale(1.02); }
.backdrop-vignette { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 30%, rgba(11, 17, 24, .15), rgba(11, 17, 24, .85) 75%),
  linear-gradient(180deg, rgba(11, 17, 24, .55), rgba(11, 17, 24, .25) 40%, rgba(11, 17, 24, .9)); }
@media (prefers-reduced-motion: no-preference) {
  .backdrop-art { animation: drift 60s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1.5%, -1%, 0); } }
}

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(14px, 3vw, 32px); background: linear-gradient(180deg, rgba(8, 12, 18, .92), rgba(8, 12, 18, .55) 80%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.1rem; letter-spacing: .14em; }
.brand small { font-size: .7em; color: var(--gold); letter-spacing: .2em; }
.top-right { display: flex; align-items: center; gap: 10px; }
.badge { white-space: nowrap; font-size: .64rem; letter-spacing: .2em; color: var(--gold); border: 1px solid var(--line-strong); padding: 5px 9px; border-radius: 3px; }
.conn { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 10px var(--warn); }
body[data-status="online"] .conn { color: var(--good); } body[data-status="online"] .conn::before { background: var(--good); box-shadow: 0 0 10px var(--good); }
body[data-status="offline"] .conn { color: var(--bad); } body[data-status="offline"] .conn::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: none; }
body[data-status="reconnecting"] .conn::before, body[data-status="connecting"] .conn::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)), var(--panel-solid); color: var(--text); padding: 11px 18px; min-height: 44px;
  font-weight: 600; letter-spacing: .04em; text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, filter .15s ease; }
.btn:hover:not(:disabled) { filter: brightness(1.12); box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px rgba(0, 0, 0, .35); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #e9c87c, #b88a3c 60%, #9a6f2b); color: #1a1208; border-color: #f3dca3; text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 0 0 1px #f3dca3, 0 8px 24px rgba(216, 179, 106, .35); }
.btn.ghost { background: rgba(255, 255, 255, .03); }
.btn.text { background: none; border: none; min-height: 32px; padding: 6px 8px; color: var(--muted); font-weight: 500; }
.btn.text:hover:not(:disabled) { color: var(--text); box-shadow: none; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: .82rem; }
.btn.xl { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.btn .meta { font-size: .68rem; letter-spacing: .12em; opacity: .75; font-weight: 500; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.is-ready { background: linear-gradient(180deg, #a9e3b0, #5c9c66 60%, #3f7a4a); border-color: #c8f0cd; color: #0d1a10; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: relative; }
.panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-family: var(--sans); font-size: .7rem; }

/* Inputs */
input[type="text"], input:not([type]), input[type="number"], select { width: 100%; min-height: 44px; padding: 10px 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--bad); }
input::placeholder { color: #6e7a86; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* Overlays / toasts */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(5, 8, 12, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay[hidden] { display: none; }
.overlay-card { width: min(520px, 100%); text-align: center; padding: 34px 28px 28px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow); animation: rise .25s ease-out; }
.overlay-card.compact { width: min(420px, 100%); padding: 28px 24px 22px; }
.overlay-card h3 { font-size: 1.7rem; margin-bottom: 8px; }
.overlay-card p { color: var(--muted); }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.count-number { display: block; font-family: var(--serif); font-size: clamp(64px, 14vw, 120px); line-height: 1; color: var(--gold-2); text-shadow: 0 0 40px rgba(216, 179, 106, .45); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.count-number:empty, .count-number[hidden] { display: none; }
.spinner { display: block; width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(216, 179, 106, .2); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); padding: 12px 16px; border-radius: var(--radius);
  background: #2a1d16; border: 1px solid var(--bad); color: #ffd9d0; box-shadow: var(--shadow); font-size: .9rem; animation: rise .2s ease-out; }
.toast.info { background: #16221c; border-color: var(--good); color: #d9f5dd; }
.toast[hidden] { display: none; }
dialog.help { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-solid); color: var(--text); width: min(560px, calc(100% - 32px)); padding: 28px; box-shadow: var(--shadow); }
dialog.help::backdrop { background: rgba(5, 8, 12, .7); }
dialog.help h3 { font-size: 1.5rem; margin-bottom: 12px; }
dialog.help ol { padding-left: 20px; margin: 0 0 14px; display: grid; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 480px) { .badge { display: none; } .brand { font-size: .95rem; letter-spacing: .1em; } }
