.studio-rail .brand > span { font-size: 1.35rem; letter-spacing: -.045em; }
.nav-badge.live { border-color: #35644e; color: #8fe0b5; background: #8fe0b50b; }
.cover-ranks { --cover: url("assets/broadcast-cup.webp"); }
.cover-lobby { --cover: url("assets/arena-night.webp"); }
body[data-mode="ranks"] { --accent: #f5d284; }
body[data-mode="lobby"] { --accent: #8fe0b5; }
[data-mode="ranks"] .arcade-art { background-image: url("assets/broadcast-cup.webp"); background-position: 72% 50%; }
[data-mode="lobby"] .arcade-art { background-image: url("assets/arena-night.webp"); background-position: 66% 48%; }
#steam-account { max-width: 240px; }
#steam-account .account-name { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-avatar, .player-avatar { display: inline-grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid #4a6075; border-radius: 50%; background: #172638; color: #b8c9d8; }
.header-avatar { width: 27px; height: 27px; }
.header-avatar img, .player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-avatar .icon { width: 16px; height: 16px; }
.balance-chip { padding: 3px 6px; border: 1px solid #7d6a40; border-radius: 3px; color: #f5d284; font: 650 .68rem var(--mono); }
.account-balance { display: flex; align-items: baseline; gap: 12px; padding: 18px; border: 1px solid #5d563f; background: #f5d2840b; }
.account-balance strong { color: var(--gold); font: 900 3rem/1 var(--display); }
.account-balance span { color: #d2dce5; }
[data-stage="ranks"] .arcade-hero, [data-stage="online"] .arcade-hero { min-height: 240px; }
.ranks-panel { margin-top: 16px; }
.ranks-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.period-tabs { max-width: 100%; overflow-x: auto; }
.period-tabs button { white-space: nowrap; }
.rank-mode { min-height: 45px; padding: 0 34px 0 12px; border: 1px solid #40566d; border-radius: 4px; background: #0a1523; color: var(--text); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.podium-card { position: relative; display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 20px 10px; border: 1px solid #42566a; background: linear-gradient(145deg, #1c2a3b, #101b29); text-align: center; }
.podium-card.place-1 { border-top: 3px solid #f5d284; }
.podium-card.place-2 { border-top: 3px solid #bfd0df; }
.podium-card.place-3 { border-top: 3px solid #d59a71; }
.podium-rank { position: absolute; left: 10px; top: 8px; color: #a9b8c6; font: 650 .75rem var(--mono); }
.podium-card .player-avatar { width: 48px; height: 48px; }
.podium-card > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-card > b { color: var(--accent); font-size: .82rem; }
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th { padding: 10px 12px; border-bottom: 1px solid #405469; color: #93a8bc; font: 650 .65rem var(--mono); letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.leaderboard-table td { padding: 11px 12px; border-bottom: 1px solid #293e52; color: #c9d4de; font-size: .85rem; }
.leaderboard-table tr.is-me { background: #8fe0b50a; }
.rank-number { color: #8fa5b9 !important; font-family: var(--mono); }
.leader-player { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.leader-player .player-avatar, .online-player .player-avatar { width: 34px; height: 34px; }
.leader-player strong { overflow-wrap: anywhere; }
.leader-points { color: var(--accent) !important; font: 900 1.35rem var(--display); }
.you-badge { padding: 2px 5px; border-radius: 2px; background: var(--accent); color: #102019; font-size: .62rem; }
.empty-ranking, .empty-lobbies { padding: 35px 15px; color: #aebdcc; text-align: center; line-height: 1.55; }
.online-lobby-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 15px; margin-top: 16px; align-items: start; }
.create-lobby-panel h2 { margin-bottom: 18px; font: 900 2rem var(--display); }
.lobby-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.form-field { display: grid; gap: 7px; min-width: 0; }
.form-field > span { color: #a9bbcb; font-size: .72rem; }
.form-field input, .form-field select, .guest-form input { width: 100%; min-width: 0; min-height: 45px; padding: 0 11px; border: 1px solid #40576e; border-radius: 4px; outline: none; background: #091422; color: var(--text); }
.form-field input:focus, .form-field select:focus { border-color: var(--accent); }
.topic-section { margin-top: 17px; }
.topic-head { display: flex; align-items: center; justify-content: space-between; }
.topic-head .text-action { font-size: .72rem; }
.topic-checkboxes { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-chip { cursor: pointer; }
.topic-chip input { position: absolute; opacity: 0; pointer-events: none; }
.topic-chip span { display: block; padding: 7px 10px; border: 1px solid #3c5268; border-radius: 3px; background: #0b1724; color: #aebdcc; font-size: .73rem; }
.topic-chip input:checked + span { border-color: var(--accent); background: #8fe0b510; color: var(--accent); }
.topic-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.create-lobby-panel > .primary { margin-top: 20px; }
.lobby-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.public-lobbies { display: grid; gap: 8px; }
.public-lobby { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; align-items: center; padding: 12px; border: 1px solid #334b61; background: #0d1a28; }
.public-lobby > div strong, .public-lobby > div small { display: block; }
.public-lobby > div small { margin-top: 3px; color: #91a6b9; font-size: .7rem; }
.public-lobby > span { color: #a8b8c7; font-size: .72rem; }
.lobby-capacity { font-family: var(--mono); color: var(--accent) !important; }
.public-lobby .secondary { grid-column: 2; grid-row: 1 / 3; min-height: 38px; padding: 0 11px; font-size: .75rem; }
.online-notice { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 650px; margin: 16px auto 0; padding-block: 35px; }
.online-notice .card-glyph { width: 34px; height: 34px; color: var(--accent); }
.online-notice h2 { font: 900 2rem var(--display); }
.online-notice p { color: #adbece; line-height: 1.55; }
.guest-form { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.waiting-room { margin-top: 16px; }
.waiting-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #354b61; }
.waiting-heading h2 { font: 900 2.4rem var(--display); }
.waiting-heading p { margin-top: 7px; color: #aebfce; }
.waiting-room > h3 { margin: 20px 0 10px; }
.online-invite { display: flex; align-items: center; gap: 7px; }
.online-invite input { width: 7ch; padding: 0; border: 0; background: transparent; color: var(--accent); font: 900 2rem var(--display); }
.online-players { display: grid; gap: 6px; }
.online-player { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid #30485e; background: #0c1926; }
.online-player.winner { border-color: #8b7745; background: #f5d2840b; }
.online-place { width: 18px; color: #8da3b7; font: .7rem var(--mono); }
.online-player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d2dde6; font-size: .8rem; }
.online-player > strong { color: var(--accent); font: 900 1.25rem var(--display); }
.reward-chip { color: #f5d284; font-size: .7rem; }
.waiting-room > .primary { margin-top: 20px; }
.online-game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 15px; margin-top: 16px; align-items: start; }
.online-question-card { border-top: 2px solid var(--accent); }
.online-timer { color: var(--accent); font: 900 1.4rem var(--display); }
.online-timer.urgent { color: #ff9c96; }
.online-options .answer-option { min-height: 85px; }
.online-score-side h2 { margin: 5px 0 13px; font: 900 1.6rem var(--display); }
.ready-count, .answer-waiting { margin-top: 12px; color: #aebfd0; font-size: .78rem; }
.online-reveal { margin-top: 16px; padding: 13px; border-left: 3px solid var(--accent); background: #0a1724; }
.online-reveal strong { color: var(--accent); }
.online-reveal p { margin-top: 5px; color: #c1ced9; font-size: .85rem; line-height: 1.5; }
.online-career-form { display: flex; gap: 9px; }
.online-career-form input { width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid #465e75; background: #091422; color: var(--text); }
.online-finish { margin-top: 16px; }
.online-finish .online-players { max-width: 700px; margin: 20px 0; }
.balance-award { margin: 15px 0; color: #f5d284; font: 900 1.7rem var(--display); }
.online-finish > .primary { margin-top: 20px; }
[data-stage="online-question"] .arcade-hero, [data-stage="online-finished"] .arcade-hero { display: none; }
@media (max-width: 1100px) {
  #steam-account { max-width: 170px; }
  #steam-account .account-name { display: none; }
  .online-lobby-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 749px) {
  .ranks-head { align-items: stretch; flex-direction: column; }
  .rank-mode { width: 100%; }
  .online-lobby-layout, .online-game-layout { grid-template-columns: 1fr; }
  .online-score-side { order: -1; }
  .online-score-side .online-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .waiting-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  #steam-account { width: 44px; padding: 0; }
  #steam-account > span:not(.header-avatar), #steam-account > b { display: none; }
  #steam-account .header-avatar { width: 26px; height: 26px; }
  .podium { gap: 5px; }
  .podium-card { padding: 15px 5px; }
  .podium-card .player-avatar { width: 38px; height: 38px; }
  .podium-card > strong { font-size: .75rem; }
  .leaderboard-table thead { display: none; }
  .leaderboard-table, .leaderboard-table tbody { display: block; }
  .leaderboard-table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 11px 0; border-bottom: 1px solid #30475c; }
  .leaderboard-table td { display: block; padding: 3px 7px; border: 0; }
  .leaderboard-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: #8198ad; font: .58rem var(--mono); }
  .leader-player { grid-column: 1 / -1; grid-row: 1; }
  .rank-number { grid-row: 2; }
  .lobby-form-row { grid-template-columns: 1fr; }
  .public-lobby { grid-template-columns: 1fr auto; }
  .online-score-side .online-players { grid-template-columns: 1fr; }
  .online-career-form { flex-direction: column; }
  .guest-form { flex-direction: column; }
}
