:root {
  color-scheme: dark;
  --bg: #0b1418;
  --text: #f0f3ed;
  --muted: #9aaca9;
  --gold: #d2ba84;
  --line: #d2e6e11c;
  --glass: #132228df;
  font: 15px 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; color: inherit; border: 0; }
a { color: inherit; text-decoration: none; }
button, a { transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #f2d596; outline-offset: 5px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
h2, h3, h4 { font-weight: 500; letter-spacing: -.03em; }
p { line-height: 1.65; }
[hidden] { display: none !important; }
.atlas-background { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #101f24; }
#home-atlas { width: 100%; height: 100%; display: block; }
.atlas-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #071316d1 0%, #09181b88 30%, #08141712 65%, #08131944 100%), linear-gradient(0deg, #081115c9 0%, transparent 28%, transparent 76%, #0b161a80 100%); }
.page-frame { min-height: 100svh; position: relative; }
.scene-nav { position: absolute; z-index: 3; top: 36px; left: 6vw; display: flex; align-items: center; gap: 34px; }
.scene-nav a { position: relative; padding: 12px 0; font-size: .84rem; color: #aebfbb; }
.scene-nav a:hover { color: #fff; }
.scene-nav a[aria-current] { color: #f4e1b4; }
.scene-nav a[aria-current]::before { content: ''; position: absolute; bottom: 1px; left: 50%; width: 4px; height: 4px; transform: translateX(-50%) rotate(45deg); background: var(--gold); box-shadow: 0 0 12px #e3bd77a3; }
.account-dock { position: absolute; top: 31px; right: 6vw; display: flex; align-items: center; gap: 8px; z-index: 3; }
.sign-in-button { padding: 13px 19px; background: transparent; color: #dce5e0; font-size: .8rem; }
.sign-in-button:hover { color: #f5deb0; }
.register-button { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 12px 17px; border: 1px solid #d9c39755; border-radius: 7px; background: linear-gradient(130deg, #ead8b123, #cbb77f0b); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 #ffeec91c, 0 6px 25px #020e1326; font-size: .8rem; color: #f0dfb9; }
.register-button svg { width: 15px; height: 15px; }
.register-button:hover { background: #cbb78226; border-color: #ead6a999; box-shadow: 0 0 25px #d5ba7720; }
main { min-height: 100svh; max-width: 1670px; padding: 128px 6vw 95px; margin: auto; display: flex; flex-direction: column; justify-content: center; outline: 0; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 420px); gap: 38px 7vw; align-items: center; }
.game-title { grid-column: 1 / -1; font-size: clamp(46px, 8vw, 125px); font-weight: 600; line-height: 1.04; letter-spacing: -.055em; white-space: nowrap; color: #f0f4ec; text-shadow: 0 3px 45px #020b0d4d; }
.game-title span { font-weight: 200; color: #cbb890; margin-left: .1em; letter-spacing: -.055em; }
.hero { max-width: 530px; align-self: start; padding-top: 5px; }
.hero-motto { font-size: clamp(22px, 2.2vw, 33px); font-weight: 400; letter-spacing: -.035em; color: #e9ddc3; }
.hero-description { color: #b4c2bc; font-size: .91rem; line-height: 1.95; margin-top: 18px; max-width: 440px; }
.rivals-showcase { margin-top: 33px; max-width: 460px; }
.rivals-promise { font-size: .99rem; font-weight: 400; letter-spacing: -.01em; line-height: 1.6; color: #bdccc3; max-width: 440px; margin-bottom: 23px; text-wrap: pretty; }
.model-icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.model-chip { display: flex; align-items: center; flex-direction: column; background: none; gap: 10px; padding: 0; position: relative; color: #aebeb7; }
.model-avatar { position: relative; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 17px; background: linear-gradient(150deg, #dae8e112, #11262b77); border: 1px solid #cadbce26; box-shadow: inset 0 1px 0 #edf6e90b; backdrop-filter: blur(8px); transition: .2s; }
.model-logo { display: block; width: 34px; height: 34px; object-fit: contain; }
.model-name { font-size: .66rem; white-space: nowrap; }
.model-chip:hover .model-avatar { background: #cbdddb16; border-color: #d5e6dc66; transform: translateY(-3px); }

.model-icon-openai { filter: invert(1); }
.launcher { width: 100%; align-self: start; padding-top: 4px; }
.eyebrow { font-size: .6rem; letter-spacing: .2em; font-weight: 500; color: #a5b4a9; line-height: 1.6; }
.launcher .eyebrow { margin-bottom: 14px; }
.launcher h2 { font-size: 2rem; line-height: 1.2; letter-spacing: -.04em; font-weight: 500; }
.launcher h2 span { color: #a9b8ae; font-weight: 300; }
.panel-intro { color: #9bad9f; font-size: .8rem; margin: 14px 0 25px; }
.mode-button, .continue-button { position: relative; display: flex; gap: 19px; align-items: center; width: 100%; text-align: left; padding: 23px 21px; border-radius: 7px; border: 1px solid #d0e1d929; background: linear-gradient(115deg, #879e951c, #10232b77); backdrop-filter: blur(18px); margin: 11px 0 0; box-shadow: inset 0 1px 0 #e9ffe50b, 0 8px 30px #04101526; }
.mode-button::before, .continue-button::before { content: ''; position: absolute; left: -1px; top: 26%; bottom: 26%; width: 2px; background: #c7dccc5c; border-radius: 3px; transition: .2s; }
.mode-button:hover, .continue-button:hover { background: linear-gradient(105deg, #b6c9b829, #274143aa); border-color: #d2dfc866; transform: translateX(4px); box-shadow: 0 8px 32px #020b1250; }
.mode-button:hover::before, .continue-button:hover::before { top: 17%; bottom: 17%; background: #e4ce96; box-shadow: 0 0 18px #e4ce96a1; }
.option-icon { display: grid; place-items: center; color: #c3cfbf; flex-shrink: 0; }
.option-icon svg { width: 22px; height: 22px; }
.mode-button strong, .continue-button strong { font-weight: 500; font-size: 1.03rem; letter-spacing: -.015em; display: block; line-height: 1.4; }
.mode-button small, .continue-button small { display: block; font-size: .68rem; color: #a8b9ae; margin-top: 6px; line-height: 1.5; }
.button-arrow { margin-left: auto; font-size: 21px; font-weight: 300; color: #c4d5bf; }
.primary-mode, .has-ongoing .continue-button { border-color: #d8c79470; background: linear-gradient(110deg, #c7b6812b, #747e5e16 70%, #182b2daa); }
.primary-mode::before, .has-ongoing .continue-button::before { background: #e4ce96; box-shadow: 0 0 18px #e4ce9655; }
.primary-mode strong, .has-ongoing .continue-button strong { color: #f2e5c5; }
.has-ongoing .primary-mode { background: linear-gradient(115deg, #879e951c, #10232b77); border-color: #d0e1d929; }
.has-ongoing .primary-mode::before { background: #c7dccc5c; box-shadow: none; }
.has-ongoing .primary-mode strong { color: var(--text); }
.learn-link { display: flex; justify-content: space-between; padding: 19px 1px 12px; color: #b7c8ba; font-size: .76rem; }
.learn-link:hover { color: #f6dfb1; }
.menu-caption { font-size: .6rem; color: #859d94; margin-top: 7px; }
.menu-caption span { margin: 0 8px; }
.scene-tools { position: fixed; z-index: 4; right: 6vw; bottom: 26px; display: flex; align-items: center; gap: 10px; }
.tool-button { border: 1px solid #c7dfd11c; border-radius: 50%; width: 39px; height: 39px; display: grid; place-items: center; background: #10212688; backdrop-filter: blur(12px); color: #b3c3b9; }
.tool-button svg { width: 17px; height: 17px; }
.tool-button:hover { color: #f2dfb4; background: #57716c30; border-color: #d4dcca66; transform: translateY(-2px); }
#music { position: relative; }
#music-panel { position: absolute; bottom: 52px; right: 0; display: flex; align-items: center; gap: 12px; width: 215px; padding: 16px; border: 1px solid #b5c4ae4d; border-radius: 8px; background: #15292eef; backdrop-filter: blur(20px); }
#music-panel legend { font-size: .7rem; padding: 0 6px; color: #b6c7b6; }
#music-mute { background: transparent; font-size: 22px; color: #d9c38d; }
#music.is-muted #music-menu { color: #607b72; }
input[type=range] { accent-color: #c9b583; min-width: 0; width: 100%; }
#match-form { border: 1px solid #bfd3ca2e; border-radius: 14px; padding: 26px; background: linear-gradient(135deg, #1d3435db, #101e26f2); backdrop-filter: blur(22px); box-shadow: 0 25px 70px #020b0d44; }
.back-button, .text-button { color: #b7cabb; background: transparent; font-size: .77rem; padding: 0; }
.back-button:hover, .text-button:hover { color: #f1d9a7; }
.back-button { margin-bottom: 23px; }
#match-form .panel-intro { margin-bottom: 21px; }
.field-label, legend, .advanced label, .home-dialog>label { font-size: .73rem; font-weight: 500; display: block; color: #d2dfd4; }
.field-label { margin-bottom: 9px; }
.field-label span, legend span { font-size: .62rem; color: #8fa69b; font-weight: 400; margin-left: 6px; }
input:not([type=radio]):not([type=checkbox]):not([type=range]), select { color: #e8f0e6; background: #081b2266; border: 1px solid #bed0bc30; border-radius: 6px; min-height: 45px; width: 100%; padding: 11px 12px; font-size: .84rem; }
input::placeholder { color: #7c9388; }
select option { background: #172a2f; }
.choice-field { margin: 21px 0 0; padding: 0; border: 0; min-width: 0; }
.choice-field legend { padding: 0; margin-bottom: 10px; }
.count-options, .difficulty-options { display: flex; gap: 6px; }
.count-options label, .difficulty-options label { flex: 1; position: relative; cursor: pointer; }
.count-options input, .difficulty-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.count-options span, .difficulty-options span { display: block; text-align: center; padding: 11px 0; border: 1px solid #b6ccbb29; border-radius: 5px; color: #b5c9bb; background: #0c202644; font-size: .82rem; transition: .2s; }
.choice-field input:checked+span { color: #f0deae; background: linear-gradient(140deg, #dcc48b32, #b4a47810); border-color: #dfcc9688; box-shadow: inset 0 0 20px #e1c68f0a; }
.choice-field input:focus-visible+span { outline: 2px solid #e4ce96; outline-offset: 3px; }
.field-help { font-size: .66rem; color: #92a99c; line-height: 1.65; margin-top: 8px; }
.advanced { margin: 22px 0 19px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { font-size: .72rem; color: #b6c7b7; padding: 14px 0; display: flex; justify-content: space-between; list-style: none; cursor: pointer; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced[open] summary span { transform: rotate(45deg); }
.advanced-fields { padding-bottom: 16px; }
.advanced label { margin: 12px 0 8px; }
.solid-button { display: flex; gap: 18px; align-items: center; justify-content: space-between; width: 100%; min-height: 49px; background: linear-gradient(115deg, #dfd0a3, #b5a576); color: #162727; border: 1px solid #e7dcb966; border-radius: 6px; padding: 14px 18px; font-size: .82rem; font-weight: 600; box-shadow: 0 7px 24px #0003, inset 0 1px 0 #fff4; }
.solid-button:hover:enabled { background: linear-gradient(115deg, #f0e0b4, #c8b88b); box-shadow: 0 8px 30px #d8c69320; }
.setup-hint { color: #8fa99b; font-size: .62rem; text-align: center; margin-top: 13px; }
.quiet-note { font-size: .72rem; color: #a6bcae; padding: 12px; margin: 16px 0; background: #9b996510; border-left: 2px solid #c5b78066; }
.error { color: #fac2b2; font-size: .75rem; line-height: 1.55; margin: 10px 0; }
.error:empty { display: none; }
.content-view { width: 100%; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.view-heading h2 { font-size: clamp(30px, 4vw, 58px); margin-top: 12px; line-height: 1.15; font-weight: 400; }
.outline-link { display: inline-block; background: #10232d66; color: #d0ddcc; border: 1px solid #bccfb74d; border-radius: 5px; padding: 12px 16px; font-size: .78rem; }
.outline-link:hover { background: #b3c1a926; border-color: #d5d9b477; }
.paper-panel { background: linear-gradient(115deg, #213a38dd, #11212af0); backdrop-filter: blur(24px); border: 1px solid #bed2bc33; border-radius: 13px; box-shadow: 0 20px 65px #010e1433; }
.tutorial-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 365px; }
.lesson-list { border-right: 1px solid var(--line); padding: 25px 0; }
.lesson-list button { color: #a0bba9; background: none; text-align: left; font-size: .78rem; display: flex; align-items: center; gap: 17px; padding: 19px 25px; width: 100%; border-left: 2px solid transparent; line-height: 1.4; }
.lesson-list button span { font-size: .61rem; color: #8d9c7d; }
.lesson-list button[aria-current] { color: #efdfb4; background: linear-gradient(90deg, #c9b8841a, transparent); border-left-color: #d7c78a; }
.lesson-content { padding: 35px 40px; }
.lesson-content h3 { font-size: 2rem; margin: 14px 0 18px; }
.lesson-content>p:not(.eyebrow) { font-size: .88rem; line-height: 1.85; color: #b3c7b6; }
.lesson-example { font-size: 1rem; line-height: 1.7; background: #a8bca310; border-left: 2px solid #c3b78388; padding: 19px 22px; margin: 23px 0; color: #d3d9c2; }
.lesson-actions { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-top: 26px; }
.lesson-actions .solid-button { width: auto; min-width: 150px; }
.section-caption { color: #96ad9b; font-size: .72rem; margin-top: 18px; }
.lesson-content label { display: flex; justify-content: space-between; font-size: .77rem; margin-bottom: 10px; }
#tutorial-score { color: #c8d4b9; font-size: .82rem; margin-top: 10px; }
.match-library { display: grid; gap: 13px; max-height: 450px; overflow: auto; padding: 2px; }
.match-card { display: flex; align-items: center; gap: 21px; padding: 24px; background: #152e31c7; border: 1px solid #bed2bc33; border-radius: 9px; backdrop-filter: blur(16px); }
.match-emblem { display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px; color: #bfc9aa; }
.match-card h3 { font-size: 1.2rem; }
.match-card p { font-size: .72rem; color: #a1b79e; margin-top: 6px; }
.match-card button { width: auto; margin-left: auto; white-space: nowrap; }
.empty-library { padding: 50px 30px; border: 1px solid #bed2bc33; background: #142e32b0; border-radius: 12px; text-align: center; }
.empty-library h3 { font-size: 1.9rem; margin-bottom: 14px; }
.empty-library p { font-size: .84rem; color: #a8bea9; }
.empty-library button { max-width: 265px; margin: 23px auto 0; }
.import-link { display: inline-block; color: #c6cdaa; font-size: .73rem; margin-top: 20px; }
.import-link input { display: block; font-size: .72rem; margin-top: 10px; }
.home-dialog { color: var(--text); background: radial-gradient(ellipse at 10% 0%, #34504c70, transparent 60%), linear-gradient(145deg, #192d32f7, #0b1922fc); border: 1px solid #b8cec84f; border-radius: 17px; max-width: 460px; width: calc(100% - 32px); max-height: 90svh; overflow-y: auto; padding: 38px; box-shadow: 0 35px 100px #0009, inset 0 1px 0 #e4f3d617; backdrop-filter: blur(28px); }
.home-dialog::backdrop { background: #030b10a6; backdrop-filter: blur(10px); }
.dialog-close { position: absolute; top: 14px; right: 15px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #abc2b31f; border-radius: 50%; background: #10263166; color: #b8cbbc; font-size: 21px; }
.dialog-close:hover { color: #fff; background: #adc2b222; }
.home-dialog h2 { font-size: 2.3rem; font-weight: 400; line-height: 1.15; margin-top: 15px; }
.home-dialog>p:not(.eyebrow) { font-size: .8rem; color: #a8bfac; margin: 16px 0; }
.home-dialog>label { margin: 25px 0 10px; }
.home-dialog>.solid-button { margin-top: 18px; }
.home-dialog .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); margin: 5px 0; }
.toggle-row strong { font-weight: 500; }
.toggle-row small { display: block; font-size: .68rem; color: #92ad99; margin-top: 7px; line-height: 1.6; font-weight: 400; }
.toggle-row input { width: 20px; height: 20px; accent-color: #c7b586; flex-shrink: 0; }
.settings-language { display: flex; justify-content: space-between; padding: 20px 0; font-size: .78rem; }
.settings-language strong { font-weight: 400; color: #b0c4a5; }
.rivals-dialog { max-width: 590px; padding: 39px; }
.rivals-dialog h2 { font-size: 2.6rem; }
.rivals-dialog h3 { font-size: 1.35rem; margin-top: 23px; }
.rivals-dialog .rivals-intro { font-size: .84rem; line-height: 1.85; }
.rival-traits { display: flex; gap: 22px; padding: 4px 0 20px; border-bottom: 1px solid var(--line); font-size: .69rem; color: #c1d2b9; flex-wrap: wrap; }
.rival-traits b { font-weight: 400; color: #929b73; font-size: .58rem; margin-right: 6px; }
.rivals-dialog .rivals-vision { font-size: .73rem; color: #92ab95; margin: 11px 0 17px; }
.rival-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rival-roster article { display: flex; gap: 14px; align-items: center; border-radius: 8px; padding: 16px 13px; border: 1px solid #bdd0b32e; background: #a1c0b309; }
.rival-roster h4 { font-size: 1rem; }
.rival-monogram { width: 31px; flex-shrink: 0; }
.rival-monogram .model-logo { width: 30px; height: 30px; }
.rival-availability { font-size: .62rem; color: #96ab91; margin-top: 5px; }
.rival-roster .is-available { background: #829b6924; border-color: #b9cb9d66; }
.is-available .rival-availability { color: #cbdcb4; }
.rivals-dialog .rival-current { font-size: .66rem; color: #95ad98; overflow-wrap: anywhere; line-height: 1.7; margin-top: 13px; }
.rivals-dialog .rivals-replay { font-size: .89rem; line-height: 1.7; color: #c5cdae; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 17px; }
.account-dialog { text-align: center; max-width: 440px; padding: 37px 35px 30px; }
.account-emblem { margin: 0 auto 25px; width: 58px; height: 58px; display: grid; place-items: center; color: #daca9f; border-radius: 17px; background: radial-gradient(circle at 30% 10%, #dbc89c2e, #101f2400); border: 1px solid #bcb58540; box-shadow: 0 0 30px #d1bd7d0a; }
.account-emblem svg { width: 36px; height: 36px; }
.account-tabs { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 8px; border: 1px solid #bccdb125; background: #081a2170; }
.account-tabs button { font-size: .73rem; padding: 10px; border-radius: 5px; color: #94ae99; background: none; }
.account-tabs button[aria-pressed=true] { background: #99b1a21d; color: #e5e6cd; box-shadow: 0 1px 8px #030f1533; }
.account-dialog h2 { margin-top: 29px; font-size: 2.2rem; }
.account-dialog #account-description { margin: 12px 0 29px; }
.account-dialog>label { text-align: left; font-size: .7rem; }
.email-field { position: relative; }
.email-field svg { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; color: #859e8c; }
.email-field input { padding-left: 42px !important; min-height: 50px !important; }
.account-dialog>.solid-button { min-height: 49px; margin-top: 13px; }
.account-dialog .account-note { font-size: .66rem; line-height: 1.75; color: #87a190; margin-top: 19px; text-align: left; }
.account-note span { display: block; font-size: .55rem; letter-spacing: .15em; color: #b7c5a5; margin-bottom: 7px; }
.account-guest { margin-top: 7px; padding: 12px 0; width: 100%; font-size: .71rem; display: flex; justify-content: space-between; }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; background: #e7d7ad; color: #162c2c; padding: 12px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.noscript-notice { padding: 20px; background: #172f32; }
.large-text { font-size: 17px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 1600px) { main { padding-left: 90px; padding-right: 90px; }.play-layout { grid-template-columns: minmax(0,1fr) 430px; gap: 45px 10vw; }.hero-description { font-size: 1rem; } }
@media (max-width: 1050px) and (min-width: 801px) { .play-layout { grid-template-columns: minmax(0,1fr) 340px; gap: 28px 5vw; }.hero-motto { font-size: 24px; }.hero-description { font-size: .8rem; }.hero-description br { display: none; }.rivals-showcase { margin-top: 31px; }.model-icons { gap: 6px; }.model-avatar { width: 55px; height: 55px; border-radius: 14px; }.model-name { font-size: .61rem; }.launcher h2 { font-size: 1.8rem; }.mode-button, .continue-button { padding: 20px 17px; gap: 14px; }.mode-button strong, .continue-button strong { font-size: .91rem; } }
@media (min-width: 801px) and (max-height: 850px) { main { padding-top: 106px; padding-bottom: 79px; }.play-layout { gap: 27px 6vw; }.game-title { font-size: clamp(58px, 7.4vw, 103px); }.hero-description { margin-top: 14px; }.rivals-showcase { margin-top: 29px; }.launcher h2 { font-size: 1.8rem; }.launcher .eyebrow { margin-bottom: 11px; }.panel-intro { margin: 12px 0 19px; }.mode-button, .continue-button { padding: 19px 18px; }.learn-link { padding-top: 17px; }.scene-tools { bottom: 22px; }.scene-nav { top: 25px; }.account-dock { top: 23px; } }
@media (max-width: 800px) {
  main { padding: 125px 7vw 97px; justify-content: flex-start; }
  .scene-nav { top: 78px; left: 7vw; gap: 32px; }
  .scene-nav a { padding: 9px 0; font-size: .79rem; }
  .account-dock { top: 22px; right: 7vw; }
  .sign-in-button { padding: 11px 15px; font-size: .75rem; }
  .register-button { font-size: .73rem; padding: 10px 13px; gap: 17px; }
  .register-button svg { width: 13px; height: 13px; }
  .play-layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .game-title { order: 0; font-size: clamp(32px, 8.65vw, 68px); letter-spacing: -.05em; margin-bottom: 12px; }
  .hero { display: contents; }
  .hero-motto { order: 1; font-size: 1.5rem; }
  .hero-description { order: 2; margin-top: 8px; font-size: .83rem; }
  .rivals-showcase { order: 4; margin-top: 26px; max-width: 380px; }
  .rivals-promise { font-size: .82rem; line-height: 1.6; margin-bottom: 18px; }
  .model-avatar { width: 57px; height: 57px; border-radius: 14px; }
  .model-logo { width: 31px; height: 31px; }
  .model-icons { gap: 8px; }
  .launcher { order: 3; max-width: 530px; padding-top: 0; margin-top: 20px; }
  #launch-menu>.eyebrow, #launch-menu>.menu-caption { display: none; }
  #launcher-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #launch-menu>.panel-intro { margin: 0 0 14px; }
  .launcher h2 { font-size: 1.75rem; }
  .mode-button, .continue-button { padding: 16px 17px; margin-top: 8px; }
  .learn-link { padding-top: 15px; padding-bottom: 0; }
  .scene-tools { right: 7vw; bottom: 22px; }
  .play-layout:has(#match-form:not([hidden])) .hero { display: none; }
  .play-layout:has(#match-form:not([hidden])) .launcher { margin-top: 12px; }
  #match-form { padding: 23px; }
  .view-heading { align-items: start; gap: 18px; }
  .view-heading h2 { font-size: 2.4rem; }
  .view-heading .outline-link { font-size: .65rem; white-space: nowrap; padding: 10px; }
  .view-heading .eyebrow { font-size: .51rem; }
  .tutorial-layout { grid-template-columns: 1fr; }
  .lesson-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; }
  .lesson-list button { min-width: 115px; display: block; padding: 17px; font-size: .69rem; border-left: 0; border-bottom: 2px solid transparent; }
  .lesson-list button[aria-current] { border-bottom-color: var(--gold); }
  .lesson-list button span { display: block; margin-bottom: 6px; }
  .lesson-content { padding: 24px; }
  .lesson-content h3 { font-size: 1.65rem; }
  .lesson-example { padding: 17px; font-size: .88rem; }
  .lesson-actions .solid-button { min-width: 130px; }
  .home-dialog, .rivals-dialog { padding: 34px 25px 27px; }
  .home-dialog h2, .rivals-dialog h2 { font-size: 2rem; }
  .rival-roster { gap: 8px; }
  .rival-roster article { padding: 13px 10px; gap: 10px; }
  .rival-roster h4 { font-size: .87rem; }
  .rival-monogram, .rival-monogram .model-logo { width: 25px; height: 25px; }
  .rival-availability { font-size: .56rem; }
  .match-card { padding: 20px; gap: 14px; flex-wrap: wrap; }
  .match-emblem { display: none; }
  .match-card button { padding: 12px 15px; min-height: 41px; }
  .match-card p { font-size: .66rem; }
}
@media (min-width: 480px) and (max-width: 800px) {
  .scene-nav { top: 27px; gap: 22px; }
  .scene-nav a { font-size: .7rem; }
  .account-dock { top: 22px; gap: 0; }
  .sign-in-button { padding: 11px; font-size: .7rem; }
  .register-button { padding: 10px; font-size: .68rem; gap: 12px; }
  main { padding-top: 100px; }
}
@media (max-width: 800px) and (max-height: 760px) {
  .hero-description { font-size: .78rem; margin-top: 5px; line-height: 1.75; }
  .game-title { margin-bottom: 8px; }
  .launcher { margin-top: 13px; }
  .rivals-showcase { margin-top: 19px; }
  .model-avatar { width: 50px; height: 50px; border-radius: 13px; }
  .rivals-promise { font-size: .8rem; margin-bottom: 14px; }
  .mode-button, .continue-button { padding-top: 14px; padding-bottom: 14px; }
  main { padding-bottom: 72px; }
}
@media (max-width: 390px) { .model-name { font-size: .6rem; }.hero-description { font-size: .77rem; }.hero-description br { display: none; }.model-avatar { width: 53px; height: 53px; }.mode-button strong, .continue-button strong { font-size: .9rem; }.mode-button small, .continue-button small { font-size: .62rem; }.view-heading { flex-direction: column; }.rival-roster { grid-template-columns: 1fr; }.match-card { display: block; }.match-card button { margin: 15px 0 0; } }

@media (min-width: 480px) and (max-width: 800px) and (max-height: 760px) { main { padding-top: 86px; } }

/* The title and the launcher share the visual centre of the home screen. */
.play-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 5vw; }
.game-title { grid-column: auto; font-size: clamp(44px, 5.6vw, 94px); margin: 0; align-self: center; }
.launcher { margin: 0; }
body:has(#match-dialog[open]) { overflow: hidden; }
.match-dialog { width: min(620px, calc(100% - 32px)); max-width: 620px; max-height: none; padding: 30px; overflow: visible; }
#match-dialog #match-form { border: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
.match-dialog h2 { font-size: 2rem; margin-top: 8px; }
.setup-steps { display: flex; gap: 22px; margin: 22px 0; border-bottom: 1px solid var(--line); }
.setup-steps button { background: none; color: var(--muted); font-size: .76rem; padding: 0 0 12px; border-bottom: 2px solid transparent; }
.setup-steps button[aria-current] { color: #f0deae; border-color: var(--gold); }
.variant-options { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.variant-options legend { margin-bottom: 12px; }
.variant-options label { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #b6ccbb29; border-radius: 8px; cursor: pointer; }
.variant-options label:has(:checked) { border-color: #dfcc9688; background: #dcc48b15; }
.variant-options input { margin: 0; accent-color: var(--gold); flex-shrink: 0; }
.variant-options strong { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .86rem; font-weight: 500; }
.variant-options em { font-style: normal; font-size: .57rem; font-weight: 400; padding: 3px 6px; border-radius: 4px; background: #d2ba8417; color: #d2ba84; }
.variant-options small { display: block; font-size: .72rem; line-height: 1.5; color: #a9bcb3; margin-top: 6px; }
.rules-source { display: inline-block; font-size: .65rem; color: #a9bcb3; margin-top: 12px; }
.rules-source:hover { color: var(--gold); }
.opponent-label { margin-top: 22px; }
.ai-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.match-dialog #difficulty-field { margin-top: 0; }
.setup-footer { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.setup-footer .solid-button { width: auto; min-width: 185px; margin-left: auto; }
.setup-footer .text-button { flex-shrink: 0; }
.match-dialog .setup-hint { line-height: 1.4; }
.match-dialog .quiet-note { padding: 8px; margin: 10px 0; }
@media (max-width: 800px) {
  .play-layout { display: flex; flex-direction: column; align-items: stretch; gap: 35px; }
  .game-title { align-self: start; font-size: clamp(38px, 8.8vw, 70px); order: 0; }
  .launcher { margin: 0; }
}
@media (max-width: 480px) {
  .match-dialog { padding: 24px 20px; }
  .match-dialog h2 { font-size: 1.65rem; }
  .variant-options label { padding: 12px 10px; gap: 9px; }
  .variant-options strong { font-size: .79rem; gap: 6px; }
  .variant-options small { font-size: .69rem; }
  .setup-steps { margin: 18px 0; }
  .setup-footer { margin-top: 18px; }
}
@media (max-height: 650px) {
  .match-dialog { padding: 18px 22px; }
  .match-dialog h2 { font-size: 1.5rem; margin-top: 5px; }
  .setup-steps { margin: 12px 0; }
  .setup-steps button { padding-bottom: 8px; }
  .variant-options { gap: 7px; }
  .variant-options label { padding: 9px; }
  .variant-options small { margin-top: 3px; line-height: 1.35; }
  .setup-footer { margin-top: 12px; }
  .match-dialog .setup-hint { margin-top: 8px; }
  .match-dialog .choice-field, .opponent-label, .ai-fields { margin-top: 12px; }
}
@media (max-height: 480px) and (min-width: 600px) {
  .match-dialog { width: min(860px, calc(100% - 24px)); max-width: 860px; padding: 16px 24px; }
  .variant-options { grid-template-columns: repeat(3, 1fr); }
  .variant-options label { align-items: start; }
  .variant-options strong { min-height: 40px; align-content: start; }
  [data-config-page="1"] { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
  [data-config-page="1"] .choice-field { grid-column: 2; grid-row: 1 / 4; margin: 0; }
  [data-config-page="1"] .opponent-label { margin: 0; }
  [data-config-page="1"] #ai-opponent { grid-column: 1; }
  [data-config-page="1"] #opponent-description { grid-column: 2; grid-row: 4 / 6; }
}
.setup-footer .solid-button { flex: 1; min-width: 0; max-width: 250px; }
@media (max-width: 480px) { .setup-footer { gap: 14px; } }
@media (max-height: 480px) and (min-width: 600px) {
  [data-config-page="2"] { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
  [data-config-page="2"] .ai-fields { margin-top: 0; }
  [data-config-page="2"] > .field-help { grid-column: 1 / -1; margin-top: 0; }
}

/* One compact setup surface, shared by all opponent families. */
.match-dialog { width: min(600px, calc(100% - 24px)); max-width: 600px; max-height: calc(100dvh - 24px); overflow: auto; padding: 28px; }
.match-dialog h2 { margin: 0 36px 22px 0; font-size: 1.8rem; }
.variant-options { grid-template-columns: 1fr; gap: 7px; }
.variant-options label { padding: 12px; min-height: 44px; }
.variant-options strong { min-height: 0; font-size: .81rem; }
.player-slider { margin: 22px 0; }
.player-slider .field-label { display: flex; justify-content: space-between; align-items: center; }
.player-slider output { color: #f0deae; font-size: 1rem; font-variant-numeric: tabular-nums; }
.player-slider input { display: block; height: 24px; margin: 0; cursor: pointer; }
.player-slider .field-help { margin: 3px 0 0; }
.opponent-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.opponent-field legend { padding: 0; }
.opponent-families { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.opponent-families button { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 1px solid #b6ccbb29; border-radius: 6px; background: #0c202644; color: #b5c9bb; font-size: .75rem; }
.opponent-families button[aria-pressed=true] { color: #f0deae; border-color: #dfcc9688; background: #dcc48b15; }
.opponent-families img { width: 19px; height: 19px; object-fit: contain; }
.opponent-families [data-family=openai] img { filter: invert(1); }
.match-dialog .ai-settings { margin-top: 20px; }
.match-dialog .ai-fields { margin-top: 18px; }
.match-dialog .setup-footer { margin-top: 24px; }
.match-dialog :focus-visible { outline: 2px solid #e4ce96; outline-offset: 3px; }
.match-dialog [hidden] { display: none !important; }
@media (max-width: 480px), (max-height: 720px) {
  .match-dialog { padding: 20px; }
  .match-dialog h2 { font-size: 1.55rem; margin-bottom: 16px; }
  .variant-options label { padding: 10px; }
  .variant-options strong { font-size: .76rem; }
  .player-slider { margin: 16px 0; }
  .opponent-families { gap: 6px; }
  .opponent-families button { padding: 8px; font-size: .7rem; }
  .match-dialog .ai-settings, .match-dialog .ai-fields { margin-top: 14px; }
  .match-dialog .setup-footer { margin-top: 18px; }
}
.match-dialog .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .opponent-families { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
