:root {
  --bg: #0a0708;
  --panel: rgba(13, 9, 11, 0.9);
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #ebe4e1;
  --muted: #8d8280;
  --dim: #5a5250;
  --accent: #c8243a;
  --accent-2: #ff3d55;
  --gold: #e3b658;
  --good: #6fd08c;
  --bad: #ff5468;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root:not([data-theme="light"]) { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: var(--text); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

#game { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

/* ---------------------------------------------------------------- fade (floor change / being brought along) */
.fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 8; }
.fade.run { animation: fadeThrough .7s ease-out; }
@keyframes fadeThrough { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- loading */
.loading { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 50; transition: opacity .6s; }
.loading.done { opacity: 0; pointer-events: none; }
.brand-mark { width: 28px; height: 28px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 72% 100%, 50% 58%, 28% 100%); }
.loading .brand-mark { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.9); } }

/* ---------------------------------------------------------------- main menu */
.screen { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.screen > * { pointer-events: auto; }
#menu { background: linear-gradient(90deg, rgba(6, 4, 5, 0.92) 0%, rgba(6, 4, 5, 0.55) 34%, rgba(6, 4, 5, 0) 60%); }
.menu-left { position: absolute; left: clamp(24px, 7vw, 120px); top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 56px; max-width: 420px; }
.brand h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(52px, 7vw, 88px); line-height: .9; letter-spacing: .01em; margin: 18px 0 14px; }
.tagline { color: var(--muted); margin: 0; font-size: 15px; letter-spacing: .01em; }
.menu-nav { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.menu-nav button { font-size: 19px; font-weight: 500; letter-spacing: .02em; padding: 8px 0 8px 0; color: #cfc6c3; position: relative; transition: color .15s, padding .2s; }
.menu-nav button::before { content: ''; position: absolute; left: -22px; top: 50%; width: 10px; height: 1px; background: var(--accent-2); opacity: 0; transition: opacity .15s, left .2s; }
.menu-nav button:hover, .menu-nav button:focus-visible { color: #fff; padding-left: 6px; outline: none; }
.menu-nav button:hover::before, .menu-nav button:focus-visible::before { opacity: 1; left: -16px; }
.menu-foot { font-size: 12px; }

/* ---------------------------------------------------------------- panels */
.panel-wrap { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(4, 2, 3, 0.55); backdrop-filter: blur(6px); padding: 24px 16px; }
.panel { width: min(1080px, 100%); height: min(720px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.panel-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0; letter-spacing: .01em; }
.back { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.back:hover { background: var(--panel-2); color: var(--text); }
.tabs { margin-left: auto; display: flex; gap: 2px; }
.tabs button { padding: 7px 14px; border-radius: 4px; color: var(--muted); font-weight: 500; font-size: 13px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.panel-body { flex: 1; overflow: auto; padding: 22px; }
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 4px; border: 1px solid var(--line-2); font-weight: 500; font-size: 13px; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--panel-2); border-color: rgba(255, 255, 255, 0.28); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #d8304a; }
.btn:disabled { opacity: .4; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.field input[type=text], .field input[type=password] { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px; outline: none; }
.field input:focus { border-color: rgba(255, 255, 255, 0.35); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.seg button { padding: 8px 14px; color: var(--muted); font-size: 13px; }
.seg button.on { background: rgba(255, 255, 255, 0.08); color: var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--line-2); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.setting { display: grid; grid-template-columns: 180px 1fr 60px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting .v { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.section-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 22px 0 8px; }
.section-label:first-child { margin-top: 0; }

/* server browser */
.sessions { width: 100%; border-collapse: collapse; }
.sessions th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sessions td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.sessions tr.s:hover td { background: var(--panel-2); cursor: pointer; }
.sessions .lock { color: var(--gold); vertical-align: -2px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.lobby-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.player-list { display: flex; flex-direction: column; gap: 8px; }
.player { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; }
.player .swatch { width: 10px; height: 10px; border-radius: 2px; }
.player .tag { margin-left: auto; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 22px; letter-spacing: .12em; }

/* codex */
.codex { display: grid; grid-template-columns: 1fr 340px; gap: 22px; height: 100%; }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; align-content: start; }
.tile { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 0, 0, 0.25); display: grid; place-items: center; position: relative; transition: border-color .15s, background .15s; }
.tile img { width: 88%; height: 88%; object-fit: contain; image-rendering: auto; }
.tile:hover { border-color: var(--line-2); background: var(--panel-2); }
.tile.sel { border-color: rgba(255, 255, 255, 0.5); }
.tile.locked img { opacity: .5; filter: brightness(0) saturate(0); }
.tile .pip { position: absolute; left: 6px; top: 6px; width: 5px; height: 5px; border-radius: 50%; }
.detail { border-left: 1px solid var(--line); padding-left: 22px; overflow: auto; }
.detail .big { width: 150px; height: 150px; display: block; margin: 4px 0 14px; }
.detail h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0 0 4px; }
.detail .rar { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.detail .desc { margin: 14px 0; line-height: 1.55; }
.detail .lore { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.syn { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; }
.syn .n { font-weight: 600; }
.syn.good .n { color: var(--good); }
.syn.bad .n { color: var(--bad); }
.syn .d { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.syn .pair { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.syn .pair img { width: 26px; height: 26px; }
.progress { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.stat-card { border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.stat-card .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.stat-card .v { font-family: var(--serif); font-size: 34px; font-weight: 600; margin-top: 6px; }

/* character sheet */
.sheet { display: grid; grid-template-columns: 300px 1fr; gap: 26px; }
.sheet canvas { width: 300px; height: 380px; border: 1px solid var(--line); border-radius: 4px; background: radial-gradient(circle at 50% 35%, #2a1418, #0a0708 70%); }
.statlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 26px; }
.statlist div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.statlist span:last-child { font-variant-numeric: tabular-nums; }
.owned { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.owned img { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 0, 0, 0.3); }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); padding: 16px; }
.modal-card { width: min(420px, 100%); background: #120c0e; border: 1px solid var(--line-2); border-radius: 6px; padding: 24px; }
.modal-card h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 24px; font-weight: 600; }

/* ---------------------------------------------------------------- HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.hud-tl { position: absolute; left: 22px; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.hearts { display: flex; flex-wrap: wrap; gap: 3px; max-width: 250px; }
.hearts svg { width: 22px; height: 20px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7)); }
.hud-row { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; text-shadow: 0 1px 3px #000; font-variant-numeric: tabular-nums; }
.hud-row .sep { width: 1px; height: 12px; background: var(--line-2); margin: 0 6px; }
.hud-row .muted { font-weight: 500; font-size: 13px; }
.coin-dot { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe7a0, #d69a2a); box-shadow: 0 0 6px rgba(240, 180, 60, 0.6); }
.lust { display: flex; align-items: center; gap: 10px; }
.lust-bar { width: 150px; height: 4px; background: rgba(0, 0, 0, 0.55); border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
#lustFill { height: 100%; width: 0; background: linear-gradient(90deg, #7a0c1c, var(--accent-2)); transition: width .15s; }
#lustLabel { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-shadow: 0 1px 2px #000; }
.lust.full #lustFill { box-shadow: 0 0 10px var(--accent-2); animation: glow 1s ease-in-out infinite; }
.lust.full #lustLabel { color: var(--accent-2); }
.lust.active #lustFill { background: #fff; }
@keyframes glow { 50% { filter: brightness(1.5); } }
.team { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.team div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #cfc6c3; text-shadow: 0 1px 2px #000; }
.team i { width: 8px; height: 8px; border-radius: 2px; }
.team .hpbar { width: 60px; height: 3px; background: rgba(0, 0, 0, 0.6); }
.team .hpbar b { display: block; height: 100%; background: var(--accent-2); }
#minimap { position: absolute; right: 20px; top: 20px; width: 220px; height: 150px; opacity: .92; }
.boss { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); width: min(560px, 70vw); text-align: center; }
.boss-name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; text-shadow: 0 2px 6px #000; }
.boss-bar { height: 5px; background: rgba(0, 0, 0, 0.6); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
#bossFill { height: 100%; background: linear-gradient(90deg, #6a0a16, var(--accent-2)); transition: width .2s; }
.boss.p2 #bossFill { background: linear-gradient(90deg, #4a0a4a, #d040ff); }
#crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; transition: transform .08s, border-color .1s; }
#crosshair i { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: #fff; border-radius: 50%; box-shadow: 0 0 3px #000; }
#crosshair.fire { transform: translate(-50%, -50%) scale(.82); border-color: rgba(255, 80, 100, 0.7); }
.prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); min-width: 260px; max-width: 380px; background: rgba(10, 6, 8, 0.82); border: 1px solid var(--line); border-radius: 5px; padding: 14px 16px; backdrop-filter: blur(4px); }
.prompt .t { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.1; }
.prompt .r { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }
.prompt .g { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 16px; margin-top: 4px; }
.prompt .d { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.prompt .x { margin-top: 8px; font-size: 12px; }
.prompt .x.good { color: var(--good); } .prompt .x.bad { color: var(--bad); } .prompt .x.unk { color: #b58cff; }
.prompt .k { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
kbd { display: inline-block; min-width: 20px; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; font: 600 11px var(--sans); color: var(--text); text-align: center; }
.relic-strip { position: absolute; right: 20px; bottom: 18px; display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 4px; max-width: 45vw; }
.relic-strip img { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
.banner { position: absolute; left: 0; right: 0; top: 17%; text-align: center; pointer-events: none; }
.banner .b { display: inline-block; animation: bannerIn 3.4s ease forwards; }
.banner .b1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 48px); font-weight: 600; text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9); letter-spacing: .02em; }
.banner .b2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; text-shadow: 0 1px 4px #000; }
.banner .line { width: 60px; height: 1px; margin: 12px auto 0; background: currentColor; opacity: .6; }
@keyframes bannerIn { 0% { opacity: 0; transform: translateY(8px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.toast { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); font-size: 13px; color: #fff; background: rgba(0, 0, 0, 0.6); padding: 8px 14px; border-radius: 4px; opacity: 0; transition: opacity .2s; }
.toast.on { opacity: 1; }
.click-to-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 30px); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 18px; font-size: 12px; color: var(--muted); text-shadow: 0 1px 2px #000; white-space: nowrap; animation: fadeIn .8s ease; }
.hint span { display: inline-flex; gap: 6px; align-items: center; }
@keyframes fadeIn { from { opacity: 0; } }

/* bombs + active item */
.bomb-dot { width: 11px; height: 11px; border-radius: 50%; margin-left: 10px; background: radial-gradient(circle at 35% 35%, #c84050, #4a0610); box-shadow: 0 0 6px rgba(255, 60, 80, 0.4); }
.active-slot { position: absolute; left: 22px; bottom: 22px; width: 64px; height: 64px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(10, 6, 8, 0.6); display: grid; place-items: center; }
.active-slot img { width: 54px; height: 54px; transition: filter .2s, opacity .2s; }
.active-slot.empty img { filter: grayscale(1) brightness(.5); opacity: .6; }
.active-slot.ready { border-color: rgba(181, 140, 255, 0.8); box-shadow: 0 0 18px rgba(181, 140, 255, 0.35); }
.active-slot .pips { position: absolute; left: 4px; right: 4px; bottom: -9px; display: flex; gap: 2px; }
.active-slot .pips i { flex: 1; height: 4px; background: rgba(0, 0, 0, 0.6); border-radius: 1px; }
.active-slot .pips i.on { background: #b58cff; }
.active-slot kbd { position: absolute; right: -10px; top: -10px; background: #120c0e; }

/* boss intro card */
.boss-card { position: absolute; inset: 0; pointer-events: none; }
.boss-card .bar { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height .45s cubic-bezier(.2, .7, .2, 1); }
.boss-card .top { top: 0; } .boss-card .bottom { bottom: 0; }
.boss-card .card { position: absolute; left: 7vw; bottom: 16vh; opacity: 0; transform: translateX(-20px); transition: opacity .5s .15s, transform .6s .15s; }
.boss-card .sub { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent-2); }
.boss-card .name { font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); font-weight: 600; text-shadow: 0 4px 18px #000; }
.boss-card.on .bar { height: 11vh; }
.boss-card.on .card { opacity: 1; transform: none; }

/* character select */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.char { border: 1px solid var(--line); border-radius: 6px; padding: 14px; text-align: left; background: rgba(0, 0, 0, 0.25); transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 8px; }
.char:hover { border-color: var(--line-2); background: var(--panel-2); }
.char.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.char.locked { opacity: .55; cursor: default; }
.char img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.char.locked img { filter: brightness(0); opacity: .5; }
.char .n { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.char .t { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 15px; }
.char .d { font-size: 12px; color: #bfb5b2; line-height: 1.45; }
.char .lock { font-size: 12px; color: var(--gold); }
.mini-chars { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-chars button { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; color: var(--muted); }
.mini-chars button.on { color: var(--text); border-color: var(--accent); }
.mini-chars button:disabled { opacity: .35; }

/* achievements */
.ach { display: grid; grid-template-columns: 1fr 180px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ach .n { font-weight: 600; }
.ach.done .n { color: var(--gold); }
.ach .d { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ach .r { font-size: 12px; color: #bfb5b2; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.ach .r img { width: 22px; height: 22px; }
.ach .bar { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.ach .bar b { display: block; height: 100%; background: var(--gold); }
.ach .pv { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* run summary */
.summary { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; text-align: left; }
.summary canvas { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 0, 0, 0.3); }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline .fl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.timeline .fl span { font-size: 11px; color: var(--muted); width: 58px; letter-spacing: .06em; text-transform: uppercase; }
.timeline img { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 0, 0, 0.3); }
.killer { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; margin-top: 12px; }
.killer img { width: 52px; height: 52px; }
.lb { width: 100%; border-collapse: collapse; }
.lb td, .lb th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.lb th { font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.lb td:last-child, .lb th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.lb tr.me td { color: var(--accent-2); }  /* your guest row; gold is reserved for verified Honk Party accounts */

/* end screen */
.end { max-width: 520px; margin: 30px auto; text-align: center; }
.end h3 { font-family: var(--serif); font-size: 54px; font-weight: 600; margin: 0 0 6px; }
.end .sub { color: var(--muted); margin-bottom: 30px; }
.end .stats-grid { text-align: left; margin-bottom: 26px; }

.controls { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; }
.controls span { color: var(--muted); }

@media (max-width: 760px) {
  .summary { grid-template-columns: 1fr; }
  .codex, .lobby-grid, .sheet { grid-template-columns: 1fr; }
  .detail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .setting { grid-template-columns: 1fr 1fr 44px; }
  #minimap { width: 150px; height: 102px; }
}

/* ---------------------------------------------------------------- Honk Party login (sq-loader.js): restyled to the crypt look.
   Gold (var(--sq-gold)) is only ever used for names the server verified. #panel raises specificity over the hub's sheet. */
#panel .sq-gate { gap: 8px; }
#panel .sq-or { font-size: 12px; color: var(--muted); letter-spacing: .02em; opacity: 1; gap: 8px; }
#panel .sq-or > span { opacity: 1; color: var(--dim); }
#panel .sq-btn { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
#panel .sq-btn:hover { color: #fff; border-color: var(--accent-2); filter: none; }
#panel .sq-btn:focus-visible { outline: 1px solid var(--accent-2); outline-offset: 3px; }
#panel .sq-me { border-radius: 4px; padding: 10px 12px; gap: 10px; border: 1px solid var(--line-2); border-left: 2px solid var(--sq-gold); background: rgba(0, 0, 0, 0.35); }
#panel .sq-me small { font-size: 12px; color: var(--muted); opacity: 1; letter-spacing: .02em; }
#panel .sq-me .sq-verified { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .01em; }
#panel .sq-me .sq-btn { font-size: 12px; color: var(--muted); border-bottom-color: var(--line-2); opacity: 1; }
#panel .sq-me .sq-btn:hover { color: var(--text); border-color: var(--accent); }
.coop-name { max-width: 320px; margin-bottom: 22px; }
.team .sq-verified, .toast .sq-verified { font-weight: 600; }
@media (max-width: 560px) { .coop-name { max-width: none; } #panel .sq-me .sq-btn { margin-left: 0; } }
