:root {
  color-scheme: dark;
  --bg: #060b0e;
  --surface: #0c1519;
  --surface-2: #111d21;
  --ink: #f4efe5;
  --muted: #94a2a4;
  --gold: #d7b56d;
  --line: rgba(215, 181, 109, .22);
  --danger: #ef8f82;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 70% 8%, rgba(37, 72, 78, .2), transparent 36%), var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
code { color: #f0d69f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; letter-spacing: .26em; }
.wordmark > img { width: 44px; height: 44px; object-fit: cover; border: 1px solid rgba(215,181,109,.42); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.32); }
.wordmark strong { font: 600 16px/1 Georgia, serif; }
.wordmark.compact > img { width: 38px; height: 38px; border-radius: 9px; }

.auth-page { display: grid; min-height: 100svh; place-items: center; padding: 28px 18px; }
.auth-shell { width: min(480px, 100%); }
.auth-shell-login { width: 100%; max-width: 480px; }
.auth-shell > .wordmark { margin: 0 0 24px; }
.auth-card { padding: clamp(28px, 7vw, 48px); border: 1px solid var(--line); background: rgba(10, 18, 22, .92); box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.auth-card h1, .lobby-hero h1, .active-match h2, .section-row h2 { margin: 0; font: 400 clamp(36px, 8vw, 58px)/1.02 Georgia, serif; }
.lead { margin: 18px 0 30px; color: var(--muted); line-height: 1.65; }
.stack-form { display: grid; gap: 18px; }
.stack-form label { display: grid; gap: 9px; color: #d8dedb; font-size: 13px; font-weight: 700; }
.stack-form input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid rgba(255,255,255,.14); border-radius: 0; outline: none; color: var(--ink); background: #071014; }
.stack-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,181,109,.1); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--gold); cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transition: transform .16s ease, opacity .16s ease, background .16s ease; }
.primary-button { color: #17140d; background: var(--gold); }
.secondary-button { color: var(--gold); background: transparent; }
.danger-button { border-color: rgba(239,143,130,.48); color: #f0b7ae; background: rgba(101,34,29,.16); }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); }
.danger-button:hover, .danger-button:focus-visible { border-color: var(--danger); outline: none; color: #ffe8e3; background: rgba(122,41,34,.28); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { cursor: wait; opacity: .55; transform: none; }
.form-message { margin: 0; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.form-message.error { border-left: 2px solid var(--danger); color: #ffd6cf; background: rgba(130, 37, 30, .18); }
.form-message.success { border-left: 2px solid #82b99f; color: #d9f2e4; background: rgba(40, 104, 77, .18); }
.invitation-continuity { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 12px; align-items: center; margin: -8px 0 25px; padding: 14px; border: 1px solid rgba(215,181,109,.28); color: #b8c2c0; background: rgba(215,181,109,.075); font-size: 12px; line-height: 1.5; }
.invitation-continuity > i { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(215,181,109,.32); border-radius: 50%; color: var(--gold); font-size: 15px; }
.invitation-continuity strong { display: block; color: #ebe4d7; font: 400 15px/1.25 Georgia,serif; }
.form-help { margin: -8px 0 0; color: #7f8d8f; font-size: 11px; line-height: 1.45; }
.privacy-consent { display: grid !important; grid-template-columns: 20px minmax(0,1fr); gap: 10px !important; align-items: start; font-weight: 500 !important; line-height: 1.5; }
.privacy-consent input { width: 18px; min-height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.privacy-consent a, .auth-switch a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.auth-switch { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: 13px; text-align: center; }
.google-access { display: grid; gap: 13px; margin: 0 0 24px; }
.google-access-title { margin: 0; color: #d8dedb; font-size: 13px; font-weight: 700; }
.google-signin-button { display: flex; min-height: 44px; align-items: center; justify-content: center; transition: opacity .16s ease; }
.google-signin-button.is-busy { pointer-events: none; opacity: .55; }
.google-privacy { margin: 0; color: #819092; font-size: 11px; line-height: 1.5; text-align: center; }
.google-privacy a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.auth-divider { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 0 0 24px; color: #6f7d7f; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; background: rgba(255,255,255,.09); content: ''; }
.form-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.demo-note { display: grid; gap: 7px; margin-top: 26px; padding: 17px; border: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: 12px; }
.demo-note strong { color: #e6e0d5; }

.app-shell { width: min(1180px, calc(100% - 36px)); margin: auto; }
.app-header { display: flex; min-height: 78px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); }
.account { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.account strong { color: var(--ink); }
.account-link, .auth-legal a { color: #aeb8b6; text-decoration: none; }
.account-link:hover, .account-link:focus-visible, .auth-legal a:hover, .auth-legal a:focus-visible { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.account-button { padding: 0; border: 0; cursor: pointer; background: none; font: inherit; }
.text-button { padding: 4px 0; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--gold); background: none; }
.auth-legal { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.lobby-shell main { padding: 0 0 100px; }
.lobby-hero { position: relative; overflow: hidden; padding: clamp(62px, 8vw, 104px) 0 clamp(48px, 6vw, 76px); }
.lobby-hero::after { position: absolute; right: 4%; bottom: 0; width: min(48vw, 520px); height: 1px; content: ""; background: linear-gradient(90deg, transparent, rgba(215,181,109,.65)); }
.lobby-hero-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(42px, 9vw, 130px); align-items: end; }
.lobby-hero-copy { max-width: 850px; }
.lobby-hero h1 { max-width: 820px; font-size: clamp(52px, 7.4vw, 92px); letter-spacing: -.035em; }
.lobby-hero h1 em { display: block; color: var(--gold); font-weight: 400; }
.lobby-hero-copy > p:last-child { max-width: 720px; margin: 25px 0 0; color: #a9b3b3; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.72; }
.lobby-promise { display: grid; min-width: 210px; gap: 13px; padding: 7px 0 10px 30px; border-left: 1px solid var(--line); text-transform: uppercase; }
.lobby-promise span { color: #7f8d8f; font-size: 9px; font-weight: 800; letter-spacing: .24em; }
.lobby-promise i { display: block; width: 44px; height: 1px; background: var(--gold); }
.lobby-promise strong { color: #eee6d6; font: 400 21px/1.1 Georgia, serif; letter-spacing: .035em; text-transform: none; }
.lobby-aside { display: grid; min-width: 210px; gap: 18px; }
.lobby-share-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid rgba(215,181,109,.34); cursor: pointer; color: #d9bd79; background: rgba(215,181,109,.05); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.lobby-share-button:hover,.lobby-share-button:focus-visible { border-color: var(--gold); outline: none; color: var(--gold-bright); background: rgba(215,181,109,.1); }
.lobby-hub { overflow: hidden; border: 1px solid rgba(255,255,255,.11); background: linear-gradient(145deg, rgba(16,27,31,.96), rgba(7,13,16,.98)); box-shadow: 0 34px 100px rgba(0,0,0,.3); }
.lobby-feedback { margin: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.lobby-tabs { display: flex; min-height: 72px; align-items: stretch; gap: 4px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(3,8,10,.42); }
.lobby-tab { position: relative; display: inline-flex; min-width: 180px; align-items: center; justify-content: center; gap: 10px; padding: 0 26px; border: 0; outline: 0; cursor: pointer; color: #7f8d8f; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; transition: color .2s ease, background .2s ease; }
.lobby-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: transparent; }
.lobby-tab:hover, .lobby-tab:focus-visible { color: #e7e1d6; background: rgba(255,255,255,.025); }
.lobby-tab[aria-selected="true"] { color: var(--gold); }
.lobby-tab[aria-selected="true"]::after { background: var(--gold); }
.lobby-tab > i { font-size: 17px; }
.lobby-tab > em { display: grid; min-width: 23px; height: 23px; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; color: #b7c0c0; font-size: 9px; font-style: normal; letter-spacing: 0; }
.lobby-tab.has-active > em { border-color: rgba(215,181,109,.46); color: var(--gold); background: rgba(215,181,109,.09); }
.lobby-panel { padding: clamp(24px, 4vw, 48px); }
.panel-kicker { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.panel-kicker span { color: #ddd6c9; font: 400 22px/1.1 Georgia, serif; }
.panel-kicker small { color: #758486; font-size: 11px; }
.story-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 16px; }
.story-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); min-height: 350px; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.12); outline: 0; cursor: pointer; color: var(--ink); background: rgba(11,19,23,.92); text-align: left; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.story-card:hover, .story-card:focus-visible { border-color: rgba(215,181,109,.7); transform: translateY(-2px); }
.story-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(215,181,109,.13), 0 22px 60px rgba(0,0,0,.28); }
.story-cover { position: relative; min-height: 350px; isolation: isolate; overflow: hidden; background: #0b1316 center/cover no-repeat; }
.story-cover-video { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; object-fit: cover; filter: saturate(.78) brightness(.72); transform: scale(1.015); transition: opacity .55s ease, filter .45s ease, transform 1.2s ease; }
.story-cover.has-video .story-cover-video { opacity: 1; }
.story-cover-shade { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3,8,10,.04) 42%, rgba(3,8,10,.68) 100%), linear-gradient(90deg, transparent 72%, rgba(6,12,15,.38)); }
.story-card:hover .story-cover-video, .story-card:focus-visible .story-cover-video { filter: saturate(.9) brightness(.82); transform: scale(1.035); }
.story-sound-toggle { position: absolute; z-index: 2; left: 17px; bottom: 16px; display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); cursor: pointer; color: #f1eadc; background: rgba(3,8,10,.72); backdrop-filter: blur(9px); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; transition: border-color .2s ease, background .2s ease; }
.story-sound-toggle:hover, .story-sound-toggle:focus-visible { border-color: var(--gold); outline: none; background: rgba(5,12,15,.92); }
.story-sound-toggle[aria-pressed="true"] { border-color: rgba(215,181,109,.72); color: var(--gold); }
.story-sound-toggle > i { font-size: 14px; }
.story-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(30px, 4vw, 48px); }
.story-copy small { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.story-copy strong { margin-top: 12px; font: 400 clamp(30px, 3vw, 40px)/1.03 Georgia, serif; }
.story-copy > span { margin-top: 17px; color: #9eabad; font-size: 14px; line-height: 1.65; }
.story-copy em { margin-top: 18px; color: #d7d0c3; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.turn-tempo { display: grid; grid-template-columns: minmax(210px,.7fr) minmax(360px,1.3fr); gap: 14px 26px; align-items: center; margin: 22px 0 0; padding: 19px 21px; border: 1px solid rgba(215,181,109,.22); background: linear-gradient(110deg,rgba(215,181,109,.075),rgba(7,14,17,.72)); }
.turn-tempo legend { display: contents; }
.turn-tempo legend > span { color: #e6dfd2; font: 400 20px/1.15 Georgia,serif; }
.turn-tempo legend > small { grid-row: 2; color: #7f8d8f; font-size: 10px; line-height: 1.4; }
.turn-tempo-options { grid-row: 1 / 3; grid-column: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.turn-tempo-options label { position: relative; cursor: pointer; }
.turn-tempo-options input { position: absolute; opacity: 0; pointer-events: none; }
.turn-tempo-options span { display: grid; min-height: 62px; align-content: center; justify-items: center; gap: 4px; border: 1px solid rgba(255,255,255,.12); color: #b5c0c0; background: rgba(4,10,12,.66); transition: border-color .16s ease,background .16s ease,transform .16s ease; }
.turn-tempo-options strong { font: 400 24px/1 Georgia,serif; }
.turn-tempo-options small { color: #7c898a; font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.turn-tempo-options label:hover span, .turn-tempo-options input:focus-visible + span { border-color: rgba(215,181,109,.62); transform: translateY(-1px); }
.turn-tempo-options input:checked + span { border-color: var(--gold); color: #1b170f; background: var(--gold); box-shadow: 0 0 0 2px rgba(215,181,109,.12); }
.turn-tempo-options input:checked + span small { color: #5d4a25; }
.turn-tempo > p { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 2px 0 0; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.07); color: #919d9e; font-size: 10px; line-height: 1.5; }
.turn-tempo > p i { flex: 0 0 auto; color: var(--gold); font-size: 17px; }
.story-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.story-actions .primary-button { min-width: 230px; }
.active-match { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 62px 0 28px; padding: 28px 32px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(215,181,109,.09), rgba(10,18,22,.94)); }
.lobby-panel > .active-match { margin: 0 0 36px; }
.active-match h2 { font-size: 34px; }
.active-match p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.active-match-actions { display: grid; min-width: min(100%, 280px); gap: 9px; }
.active-match-actions .secondary-button { gap: 9px; }
.active-match-actions small { color: #778789; font-size: 10px; line-height: 1.45; text-align: center; }
.leave-match-dialog { position: fixed; inset: 0; width: min(460px,calc(100vw - 32px)); margin: auto; padding: 0; border: 1px solid rgba(216,182,109,.38); color: var(--ink); background: #081114; box-shadow: 0 34px 100px rgba(0,0,0,.72); }
.leave-match-dialog::backdrop { background: rgba(1,4,5,.78); backdrop-filter: blur(5px); }
.leave-match-card { padding: clamp(24px,4vw,38px); border: 1px solid rgba(255,255,255,.045); outline: 1px solid rgba(216,182,109,.1); outline-offset: -9px; }
.leave-match-card h2 { margin: 12px 0 10px; font: 400 clamp(28px,4vw,38px)/1 Georgia,serif; }
.leave-match-card > p:last-of-type { margin: 0; color: #98a4a4; font: 400 12px/1.55 Georgia,serif; }
.leave-match-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 26px; }
.leave-match-actions button { min-height: 46px; padding: 0 12px; border: 1px solid rgba(216,182,109,.28); cursor: pointer; color: #b9c1bf; background: rgba(255,255,255,.025); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.leave-match-actions button:hover, .leave-match-actions button:focus-visible { border-color: var(--gold); outline: none; color: var(--gold-bright); }
.leave-match-actions .confirm-leave { border-color: rgba(214,116,104,.52); color: #f0d5d0; background: rgba(92,30,25,.3); }
.leave-match-actions .confirm-leave:hover, .leave-match-actions .confirm-leave:focus-visible { border-color: var(--danger); color: #fff3f0; background: rgba(122,41,34,.4); }
.profile-dialog { position: fixed; inset: 0; width: min(500px,calc(100vw - 32px)); margin: auto; padding: 0; border: 1px solid rgba(216,182,109,.38); color: var(--ink); background: #081114; box-shadow: 0 34px 100px rgba(0,0,0,.72); }
.profile-dialog::backdrop { background: rgba(1,4,5,.78); backdrop-filter: blur(5px); }
.profile-card { padding: clamp(26px,5vw,42px); border: 1px solid rgba(255,255,255,.045); outline: 1px solid rgba(216,182,109,.1); outline-offset: -9px; }
.profile-card h2 { margin: 12px 0 12px; font: 400 clamp(30px,5vw,42px)/1 Georgia,serif; }
.profile-card > p:not(.eyebrow,.form-message,.profile-email) { margin: 0 0 24px; color: #98a4a4; font: 400 14px/1.6 Georgia,serif; }
.profile-field { display: grid; gap: 9px; color: #d8dedb; font-size: 13px; font-weight: 700; }
.profile-field input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid rgba(255,255,255,.14); outline: none; color: var(--ink); background: #071014; }
.profile-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,181,109,.1); }
.profile-email { margin: 11px 0 0; overflow: hidden; color: #718083; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-links { display: flex; gap: 18px; margin-top: 18px; font-size: 11px; }
.profile-links a { color: #aeb8b6; text-decoration: underline; text-underline-offset: 3px; }
.profile-links a:hover, .profile-links a:focus-visible { color: var(--gold); }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 26px; }
.profile-actions button { min-height: 48px; padding: 0 12px; border: 1px solid rgba(216,182,109,.28); cursor: pointer; color: #b9c1bf; background: rgba(255,255,255,.025); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.profile-actions button:hover, .profile-actions button:focus-visible { border-color: var(--gold); outline: none; color: var(--gold); }
.profile-actions .primary-button { border-color: var(--gold); color: #17140d; background: var(--gold); }
.profile-actions button:disabled { cursor: wait; opacity: .55; }
.match-browser { margin-top: 70px; }
.lobby-panel > .match-browser { margin-top: 0; }
.section-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-row h2 { font-size: 38px; }
.refresh-state { color: #6f7f81; font-size: 11px; }
.match-list { display: grid; gap: 10px; }
.match-row { display: grid; grid-template-columns: .8fr 1.2fr 1fr 1fr auto; gap: 24px; align-items: center; min-height: 88px; padding: 16px 20px; border: 1px solid rgba(255,255,255,.09); background: rgba(11,19,23,.82); }
.match-row > div:first-child { display: grid; gap: 3px; }
.match-row small, .match-owner span, .match-story span { color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.match-row > div:first-child strong { font: 400 22px/1 Georgia, serif; letter-spacing: .08em; }
.match-owner, .match-story { display: grid; gap: 5px; }
.match-owner b, .match-story b { font-size: 13px; }
.match-capacity { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.match-capacity i { display: block; width: 100%; height: 3px; overflow: hidden; background: rgba(255,255,255,.09); }
.match-capacity em { display: block; height: 100%; background: var(--gold); }
.empty-state { display: grid; gap: 8px; padding: 32px; border: 1px dashed rgba(255,255,255,.12); color: var(--muted); text-align: center; }
.empty-state strong { color: #d5d8d3; font: 400 21px/1.2 Georgia, serif; }
.ranking-panel { min-height: 470px; }
.ranking-notice { display: grid; min-height: 360px; justify-items: center; align-content: center; gap: 18px; padding: clamp(28px,5vw,56px) 20px; border: 1px solid rgba(215,181,109,.18); background: radial-gradient(ellipse at 50% 0,rgba(215,181,109,.08),transparent 65%),rgba(7,14,17,.5); text-align: center; }
.ranking-notice-icon { color: var(--gold); font-size: 38px; }
.ranking-notice .eyebrow { margin: 0; }
.ranking-notice h2 { max-width: 620px; margin: 0; color: #e0dbd1; font: 400 clamp(30px,5vw,46px)/1.1 Georgia,serif; }
.ranking-notice > p:last-child { max-width: 490px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.ranking-controls { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: -4px 0 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.075); }
.ranking-scope { display: inline-flex; padding: 3px; border: 1px solid rgba(255,255,255,.11); background: rgba(3,9,12,.62); }
.ranking-scope button { min-height: 34px; padding: 0 16px; border: 0; color: #778789; background: transparent; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ranking-scope button[aria-pressed="true"] { color: #1c170e; background: var(--gold); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.ranking-season-field { display: grid; gap: 7px; color: #7f8d8f; font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.ranking-season-field select { min-width: 220px; height: 40px; padding: 0 34px 0 12px; border: 1px solid rgba(215,181,109,.28); border-radius: 0; color: #ddd7cc; background: #0b1519; font: 600 11px/1.2 Inter,Arial,sans-serif; letter-spacing: .02em; text-transform: none; }
.ranking-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); gap: 34px; align-items: end; margin-bottom: 30px; }
.ranking-intro h2 { margin: 0; font: 400 clamp(34px, 5vw, 52px)/1.03 Georgia, serif; }
.ranking-intro > div > p:last-child { max-width: 610px; margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.current-ranking { position: relative; isolation: isolate; display: grid; min-height: 128px; grid-template-columns: minmax(70px,.55fr) minmax(0,1.45fr); grid-template-rows: auto 1fr; gap: 10px 20px; align-items: stretch; padding: 21px 22px 20px 26px; overflow: hidden; border: 1px solid rgba(215,181,109,.4); background: radial-gradient(circle at 8% 100%,rgba(215,181,109,.14),transparent 42%),linear-gradient(125deg,rgba(18,26,27,.98),rgba(7,14,17,.96)); box-shadow: inset 0 1px rgba(255,255,255,.025),0 18px 42px rgba(0,0,0,.18); }
.current-ranking::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ''; background: linear-gradient(180deg,#f0d084,#9d7638); box-shadow: 0 0 22px rgba(215,181,109,.28); }
.current-ranking > * { position: relative; z-index: 1; }
.current-ranking-label { grid-column: 1 / -1; color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.current-ranking-position { align-self: center; color: #f0cb75; font: 400 48px/.9 Georgia,serif; letter-spacing: -.045em; text-shadow: 0 8px 24px rgba(0,0,0,.38); }
.current-ranking-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-self: stretch; border-left: 1px solid rgba(215,181,109,.2); }
.current-ranking-metric { display: grid; min-width: 0; align-content: center; gap: 6px; padding: 3px 8px 2px 11px; }
.current-ranking-metric + .current-ranking-metric { border-left: 1px solid rgba(255,255,255,.07); }
.current-ranking-metric b { overflow: hidden; color: #eee8dc; font: 400 22px/1 Georgia,serif; text-overflow: ellipsis; }
.current-ranking-metric small { color: #788789; font-size: 6px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.current-ranking-detail { grid-column: 1 / -1; margin: 0; color: #778789; font-size: 9px; }
.current-ranking.is-empty { grid-template-columns: 62px minmax(0,1fr); }
.current-ranking-empty-copy { align-self: center; margin: 0; color: #899698; font-size: 10px; line-height: 1.5; }
.division-progress { display: grid; grid-column: 1 / -1; gap: 7px; }
.division-progress > span { display: block; height: 3px; overflow: hidden; background: rgba(255,255,255,.08); }
.division-progress > span > i { display: block; height: 100%; background: linear-gradient(90deg,#9d7638,#e1bd6c); }
.division-progress > small { color: #758486; font-size: 8px; letter-spacing: .06em; }
.division-progress.is-promotion > small { color: #e0bd70; }
.division-tabs { display: flex; gap: 7px; margin: 0 0 12px; padding: 0 0 7px; overflow-x: auto; scrollbar-color: rgba(215,181,109,.35) transparent; }
.division-tab { --division-color: #8b9290; display: grid; min-width: 112px; min-height: 66px; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; padding: 10px 11px; border: 1px solid rgba(255,255,255,.09); color: #899597; background: rgba(8,15,18,.7); text-align: left; }
.division-tab i { color: var(--division-color); font-size: 16px; }
.division-tab span { font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.division-tab em { display: grid; min-width: 20px; height: 20px; place-items: center; color: #687678; background: rgba(255,255,255,.055); font-size: 8px; font-style: normal; }
.division-tab[aria-pressed="true"] { border-color: color-mix(in srgb,var(--division-color) 62%,transparent); color: #ece7dd; background: linear-gradient(145deg,color-mix(in srgb,var(--division-color) 15%,#081014),#081014 68%); box-shadow: inset 0 -2px var(--division-color); }
.division-tab[aria-pressed="true"] em { color: #17130d; background: var(--division-color); }
.division-cobre { --division-color: #c47c52; }
.division-bronce { --division-color: #b98a5a; }
.division-hierro { --division-color: #9fa8aa; }
.division-plata { --division-color: #ccd8db; }
.division-oro { --division-color: #e4bd5e; }
.division-valdemar { --division-color: #e0b45a; }
.division-promotion { display: flex; align-items: center; gap: 13px; margin: 0 0 15px; padding: 12px 15px; border: 1px solid rgba(215,181,109,.17); color: #899698; background: rgba(215,181,109,.045); }
.division-promotion > i { color: var(--gold); font-size: 20px; }
.division-promotion > span { display: grid; gap: 3px; }
.division-promotion strong { color: #d9d6cf; font-size: 11px; }
.division-promotion small { font-size: 9px; line-height: 1.4; }
.ranking-board { overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: rgba(5,11,14,.5); }
.ranking-heading, .ranking-row { display: grid; grid-template-columns: 76px minmax(190px, 1fr) repeat(4, minmax(90px, .55fr)); gap: 18px; align-items: center; }
.ranking-heading { min-height: 42px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.08); color: #6f7e80; font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ranking-heading span:nth-child(n+3) { text-align: right; }
.ranking-list { margin: 0; padding: 0; list-style: none; }
.ranking-row { position: relative; min-height: 76px; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.065); background: rgba(11,19,23,.72); }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row.is-current { background: linear-gradient(90deg, rgba(215,181,109,.13), rgba(11,19,23,.76) 60%); box-shadow: inset 3px 0 var(--gold); }
.ranking-position { color: #758486; font: 400 22px/1 Georgia, serif; letter-spacing: .05em; }
.ranking-row.is-podium-1 .ranking-position { color: #f2cf7a; }
.ranking-row.is-podium-2 .ranking-position { color: #c8d0d0; }
.ranking-row.is-podium-3 .ranking-position { color: #c98e68; }
.ranking-player { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ranking-player > i { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(215,181,109,.3); border-radius: 50%; color: var(--gold); background: rgba(215,181,109,.07); font: 400 18px/1 Georgia, serif; }
.ranking-player-copy { display: grid; min-width: 0; gap: 4px; }
.ranking-player-copy b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-player-copy small { overflow: hidden; color: #657476; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-player > em { padding: 4px 6px; color: #19150d; background: var(--gold); font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ranking-player > .promotion-badge { color: #d7b86f; border: 1px solid rgba(215,184,111,.38); background: transparent; white-space: nowrap; }
.ranking-row.is-promotion-zone:not(.is-current) { background: linear-gradient(90deg,rgba(215,181,109,.045),rgba(11,19,23,.72) 48%); }
.ranking-stat { color: #b9c1bf; text-align: right; }
.ranking-stat b { font: 400 19px/1 Georgia, serif; }
.ranking-stat.is-primary b { color: var(--gold); font-size: 24px; }
.ranking-empty { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 8px; padding: 34px; color: var(--muted); text-align: center; }
.ranking-empty i { margin-bottom: 8px; color: var(--gold); font-size: 28px; }
.ranking-empty strong { color: #e0dbd1; font: 400 24px/1.15 Georgia, serif; }
.ranking-empty span { font-size: 12px; }

@media (min-width: 721px) {
  .auth-shell-login { max-width: 620px; }
}

@media (max-width: 720px) {
  .app-shell { width: min(100% - 28px, 680px); }
  .app-header { min-height: 66px; }
  .account > span { display: none; }
  .account > a { display: none; }
  .account { gap: 14px; }
  .lobby-hero { padding: 48px 0 40px; }
  .lobby-hero-intro { grid-template-columns: 1fr; gap: 32px; }
  .lobby-aside { min-width: 0; }
  .lobby-hero h1 { font-size: clamp(48px, 15vw, 66px); }
  .lobby-promise { min-width: 0; padding-left: 20px; }
  .lobby-tabs { min-height: 64px; padding: 0; }
  .lobby-tab { min-width: 0; flex: 1; padding: 0 14px; }
  .lobby-panel { padding: 20px; }
  .panel-kicker { align-items: start; flex-direction: column; gap: 7px; }
  .story-card { grid-template-columns: 1fr; }
  .story-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .story-copy { padding: 28px 24px 32px; }
  .turn-tempo { grid-template-columns: 1fr; gap: 8px; padding: 17px; }
  .turn-tempo legend > small { grid-row: auto; }
  .turn-tempo-options { grid-row: auto; grid-column: 1; margin-top: 6px; }
  .turn-tempo > p { margin-top: 7px; }
  .story-actions .primary-button { width: 100%; }
  .active-match { align-items: stretch; flex-direction: column; padding: 24px; }
  .leave-match-actions { grid-template-columns: 1fr; }
  .profile-actions { grid-template-columns: 1fr; }
  .section-row { align-items: start; flex-direction: column; }
  .match-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .match-row .secondary-button { grid-column: 1 / -1; }
  .ranking-controls { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 24px; }
  .ranking-scope { display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); align-self: stretch; }
  .ranking-scope button { min-width: 0; padding-inline: 10px; }
  .ranking-season-field select { width: 100%; min-width: 0; }
  .ranking-intro { grid-template-columns: 1fr; gap: 22px; }
  .ranking-intro h2 { font-size: clamp(31px,10vw,42px); }
  .current-ranking { grid-template-columns: 62px minmax(0,1fr); padding: 19px 17px 18px 21px; }
  .current-ranking-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .current-ranking-metric:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }
  .current-ranking-metric:nth-child(4) { border-top: 1px solid rgba(255,255,255,.07); }
  .division-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-right: 0; padding-right: 0; overflow: visible; }
  .division-tab { width: 100%; min-width: 0; }
  .division-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ranking-heading { display: none; }
  .ranking-row { grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: auto auto; gap: 12px 8px; min-height: 0; padding: 15px 14px; }
  .ranking-position { grid-row: 1; grid-column: 1; align-self: center; }
  .ranking-player { grid-row: 1; grid-column: 2 / 5; }
  .ranking-player > em { display: none; }
  .ranking-stat { display: grid; grid-row: 2; gap: 4px; min-width: 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); text-align: left; }
  .ranking-stat:nth-child(3) { grid-column: 1; }
  .ranking-stat:nth-child(4) { grid-column: 2; }
  .ranking-stat:nth-child(5) { grid-column: 3; }
  .ranking-stat:nth-child(6) { grid-column: 4; }
  .ranking-stat::before { content: attr(data-label); color: #69787a; font-size: 7px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .ranking-stat.is-primary { grid-column: 1; grid-row: 2; align-self: stretch; padding-left: 0; text-align: left; }
  .ranking-stat.is-primary::before { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
