/* The codex look of this game's own panels (the plan page's: obsidian,
   ember and frost glows, gold-leaf hairlines, corner ornaments, Reaver
   capitals over Radiance): the co-op panel and the nickname (lobby.js), the
   settings behind the gear (main.js), the stats tab and the small labels of
   the co-op HUD (hud.js), the dash's keys. The popup's own screens keep the
   game's look (ui/ is the exporter's). Hand-written. */

@font-face { font-family: 'Reaver'; src: url('fonts/reaver-bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Reaver'; src: url('fonts/reaver-semibold.otf') format('opentype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Reaver'; src: url('fonts/reaver-regular.otf') format('opentype'); font-weight: 400; font-display: swap; }

:root {
  --cx-ink: #0a0b0d;
  --cx-slab: #13110e;
  --cx-slab-2: #1b1813;
  --cx-gold: #d6a441;
  --cx-gold-hi: #f6d98a;
  --cx-gold-lo: #7a5a22;
  --cx-ember: #c4502f;
  --cx-radiant: #5fae74;
  --cx-frost: #6fb4d6;
  --cx-text: #ebe1cb;
  --cx-muted: #a3967c;
  --cx-faint: #6c6252;
  --cx-hair: rgba(214, 164, 65, 0.28);
  --cx-display: 'Reaver', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --cx-body: 'Radiance', 'Trebuchet MS', 'Segoe UI', sans-serif;
  /* The grain over a slab (an SVG noise, drawn once by the browser). */
  --cx-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  /* Four gold corners (each two hairlines), for ::before of a framed slab. */
  --cx-corners:
    linear-gradient(var(--cx-gold), var(--cx-gold)) top left / 14px 1px no-repeat, linear-gradient(var(--cx-gold), var(--cx-gold)) top left / 1px 14px no-repeat,
    linear-gradient(var(--cx-gold), var(--cx-gold)) top right / 14px 1px no-repeat, linear-gradient(var(--cx-gold), var(--cx-gold)) top right / 1px 14px no-repeat,
    linear-gradient(var(--cx-gold), var(--cx-gold)) bottom left / 14px 1px no-repeat, linear-gradient(var(--cx-gold), var(--cx-gold)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--cx-gold), var(--cx-gold)) bottom right / 14px 1px no-repeat, linear-gradient(var(--cx-gold), var(--cx-gold)) bottom right / 1px 14px no-repeat;
  --cx-frame: inset 0 0 0 1px rgba(214, 164, 65, 0.3), inset 0 0 0 5px rgba(10, 11, 13, 0.92), inset 0 0 0 6px rgba(214, 164, 65, 0.12);
}

@keyframes cx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* The same for a panel centred by translateX(-50%). */
@keyframes cx-rise-mid { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes cx-glow { 0%, 100% { box-shadow: var(--cx-frame), 0 0 0 rgba(246, 217, 138, 0); } 50% { box-shadow: var(--cx-frame), 0 0 22px rgba(246, 217, 138, 0.35); } }

/* --- the co-op panel (#Lobby) ------------------------------------------------ */

.rg-lobby {
  position: absolute; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center;
  font-family: var(--cx-body); color: var(--cx-text);
  background:
    radial-gradient(900px 600px at -5% 105%, rgba(196, 80, 47, 0.24), transparent 60%),
    radial-gradient(800px 520px at 105% -5%, rgba(111, 180, 214, 0.14), transparent 60%),
    rgba(6, 7, 9, 0.8);
}
.rg-lobby.shown { display: flex; }
.rg-lobby-box {
  position: relative; width: min(600px, 94vw); max-height: 94vh; overflow: auto; box-sizing: border-box;
  padding: clamp(18px, 3.4vh, 30px) clamp(16px, 3vw, 32px) clamp(14px, 3vh, 26px);
  background: var(--cx-grain), linear-gradient(162deg, var(--cx-slab-2), var(--cx-slab) 55%, #0c0a08);
  background-size: 180px 180px, auto; background-blend-mode: soft-light, normal;
  box-shadow: var(--cx-frame), 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin; scrollbar-color: var(--cx-gold-lo) transparent;
  animation: cx-rise 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.rg-lobby-box::before { content: ''; position: absolute; inset: 9px; pointer-events: none; background: var(--cx-corners); opacity: 0.7; }
/* Freshly opened: its rows come in one after another. */
.rg-lobby.enter .rg-lobby-box > * { animation: cx-rise 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.rg-lobby.enter .rg-lobby-box > :nth-child(2) { animation-delay: 60ms; }
.rg-lobby.enter .rg-lobby-box > :nth-child(3) { animation-delay: 110ms; }
.rg-lobby.enter .rg-lobby-box > :nth-child(4) { animation-delay: 160ms; }
.rg-lobby.enter .rg-lobby-box > :nth-child(5) { animation-delay: 210ms; }
.rg-lobby.enter .rg-lobby-box > :nth-child(n+6) { animation-delay: 260ms; }

.rg-lobby-title {
  position: relative; margin: 2px 0 16px; padding-bottom: 19px; text-align: center; font: 700 clamp(26px, 4.6vh, 38px)/1 var(--cx-display); letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(176deg, var(--cx-gold-hi) 0%, var(--cx-gold) 48%, var(--cx-gold-lo) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgba(214, 164, 65, 0.2));
}
/* A gold rule under the title, a diamond in its gap. */
.rg-lobby-title::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); height: 1px; width: min(280px, 72%);
  background: linear-gradient(90deg, transparent, var(--cx-hair) 25%, var(--cx-gold) 45%, transparent 46% 54%, var(--cx-gold) 55%, var(--cx-hair) 75%, transparent);
}
.rg-lobby-title::before {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 7px; height: 7px; margin-left: -3.5px; transform: rotate(45deg);
  background: var(--cx-gold); box-shadow: 0 0 8px rgba(214, 164, 65, 0.7);
}
.rg-lobby-error {
  margin: 4px 0 12px; padding: 10px 14px; text-align: left; color: #f0a48a; font-size: 14px;
  border-left: 2px solid var(--cx-ember); background: linear-gradient(90deg, rgba(196, 80, 47, 0.14), transparent);
}
.rg-lobby-note { margin: 8px 0; text-align: center; color: var(--cx-muted); font-size: 14px; letter-spacing: 0.02em; }
.rg-lobby-row { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; flex-wrap: wrap; }

/* Inputs: a dark well with a gold line under it. */
.rg-lobby-input {
  flex: 1; min-width: 140px; box-sizing: border-box; font: 400 18px var(--cx-body); padding: 10px 12px; color: var(--cx-text);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(20, 16, 10, 0.6)); border: 0; border-radius: 0; outline: none;
  box-shadow: inset 0 0 0 1px rgba(214, 164, 65, 0.18), inset 0 -2px 0 var(--cx-gold-lo); transition: box-shadow .2s;
}
.rg-lobby-input:focus { box-shadow: inset 0 0 0 1px rgba(246, 217, 138, 0.45), inset 0 -2px 0 var(--cx-gold), 0 0 18px rgba(214, 164, 65, 0.18); }
.rg-lobby-input::placeholder { color: var(--cx-faint); }
.rg-lobby-input.code { flex: 1 1 auto; min-width: 0; max-width: 230px; text-transform: uppercase; letter-spacing: 0.4em; text-align: center; font: 700 22px var(--cx-display); }
.rg-lobby-input.code::placeholder { letter-spacing: normal; text-transform: none; font: 400 16px var(--cx-body); }

/* Buttons: clipped corners; the main one gold leaf. */
.rg-lobby-btn {
  font: 700 13px/1 var(--cx-display); letter-spacing: 0.14em; text-transform: uppercase; padding: 13px 20px; color: var(--cx-gold-hi);
  background: linear-gradient(180deg, rgba(214, 164, 65, 0.1), rgba(214, 164, 65, 0.03)); border: 1px solid rgba(214, 164, 65, 0.42); border-radius: 0;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); cursor: pointer; transition: color .2s, background .2s, filter .2s, border-color .2s;
}
.rg-lobby-btn:hover:not(:disabled) { color: #fff6dc; border-color: var(--cx-gold); background: linear-gradient(180deg, rgba(214, 164, 65, 0.22), rgba(214, 164, 65, 0.06)); }
.rg-lobby-btn.main {
  min-width: 170px; color: #1a1207; border-color: var(--cx-gold-hi);
  background: linear-gradient(180deg, var(--cx-gold-hi), var(--cx-gold) 55%, #b07f2a); text-shadow: 0 1px 0 rgba(255, 240, 200, 0.4);
}
.rg-lobby-btn.main:hover:not(:disabled) { color: #120c04; filter: brightness(1.08) drop-shadow(0 0 10px rgba(246, 217, 138, 0.45)); background: linear-gradient(180deg, #fff0bc, var(--cx-gold-hi) 50%, var(--cx-gold)); }
.rg-lobby-btn.main.on, .rg-lobby-btn.ready.on { color: #0b1a0c; border-color: #a8f0a0; background: linear-gradient(180deg, #a8e8a0, var(--cx-radiant) 60%, #3d7d4c); text-shadow: none; }
.rg-lobby-btn.wide { display: block; width: 100%; margin: 8px 0 6px; padding: 16px 20px; font-size: 15px; }
.rg-lobby-btn.link {
  clip-path: none; background: none; border-color: transparent; color: var(--cx-muted); padding: 10px 12px; font-size: 11px; letter-spacing: 0.2em;
}
.rg-lobby-btn.link::before { content: '◆ '; color: var(--cx-gold-lo); }
.rg-lobby-btn.link:hover:not(:disabled) { background: none; color: var(--cx-gold-hi); border-color: transparent; }
.rg-lobby-btn:disabled { opacity: 0.4; cursor: default; filter: saturate(0.5); }

/* The room's code: a seal of four capitals. */
.rg-lobby-code {
  font: 700 clamp(30px, 6vh, 44px)/1 var(--cx-display); letter-spacing: 0.32em; padding: 10px 6px 10px 22px; color: transparent;
  background: linear-gradient(176deg, var(--cx-gold-hi), var(--cx-gold) 55%, var(--cx-gold-lo)); -webkit-background-clip: text; background-clip: text;
  position: relative;
}
.rg-lobby-code::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid var(--cx-hair);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
  background: rgba(214, 164, 65, 0.06);
}

/* Who is in: a ledger. */
.rg-lobby-list { margin: 14px 0 10px; }
.rg-lobby-member {
  display: grid; grid-template-columns: 1.4fr 1fr 0.9fr; gap: 10px; align-items: baseline; padding: 9px 4px; font-size: 15px;
  border-top: 1px solid rgba(214, 164, 65, 0.13);
}
.rg-lobby-member:last-child { border-bottom: 1px solid rgba(214, 164, 65, 0.13); }
.rg-lobby-member .nick { color: var(--cx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-lobby-member .hero { font: 700 12px var(--cx-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-lobby-member .state { text-align: right; font: 700 11px var(--cx-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-faint); white-space: nowrap; }
.rg-lobby-member .state::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; transform: rotate(45deg) translateY(-1px); border: 1px solid var(--cx-gold-lo); }
.rg-lobby-member.ready .state { color: #9fe0a0; }
.rg-lobby-member.ready .state::before { background: var(--cx-radiant); border-color: #a8f0a0; box-shadow: 0 0 8px rgba(95, 174, 116, 0.7); }
.rg-lobby-member.away { opacity: 0.45; }

/* The heroes: framed portraits. */
.rg-lobby-heroes { display: flex; gap: 8px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.rg-lobby-hero {
  flex: 1 1 0; min-width: 72px; max-width: 150px; height: 88px; border: 0; border-radius: 0; cursor: pointer; position: relative; color: #fff; font: inherit;
  background: #000 center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(214, 164, 65, 0.35), 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, filter .25s;
}
.rg-lobby-hero::before { content: ''; position: absolute; inset: 4px; pointer-events: none; background: var(--cx-corners); opacity: 0.55; z-index: 1; }
.rg-lobby-hero span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 5px; font: 700 10.5px/1.15 var(--cx-display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cx-gold-hi); background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 45%);
}
.rg-lobby-hero:hover:not(:disabled) { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(246, 217, 138, 0.7), 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(214, 164, 65, 0.18); }
.rg-lobby-hero.on { box-shadow: inset 0 0 0 2px var(--cx-gold-hi), 0 0 0 1px var(--cx-gold), 0 0 22px rgba(246, 217, 138, 0.4); }
.rg-lobby-hero.on::before { opacity: 1; }
.rg-lobby-hero.taken { opacity: 0.35; filter: grayscale(1); cursor: default; }
.rg-lobby-hero.locked:not(.on) { opacity: 0.5; cursor: default; }

/* The host's options. */
.rg-lobby-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 14px; margin: 6px 0 4px; }
.rg-lobby-opts label { display: flex; flex-direction: column; gap: 5px; font: 700 10.5px var(--cx-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-faint); }
.rg-lobby-select, #Settings select {
  -webkit-appearance: none; appearance: none; width: 100%; box-sizing: border-box; font: 400 14px var(--cx-body); letter-spacing: 0; text-transform: none;
  padding: 8px 30px 8px 10px; color: var(--cx-text); border: 0; border-radius: 0; cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, var(--cx-gold) 50%) right 14px center / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--cx-gold) 50%) right 9px center / 6px 6px no-repeat,
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(20, 16, 10, 0.6));
  box-shadow: inset 0 0 0 1px rgba(214, 164, 65, 0.25);
}
.rg-lobby-select:hover:not(:disabled), #Settings select:hover { box-shadow: inset 0 0 0 1px rgba(246, 217, 138, 0.55); }
.rg-lobby-select:disabled { opacity: 0.6; cursor: default; }
.rg-lobby-select option, #Settings select option { background: #15120d; color: var(--cx-text); }

/* --- the settings (the gear's) ----------------------------------------------- */

#Gear {
  position: absolute; z-index: 70; left: calc(4px + env(safe-area-inset-left)); top: 34px; width: 28px; height: 22px; padding: 0; cursor: pointer; pointer-events: auto;
  border: 0; border-radius: 0; color: var(--cx-gold-hi); font: 15px/22px sans-serif; background: rgba(10, 9, 7, 0.72);
  box-shadow: inset 0 0 0 1px rgba(214, 164, 65, 0.45); transition: box-shadow .2s, color .2s;
}
#Gear:hover { box-shadow: inset 0 0 0 1px var(--cx-gold-hi), 0 0 12px rgba(214, 164, 65, 0.35); }
#Gear.muted { color: #9a7c62; }
#Settings {
  position: absolute; z-index: 71; left: calc(4px + env(safe-area-inset-left)); top: 60px; display: none; flex-direction: column; gap: 8px;
  max-height: calc(100% - 70px); overflow-y: auto; width: 228px; box-sizing: border-box; padding: 14px 15px 15px;
  font: 13px var(--cx-body); color: var(--cx-text);
  background: var(--cx-grain), linear-gradient(162deg, var(--cx-slab-2), var(--cx-slab) 60%, #0c0a08);
  background-size: 180px 180px, auto; background-blend-mode: soft-light, normal;
  box-shadow: var(--cx-frame), 0 16px 44px rgba(0, 0, 0, 0.7);
  scrollbar-width: thin; scrollbar-color: var(--cx-gold-lo) transparent;
}
#Settings::before { content: ''; position: absolute; inset: 7px; pointer-events: none; background: var(--cx-corners); opacity: 0.6; }
#Settings.shown { display: flex; animation: cx-rise 0.3s cubic-bezier(.2, .8, .2, 1) both; }
#Settings .rg-set-title {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--cx-gold); font: 700 12px var(--cx-display); letter-spacing: 0.22em; text-transform: uppercase;
}
#Settings .rg-set-title:first-child { margin-top: 0; }
#Settings .rg-set-title::before { content: ''; width: 6px; height: 6px; flex: none; transform: rotate(45deg); background: var(--cx-gold); box-shadow: 0 0 6px rgba(214, 164, 65, 0.6); }
#Settings .rg-set-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--cx-hair), transparent); }
#Settings label { display: flex; flex-direction: column; gap: 5px; color: var(--cx-muted); font-size: 12.5px; letter-spacing: 0.02em; }
/* The volume: a gold hairline track and a diamond. */
#Settings input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
#Settings input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--cx-gold), var(--cx-gold-lo)); }
#Settings input[type=range]::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--cx-gold), var(--cx-gold-lo)); }
#Settings input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; transform: rotate(45deg); border: 1px solid var(--cx-gold-hi);
  background: linear-gradient(135deg, var(--cx-gold-hi), var(--cx-gold)); box-shadow: 0 0 8px rgba(214, 164, 65, 0.6);
}
#Settings input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 0; transform: rotate(45deg); border: 1px solid var(--cx-gold-hi); background: var(--cx-gold); }

