/* Inkblade The Duel - menu screens: login, lobby, room, shop, options, results (the arena keeps orbiting
 * behind them). */

.screen {
  position: fixed; inset: 0; z-index: 20; display: flex; padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at 50% 40%, rgba(10,12,18,0.25), rgba(5,6,10,0.88));
}
.spacer { flex: 1; }
.muted { color: var(--muted); font-weight: 400; }
.msg { min-height: 1.2em; margin: 8px 0 0; color: #ffb4b4; font-size: 14px; }
.msg.ok { color: #b8f5c9; }
button.accent { background: rgba(255,138,61,0.22); border-color: var(--accent); color: #ffe2cc; }
button.accent:hover { background: rgba(255,138,61,0.38); }
button:disabled { opacity: 0.45; cursor: default; }
.tabs { display: flex; gap: 4px; align-items: center; }
.tabs button.on { background: rgba(255,138,61,0.22); border-color: var(--accent); color: #fff; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
label input:not([type=checkbox]), label select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--text);
  background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 6px; outline: none;
}
label select option { background: #1a1d24; color: var(--text); }
label input:focus, label select:focus { border-color: var(--accent); }
label select:disabled { opacity: 0.65; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.coin {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px;
  background: radial-gradient(circle at 35% 35%, #ffe9a0, #e0a020 60%, #8a5a10); box-shadow: 0 0 4px rgba(255,200,80,0.6);
}
.coins { white-space: nowrap; }
.coins b { color: #ffd77a; font-variant-numeric: tabular-nums; }
.lv b { color: var(--accent2); }

/* Level badge: a small bevelled chip. */
.lvbadge {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 26px; height: 22px; padding: 0 6px;
  border-radius: 5px; font-size: 12px; font-weight: 800; color: #dff6ff; white-space: nowrap;
  background: linear-gradient(180deg, rgba(79,209,255,0.35), rgba(79,209,255,0.12)); border: 1px solid rgba(79,209,255,0.55);
  font-variant-numeric: tabular-nums;
}
.lvbadge b { color: #fff; }
.lvbadge.sm { height: 18px; min-width: 22px; font-size: 11px; padding: 0 4px; }
.lvbadge.hi { background: linear-gradient(180deg, rgba(199,125,255,0.4), rgba(199,125,255,0.12)); border-color: rgba(199,125,255,0.7); }
.lvbadge.top { background: linear-gradient(180deg, rgba(255,184,77,0.45), rgba(255,184,77,0.14)); border-color: rgba(255,184,77,0.8); color: #fff2d6; }

.xpbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.xpbar div { height: 100%; width: 0; background: linear-gradient(90deg, #3bb0d2, #8fe3ff); transition: width 0.6s ease; }

/* Filter chips. */
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chips button { padding: 4px 10px; font-size: 12.5px; border-radius: 999px; background: rgba(255,255,255,0.04); }
.chips button.on { background: rgba(255,138,61,0.22); border-color: var(--accent); color: #fff; }

.icon-btn { padding: 6px 9px; line-height: 0; }
.ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }

/* ---- login ---- */
.login-wrap { margin: auto; width: 100%; max-width: 440px; text-align: center; }
.logo {
  display: inline-block; margin: 0; font-size: 64px; letter-spacing: 8px; font-weight: 900; font-style: italic;
  padding: 0 0.35em 0 0.15em; /* room for the italic overhang so the last letter isn't clipped */
  background: linear-gradient(90deg, var(--accent), #ffd08a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 14px rgba(255,138,61,0.4));
}
.logo-sub { display: block; font-size: 17px; letter-spacing: 13px; margin: -6px 0 0 6px; font-weight: 800; font-style: normal; }
.login-panel { text-align: left; margin-top: 14px; padding: 22px 24px; }
.login-tabs { margin-bottom: 4px; }
.login-tabs button { flex: 1; }
.servers { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.srv-head { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 10.5px; letter-spacing: 2px; color: var(--muted); background: rgba(255,255,255,0.04); }
.server { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 14px; border-top: 1px solid rgba(255,255,255,0.05); }
.server.on { background: rgba(79,209,255,0.1); }
.server.off { opacity: 0.55; }
.server .sname { font-weight: 700; }
.server .muted { font-size: 12px; }
.server .dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; }
.server.on .dot { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.sstat { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.sstat.ok { color: #8ef0a8; }
.version { font-size: 12px; margin-top: 10px; }
@media (max-width: 520px) { .logo { font-size: 42px; } }

/* ---- shared panel look for the big screens ---- */
.lobby .panel, .room .panel, .shop .panel {
  max-width: none; padding: 12px 14px; border-radius: 10px; display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, rgba(20,23,31,0.9), rgba(11,13,19,0.86));
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}
.topnav, .room-top, .shop-top { grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.panel h3::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }
.sect-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sect-head h3 { margin: 0; }

/* ---- top navigation (lobby) ---- */
.brand { font-weight: 900; font-style: italic; letter-spacing: 3px; color: var(--accent); font-size: 21px; padding-right: 0.3em; margin-right: 6px; text-shadow: 0 0 14px rgba(255,138,61,0.35); line-height: 1; }
.brand small { display: block; font-size: 9.5px; letter-spacing: 5.5px; font-style: normal; font-weight: 800; color: #ffc89a; margin-top: 3px; text-shadow: none; }
.navtabs { display: flex; gap: 2px; }
.navtabs button { background: transparent; border-color: transparent; color: var(--muted); font-weight: 700; letter-spacing: 0.5px; border-radius: 6px; }
.navtabs button:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.navtabs button.on { color: #fff; background: rgba(255,138,61,0.16); border-color: rgba(255,138,61,0.5); }
.chan-pick { margin: 0; display: flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0,0,0,0.25); }
.chan-pick .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; flex: none; }
.chan-pick select { margin: 0; border: none; background: transparent; padding: 7px 6px; width: auto; font-weight: 700; }
.me-box { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 6px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.me-text { display: flex; flex-direction: column; gap: 4px; min-width: 96px; }
.me-text b { font-size: 14px; line-height: 1; }

/* ---- lobby ---- */
.lobby {
  margin: auto; width: 100%; max-width: 1380px; height: min(100%, 820px); min-height: 580px;
  display: grid; gap: 10px; grid-template-columns: 250px 1fr 270px; grid-template-rows: auto 1fr 230px;
}
.fighter-card { grid-column: 1; grid-row: 2 / 4; gap: 8px; }
.rooms { grid-column: 2; grid-row: 2; }
.players { grid-column: 3; grid-row: 2 / 4; }
.lobby .chat { grid-column: 2; grid-row: 3; }

.fighter-card .preview { flex: 1; min-height: 200px; }
.fc-head { display: flex; align-items: center; gap: 8px; }
.fc-head b { font-size: 18px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-xp { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.fc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.fc-stats div { background: rgba(255,255,255,0.04); border-radius: 6px; padding: 5px 4px; text-align: center; }
.fc-stats b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.fc-stats span { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.loadout-list { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; font-size: 12.5px; align-items: center; }
.loadout-list .k {
  font-size: 10.5px; font-weight: 800; color: var(--accent); border: 1px solid rgba(255,138,61,0.45); border-radius: 4px;
  min-width: 20px; text-align: center; padding: 1px 4px;
}
.loadout-list .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loadout-list .h { grid-column: 1 / -1; font-size: 10.5px; letter-spacing: 2px; color: var(--muted); margin-top: 2px; }

.search { margin: 0; position: relative; color: var(--muted); }
.search .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; }
label.search input { margin: 0; padding: 7px 10px 7px 30px; width: 190px; }
.room-filters { margin: -2px 0 10px; }

.room-list {
  flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 8px; align-content: start; padding-right: 2px;
}
.room-card {
  text-align: left; padding: 0; border-radius: 8px; background: rgba(255,255,255,0.035);
  border: 1px solid var(--line); cursor: pointer; display: flex; color: var(--text); overflow: hidden; min-height: 76px;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.room-card:hover { background: rgba(255,138,61,0.1); border-color: rgba(255,138,61,0.65); transform: translateY(-1px); }
.room-card.busy { cursor: default; }
.room-card.busy .rc-body { opacity: 0.62; }
.room-card.busy:hover { background: rgba(255,255,255,0.035); border-color: var(--line); transform: none; }
.rc-map { width: 74px; flex: none; position: relative; border-right: 1px solid rgba(255,255,255,0.08); }
.rc-no {
  position: absolute; left: 6px; bottom: 5px; font-weight: 900; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}
.rc-body { flex: 1; min-width: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.rc-top { display: flex; align-items: center; gap: 6px; }
.rc-top .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.rc-top .ico { width: 13px; height: 13px; color: #ff8a8a; }
.rc-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.fillbar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.fillbar i { display: block; height: 100%; background: linear-gradient(90deg, #4ade80, #a3f7bf); }
.room-card.full .fillbar i, .room-card.playing .fillbar i { background: linear-gradient(90deg, #ff9b4d, #ffd08a); }
.rc-bottom .cnt { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.st { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; }
.st.waiting { color: #8ef0a8; background: rgba(74,222,128,0.12); }
.st.playing { color: #ffb36b; background: rgba(255,155,77,0.12); }
.st.locked { color: #ff8a8a; background: rgba(255,90,90,0.12); }
.mode-badge { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 1px 6px; border-radius: 4px; margin-right: 6px; color: #fff; }
.mode-dm { background: rgba(255,138,61,0.3); }
.mode-duel { background: rgba(79,209,255,0.3); }
.mode-gladiator { background: rgba(199,125,255,0.32); }
.mode-tdm { background: linear-gradient(90deg, rgba(255,77,94,0.45), rgba(62,168,255,0.45)); }
.empty-note { color: var(--muted); padding: 18px 4px; grid-column: 1 / -1; text-align: center; }

.ptabs { margin-bottom: 8px; }
.ptabs button, .chat-tabs button { padding: 5px 10px; font-size: 13px; }
.plist { overflow-y: auto; flex: 1; }
.prow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 5px; font-size: 14px; }
.prow:hover { background: rgba(255,255,255,0.05); }
.prow .pn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.prow.me { background: rgba(255,138,61,0.12); }
.prow .whisper { padding: 2px 6px; font-size: 11px; opacity: 0; line-height: 1.3; }
.prow:hover .whisper { opacity: 1; }
.plist-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; padding: 10px 6px; }
.plist-note b { color: var(--text); }

.chat-tabs { margin-bottom: 6px; }
.chat-hint { font-size: 11.5px; }
.chatlog { flex: 1; overflow-y: auto; font-size: 14px; line-height: 1.5; padding-right: 4px; }
.chatlog .ln { overflow-wrap: anywhere; }
.chatlog .ts { color: rgba(154,163,178,0.6); font-size: 11px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.chatlog .who { font-weight: 700; margin-right: 6px; }
.chatlog .sys { color: #9fdcff; font-style: italic; }
.chatlog .wh, .chatlog .wh .who { color: #f7a8ff; }
.chatlog.only-wh .ln:not(.wh) { display: none; }
.chatin { display: flex; gap: 6px; margin-top: 8px; }
.chatin input {
  flex: 1; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: rgba(0,0,0,0.35);
  border: 1px solid var(--line); border-radius: 6px; outline: none;
}
.chatin input:focus { border-color: var(--accent); }
@media (max-width: 1100px) {
  .lobby { grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr 230px 260px; height: auto; }
  .players { grid-column: 1 / -1; grid-row: 4; }
}
@media (max-width: 760px) {
  .lobby { grid-template-columns: 1fr; grid-template-rows: auto 360px 380px 240px 240px; }
  .fighter-card, .rooms, .players, .lobby .chat { grid-column: 1; grid-row: auto; }
}

/* ---- room ---- */
.room {
  margin: auto; width: 100%; max-width: 1180px; height: min(100%, 760px); min-height: 560px;
  display: grid; gap: 10px; grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr 210px;
}
.room-top { gap: 14px; }
.room-top h2 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.room-no {
  font-size: 26px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; padding: 2px 10px;
  border: 1px solid rgba(255,138,61,0.5); border-radius: 8px; background: rgba(255,138,61,0.1);
}
.room-slots { grid-column: 1; grid-row: 2; }
.room-settings { grid-column: 2; grid-row: 2 / 4; position: relative; }
.room-chat { grid-column: 1; grid-row: 3; }
.rooms-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 12px; text-align: center; }
.rooms-empty b { font-size: 16px; color: #e6ebf2; letter-spacing: 1px; }
.rooms-empty button { margin-top: 6px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; overflow-y: auto; align-content: start; }
.pslot {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 8px; position: relative;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); min-height: 64px; overflow: hidden;
}
.pslot::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: rgba(255,255,255,0.12); }
.pslot.ready::before { background: #4ade80; }
.pslot.host::before { background: #ffd77a; }
.pslot.empty { opacity: 0.4; border-style: dashed; justify-content: center; color: var(--muted); }
/* Open slots wait for someone to join (a soft pulsing dot); bots have a kick button. */
.pslot.empty.waiting { opacity: 0.55; gap: 9px; font-size: 13.5px; letter-spacing: 0.3px; }
.pslot .wdot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: wdot 1.6s ease-in-out infinite; }
@keyframes wdot { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
.pslot .kick { flex: none; width: 26px; height: 26px; padding: 0; border-radius: 6px; font-size: 13px; line-height: 1; margin: 0;
  background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--line); }
.pslot .kick:hover { background: rgba(255,77,94,0.25); color: #fff; border-color: rgba(255,77,94,0.6); }
.rs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rs-head h3 { margin: 0; }
.room-slots .slot-grid { flex: 1; min-height: 0; }
/* Host's bot buttons, in a bar under the player list. */
.bot-tools { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bot-tools button { padding: 6px 12px; font-size: 12.5px; margin: 0; }
.bot-tools .add-bot { padding: 8px 18px; font-size: 13.5px; font-weight: 800; letter-spacing: 0.5px; }
.bot-tools.hidden { display: none; }
/* Team Deathmatch rooms: a red column and a blue column. */
.slot-grid.teams { grid-template-columns: 1fr 1fr; }
.team-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 9px; }
.team-col.team-0 { background: rgba(255,77,94,0.07); border: 1px solid rgba(255,77,94,0.3); color: inherit; }
.team-col.team-1 { background: rgba(62,168,255,0.07); border: 1px solid rgba(62,168,255,0.3); color: inherit; }
.tc-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.tc-head b { letter-spacing: 3px; font-size: 14px; }
.team-0 .tc-head b { color: #ff6b78; }
.team-1 .tc-head b { color: #5cb8ff; }
.tc-head button { padding: 4px 10px; font-size: 12.5px; }
.pslot.empty::before { display: none; }
.pslot.me { border-color: rgba(255,138,61,0.7); background: rgba(255,138,61,0.08); }
.pslot .sw { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.ps-main { flex: 1; min-width: 0; }
.ps-name { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.ps-name span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-load { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.pslot .tag { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; margin: 0; flex: none; }
.tag.host { background: rgba(255,200,80,0.2); color: #ffd77a; }
.tag.ready { background: rgba(74,222,128,0.2); color: #8ef0a8; }
.tag.wait { background: rgba(255,255,255,0.08); color: var(--muted); }
.map-card { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.map-card .mdesc { font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.map-thumb {
  width: 96px; height: 62px; border-radius: 6px; flex: none; border: 1px solid rgba(255,255,255,0.15);
  background: linear-gradient(135deg, #6b7078 0 40%, #d0803c 40% 48%, #9aa0a8 48% 70%, #5f6f82 70%);
}
.setgrid .wide { grid-column: 1 / -1; }
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.room-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; align-items: stretch; }
.room-actions .big { flex: 1; margin-top: 0; }
#room-ready.on { background: #4ade80; color: #062b14; }
.countdown {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px;
  font-weight: 900; color: #fff; text-shadow: 0 0 24px rgba(255,138,61,0.8); background: rgba(5,6,10,0.55);
  border-radius: 10px; pointer-events: none;
}
@media (max-width: 860px) {
  .room { grid-template-columns: 1fr; grid-template-rows: auto 280px auto 200px; height: auto; }
  .room-slots, .room-settings, .room-chat { grid-column: 1; grid-row: auto; }
}

/* Stat bars on weapons (compared within the category). */
.sbars { display: grid; grid-template-columns: 46px 1fr; gap: 3px 8px; align-items: center; margin: 2px 0; }
.sbars span { font-size: 10px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.sbars i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); position: relative; overflow: hidden; }
.sbars i::after { content: ''; position: absolute; inset: 0; width: var(--v); background: linear-gradient(90deg, #3bb0d2, #8fe3ff); border-radius: 3px; }
.preview {
  flex: 1; min-height: 240px; border-radius: 8px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 72%, rgba(255,138,61,0.14), rgba(0,0,0,0.28));
}
.preview canvas { display: block; width: 100%; height: 100%; }

/* ---- shop / equipment: character + equipped slots | catalogue | item details ---- */
/* Item pictures sit on a soft lit backdrop so dark gear (black hair, black coats) still reads. */
:root { --studio: radial-gradient(ellipse at 50% 45%, #444b58, #2a2f39 55%, #1b1e25); }
.shop {
  margin: auto; width: 100%; max-width: 1500px; height: min(100%, 880px); min-height: 600px;
  display: grid; gap: 10px; grid-template-columns: 290px minmax(0, 1fr) 330px; grid-template-rows: auto minmax(0, 1fr);
}
.shop-top .navtabs button { font-size: 15px; padding: 7px 16px; letter-spacing: 1px; text-transform: uppercase; }
.shop-top .me-box { padding: 6px 10px; gap: 12px; }
.shop-char { grid-column: 1; grid-row: 2; gap: 8px; overflow-y: auto; }
.shop-items { grid-column: 2; grid-row: 2; }
.shop-detail { grid-column: 3; grid-row: 2; }

/* Character: the turning preview, then the equipped slots. */
.shop-char .preview { position: relative; flex: 1 1 auto; min-height: 250px; }
.preview canvas { position: relative; z-index: 0; cursor: grab; touch-action: none; }
.preview canvas.dragging { cursor: grabbing; }
.pv-ctl { position: absolute; right: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.pv-ctl button {
  width: 30px; height: 30px; padding: 0; font-size: 17px; font-weight: 800; line-height: 1; border-radius: 6px;
  background: rgba(10,12,18,0.65); border-color: rgba(255,255,255,0.18);
}
.pv-ctl button:hover { background: rgba(255,138,61,0.3); border-color: var(--accent); }
.preview-info {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1; text-align: center; font-size: 13px;
  pointer-events: none; text-shadow: 0 1px 3px #000, 0 0 8px #000;
}
.preview-info b { font-size: 15px; letter-spacing: 1px; }
.preview-info .trying { margin-top: 3px; font-size: 12px; color: #ffcf9e; }
.eq-h {
  display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-top: 2px;
}
.eq-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.eq-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.eq-slot {
  padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0;
  background: none; border: none; border-radius: 0; color: var(--muted);
}
.eq-slot:hover { background: none; color: var(--text); }
.es-pic {
  position: relative; display: block; aspect-ratio: 1; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--line); border-bottom: 2px solid var(--rar, var(--line));
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--rar, #888) 22%, transparent), transparent 72%), var(--studio);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.eq-slot:hover .es-pic { border-color: rgba(255,138,61,0.7); border-bottom-color: var(--rar); }
.eq-slot.on .es-pic { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 12px rgba(255,138,61,0.35); }
.eq-slot.on small { color: #fff; }
.es-pic img.thumb { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; }
.es-pic .key {
  position: absolute; left: 3px; top: 3px; z-index: 1; font-size: 9.5px; line-height: 1; padding: 2px 3px; border-radius: 3px;
  color: var(--accent); background: rgba(0,0,0,0.6); border: 1px solid rgba(255,138,61,0.45);
}
.es-pic .dye {
  position: absolute; right: 4px; bottom: 4px; z-index: 1; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 0 3px #000;
}
.eq-slot small {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Catalogue: Weapons / Items / Look, a category row, tools, then the item grid. */
.group-tabs { display: flex; gap: 2px; margin: -4px -14px 10px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.group-tabs button {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px 11px; margin-bottom: -1px;
  background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  font-size: 14px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
}
.group-tabs button:hover { background: none; color: var(--text); }
.group-tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.group-tabs button.on .ico { color: var(--accent); }
.cat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.cat-tabs button { padding: 5px 12px; font-size: 13px; border-radius: 6px; background: rgba(255,255,255,0.04); }
.cat-tabs button .n { margin-left: 7px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-tabs button.on { background: rgba(255,138,61,0.2); border-color: var(--accent); color: #fff; }
.cat-tabs button.on .n { color: #ffcf9e; }
.shop-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.shop-tools label.search input { width: 170px; }
.shop-tools .sortby { margin: 0; display: flex; align-items: center; gap: 6px; }
.shop-tools .sortby select { margin: 0; padding: 5px 8px; width: auto; }
#shop-count { font-size: 12.5px; }

.items {
  overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  grid-auto-rows: max-content; /* cards keep their height and the list scrolls */
  align-content: start; flex: 1; min-height: 0; padding: 2px 4px 2px 2px;
}
.icard {
  position: relative; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); border: 1px solid var(--line);
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.icard:hover { border-color: rgba(255,138,61,0.6); transform: translateY(-1px); }
.icard.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(255,138,61,0.2); }
.ic-pic {
  position: relative; flex: none; height: 98px; border-bottom: 2px solid var(--rar);
  background: radial-gradient(ellipse at 50% 62%, color-mix(in srgb, var(--rar) 24%, transparent), transparent 72%), var(--studio);
}
.ic-pic img.thumb { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.icard.locked .ic-pic img.thumb { filter: grayscale(0.75) brightness(0.55); }
.ic-lock { position: absolute; right: 6px; top: 6px; color: #ff9a9a; line-height: 0; }
.icard.worn::after {
  content: '\2713'; position: absolute; left: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #062b14; background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
}
.ic-name {
  padding: 6px 9px 0; font-size: 13.5px; font-weight: 800; color: var(--rar);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ic-meta { display: flex; align-items: center; gap: 6px; padding: 3px 9px 8px; font-size: 12px; }
.ic-lv { color: var(--muted); }
.ic-lv.bad, .bad { color: #ff8a8a; }
.ic-price { margin-left: auto; font-weight: 800; color: #ffd77a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ic-price.bad { color: #c9a76a; opacity: 0.75; }
.ic-tag { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.ic-tag.eq { color: #062b14; background: #4ade80; }
.ic-tag.own { color: #8ef0a8; background: rgba(74,222,128,0.14); }

/* Item pictures fade in once drawn; a soft pulse while they're on the way. */
img.thumb { opacity: 0; transition: opacity 0.25s; }
img.thumb.ready { opacity: 1; }
.ic-pic:has(img.thumb:not(.ready):not(.fail)), .es-pic:has(img.thumb:not(.ready):not(.fail)),
.d-pic:has(img.thumb:not(.ready):not(.fail)) { animation: thumbPulse 1.1s ease-in-out infinite; }
@keyframes thumbPulse { 50% { filter: brightness(1.35); } }

/* Details: picture, name, stats, colours, then price and buttons at the bottom. */
.shop-detail { padding-bottom: 10px; }
.detail { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.d-pic {
  position: relative; flex: none; height: 176px; border-radius: 8px; border: 1px solid var(--line); border-bottom: 2px solid var(--rar);
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--rar) 30%, transparent), transparent 72%), var(--studio);
}
.d-pic img.thumb { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.d-rar {
  position: absolute; right: 8px; top: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,0.55); border: 1px solid currentColor;
}
.d-name { font-size: 23px; font-weight: 900; line-height: 1.1; margin-top: 2px; }
.d-cls { margin-top: -4px; font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.d-desc { margin: 0; font-size: 13.5px; line-height: 1.45; color: #cfd6e2; }
.d-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.d-stats span {
  font-size: 12px; padding: 3px 7px; border-radius: 5px; color: #c9efff;
  background: rgba(79,209,255,0.09); border: 1px solid rgba(79,209,255,0.22);
}
.detail .sbars { grid-template-columns: 52px 1fr; gap: 5px 10px; }
.detail .sbars i { height: 6px; }
.d-sect { padding-top: 10px; border-top: 1px solid var(--line); }
.d-h { margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.d-h .muted { letter-spacing: 0; text-transform: none; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches .sw {
  position: relative; width: 30px; height: 30px; padding: 0; border-radius: 7px; background: var(--c);
  border: 2px solid rgba(255,255,255,0.16); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}
.swatches .sw:hover { background: var(--c); border-color: rgba(255,255,255,0.65); }
.swatches .sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(0,0,0,0.35); }
.swatches .sw .ico {
  position: absolute; right: -5px; bottom: -5px; width: 15px; height: 15px; padding: 2px; border-radius: 50%;
  color: #ffd2d2; background: #1b1e26; border: 1px solid rgba(255,255,255,0.2);
}
.dye-buy {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 8px; font-size: 13px;
  border-radius: 7px; background: rgba(255,138,61,0.08); border: 1px solid rgba(255,138,61,0.35);
}
.dye-buy .sw-mini { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.4); flex: none; }
.dye-buy .ic-price { margin-left: 0; }
.dye-buy button { padding: 5px 12px; }
.d-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.d-price { display: flex; align-items: center; gap: 4px; min-height: 30px; font-size: 13px; }
.d-price > b { font-size: 24px; color: #ffd77a; font-variant-numeric: tabular-nums; }
.d-price .coin { width: 16px; height: 16px; }
.d-req { color: var(--muted); }
.d-owned { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #8ef0a8; }
.d-why { font-size: 12.5px; color: #ffb4b4; }
.d-btns { display: flex; gap: 6px; }
.d-btns > * { flex: 1; }
.d-btns button { padding: 11px 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 14px; }
.d-btns button.primary { background: var(--accent); border-color: var(--accent); color: #1a0e05; }
.d-btns button.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.12); }
.d-btns button.ghost { font-size: 12.5px; padding: 7px 10px; letter-spacing: 0.5px; color: var(--muted); }
.d-btns button.ghost:hover { color: #ffb4b4; border-color: rgba(255,120,120,0.5); }
.d-btns kbd, .d-on kbd { font: inherit; font-size: 11px; padding: 0 4px; margin-left: 4px; border-radius: 3px; border: 1px solid currentColor; opacity: 0.75; }
.d-on {
  display: flex; align-items: center; justify-content: center; padding: 11px 10px; border-radius: 6px; font-size: 14px;
  font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #8ef0a8;
  background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.45);
}
.shop-detail .msg { margin-top: 8px; min-height: 1.3em; font-size: 13px; }

/* Lobby fighter card: little pictures in the loadout list. */
.loadout-list .v { display: flex; align-items: center; gap: 6px; }
.mini-pic { position: relative; width: 38px; height: 24px; flex: none; border-radius: 4px; background: rgba(0,0,0,0.25); }
.mini-pic img.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 1240px) {
  .shop { grid-template-columns: 250px minmax(0, 1fr) 300px; }
}
@media (max-width: 1020px) {
  .shop { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(520px, 1fr) auto; height: auto; }
  .shop-items { grid-column: 1; grid-row: 2; }
  .shop-detail { grid-column: 2; grid-row: 2; }
  .shop-char { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: 220px 1fr; gap: 8px 12px; overflow: visible; }
  .shop-char .preview { grid-row: 1 / 5; min-height: 260px; }
}
@media (max-width: 700px) {
  .shop { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; }
  .shop-items, .shop-detail, .shop-char { grid-column: 1; grid-row: auto; }
  .shop-items { min-height: 480px; }
  .shop-char { grid-template-columns: 1fr; }
  .shop-char .preview { grid-row: auto; }
  .group-tabs button { padding: 10px 10px 11px; letter-spacing: 1px; }
}

/* ---- options ---- */
.options-panel { max-width: 960px; }
.opt-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.opt-head h2 { margin: 0; }
.opt-tabs button { padding: 6px 14px; }
.opt-pane { min-height: 360px; }
/* Options > Audio: settings on the left, the music player and track lists on the right. */
.opt-audio { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 36px; align-content: start; }
.opt-audio .setting h3 { margin-top: 10px; }
.opt-audio .setting.sub { padding-left: 16px; border-left: 2px solid rgba(255,138,61,0.25); margin-left: 4px; }
.opt-audio .setting.sub h3 { font-size: 11.5px; margin-top: 6px; }
.opt-audio .setting.sub h3::before { display: none; }
.au-head { margin: 18px 0 2px; font-size: 11.5px; font-weight: 800; letter-spacing: 2.5px; color: var(--accent); text-transform: uppercase; }
.au-col > .au-head:first-child { margin-top: 6px; }
.opt-audio .check { margin: 9px 0 3px; }
.np-card { margin-top: 6px; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(255,138,61,0.35);
  background: linear-gradient(135deg, rgba(255,138,61,0.13), rgba(255,255,255,0.03)); }
.np-label { font-size: 11px; font-weight: 800; letter-spacing: 2.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.np-mood { letter-spacing: 0.5px; font-weight: 700; color: var(--accent); text-transform: none; font-size: 11.5px; }
.np-title { font-size: 19px; font-weight: 800; margin-top: 6px; color: #f2f5f9; }
.np-artist { font-size: 13px; color: var(--muted); min-height: 17px; }
.np-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.1); margin-top: 12px; overflow: hidden; }
.np-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.25s linear; }
.np-time { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.np-btns { display: flex; gap: 8px; margin-top: 10px; }
.np-btns button { flex: 1; margin: 0; padding: 7px 10px; }
.pl-head { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.pl-tabs button { padding: 5px 12px; font-size: 12.5px; }
.pl-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.pl-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border-radius: 7px; background: rgba(255,255,255,0.035); border: 1px solid transparent; }
.pl-list li.playing { border-color: rgba(255,138,61,0.55); background: rgba(255,138,61,0.09); }
.pl-list li.off { opacity: 0.5; }
.pl-list .check { margin: 0; flex: 1; min-width: 0; }
.pl-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pl-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-t .muted { font-size: 11.5px; }
.pl-play { flex: none; width: 30px; height: 30px; padding: 0; margin: 0; border-radius: 50%; font-size: 12px; }
.pl-list li.playing .pl-play { color: var(--accent); }
.pl-note { font-size: 12px; margin-top: 8px; }
@media (max-width: 720px) { .opt-audio { grid-template-columns: 1fr; } }
/* The "now playing" pop-up (top left, clear of the kill feed). */
.np-toast { position: fixed; top: 14px; left: 16px; z-index: 60; display: flex; align-items: center; gap: 10px; pointer-events: none;
  padding: 8px 14px 8px 10px; border-radius: 9px; background: rgba(12,14,20,0.82); border: 1px solid rgba(255,138,61,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 0; transform: translateX(-12px); transition: opacity 0.35s, transform 0.35s; }
.np-toast.show { opacity: 1; transform: none; }
.np-toast .np-ic { font-size: 20px; color: var(--accent); }
.np-toast b { display: block; font-size: 13.5px; color: #f2f5f9; }
.np-toast span:not(.np-ic) { font-size: 11.5px; color: var(--muted); }
.credits-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.credits-list li { padding: 8px 10px; border-radius: 7px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); font-size: 13.5px; }
.credits-list a { color: var(--accent); }
.credits-list .muted { font-size: 12px; margin-top: 3px; }
.opt-general { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 36px; align-content: start; }
.opt-general .setting h3 { margin-top: 16px; }
@media (max-width: 720px) { .opt-general { grid-template-columns: 1fr; } }

/* Crosshair tab: three previews on top, then style / colour / size controls. */
.xh-pane { display: flex; flex-direction: column; gap: 14px; }
.xh-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.xh-view {
  position: relative; height: 120px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(180deg, #5b6575 0%, #39404c 55%, #2a2d33 56%, #4a4036 100%);
}
.xh-view.firing { background: linear-gradient(180deg, #7a5b45 0%, #4a3a30 60%, #2c2622 61%, #3f3a34 100%); }
.xh-view.light { background: linear-gradient(135deg, #e9edf2, #c7ccd4); }
.xh-mark { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.xh-mark svg { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); overflow: visible; }
.xh-cap {
  position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 3px #000;
}
.xh-ctl .setting h3 { margin: 6px 0 8px; }
.xh-ctl #xh-mode button { padding: 7px 14px; }
.xh-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.xh-styles button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border-radius: 7px;
  background: rgba(0,0,0,0.3);
}
.xh-styles button svg { height: 30px; width: auto; }
.xh-styles button span { font-size: 11px; color: var(--muted); }
.xh-styles button.on { border-color: var(--accent); background: rgba(255,138,61,0.16); }
.xh-styles button.on span { color: #fff; }
.xh-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xh-colors button { width: 30px; height: 30px; padding: 0; border-radius: 7px; background: var(--c); border: 2px solid rgba(255,255,255,0.15); }
.xh-colors button:hover { background: var(--c); border-color: rgba(255,255,255,0.6); }
.xh-colors button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.xh-custom { display: flex; align-items: center; gap: 6px; margin: 0 0 0 6px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.xh-custom input { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.xh-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.xh-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
.xh-checks label { margin-top: 6px; }
.xh-pane.weapon-mode .xh-styles, .xh-pane.weapon-mode .xh-colors, .xh-pane.weapon-mode .xh-sliders { opacity: 0.55; }
.xh-pane .row-btns { margin-top: 4px; justify-content: flex-start; }
@media (max-width: 720px) { .xh-sliders, .xh-checks, .xh-preview { grid-template-columns: 1fr; } }

/* ---- dialogs / results ---- */
.panel.form { text-align: left; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.panel.small .row-btns button { display: inline-block; width: auto; margin-top: 0; }
#dlg-create, #dlg-options { z-index: 30; }

.results { max-width: 760px; padding: 0 0 22px; overflow: hidden; text-align: center; }
.res-banner { padding: 22px 24px 16px; background: linear-gradient(180deg, rgba(255,138,61,0.22), transparent); border-bottom: 1px solid var(--line); }
.res-banner h2 { margin: 0; font-size: 34px; letter-spacing: 6px; font-style: italic; }
.results.won .res-banner h2 { background: linear-gradient(90deg, var(--accent), #ffd08a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.results.lost .res-banner { background: linear-gradient(180deg, rgba(79,209,255,0.14), transparent); }
.res-banner .muted { margin-top: 6px; }
.res-body { display: grid; grid-template-columns: 230px 1fr; gap: 18px; padding: 16px 24px 0; text-align: left; }
.res-place { font-size: 42px; font-weight: 900; line-height: 1; }
.res-place small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.res-stats div { background: rgba(255,255,255,0.05); border-radius: 6px; padding: 6px; text-align: center; }
.res-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.res-stats span { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.rewards { display: flex; gap: 8px; flex-wrap: wrap; font-weight: 800; }
.rewards > span { background: rgba(255,215,122,0.1); border: 1px solid rgba(255,215,122,0.3); border-radius: 6px; padding: 5px 9px; }
.rewards .lvup { color: var(--accent2); background: rgba(79,209,255,0.12); border-color: rgba(79,209,255,0.45); }
.res-xp { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; }
.res-table { max-height: 300px; overflow-y: auto; }
.results .big { width: calc(100% - 48px); margin: 18px 24px 0; }
@media (max-width: 640px) { .res-body { grid-template-columns: 1fr; } }

/* ---- admin console ---- */
#admin { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 60; width: min(760px, calc(100vw - 24px)); }
.admin-panel {
  background: rgba(8, 10, 14, 0.94); border: 1px solid rgba(255,138,61,0.55); border-radius: 8px; padding: 10px 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6); font-family: Consolas, 'Courier New', monospace;
}
.admin-head { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 1px; }
.admin-head b { color: var(--accent); }
.admin-head .muted { flex: 1; font-size: 11.5px; }
.admin-head button { padding: 0 9px; font-size: 18px; line-height: 24px; }
.admin-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.admin-quick button { padding: 4px 9px; font-size: 12px; font-family: inherit; }
.admin-log { height: 190px; overflow-y: auto; font-size: 12.5px; line-height: 1.45; padding: 6px 8px; background: rgba(255,255,255,0.03); border-radius: 5px; }
.admin-log .in { color: var(--accent2); }
.admin-log .ok { color: #8ef0a8; }
.admin-log .err { color: #ff8a8a; }
.admin-log .info { color: #cfd6e2; white-space: pre-wrap; }
.admin-in { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.admin-in .prompt { color: var(--accent); font-weight: 800; }
.admin-in input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 5px; color: var(--text); padding: 7px 9px; font: inherit; font-size: 13px; outline: none; }
.admin-in input:focus { border-color: var(--accent); }

/* Thin dark scrollbars for the menu lists. */
.screen ::-webkit-scrollbar, .overlay ::-webkit-scrollbar { width: 8px; height: 8px; }
.screen ::-webkit-scrollbar-thumb, .overlay ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }
.screen ::-webkit-scrollbar-thumb:hover, .overlay ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.24); }
.screen ::-webkit-scrollbar-track, .overlay ::-webkit-scrollbar-track { background: transparent; }

/* Key bindings in two columns inside the Options dialog. */
.opt-pane .keybinds { grid-template-columns: 1fr auto 1fr auto; column-gap: 18px; }
.opt-pane .keybinds span { padding-left: 2px; }