/* --- the co-op HUD's labels ---------------------------------------------------- */

/* A plaque: a dark slab with a gold hairline. */
.rg-watch, .rg-waitpick, .rg-stats {
  background: var(--cx-grain), linear-gradient(162deg, rgba(27, 24, 19, 0.94), rgba(12, 10, 8, 0.94));
  background-size: 180px 180px, auto; background-blend-mode: soft-light, normal;
  box-shadow: var(--cx-frame), 0 12px 36px rgba(0, 0, 0, 0.6); border: 0; border-radius: 0;
}
.rg-watch { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); z-index: 45; padding: 6px 8px; color: var(--cx-text);
  font: 15px var(--cx-body); display: none; align-items: center; gap: 12px; }
.rg-watch.shown { display: flex; }
.rg-watch button {
  font: 700 15px/1 var(--cx-display); color: var(--cx-gold-hi); padding: 7px 12px; cursor: pointer; pointer-events: auto; border: 1px solid rgba(214, 164, 65, 0.42);
  border-radius: 0; background: linear-gradient(180deg, rgba(214, 164, 65, 0.14), rgba(214, 164, 65, 0.04)); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.rg-watch button:hover { color: #fff6dc; border-color: var(--cx-gold); }
.rg-waitpick { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 45; padding: 10px 18px; pointer-events: none;
  font: 700 15px var(--cx-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-gold-hi); animation: cx-glow 2.4s ease-in-out infinite; }
.rg-waitpick:empty { display: none; }
/* Under the timeline (the top bar's score and gold are above it). */
.rg-raises { position: absolute; left: 50%; top: calc(max(70px, 10%) + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30; pointer-events: none;
  font: 700 13px var(--cx-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-gold-hi); text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); }
.rg-raises:empty { display: none; }
body:not(.playing) .rg-raises { display: none; }
.rg-card-timer { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 5; pointer-events: none;
  font: 700 26px var(--cx-display); color: var(--cx-gold-hi); text-shadow: 0 2px 6px #000, 0 0 14px rgba(214, 164, 65, 0.35); }
.rg-mate-nick { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap;
  font: 700 13px var(--cx-display); letter-spacing: 0.06em; color: #fff; text-shadow: 0 1px 2px #000, 0 0 5px #000; }

/* The stats tab: a ledger. */
.rg-stats { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); z-index: 46; display: none; min-width: min(580px, 92vw); max-width: 96vw;
  box-sizing: border-box; padding: 16px 20px 14px; color: var(--cx-text); font: 14px var(--cx-body); pointer-events: none; }
.rg-stats::before { content: ''; position: absolute; inset: 8px; pointer-events: none; background: var(--cx-corners); opacity: 0.6; }
.rg-stats.shown { display: block; animation: cx-rise-mid 0.25s cubic-bezier(.2, .8, .2, 1) both; }
.rg-stats table { width: 100%; border-collapse: collapse; }
.rg-stats th { text-align: left; padding: 4px 8px 8px; font: 700 10.5px var(--cx-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cx-gold);
  border-bottom: 1px solid var(--cx-hair); }
.rg-stats td { padding: 7px 8px; border-bottom: 1px solid rgba(214, 164, 65, 0.1); font-variant-numeric: tabular-nums; }
.rg-stats td:nth-child(2) { font: 700 11.5px var(--cx-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cx-muted); }
.rg-stats td:nth-child(n+3), .rg-stats th:nth-child(n+3) { text-align: right; }
.rg-stats tr.me td { color: #a8ecaa; }
.rg-stats tr.me td:first-child::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; transform: rotate(45deg) translateY(-1px);
  background: var(--cx-radiant); box-shadow: 0 0 6px rgba(95, 174, 116, 0.8); }
.rg-stats .team { margin-top: 10px; text-align: center; font: 700 11px var(--cx-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); }

/* The dash button's keys (dash.js). */
.rg-keys { font: 700 11px var(--cx-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-gold-hi); }

/* The online line, the install and rotate buttons. */
.rg-online { position: absolute; right: 8px; bottom: 6px; z-index: 30; pointer-events: none; opacity: 0.85;
  font: 700 10px var(--cx-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); }
#Install, #Rotate {
  border: 1px solid var(--cx-gold-hi); border-radius: 0; color: #1a1207; text-shadow: 0 1px 0 rgba(255, 240, 200, 0.4);
  background: linear-gradient(180deg, var(--cx-gold-hi), var(--cx-gold) 55%, #b07f2a);
  font: 700 13px var(--cx-display); letter-spacing: 0.14em; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.rg-rotated #Rotate { font-size: 16px; letter-spacing: 0; }

/* A small screen: tighter, the options one column. */
@media (max-height: 500px), (max-width: 560px) {
  .rg-lobby-box { width: min(640px, 96vw); max-height: 96vh; }
  .rg-lobby-title { margin-bottom: 10px; padding-bottom: 15px; }
  .rg-lobby-row { margin: 8px 0; }
  .rg-lobby-heroes { margin: 10px 0; }
  .rg-lobby-hero { height: 70px; min-width: 64px; }
}
