/* Complete screen compositions, sharing the approved painted-metal art kit. */
#worldTour .player-passport{display:grid;grid-template-columns:120px minmax(0,1fr);gap:24px;align-items:center;background:#b9c6a6;border:3px solid #102a30;border-radius:12px;padding:26px;color:#183c3c;box-shadow:0 5px #0d282d,inset 0 2px #faf0c799;position:relative;overflow:hidden}
#worldTour .player-passport::after{content:'';position:absolute;inset:0;background:url('/brand/metal.webp') center/512px;mix-blend-mode:soft-light;opacity:.2;pointer-events:none}
.passport-number{border:2px solid #234745;border-radius:8px;background:#e8c172;display:flex;flex-direction:column;align-items:center;gap:8px;justify-content:center;padding:20px 8px;min-height:120px;transform:rotate(-3deg);box-shadow:3px 3px #48685766}
#worldTour .passport-number small{font-size:12px;text-transform:uppercase;color:#476052;letter-spacing:1px}
.passport-number strong{font-size:33px;line-height:1.05;text-align:center;overflow-wrap:anywhere}
.passport-number[data-ranked=false] strong{font-size:18px;line-height:1.25;letter-spacing:0}
.record-position{font-size:13px;color:#acbea8;min-width:20px;font-variant-numeric:tabular-nums}
.passport-country{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;letter-spacing:.5px}
.passport-country .country-flag{width:29px;height:21px}
#worldTour .passport-bio h2{font-size:clamp(27px,4vw,43px);line-height:1.06;margin:12px 0;letter-spacing:-.8px;overflow-wrap:anywhere}
#worldTour .passport-bio p{font-size:15px;color:#466150;margin:0}
.stat-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:24px 0}
.stat-card{background:#284c4e;border:2px solid #102e33;border-radius:9px;padding:20px 12px;display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:115px;box-shadow:0 4px #102a2e,inset 0 1px #b3c5a333}
#worldTour .stat-card strong{font-size:31px;color:#ecc57a;line-height:1.1;letter-spacing:-1px;font-variant-numeric:tabular-nums}
#worldTour .stat-card span{font-size:13px;line-height:1.4;color:#c2d2be}
.trophy-cabinet{background:#183a3e;border:2px solid #102b30;border-radius:12px;padding:20px;margin:25px 0;box-shadow:inset 0 3px #8ca98e22}
#worldTour .trophy-cabinet h3{margin:0;color:#e5d2a5;text-transform:uppercase;font-size:17px;letter-spacing:2px}
.category-trophies{grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:10px;margin:18px 0 0}
.category-trophies .stat-card{text-align:center;background:#b6c3a4;box-shadow:0 5px #0e292d;border-color:#102d31;min-height:100px;padding:14px 8px;border-bottom:7px solid #b4784c}
#worldTour .category-trophies .stat-card strong{color:#244940;font-size:35px}#worldTour .category-trophies .stat-card span{color:#35574a;font-size:12px}
#worldTour .history-season{margin:16px 0;padding:0;border:2px solid #122d33;border-radius:10px;background:#24464a;overflow:hidden}
#worldTour .history-season>summary{padding:17px 18px;color:#efdab0;letter-spacing:.5px;border-bottom:1px solid #829b7f33;font-size:16px}
.tournament-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:10px;padding:15px}
.result-ticket{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:13px;background:#e5e2c9;color:#26483e;padding:16px 13px;border:2px solid #19393c;border-radius:7px;box-shadow:0 3px #102c30}
.result-ticket>div:not(.ticket-points){display:flex;flex-direction:column;gap:6px}
#worldTour .result-ticket small{font-size:12px;color:#62705b}.result-ticket strong{font-size:16px;line-height:1.2}.result-ticket span{font-size:13px}
.ticket-points{display:flex;flex-direction:column;text-align:center;border-left:1px dashed #839879;padding-left:12px;min-width:58px}.ticket-points b{font-size:23px;color:#315a46}
.result-feed{list-style:none;padding:14px;margin:0;display:grid;gap:12px}
.result-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px 18px;background:#e7e2c9;border:2px solid #153338;border-radius:9px;padding:16px;color:#28463d;box-shadow:0 3px #102b31;border-left:6px solid #9aaf82}
.result-card[data-result=lost]{border-left-color:#b97158}
.result-stamp{font-size:12px;font-weight:bold;letter-spacing:.5px;color:#446647;grid-column:1;grid-row:1;text-align:center}
.result-card[data-result=lost] .result-stamp{color:#97543f}
.result-score{font-size:29px;letter-spacing:-1px;grid-column:1;grid-row:2;text-align:center;white-space:nowrap;color:#254638;font-variant-numeric:tabular-nums}
.result-body{grid-column:2;grid-row:1/span 3;display:flex;flex-direction:column;gap:5px;min-width:0}
#worldTour .result-body>small{font-size:12px;color:#667358;line-height:1.3}
#worldTour .result-body .tour-person{font-size:17px;font-weight:800;color:#234839;white-space:normal}
.result-meta{font-size:12px;line-height:1.5;color:#5d7157}
#worldTour .result-date{font-size:12px;grid-column:1;grid-row:3;text-align:center;color:#68775c}
#worldTour .result-empty{padding:20px;color:#c0d2bf}
#worldTour .major-history{border-radius:10px;border-color:#122f33;margin:20px 0}
#worldTour .major-history th{font-size:12px;max-width:155px;white-space:normal;text-align:center;line-height:1.4}
#worldTour .major-history th:first-child{background:#304f4d;color:#e3dfc3}
#worldTour .major-history td{padding:8px}
.major-result{border:1px solid #768e7333;border-radius:5px;font-weight:600;font-size:13px;line-height:1.35;padding:10px 8px}
#worldTour .major-history-note{font-size:13px;color:#a9bea8}

/* Each calendar date is a leg of the tour, not a wall of unrelated cards. */
.season-route{display:grid;gap:16px;margin:26px 0;border-left:2px solid #c9c58b33;padding-left:20px}
#worldTour .calendar-stage{padding:0;border:2px solid #102c32;border-radius:12px;background:#224549;position:relative;box-shadow:0 4px #0d292d;overflow:hidden}
#worldTour .calendar-stage[data-current=true]{border-color:#d4ac5f}
#worldTour .calendar-stage>summary{display:flex;align-items:center;gap:16px;padding:18px;background:#304e4e;cursor:pointer;list-style:none}
.calendar-stage>summary::-webkit-details-marker{display:none}
.calendar-stage>summary::after{content:'+';font-size:24px;color:#cfdaae;margin-left:auto}
.calendar-stage[open]>summary::after{content:'−'}
.stage-number{display:flex;align-items:center;justify-content:center;min-width:50px;height:55px;border:2px solid #102d32;background:#b7c3a0;color:#284942;border-radius:6px;transform:rotate(-3deg);font-size:28px;box-shadow:2px 3px #102b30}
.calendar-stage[data-current=true] .stage-number{background:#e8bc65}
.stage-title{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.stage-title>b{font-size:19px;color:#ecdfbd}
#worldTour .stage-title>small{color:#b8cbb4;font-size:13px;line-height:1.4}
.stage-flags{display:flex;gap:4px;flex-wrap:wrap;max-width:150px}.stage-flags img{width:25px;height:18px;margin:0}
#worldTour .calendar-stage .tour-events{padding:16px;margin:0}
#worldTour .calendar-stage .tour-event{box-shadow:0 3px #102b2f}

/* Honours and record holders. Numbers remain the real simulation results. */
.record-section{background:#23464a;border:2px solid #102d32;border-radius:12px;padding:22px;margin:25px 0;box-shadow:0 4px #102b2f}
#worldTour .record-section>h3{color:#efd5a0;font-size:21px;margin:0 0 20px;letter-spacing:.2px}
.record-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:12px}
.record-champion{display:flex;align-items:center;flex-direction:column;text-align:center;gap:10px;padding:18px 10px;background:#b5c3a6;color:#27483e;border:2px solid #183637;border-radius:9px;box-shadow:0 5px #102b2f;min-height:208px}
.record-champion[data-place='1']{background:#e5be72;border-color:#122e31;min-height:234px}
.record-place{font-size:22px;font-weight:900;color:#577151}.record-champion[data-place='1'] .record-place{font-size:32px;color:#87613b}
.record-champion>.country-flag{width:33px;height:24px;margin:0}
#worldTour .record-champion .tour-person{font-size:17px;text-align:center;font-weight:800;line-height:1.2;min-height:40px;color:#224439}
#worldTour .record-champion .tour-person img{display:none}
.record-champion>strong{font-size:35px;margin-top:auto;line-height:1;color:#284b3b}
#worldTour .record-champion>small{font-size:12px;color:#51694f;line-height:1.4}
#worldTour .record-rest{border:0;margin-top:18px;padding:0}
.record-rest ol{list-style-position:inside;padding:0;margin:8px 0}
.record-rest li{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;padding:13px 4px;border-top:1px solid #aabc9133}
#worldTour .record-rest .tour-person{color:#d0dec5;flex:1;min-width:120px}
#worldTour .record-rest small{font-size:12px;color:#abc1a7}.record-rest b{color:#edc477;font-size:22px}
.record-marathon{background:#e0be76;border:3px solid #122c30;border-radius:12px;padding:24px;color:#27483c;margin:20px 0;box-shadow:0 5px #102a2e}
#worldTour .record-marathon h3{font-size:15px;letter-spacing:1.5px;color:#655333;text-transform:uppercase;margin:0 0 20px}
#worldTour .record-marathon p{color:#516149;font-size:14px}
#worldTour .record-marathon .tour-person{color:#2e5140;font-size:18px}
.record-marathon .marathon-score{display:block;font-size:clamp(42px,6vw,64px);font-weight:900;letter-spacing:-2px;color:#1f4337;margin:12px 0}
.record-marathon>small{color:#6c7154!important;font-size:12px}
.final-feed{display:grid;gap:12px;margin:16px 0}
.final-card{background:#e4dfc3;border:2px solid #426153;border-radius:8px;padding:15px;color:#27493c;box-shadow:0 3px #b0b59a}
.final-card>small{display:block;color:#6f7459;font-size:12px;letter-spacing:1px;text-transform:uppercase;margin-bottom:12px}
.final-duel{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center}
.final-duel>strong{font-size:24px;color:#355741;font-variant-numeric:tabular-nums;white-space:nowrap}
.final-duel>.tour-person{border:0;background:transparent;color:#29493e;font-size:15px;line-height:1.35;text-align:left;padding:0;font-weight:700;min-width:0}
.final-duel>.tour-person:last-child{text-align:right}.final-duel .event-player{display:inline;white-space:normal}

/* Season summary is a results ceremony with a clear rank progression. */
#worldTour .season-review{margin:0 auto;width:100%}
#worldTour .season-hero{background:#af6b54;border:3px solid #122c30;border-radius:12px;color:#f3e3be;padding:28px;box-shadow:0 5px #10282e;position:relative;overflow:hidden}
#worldTour .season-hero>small{font-size:13px;letter-spacing:2px;color:#f2d9ac}
#worldTour .season-hero h2{font-size:clamp(34px,5vw,56px);line-height:1.1;letter-spacing:-1px;color:#152f33}
#worldTour .season-hero>p{font-size:18px;color:#f0d9b1;margin:10px 0}
.season-metrics{gap:10px;margin-top:24px}
.season-metrics>div{background:#27484a;border:2px solid #193638;border-radius:8px;padding:16px;box-shadow:0 3px #193538}
.season-metrics strong{color:#eac377;font-size:30px}.season-metrics span{color:#cbd7bd;font-size:13px}
.season-ranking{background:#26494b;border:2px solid #143438;border-radius:10px;padding:22px 12px 12px;min-height:185px;gap:8px}
#worldTour .season-ranking strong{color:#e1d3a5;font-size:13px}#worldTour .season-ranking small{color:#b1c7ad;font-size:13px}
.season-ranking-bar{background:linear-gradient(#efc779,#c4904e);border:1px solid #142f32;border-radius:4px 4px 0 0;box-shadow:2px 0 #102e3266}
.season-majors{gap:15px}
#worldTour .season-majors .tour-identity{background:#b5c3a5;color:#24483c;border:2px solid #163437;border-radius:9px;padding:18px;box-shadow:0 4px #102a2e;gap:9px}
#worldTour .season-majors .tour-identity small{color:#5c7257;font-size:13px}.season-majors b{background:#efcf83;border:1px solid #9eaa7d;border-radius:4px}
#worldTour .season-review>h3{color:#edd8b0;margin-top:28px}
#worldTour .season-continue{background:#e9bd67;color:#183e38;min-height:52px;font-size:16px;margin-top:24px}

/* Atlas: spacious real cartography and an anchored, compact tournament panel. */
.tour-atlas:not(.event-modal){background:#173a40 url('/brand/metal.webp') center/512px}
.tour-atlas .atlas-frame{position:relative;background:#153a43}
.tour-atlas .atlas-map{filter:saturate(.82);background:#264d55}
.tour-atlas .atlas-hint{font-size:13px;color:#b8cbb7;margin:12px 4px}
.atlas-info:empty{display:none}
.tour-atlas .atlas-info{position:sticky;bottom:-8px;z-index:5;border:3px solid #132f34;border-radius:14px 14px 8px 8px;box-shadow:0 -7px 24px #071f3066;margin-top:0;background:#b7c5ab;max-height:65dvh;overflow:auto}
.atlas-selection{display:flex;align-items:center;gap:13px;margin-bottom:13px}
.atlas-selection>.country-flag{width:40px;height:29px;flex-shrink:0}
.atlas-selection>div{min-width:0}.atlas-selection strong{display:block;font-size:22px;color:#203f3b;line-height:1.15}.atlas-selection small{font-size:13px;color:#496550;display:block;margin-top:6px}
.atlas-info .atlas-history{border-top:1px solid #607d6255;margin-top:14px}
.atlas-history>summary{font-size:14px;font-weight:700;cursor:pointer;padding:12px 0;color:#355b45}
.atlas-info .atlas-history .event-dossier{padding:0}.atlas-info .atlas-history .tour-event{display:none}
.tour-atlas .atlas-info>p{font-size:14px;color:#405f4d;line-height:1.45}
.tour-atlas .atlas-info>button{margin:0;background:#e7b65f;box-shadow:0 3px #1a3b36}

/* Gameplay: same canvas dimensions and input hit areas, new surface treatment. */
body.playing{background:#19383e url('/brand/metal.webp') center/512px}
body.playing canvas{background:#2b4c4e;border-color:#799682;box-shadow:0 0 0 2px #102c30,0 6px 20px #071d2a66;border-radius:10px}
body.playing #match .bar button,body.touch.playing #match .bar button{background:#b7c4a6;color:#24463e;border-color:#24483f;box-shadow:0 2px #102b2f,inset 0 1px #f5e6c966;font-weight:800;text-shadow:none;border-radius:6px}
body.playing #match .bar #pause{background:#e1b765;color:#204038}
body.playing #mobileMatchInfo{background:#203f42;border-color:#b8c99a33;border-radius:5px;color:#d5dfc6}
body.playing #mobileMatchInfo strong{font-family:'Trebuchet MS',sans-serif;font-weight:900;color:#eae0bc}
body.playing #mobileMatchInfo span{color:#b5c9ad}
body.playing #matchTournament{color:#decca1;border-bottom-color:#b39966;font-family:'Trebuchet MS',sans-serif;background:#193b3f66}
body.touch.playing #touch button,body.touch.playing #touch .vertical button,body.touch.playing #touch .vertical [data-dir=ArrowUp]{background:linear-gradient(#dfbb774f,#d4a85c5c);color:#f1e7c6;border-color:#cdb980a6;box-shadow:inset 0 2px #f6e9bf66,inset 0 -3px #16303455,0 3px #112d3266;text-shadow:0 2px #132e34;border-radius:12px;font-family:'Trebuchet MS',sans-serif;font-weight:900}
body.touch.playing #touch button.held,body.touch.playing #touch .vertical button.held,body.touch.playing #touch .vertical [data-dir=ArrowUp].held{background:#8faa7966;color:#fff3cc;box-shadow:inset 0 3px 8px #132d3455;border-color:#dce4b7;transform:none}
body.playing #notice{background:#bf7659eb;border:2px solid #152d32;color:#f9e6ba;border-radius:9px;box-shadow:0 4px #11282dbb;font-size:clamp(16px,3vw,24px);font-family:'Trebuchet MS',sans-serif}
#manual{background:#234449 url('/brand/metal.webp') center/512px}
#manual .manual-head{position:sticky;z-index:4;background:#234449;border-bottom:2px solid #153238;padding-bottom:12px}
#manual .manual-head h2{background:none;border:0;color:#e7d0a1;font-size:22px;padding:0}
#manual [data-rules]{display:grid;grid-template-columns:1fr;gap:0;padding:12px 0}
#manual [data-rules]>h3,#startRules [data-rules]>h3{border-left:4px solid #b67c53;padding-left:12px;margin-bottom:8px}
#manual [data-rules] ul,#startRules [data-rules] ul{list-style:none;padding:0;display:grid;gap:10px}
#manual [data-rules] li,#startRules [data-rules] li{background:#294c4c;border:1px solid #153539;border-radius:7px;padding:12px 14px;line-height:1.45;border-left:4px solid #a6bba2}
#manual [data-rules] li:nth-child(1),#startRules [data-rules] li:nth-child(1){border-left-color:#91bd70}
#manual [data-rules] li:nth-child(2),#startRules [data-rules] li:nth-child(2){border-left-color:#c77460}
#manual [data-rules] li:nth-child(5),#startRules [data-rules] li:nth-child(5){border-left-color:#e5aa53}
#manual [data-rules] p{margin-top:5px}
#nameScreen,#lobby{max-width:600px;width:100%;margin:auto;position:relative}
#nameScreen::before,#lobby::before{content:'';display:block;background:url('/brand/logo-chalk-spaced.png') center/contain no-repeat;height:125px;margin-bottom:10px}
#nameScreen h2,#lobby h2{font-size:23px;padding:14px;text-align:center}
#nameScreen form{display:grid;grid-template-columns:1fr 1fr;gap:8px 15px}
#nameScreen form>label,#nameScreen form>input,#nameScreen form>select,#nameScreen form>p,#nameScreen form>button{grid-column:1/-1;margin:0}
#nameScreen form>label{margin-top:13px}#nameScreen form>button{margin-top:18px}
#nameScreen #nameError:empty{display:none}
#lobby #inviteLink{background:#e3ddbf;border:2px solid #122f32;color:#315446;font-size:15px;padding:14px}
#lobby #inviteStatus{padding:18px;background:#294e4e;border-radius:8px;border:1px solid #8da38344;font-size:16px}
#bracketScreen{width:100%;max-width:1100px}
#bracketStatus{font-weight:700;color:#ddc89b!important}
#bracketTrophy{background:#314f47;border:2px solid #ac9864;border-radius:12px;padding:20px}
#bracketPath .tournament-match{background:#b5c4a6;border:2px solid #18383a;border-radius:9px;box-shadow:0 3px #102e32;color:#25443b}
#bracketPath .tournament-match .winner{background:#e2c078;color:#203f34}
#bracketPath .tournament-column{padding:0 5px}
#bracketPath .tournament-column h3{font-family:'Trebuchet MS',sans-serif;letter-spacing:.5px}
#bracketScreen #playRound{font-size:17px;min-height:52px;font-weight:900}
#worldTour .tour-create{background:#24484a;border:2px solid #122d32;border-radius:12px;padding:24px;margin:24px 0}
#worldTour .tour-backups{background:#1c3d40;padding:14px;border:1px solid #8ea17c44;border-radius:9px}
#worldTour .tour-backups input{max-width:100%;font-size:14px;background:#dce0c2}

@media(max-width:760px){
 body:not(.playing)>main{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 #worldTour .player-passport{grid-template-columns:83px minmax(0,1fr);padding:19px 15px;gap:16px}
 .passport-number{min-height:104px;padding:14px 5px}.passport-number strong{font-size:27px}
 #worldTour .passport-bio h2{font-size:28px;letter-spacing:-.5px}.passport-country{font-size:13px}
 #worldTour .passport-bio p{font-size:13px}.stat-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}
 .stat-card{padding:17px 14px;min-height:104px}.stat-card:nth-child(3n+1){background:#2d504d}
 .category-trophies{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.trophy-cabinet{padding:16px}
 #worldTour .category-trophies .stat-card span{font-size:12px}.category-trophies .stat-card{min-height:112px;padding:13px 5px}
 .result-feed{padding:10px}.result-card{grid-template-columns:73px minmax(0,1fr);gap:7px 12px;padding:13px 10px}
 .result-score{font-size:25px}.result-stamp{font-size:11px}.result-meta{font-size:12px}.result-body{gap:5px}
 #worldTour .result-body .tour-person{font-size:16px}.result-date{font-size:11px}
 .tournament-results{padding:10px}.result-ticket{padding:14px 10px;gap:9px;grid-template-columns:25px minmax(0,1fr) auto}
 .result-ticket strong{font-size:15px}.ticket-points{min-width:48px;padding-left:9px}.ticket-points b{font-size:21px}
 .season-route{padding-left:0;border:0;gap:13px}.stage-flags{display:none}
 #worldTour .calendar-stage>summary{padding:16px 13px;gap:13px}.stage-title>b{font-size:18px}
 .stage-number{min-width:46px;height:50px;font-size:25px}#worldTour .calendar-stage .tour-events{padding:12px}
 .record-section{padding:16px 12px}.record-podium{gap:8px;grid-template-columns:1fr 1fr}
 .record-champion[data-place='1']{grid-column:1/-1;display:grid;grid-template-columns:35px minmax(0,1fr) auto;text-align:left;align-items:center;min-height:110px;padding:16px;gap:8px 10px}
 .record-champion[data-place='1']>.record-place{grid-column:1;grid-row:1}.record-champion[data-place='1']>.country-flag{grid-column:1;grid-row:2;width:27px;height:20px}
 #worldTour .record-champion[data-place='1']>.tour-person{grid-column:2;grid-row:1/span 2;text-align:left;min-height:0;font-size:19px}
 .record-champion[data-place='1']>strong{grid-column:3;grid-row:1/span 2;font-size:38px;margin:0}
 .record-champion[data-place='1']>small{grid-column:2/-1;grid-row:3}
 .record-champion{padding:15px 10px;min-height:190px}#worldTour .record-champion .tour-person{font-size:16px}
 .record-marathon{padding:20px}.record-marathon .marathon-score{font-size:48px}
 .final-duel{grid-template-columns:minmax(0,1fr) 65px;gap:10px}.final-duel>strong{grid-column:2;grid-row:1/span 2;text-align:right;font-size:24px}.final-duel>.tour-person{grid-column:1}.final-duel>.tour-person:last-child{text-align:left}
 #worldTour .season-hero{padding:22px 16px}.season-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.season-metrics>div{padding:14px}.season-metrics strong{font-size:29px}
 .season-ranking{gap:4px;padding:18px 6px 10px}.season-ranking-bar{width:82%}#worldTour .season-ranking strong{font-size:12px}
 .tour-atlas .atlas-info{bottom:-8px;padding:14px;max-height:60dvh}.atlas-selection strong{font-size:20px}
 .tour-atlas:not(.event-modal) .atlas-map{height:60dvh;min-height:330px}
 #nameScreen::before,#lobby::before{height:100px}#nameScreen form{gap:8px}
 #manual .manual-head h2{font-size:20px}#manual .manual-head #resumeManual{padding:9px;font-size:13px}
}
@media(prefers-reduced-motion:no-preference){.player-passport,.record-section,.career-hero,.season-hero{animation:panel-arrive .22s ease-out}@keyframes panel-arrive{from{opacity:.5;transform:translateY(6px)}to{opacity:1;transform:none}}}

/* Venue postcards, natural geography and quiet, readable menu surfaces. */
.tour-identity::before,.tour-identity::after{content:none!important;display:none!important}
.tour-identity,.tour-identity strong,.tour-person,.career-intro h2,.passport-bio h2{text-shadow:none!important}
#worldTour .tour-identity,.event-modal .tour-identity,.tour-atlas .tour-identity{background-image:none;box-shadow:none}
.venue-cover{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover;background:#b2bda1;border-radius:8px 8px 0 0}
#worldTour .tour-event>.venue-cover{width:calc(100% + 36px);max-width:none;margin:0 -18px;border-radius:8px 8px 0 0}
#worldTour .tour-event>.venue-cover+.tour-identity{border-radius:0;background:#e8dfc3;border-bottom:1px solid #afa88a;min-height:86px;box-shadow:none}
.event-modal .tour-event>.venue-cover{margin-bottom:12px;border-radius:8px}
.atlas-cover{max-height:155px;margin-bottom:14px;border-radius:8px;object-position:center 55%}
.tour-atlas .atlas-map{filter:none;background:#97b8c7}
.tour-atlas .atlas-frame{background:#97b8c7;border-color:#b8bc9b}
#worldTour .career-metrics>div{min-width:0;background:#e6d8b7;border:1px solid #b0ab89;box-shadow:none;color:#29473b}
#worldTour .career-metrics strong{display:block;max-width:100%;color:#29473b;overflow-wrap:anywhere;line-height:1.15}
#worldTour .career-metrics>div[data-unranked=true] strong{font-size:clamp(14px,3.6vw,19px);letter-spacing:0;white-space:normal;line-height:1.25}
#worldTour .career-metrics span{color:#5b684d;letter-spacing:0}
#worldTour .stat-card,#worldTour .stat-card:nth-child(3n+1),.season-metrics>div{background:#ded8b8;border:1px solid #a6ac88;box-shadow:none}
#worldTour .stat-card strong,.season-metrics strong{color:#315440}
#worldTour .stat-card span,.season-metrics span{color:#53634a}
#worldTour .tour-fitness{background:#bac5a0;border:1px solid #8e9e7c;color:#344e3b}
#worldTour .tour-fitness strong,#worldTour .tour-fitness details summary,#worldTour .tour-fitness p{color:#344e3b}
#worldTour .calendar-stage{background:#e4dcc0;border:1px solid #a7aa89;box-shadow:none}
#worldTour .calendar-stage>summary{background:#bac5a4}
#worldTour .stage-title>b,#worldTour .stage-title>small,.calendar-stage>summary::after{color:#304e3c}
#worldTour .calendar-stage[data-current=true]{border:2px solid #d0aa60}
.stage-number{box-shadow:none;transform:none;border:1px solid #879b77}
.trophy-cabinet,.record-section,#worldTour .history-season{background:#b8c3a3;border:1px solid #899e7e;box-shadow:none}
#worldTour .trophy-cabinet h3,#worldTour .record-section>h3,#worldTour .history-season>summary{color:#304c3b}
#worldTour .record-rest .tour-person,#worldTour .record-rest small,.record-position{color:#3d5840}
.record-rest b{color:#705330}
.season-ranking{background:#bac5a3;border:1px solid #8b9d7b}
#worldTour .season-ranking strong,#worldTour .season-ranking small{color:#35523e}
#nameScreen,#bracketScreen,#lobby,#manual,body.touch #manual,body.touch .tournament-screen{background:#e8dfc2;color:#294838;box-shadow:0 5px #152e2c}
#manual p,#nameScreen p,#bracketScreen p,#lobby p,#manual h3,#nameScreen label{color:#405940}
#manual .manual-head{background:#e8dfc2;border-color:#acaf8b}
#manual .manual-head h2{color:#294838}
#manual [data-rules] li,#startRules [data-rules] li{background:#cbd0ae;color:#314d39;border-color:#abb38e;box-shadow:none}
#lobby #inviteStatus{background:#c4cdae;color:#314e3d;border:0}
#worldTour .tour-create,#worldTour .tour-backups{background:#c4cbaa;color:#304d3d;border:1px solid #93a07b;box-shadow:none}
#worldTour .tour-create p,#worldTour .tour-create label,#worldTour .tour-backups p{color:#405b43}
#menu.menu-redesign #tutorialButton{background:#c5ceb0;color:#294b3d;border:1px solid #869e7f;box-shadow:none;text-shadow:none}
@media(max-width:760px){
 .atlas-cover{max-height:110px}
 #worldTour .career-metrics>div{padding:12px 4px;justify-content:center}
}
/* Tutorial objectives sit over the court without capturing movement input. */
#stage #tutorialTools,body.touch #stage #tutorialTools{position:absolute;z-index:3;transform:translateX(-50%);margin:0;padding:10px 12px;max-width:85%;text-align:center;background:#17332bb3;border:1px solid #c2cca05c;box-shadow:0 2px 8px #102c2733;color:#fff4d8;pointer-events:none;border-radius:8px;text-shadow:none}
#stage #tutorialTools strong,body.touch #stage #tutorialGoal{font-size:clamp(16px,1.8vw,18px);line-height:1.4;color:#fff4d8}
#stage #tutorialHint,body.touch #stage #tutorialHint{font-size:clamp(14px,1.6vw,16px);line-height:1.45;margin-top:6px;color:#e6ebd3}
#stage #tutorialTools.completed strong{color:#e0efad}
#tutorialReset{pointer-events:auto;position:static;flex:0 0 auto;align-self:center;min-height:44px;max-width:100%;padding:9px 16px;margin:4px auto;background:#e7c478;color:#294632;border:1px solid #526b4d;border-radius:7px;text-shadow:none;font-size:14px;font-weight:800}
#stage #tutorialTools,body.touch #stage #tutorialTools{right:auto;display:flex;flex-direction:column;align-items:center;gap:4px}

/* The outer page scrolls; never squeeze a tall menu into one viewport. */
#menu.menu-redesign .menu-utilities{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
#menu.menu-redesign .menu-utilities>details,#menu.menu-redesign .menu-utilities>#startRules[open]{width:100%;min-width:0;margin:0;padding:0;background:none;border:0;border-bottom:1px solid #cdd6b52b;border-radius:0}
#menu.menu-redesign .menu-utilities>details>summary{display:grid;grid-template-columns:14px minmax(0,1fr);align-items:center;column-gap:9px;min-height:50px;padding:12px 6px;margin:0;text-align:left;line-height:1.4;list-style:none}
#menu.menu-redesign .menu-utilities>details>summary::-webkit-details-marker{display:none}
#menu.menu-redesign .menu-utilities>details>summary::before{content:'▸';display:block;text-align:center;font-size:14px;line-height:1}
#menu.menu-redesign .menu-utilities>details[open]>summary::before{content:'▾'}
#menu.menu-redesign .menu-utilities>details>div{margin-inline:6px}
body:not(.playing)>main{justify-content:flex-start;padding-top:calc(12px + env(safe-area-inset-top));scroll-padding-top:calc(12px + env(safe-area-inset-top))}
#menu.menu-redesign,body.touch #menu.menu-redesign{height:auto;max-height:none;min-width:0;flex:0 0 auto;margin:0 auto;grid-template-columns:repeat(2,minmax(0,1fr))}
#menu.menu-redesign>.menu-poster,#menu.menu-redesign>.menu-play{min-width:0;flex:0 0 auto}
#menu.menu-redesign .menu-poster{min-height:0;isolation:isolate}
@media(min-width:761px){#menu.menu-redesign .menu-poster{justify-content:flex-start;align-self:start}}
#menu.menu-redesign .new-logo{display:block;position:static;z-index:auto;flex:none;width:100%;max-width:100%;height:auto;object-fit:contain;pointer-events:none}
@media(max-width:760px){
 #menu.menu-redesign,body.touch #menu.menu-redesign{gap:12px}
 #menu.menu-redesign .menu-poster{padding:12px 10px 0}
 #menu.menu-redesign .menu-play{padding-top:0}
}

/* Read the tutorial in the centre; completion rests for five seconds, then fades. */
#stage #tutorialTools,body.touch #stage #tutorialTools{transform:translate(-50%,-50%);opacity:.9}
#stage #tutorialTools.tutorial-finished{animation:tutorial-farewell .8s ease 5s forwards}
@keyframes tutorial-farewell{from{opacity:.9;visibility:visible}to{opacity:0;visibility:hidden}}
.career-guide{padding:18px;border:1px solid #93a07b;background:#e8dfc2;color:#294838;border-radius:10px;margin:16px 0}
#worldTour .career-guide h3{color:#294838;margin:0 0 12px}
#worldTour .career-guide p{color:#405940;margin:9px 0;line-height:1.5}

/* Ranking labels are words, never letter-wrapped numbers. */
#worldTour .passport-number[data-ranked=false] strong,
#worldTour .career-metrics>div[data-unranked=true] strong{white-space:nowrap;overflow-wrap:normal;word-break:normal;font-size:16px;letter-spacing:0}
@media(max-width:760px){
 #worldTour .player-passport{grid-template-columns:112px minmax(0,1fr);gap:12px}
 #worldTour .passport-number[data-ranked=false] strong{font-size:15px}
}
@media(max-width:420px){
 #worldTour .career-metrics>div[data-unranked=true]{grid-column:1/-1}
 #worldTour .career-metrics:has(>div[data-unranked=true]){grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Tournament detail dismissal stays reachable while its history scrolls. */
.tour-atlas .atlas-detail-actions{position:sticky;top:0;z-index:6;display:flex;justify-content:flex-end;background:#b7c5ab;padding-bottom:6px}
.tour-atlas .atlas-detail-close{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;background:#f4dfad;color:#193b32;border:2px solid #284b3d;font-size:30px;line-height:1;box-shadow:0 2px #284b3d}
.tour-atlas .event-podium>div,.tour-atlas .event-podium .event-player,.tour-atlas .event-podium strong{color:#193b32}
.tour-atlas .final-duel .tour-person,.tour-atlas .final-duel .event-player{color:#193b32;background:transparent}
.tour-atlas .event-dossier td .event-player{color:#193b32}
#worldTour .career-date-heading{margin:22px 0 12px;color:#24443e}

/* Previous-date winner sits on its own explicit high-contrast surface. */
#worldTour .previous-date-champion{background:#f2dfb2;color:#193b32;border:2px solid #48634c;border-radius:10px;padding:16px 18px;margin:16px 0}
#worldTour .previous-date-champion h3{color:#35513e;font-size:16px;line-height:1.4;margin:0 0 8px}
#worldTour .previous-date-champion .tour-person{display:block;background:transparent;color:#193b32;font-size:21px;font-weight:800;line-height:1.35;white-space:normal;overflow-wrap:break-word;padding:4px 0}
/* Pre-match card and optional touch-layout editor. Default controls remain untouched. */
dialog.match-start{width:min(460px,calc(100% - 28px));max-height:90dvh;overflow:auto;background:#e7dcb8;color:#193b32;border:3px solid #183d37;border-radius:16px;padding:24px;box-shadow:0 8px 0 #102c2d;font-family:inherit}
.match-start::backdrop{background:#102b30c9}.match-start h2{font-size:26px;line-height:1.15;margin:0 0 18px}.match-start p{color:#35513e;line-height:1.5}.match-start .start-opponents{font-size:20px;font-weight:800;overflow-wrap:break-word}.match-start .start-rule{padding:12px;border-block:1px solid #809778}.match-start .start-status{min-height:24px;font-size:14px}
.match-start button{display:block;width:100%;margin:10px 0 0;min-height:48px;border:2px solid #24483d;border-radius:9px;background:#b7c9aa;color:#163a31;font:700 15px inherit;padding:12px}.match-start .start-primary{background:#edbd66;color:#17372f;font-size:23px;letter-spacing:2px}.match-start button:disabled{opacity:.65}.match-start button[hidden]{display:none}
.control-editor[hidden]{display:none!important}.control-editor{position:fixed;z-index:102;left:8px;right:8px;top:max(8px,env(safe-area-inset-top));max-height:42dvh;overflow:auto;background:#e7dcb8f7;color:#193b32;border:2px solid #24483d;border-radius:12px;padding:12px;box-shadow:0 4px 16px #10282e70;touch-action:pan-y;font-size:14px}
.control-editor p{margin:0 0 8px;color:#28493b;font-size:14px;line-height:1.35}.control-editor label{display:flex;align-items:center;gap:8px;margin:8px 0;color:#193b32}.control-editor input{min-width:40px;flex:1}.control-editor output{min-width:48px}.editor-arrows,.editor-actions{display:flex;gap:8px}.control-editor button{min-height:44px;flex:1;padding:6px;background:#b7c9aa;color:#163a31;border:2px solid #345644;border-radius:8px;font-size:13px;font-weight:800}.editor-arrows button{font-size:24px}.editor-actions button:first-child{background:#edbd66}
body.editing-controls #touch button{touch-action:none;cursor:move;transition:none!important}body.editing-controls #touch button.editing-selected{outline:3px dashed #fff3c6;outline-offset:5px;background:#cba452aa}
#manual .manual-head{display:flex;flex-direction:column;align-items:stretch;position:sticky;top:0;z-index:4;background:#e7dcb8;padding:10px;margin-bottom:14px}#manual .manual-head h2{margin:0;color:#193b32;font-size:21px}.manual-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}#manual .manual-actions button{flex:1 1 130px;margin:0;min-height:48px}#manual #manualHome{color:#193b32!important;background:#e8ba82;border-color:#345644!important}#manual{max-height:90dvh;overflow:auto}

/* Court size is computed proportionally; do not cap one axis independently. */
body.touch #court{max-height:none;flex-shrink:0}
.control-editor .editor-dimensions label{font-weight:700}

body.editing-controls #court{outline:2px dashed #f5ce74;outline-offset:-5px;cursor:move}
body.editing-controls #tutorialTools{visibility:hidden}
/* Muted printed-atlas palette: only the terrain, never markers or photos. */
.tour-map svg image,.atlas-map image{filter:saturate(.48) sepia(.22) brightness(.88) contrast(.9)}
.venue-selectable{cursor:zoom-in}.venue-selectable:focus-visible{outline:3px solid #f0bd67;outline-offset:-4px}
.venue-gallery{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));box-sizing:border-box;border:0;border-radius:0;background:#172823;color:#efe2bd;overflow:hidden;overscroll-behavior:contain}
.venue-gallery[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:8px}.venue-gallery::backdrop{background:#0e1917}
.gallery-header{display:flex;align-items:center;gap:14px;font-size:14px;font-weight:700;letter-spacing:.05em;color:#c5c4a3;text-transform:uppercase}.gallery-counter{margin-left:auto;font-variant-numeric:tabular-nums}.venue-gallery button{min-width:44px;min-height:44px;border:1px solid #809079;background:#304739;color:#fff1cb;border-radius:9px;padding:0;box-shadow:none;text-shadow:none;margin:0;cursor:pointer}.venue-gallery .gallery-close{font-size:32px;line-height:1}.venue-gallery button:focus-visible{outline:3px solid #eac17d;outline-offset:2px}
.gallery-stage{min-width:0;min-height:0;position:relative;display:grid;place-items:center;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.gallery-stage img{width:100%;height:100%;min-height:0;object-fit:contain;display:block;border-radius:4px;user-select:none;-webkit-user-drag:none}.gallery-stage img[hidden]{display:none}
.gallery-status{position:absolute;inset:40% 15% auto;text-align:center;color:#f3e4c2;background:#172823de;padding:12px;border-radius:8px;font-size:16px}.gallery-status[hidden]{display:none}.gallery-swipe{position:absolute;bottom:4px;font-size:12px;color:#e9dfbf;background:#172823c9;padding:4px 12px;border-radius:20px;pointer-events:none}
.gallery-info{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:16px;align-items:center;padding-top:8px;border-top:1px solid #627360}.venue-gallery .gallery-arrow{font-size:34px}.gallery-identity{text-align:center;min-width:0}.gallery-info h2{font-size:clamp(20px,3vw,30px);line-height:1.15;margin:0 0 4px;color:#f5d796;text-shadow:none}.gallery-info p{margin:3px 0;line-height:1.35;color:#dddcc1;font-size:14px}.gallery-info .gallery-details{color:#b6c1ad}.gallery-rotate{display:none}
@media(orientation:portrait){.gallery-rotate{display:block;text-align:center;font-size:14px;color:#e6c084;margin:6px 0}.gallery-info{gap:8px}.gallery-info h2{font-size:22px}.gallery-info p{font-size:14px}}
@media(orientation:landscape) and (max-height:500px){.venue-gallery[open]{gap:4px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}.gallery-info{padding-top:4px}.gallery-info h2{font-size:20px}.gallery-info p{display:inline;font-size:13px}.gallery-info .gallery-details::before{content:' · '}.gallery-header{font-size:12px}.gallery-swipe{display:none}}
/* Immersive viewer: photo fills the screen; all chrome floats above it. */
.venue-gallery[open]{display:block;padding:0;background:#10221d}
.gallery-viewer,.gallery-viewer:fullscreen{position:relative;display:block;width:100%;height:100%;margin:0;padding:0;background:#10221d;overflow:hidden;color:#fff4d8}
.gallery-viewer:fullscreen{width:100vw;height:100dvh}
.gallery-viewer .gallery-stage{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:pan-y}
.gallery-viewer .gallery-stage img{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;object-position:center;border-radius:0;transform:none}
.gallery-viewer .gallery-header{position:absolute;z-index:2;top:0;left:0;right:0;padding:max(8px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 24px max(14px,env(safe-area-inset-left));background:linear-gradient(#09181199,transparent);color:#fff3d8;text-shadow:0 1px 3px #0009;pointer-events:none}
.gallery-viewer .gallery-header>span:first-child{display:none}.gallery-viewer .gallery-header button{pointer-events:auto}
.gallery-viewer .gallery-info{position:absolute;z-index:2;bottom:0;left:0;right:0;border:0;gap:12px;padding:30px max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:linear-gradient(transparent,#091811b8);pointer-events:none}
.gallery-viewer .gallery-info button{pointer-events:auto}.gallery-viewer .gallery-info h2{color:#fff0cf;font-size:clamp(18px,3vw,25px);text-shadow:0 1px 4px #000b;margin:0 0 3px}
.gallery-viewer .gallery-info p{color:#f0ead9;font-size:13px;text-shadow:0 1px 3px #000c}.gallery-viewer .gallery-info .gallery-details{color:#e0ddcd}
.gallery-viewer button{background:#162d2580;border-color:#fff4d85c;color:#fff4d8;backdrop-filter:none;box-shadow:none}
.gallery-viewer .gallery-swipe{display:none}.gallery-viewer .gallery-rotate{position:absolute;z-index:2;left:14px;right:190px;top:max(16px,env(safe-area-inset-top));margin:0;color:#fff0ce;font-size:13px;text-align:left;text-shadow:0 1px 4px #000;background:none;pointer-events:none}
@media(orientation:landscape){.gallery-viewer .gallery-rotate{display:none}.gallery-viewer .gallery-info p{display:inline}.gallery-viewer .gallery-info .gallery-details::before{content:' · '}}
.gallery-viewer .gallery-info-button{padding:0 12px;font-size:14px;min-height:44px}
.gallery-header,.gallery-info,.gallery-rotate{transition:opacity .7s ease}
.gallery-idle .gallery-header,.gallery-idle .gallery-info,.gallery-idle .gallery-rotate{opacity:0;pointer-events:none}
.gallery-idle .gallery-header button,.gallery-idle .gallery-info button{pointer-events:none}
.gallery-facts{position:absolute;inset:0;z-index:5;background:#17251fef;color:#f1e6c9;overflow:auto;overscroll-behavior:contain;padding:18px max(22px,env(safe-area-inset-right)) 24px max(22px,env(safe-area-inset-left));text-shadow:none}
.gallery-facts[hidden]{display:none}.gallery-facts-close{position:sticky;top:0;float:right;z-index:2;font-size:28px}.gallery-facts-body{max-width:850px;margin:0 auto;padding-right:50px}
.gallery-facts h2{color:#f5d897;font-size:24px;margin:8px 0 12px}.gallery-facts h3{color:#eac785;font-size:18px;margin:22px 0 10px}.gallery-facts p,.gallery-facts li{color:#e6e2ce;font-size:15px;line-height:1.6}.gallery-final{border-top:1px solid #61745b;padding:12px 0}.gallery-final small{color:#b6c5af}.gallery-final p{margin:4px 0}.gallery-final strong{color:#e9cd8b}

/* Keep the venue visible beside its information in landscape. */
.gallery-reading .gallery-header,.gallery-reading .gallery-info,.gallery-reading .gallery-rotate{visibility:hidden}
@media(orientation:landscape){
 .gallery-facts{left:auto;width:43%;box-sizing:border-box;background:#17251fd9;border-left:1px solid #f1e6c933;padding:12px max(16px,env(safe-area-inset-right)) 20px 16px;box-shadow:-12px 0 35px #07140d44}
 .gallery-facts-body{padding-right:0}.gallery-facts h2{font-size:20px;padding-right:48px}.gallery-facts h3{font-size:16px}.gallery-facts p,.gallery-facts li{font-size:14px}
}

/* Pastel preview remains underneath until the decoded original has faded in. */
.gallery-photos,.gallery-photo-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.gallery-viewer .gallery-stage .gallery-photo-preview{filter:blur(.6px);transform:scale(1.005);image-rendering:auto}
.gallery-viewer .gallery-stage .gallery-photo-full{opacity:0;transition:opacity .5s cubic-bezier(.7,0,.84,0);will-change:opacity}
.gallery-viewer .gallery-stage .gallery-photo-ready .gallery-photo-full{opacity:1}
@media(prefers-reduced-motion:reduce){.gallery-viewer .gallery-stage .gallery-photo-full{transition:opacity .15s linear}}

/* Landscape gallery: preserve the complete composition with black letterboxing. */
@media(orientation:landscape){
 .venue-gallery[open],.gallery-viewer,.gallery-viewer:fullscreen,.gallery-photos{background:#000}
 .gallery-viewer .gallery-stage img{object-fit:contain;object-position:center}
 .gallery-viewer .gallery-stage .gallery-photo-preview{transform:none;filter:none}
}

.date-finals-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:16px;margin:20px 0}
.date-final-event{background:#eadcba;color:#203b33;padding:18px;border:2px solid #354b3c;border-radius:14px;min-width:0}
.date-final-event .final-card{background:#f4e8cd;color:#203b33;margin-top:12px}.date-final-event .tour-person{color:#294d40!important;text-shadow:none;white-space:normal;overflow-wrap:anywhere}
.date-final-event .final-duel{display:flex;flex-direction:column;gap:8px;text-align:center}.date-final-event .final-duel>strong{font-size:26px;color:#263d33}

.rank-date-controls{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.rank-date-controls select{min-width:0;flex:1;padding:12px;color:#253b36;background:#eee0b9;border:2px solid #35453b;border-radius:10px}.rank-evolution svg{display:block;width:100%;height:auto;background:#f1e5c7;border-radius:12px;margin:12px 0}.rank-evolution svg text{font-size:11px;fill:#263d37}.rank-evolution small{display:block}
.rank-chart-readout{display:flex;gap:8px 18px;align-items:center;flex-wrap:wrap;margin:14px 0;color:#233e38}.rank-chart-readout strong{flex-basis:100%}.rank-chart-readout b{font-size:28px}.rank-chart-controls{display:flex;align-items:center;gap:12px}.rank-chart-controls input{flex:1;min-width:0}.rank-chart-controls button{min-width:44px;min-height:44px}.rank-evolution svg{touch-action:pan-y;cursor:crosshair}.rank-evolution>select{max-width:100%;padding:10px}.rank-evolution>details{max-height:350px;overflow:auto}.rank-evolution table{width:100%;font-size:14px}.rank-evolution td,.rank-evolution th{padding:8px;text-align:left}

.rank-zoom-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.rank-zoom-controls label{display:flex;flex-direction:column;gap:6px;font-size:14px}.rank-zoom-controls input{width:100%;min-width:0}.rank-zoom-controls button{grid-column:1/-1}

/* Clear secondary actions across the quick modes and pause. */
#nameBack,#bracketBack,#singleBack,#manualHome,#home{background:#f4dfad!important;color:#182f32!important;-webkit-text-fill-color:#182f32!important;text-shadow:none!important;border:2px solid #263e40;opacity:1!important}
#quickMatchScreen{max-width:680px;margin:0 auto;padding:24px}#singleForm{display:grid;gap:14px}#singleForm select,#quickVenue{width:100%;min-height:48px;background:#f4e7ca;color:#182f32;border:2px solid #31494b;border-radius:10px;padding:10px}
.rank-chart-controls{display:flex;gap:12px}.rank-zoom-controls{display:flex!important}.rank-gesture-hint{font-size:14px;line-height:1.4;color:#253e40}.rank-evolution svg{touch-action:none;cursor:grab;min-height:180px}

.venue-selection-preview{display:block;width:100%;height:clamp(110px,22vh,190px);object-fit:cover;border-radius:12px;border:2px solid #324a48;margin:4px 0 12px}#quickMatchScreen h2{color:#172e31;text-shadow:none}#singleBack{margin-top:16px;min-height:46px}

/* Independent rank zoom controls; all operate on the current viewport. */
.rank-axis-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0;color:#233e38}.rank-axis-controls label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;font-size:14px}.rank-axis-controls label>span{grid-column:1/-1}.rank-axis-controls input{width:100%;min-width:0;accent-color:#88583d}.rank-axis-controls output{min-width:3em;text-align:right;font-size:13px}.rank-axis-controls>button{grid-column:1/-1;justify-self:start;background:#f4dfad;color:#182f32;text-shadow:none;min-height:42px}.rank-chart-controls input{flex:1;width:0;min-width:0;accent-color:#88583d}.rank-evolution>p{font-size:14px;line-height:1.45;color:#29423b}.rank-evolution svg{aspect-ratio:32/11;min-height:0;touch-action:none}

.rank-plot-layout{display:grid;grid-template-columns:minmax(0,1fr)54px;gap:10px;align-items:stretch;margin:12px 0}.rank-plot-layout svg{margin:0;height:100%;min-height:220px;aspect-ratio:auto}.rank-axis-y{display:grid;grid-template-rows:auto 1fr auto;justify-items:center;align-items:center;gap:8px;padding:6px 0;font-size:12px;color:#233e38;text-align:center}.rank-axis-y input{writing-mode:vertical-lr;direction:rtl;height:150px;width:28px;accent-color:#88583d}.rank-axis-y output{font-size:13px}.rank-axis-controls{grid-template-columns:1fr}.rank-axis-controls label{grid-template-columns:minmax(0,1fr)auto}.rank-axis-controls>button{justify-self:end;margin:0}

/* Titles open as a separate scrollable sheet, preserving the player's profile. */
#worldTour button.stat-card-link{position:relative;text-align:left;color:#315440;background:#ded8b8;border:1px solid #7c9067;box-shadow:none;cursor:pointer}
#worldTour .stat-card-link strong{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}
#worldTour button.stat-card-link:hover{background:#eee3be}
#worldTour button.stat-card-link:focus-visible{outline:3px solid #315440;outline-offset:3px}
.player-titles-modal{width:min(720px,calc(100vw - 24px));max-width:none;max-height:85dvh;margin:auto;padding:0;border:2px solid #26483d;border-radius:14px;background:#b8c3a3;color:#243f34;box-shadow:0 12px 45px #051a2680;overflow:hidden}
.player-titles-modal[open]{display:flex;flex-direction:column}
.player-titles-modal::backdrop{background:#061f27b3}
.player-titles-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid #839779;background:#dcd8b8;flex-shrink:0}
.player-titles-header>div{min-width:0}
.player-titles-header small{font-size:15px;overflow-wrap:anywhere;color:#4c614b}
.player-titles-header h2{margin:5px 0 0;font-size:25px;color:#243f34;line-height:1.2}
.player-titles-close{flex-shrink:0;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:2px solid #31513f;border-radius:8px;background:#f0dfb5;color:#243f34;font-size:32px;line-height:1;box-shadow:0 2px #31513f}
.player-titles-close:hover{background:#fff0ce}
.player-titles-close:focus-visible{outline:3px solid #315440;outline-offset:3px}
.player-titles-body{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 20px 20px}
.player-titles-season h3{font-size:17px;color:#294b3b;margin:20px 0 10px}
.player-titles-season ol{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.player-titles-season li{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid #96a17f;border-radius:7px;background:#e5e0c2}
.player-titles-season li>div{min-width:0;display:grid;gap:5px}
.player-titles-season .country-flag{flex-shrink:0;width:28px;height:21px}
.player-titles-season strong{color:#26483b;font-size:16px;line-height:1.3;overflow-wrap:anywhere}
.player-titles-season small,.player-titles-body p{color:#53634a;font-size:14px;line-height:1.4}
@media(max-width:480px){.player-titles-header{padding:15px}.player-titles-body{padding:2px 12px 15px}}

/* The selected ranking date applies to the whole screen, including its header. */
.ranking-publication{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0;color:#253b36}
.ranking-publication h3{margin:0 0 6px}.ranking-publication p{margin:0;font-size:.9rem;line-height:1.4}
.ranking-publication[data-mode="history"]{padding:14px;background:#eee0b9;border:2px solid #35453b;border-radius:12px}
.ranking-publication button{white-space:normal;min-height:44px}.tour-strip.tour-strip-historical{border-color:#bf893e}

/* Readable phone plot: real-size SVG labels, padded content and full edge dots. */
#worldTour .rank-evolution-body{padding:16px 18px 20px;min-width:0}
.rank-evolution-body>select{max-width:100%;padding:10px}
.rank-evolution-body>details{max-height:350px;overflow:auto;margin-top:14px}
.rank-evolution-body>p,.rank-evolution-body>small{font-size:13px;line-height:1.5;color:#29423b}
.rank-evolution-body .rank-chart-readout{gap:7px 16px;margin:16px 0}
.rank-evolution-body .rank-chart-readout strong{font-size:15px;line-height:1.4}
.rank-evolution-body .rank-chart-readout span{font-size:14px}
.rank-evolution-body .rank-plot-layout{grid-template-columns:minmax(0,1fr)46px;gap:6px}
.rank-evolution-body .rank-plot-layout svg{width:100%;height:260px;min-height:260px;aspect-ratio:auto;overflow:hidden}
.rank-evolution-body svg text{font-size:12px}
.rank-evolution-body svg .rank-y-label{font-size:11px}
.rank-evolution-body svg .rank-season-label{font-weight:700;font-size:13px}
.rank-evolution-body svg .rank-axis-caption{font-size:11px;fill:#516258}
.rank-evolution-body .rank-axis-y{font-size:11px;line-height:1.3}
.rank-evolution-body .rank-axis-y input{height:180px}
.rank-evolution-body input[type=range]{padding:0;border:0;box-shadow:none;min-height:28px}
.rank-evolution-body .rank-chart-controls{gap:8px}
@media(max-width:480px){#worldTour .rank-evolution-body{padding:12px 12px 16px}#worldTour .rank-evolution>summary{padding:16px 12px}}

/* Rivalries keep the balance visible; the match list unfolds on demand. */
.player-rivalries,.circuit-rivalries{margin:24px 0;color:#29483b}
.rivalry-card{padding:16px;margin:12px 0;background:#e3dec1;border:1px solid #8d9d7c;border-radius:10px;min-width:0}
.rivalry-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rivalry-heading .country-flag{flex-shrink:0}
#worldTour .rivalry-heading button{font-size:17px;line-height:1.4;overflow-wrap:anywhere;min-height:44px;max-width:100%}
.rivalry-heading small{margin-left:auto;font-size:13px}
.rivalry-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;margin:12px 0 8px}
.rivalry-stats div{display:grid;gap:5px;min-width:0}
.rivalry-stats b{font-size:23px;color:#26483b;font-variant-numeric:tabular-nums}
.rivalry-stats small{font-size:12px;line-height:1.4;color:#475f49}
.rivalry-card summary{font-size:14px;min-height:44px;display:flex;align-items:center;gap:7px}
.rivalry-card summary::before{content:'▸'}.rivalry-card details[open]>summary::before{content:'▾'}
.rivalry-card .result-feed{padding:8px 0;max-height:500px;overflow:auto}
.rivalry-card .result-card{padding:10px;gap:6px 10px;box-shadow:none}
.circuit-rivalry-duel{display:grid;grid-template-columns:minmax(0,1fr)auto minmax(0,1fr);gap:12px;align-items:center}
#worldTour .circuit-rivalry-duel button{font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;min-height:44px}
.circuit-rivalry-duel>strong{font-size:24px;font-variant-numeric:tabular-nums;color:#29483b;white-space:nowrap}
.rivalry-period{font-size:12px;line-height:1.5;color:#475f49}
@media(max-width:480px){.rivalry-card{padding:12px}.circuit-rivalry-duel{gap:8px}.rivalry-card .result-card{grid-template-columns:68px minmax(0,1fr)}}

.rivalry-stats b{font-size:20px}.circuit-rivalries .rivalry-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.circuit-rivalries .rivalry-stats>div:last-child{grid-column:1/-1}

/* Text belongs to its actual surface, not the surrounding dark career shell. */
#worldTour .player-rivalries>h3,#worldTour .circuit-rivalries>h3{color:#f3e4c4}
#worldTour .player-rivalries>p,#worldTour .circuit-rivalries>p{color:#dce4ce;line-height:1.55}
#worldTour .rank-evolution-body{background:#e8dfc2;color:#243b32}
#worldTour .rank-evolution-body :is(p,small,summary,label,output,span,td,th,strong,b){color:#243b32;-webkit-text-fill-color:currentColor;text-shadow:none}
#worldTour .rank-evolution-body svg text{fill:#243b32}
#worldTour .rivalry-card{background:#e3dec1;color:#243b32}
#worldTour .rivalry-card :is(p,small,summary,span,strong,b),#worldTour .record-rest>summary{color:#243b32;-webkit-text-fill-color:currentColor;text-shadow:none}
#worldTour .history-season .result-empty{color:#243b32}
#worldTour .record-marathon>small{color:#30432f!important}

/* Explicit readable surfaces for ranking help and publication date. */
#worldTour .ranking-publication{padding:14px;background:#eee0b9;border:2px solid #35453b;border-radius:12px}
#worldTour .ranking-publication :is(h3,p){color:#203b33!important;-webkit-text-fill-color:#203b33!important;text-shadow:none;opacity:1}
#worldTour .rank-evolution-body>p.rank-gesture-hint{background:#f5ebd3;color:#203b33!important;-webkit-text-fill-color:#203b33!important;opacity:1;font-size:14px;line-height:1.6;padding:12px;border-radius:8px;text-shadow:none}
#worldTour .backup-download{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:14px 0}
#worldTour .backup-download label{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:#f3e4c4;font-size:15px;flex:1 1 220px}
#worldTour .backup-download input{flex:1 1 160px;min-width:0;width:100%;background:#f5ebd3;color:#203b33;-webkit-text-fill-color:#203b33;padding:12px}
#worldTour .backup-download small{color:#f3e4c4}

/* Shared readable surfaces: foreground follows the panel, not its parent shell. */
:root{--panel-ink:#20382e;--panel-paper:#eee2c5;--shell-ink:#f3e8ce}
#worldTour :is(.player-passport,.passport-number,.career-metrics,.stat-card,.tour-fitness,.calendar-stage,.trophy-cabinet,.record-section,.history-season,.result-card,.result-ticket,.final-card,.record-marathon,.tour-create,.tour-backups,.season-ranking,.season-metrics,.career-guide,.career-library-card,.date-final-event){--surface-ink:var(--panel-ink)}
#worldTour :is(.player-passport,.passport-number,.career-metrics,.stat-card,.tour-fitness,.calendar-stage,.trophy-cabinet,.record-section,.history-season,.result-card,.result-ticket,.final-card,.record-marathon,.tour-create,.tour-backups,.season-ranking,.season-metrics,.career-guide,.career-library-card,.date-final-event) :is(p,span,small,strong,b,label,summary,h2,h3,td,th,output,.tour-person){color:var(--surface-ink)!important;-webkit-text-fill-color:var(--surface-ink)!important;text-shadow:none}
#worldTour .tour-brand span{color:#102820}
#menu.menu-redesign #ai :is(strong,small){color:#102820!important;-webkit-text-fill-color:#102820!important}
#menu output{color:var(--shell-ink);-webkit-text-fill-color:var(--shell-ink)}
/* All return actions, including training and invitations, share the same treatment. */
#home,#manualHome,#cancelInvite,#nameBack,#bracketBack,#singleBack,.match-start button,.control-editor button,
#worldTour button:not(.tour-person),.tour-atlas button,.event-modal button{
 background:#eee2c5;color:#20382e!important;-webkit-text-fill-color:#20382e!important;text-shadow:none!important;
}
#worldTour .tour-nav button.selected{background:#e9bd65}
#worldTour button:not(.tour-person) :is(span,small,strong){color:#20382e!important;-webkit-text-fill-color:#20382e!important}
#manual :is(label,output),.control-editor :is(label,output,p,span),.match-start :is(p,small,h2,h3){color:#20382e;-webkit-text-fill-color:#20382e}
#worldTour .career-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;margin:20px 0}
#worldTour .career-library-card{padding:20px;background:#dce0bd;color:#20382e;border:2px solid #536953;border-radius:12px}
#worldTour .career-library-card h3{margin:0 0 12px;overflow-wrap:anywhere}
#worldTour .career-library-card button{margin:6px 6px 6px 0}
#worldTour .career-library-card form{display:flex;flex-wrap:wrap;gap:8px}
#worldTour .career-library-card input{min-width:0;max-width:100%;flex:1}

#worldTour .tour-brand span{color:#08190f}
#worldTour .tour-table small{color:#20382e}
:is(.event-modal,.atlas-info,.event-dossier) :is(p,small,span,strong,b,h2,h3,td,th,.tour-person){color:#20382e!important;-webkit-text-fill-color:#20382e!important;text-shadow:none}
:is(.event-modal,.atlas-info,.event-dossier){--surface-ink:#20382e}

.tour-atlas #atlas-title{color:#08190f}

#bracketScreen #bracketStatus{color:#20382e!important;-webkit-text-fill-color:#20382e!important}
#nameScreen h2,#bracketScreen h2,#lobby h2{color:#08190f}

#menu.menu-redesign #ai :is(strong,small){color:#08190f!important;-webkit-text-fill-color:#08190f!important}

/* Generated metal-and-shades portrait; the selected flag supplies its paint. */
#worldTour .career-hero{grid-template-columns:96px minmax(0,1fr)}
#worldTour .career-paddle-badge{width:90px;height:94px;padding:10px 4px 8px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;transform:rotate(-5deg);background:#d9b36c;border:2px solid #243a31;border-radius:10px;box-shadow:3px 4px #142d30}
#worldTour canvas.career-paddle-portrait{display:block;width:94px;height:auto;flex:none;position:relative;transform:rotate(-8deg);background:none;mask:none;-webkit-mask:none;border:0;box-shadow:none}
@media(max-width:600px){#worldTour .career-hero{grid-template-columns:82px minmax(0,1fr);gap:14px}#worldTour .career-paddle-badge{width:76px;height:84px}#worldTour canvas.career-paddle-portrait{width:82px}}

/* The five navigation items share one row height, including wrapped labels. */
#worldTour .tour-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch}
#worldTour .tour-nav>button{height:100%;box-sizing:border-box;display:grid;grid-template-rows:24px 1fr;align-items:center;justify-items:center;align-self:stretch}
#worldTour .tour-nav>button>.nav-symbol{line-height:24px}
#worldTour .tour-nav>button>span:last-child{display:flex;align-items:center;justify-content:center;min-height:2.4em;line-height:1.2;text-align:center;white-space:normal;overflow-wrap:normal}

/* Date champions: venue identity belongs to the light results card. */
#worldTour .date-final-event>.tour-identity{background:#eadcba;color:#20382e;min-height:0;padding:0 0 14px;border-bottom:1px solid #9a9e7c;border-radius:0;margin-bottom:12px}
#worldTour .date-final-event>.tour-identity :is(strong,small,span),#worldTour .date-final-event>small{color:#20382e!important;-webkit-text-fill-color:#20382e!important;opacity:1;text-shadow:none}
#worldTour .date-final-event>.tour-identity :is(small,span),#worldTour .date-final-event>small{font-size:14px;line-height:1.45}

.control-editor label{flex-wrap:wrap;justify-content:space-between}.control-editor .editor-stepper{display:flex;align-items:center;gap:8px;width:100%}.control-editor .editor-stepper button{flex:0 0 44px;font-size:24px}.control-editor .editor-stepper input{width:0;min-width:0}.control-editor .editor-handle{display:block;width:100%;position:sticky;top:0;z-index:1;touch-action:none;cursor:ns-resize;margin-bottom:8px;background:#edbd66}

/* The page owns vertical scrolling across the entire desktop viewport. */
body:not(.playing)>main{max-width:none;width:100%;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
body:not(.playing) #worldTour.tour-shell{overflow:visible;flex:none;min-height:100%;width:100%}
body:not(.playing) #menu.menu-redesign{max-width:none;width:100%}
body:not(.playing) #nameScreen,body:not(.playing) #quickMatchScreen,body:not(.playing) #bracketScreen,body:not(.playing) #lobby{max-width:none;width:100%;overflow:visible;flex-shrink:0}
#worldTour .tour-full-draw{display:block;margin:0 0 18px;min-height:48px}
#worldTour .ranking-table{position:relative;height:min(60dvh,560px);min-height:260px;overflow:auto;overflow-anchor:none;isolation:isolate}
#worldTour .ranking-table th{position:sticky;top:0;z-index:3}
#worldTour .ranking-table tr{position:relative}
#worldTour .ranking-table .your-ranking{background:#eac777;color:#193b35;font-weight:bold;z-index:2}
#worldTour .ranking-exit{position:absolute;left:0;width:100%;pointer-events:none;background:#eee4cd;z-index:1}
#worldTour .tour-draw{overflow-anchor:none;max-height:none;min-height:220px}
#bracketPath{max-height:none;overflow-anchor:none;min-height:220px}

/* Career actions stay in view when a ranking or draw is focused. */
@media(min-width:761px){
 #worldTour .tour-nav{position:static;top:auto;z-index:auto;margin:0 0 12px}
 #worldTour .tour-nav button{display:flex;flex-direction:row;padding:8px;gap:8px;min-height:44px}
 #worldTour .tour-nav>button>span:last-child{min-height:0}
 #worldTour .tour-top{padding:4px 12px;margin-bottom:8px}
 #worldTour .tour-brand img{width:90px;max-height:40px}
 #worldTour .tour-strip{padding:6px 0}
 #worldTour .ranking-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:14px}
 #worldTour .ranking-toolbar .ranking-publication{padding:8px 12px;margin:8px 0}
 #worldTour .ranking-toolbar .ranking-publication h3{font-size:16px;margin-bottom:4px}
 #worldTour .ranking-toolbar .ranking-publication p{font-size:13px}
 #worldTour .ranking-toolbar .rank-date-controls{margin:8px 0}
 #worldTour .ranking-self{padding:6px 12px;margin:8px 0}
 #worldTour .ranking-toolbar .ranking-self{grid-column:1/-1}
 #worldTour .ranking-table td{padding:6px 10px}
 #worldTour .ranking-table .ranking-person{min-height:0;box-shadow:none}
}
@media(min-width:1100px){
 #worldTour .ranking-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr)}
 #worldTour .ranking-toolbar .ranking-self{grid-column:auto;gap:10px}
 #worldTour .ranking-self .tour-person{min-width:0;overflow-wrap:anywhere}
}
#worldTour .ranking-table{min-height:260px}
#worldTour .tour-draw{min-height:320px}
#worldTour .tour-draw-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;margin-top:4px}
#worldTour .tour-draw-header>select{min-width:0;max-width:280px;width:100%}
#worldTour .tour-draw-header .tour-draw-identity{display:grid;grid-template-columns:40px minmax(0,1fr);gap:3px 10px;align-items:center;padding:8px 12px;margin:0;min-height:0;border:0}
#worldTour .tour-draw-identity .identity-flag{grid-column:1;grid-row:1/3;width:36px;height:27px;margin:0}
#worldTour .tour-draw-identity strong{grid-column:2;grid-row:1;font-size:20px;line-height:1.2;overflow-wrap:anywhere}
#worldTour .tour-draw-identity small{grid-column:2;grid-row:2;font-size:12px;line-height:1.3}
#worldTour .tour-draw-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#worldTour .tour-draw-actions h3{margin:0;font-size:18px}
#worldTour .tour-draw-note{margin:6px 0;font-size:13px}
@media(min-width:761px){#worldTour .tour-draw{min-height:360px;margin-top:12px}}
@media(max-width:760px){
 #worldTour .tour-draw-header{grid-template-columns:minmax(0,1fr) auto;gap:8px}
 #worldTour .tour-draw-header .tour-draw-identity{grid-column:1/-1}
}
#worldTour .career-choices{margin-bottom:24px}
#worldTour .career-choices>.career-date-heading{margin:0 0 10px;color:#efdfbc}
#worldTour .career-choices .tour-breaks{margin:0 0 14px;padding:10px;align-items:center}
#worldTour .career-choices .tour-breaks>details{padding:0;border:0}
#worldTour .career-choices .tour-breaks>details[open]{flex-basis:100%}
#worldTour .career-choices .tour-breaks summary{padding:8px;color:#c1d0ba}
#worldTour .career-choices .tour-events{margin:0;align-items:stretch;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),380px))}
#worldTour .career-choices .tour-event>.venue-cover{height:auto;aspect-ratio:16/9}
#worldTour .career-choices .tour-event .tour-identity{min-height:0;padding:12px 18px;gap:5px}
#worldTour .career-choices .tour-event .tour-identity strong{font-size:20px}
#worldTour .career-choices .tour-event .tour-identity .identity-flag{width:32px;height:23px}
@media(max-width:760px){
 #worldTour .career-choices .tour-events{display:flex;overflow-x:auto;scroll-snap-type:x proximity;gap:12px;padding-bottom:10px}
 #worldTour .career-choices .tour-event{flex:0 0 88%;scroll-snap-align:start}
}

/* Manual fullscreen remains reachable outside a live match, including career. */
#menuFullscreenBar{position:fixed;inset:0 0 auto;min-height:52px;box-sizing:border-box;padding:4px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left));padding-top:max(4px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:flex-end;gap:12px;background:#203638;z-index:60}
#menuFullscreenBar button{min-height:40px;margin:0;padding:6px 14px;font-size:13px}
#menuFullscreenBar [role=status]{font-size:12px;max-width:600px}
body.playing #menuFullscreenBar{display:none}
body:not(.playing)>main{padding-top:calc(64px + env(safe-area-inset-top));scroll-padding-top:calc(64px + env(safe-area-inset-top))}

/* Career preparation stays beside the decisions it informs. */
#worldTour .career-preparation{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;margin:0 0 16px}
#worldTour .career-preparation :is(.tour-fitness,.tour-breaks){flex:1 1 320px;min-width:0;box-sizing:border-box;margin:0;padding:10px 14px;display:flex;flex-wrap:wrap;align-items:center;align-content:start;gap:10px 14px;background:#bac5a0;border:1px solid #8e9e7c;border-radius:9px;box-shadow:none;color:var(--panel-ink);--surface-ink:var(--panel-ink)}
#worldTour .career-preparation .tour-fitness strong{font-size:14px}
#worldTour .career-preparation details{flex-basis:100%;min-width:0;padding:0;border:0;background:none}
#worldTour .career-preparation details summary{padding:0;font-size:11px;color:var(--panel-ink)!important;-webkit-text-fill-color:var(--panel-ink)!important}
#worldTour .career-preparation details p{font-size:12px;line-height:1.5;color:var(--panel-ink)!important;-webkit-text-fill-color:var(--panel-ink)!important}
#worldTour .career-preparation .tour-breaks>button{flex:1 1 110px;min-height:36px;margin:0;padding:8px 12px}
/* Ten full players, with the career action alongside the ranking heading. */
#worldTour .ranking-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center}
#worldTour .ranking-toolbar .ranking-publication{margin:0;padding:4px 0;background:none;border:0}
#worldTour .ranking-toolbar .ranking-publication h3{font-size:16px;margin:0}
#worldTour .ranking-toolbar .ranking-publication p{font-size:11px;margin:2px 0}
#worldTour .ranking-continue{white-space:nowrap;min-height:38px;padding:7px 14px}
#worldTour .ranking-toolbar .rank-date-controls{margin:0;gap:6px}
#worldTour .ranking-toolbar .rank-date-controls select{font-size:12px;padding:4px 8px;min-height:30px}
#worldTour .ranking-toolbar .ranking-self{grid-column:auto;gap:8px;margin:0;padding:4px 8px;font-size:12px;min-width:0}
#worldTour .ranking-toolbar .ranking-self>strong{font-size:16px}
#worldTour .ranking-table{--ranking-row-height:36px;margin:8px 0;min-height:352px}
#worldTour .ranking-table th{height:30px;box-sizing:border-box;padding:4px 8px}
#worldTour .ranking-table tbody tr{height:var(--ranking-row-height)}
#worldTour .ranking-table td{padding:0 8px;font-size:13px;line-height:18px}
#worldTour .ranking-table .ranking-person{display:inline-flex;align-items:center;gap:6px;min-height:0;padding:0;white-space:nowrap;font-size:13px;line-height:20px;box-shadow:none}
#worldTour .ranking-table .ranking-person small{display:inline;font-size:11px;line-height:16px;margin:0}
#worldTour .ranking-table .country-flag{width:20px;height:15px;margin:0}
#worldTour .ranking-change{font-size:12px}
@media(max-width:760px){
 #worldTour[data-page=ranking] .tour-top,#worldTour[data-page=ranking] .tour-strip{display:none}
 #worldTour .ranking-toolbar .ranking-self{display:none}
 #worldTour .ranking-toolbar .rank-date-controls{grid-column:1/-1}
 #worldTour .ranking-table td{padding:0 5px;font-size:12px}
 #worldTour .ranking-table .ranking-person{font-size:12px;gap:4px}
 #worldTour .ranking-table .ranking-person small{display:none}
 #worldTour .ranking-continue{font-size:12px;padding:6px 9px}
}
@media(max-height:700px){#worldTour[data-page=ranking] .tour-top,#worldTour[data-page=ranking] .tour-strip{display:none}}

/* Quick match experiments are independent of every career and tournament. */
.quick-special-options{margin:8px 0 0;padding:18px;min-width:0;border:1px solid #9faa8d;border-radius:12px;background:#f5ecd4;color:#24483e}
.quick-special-options legend{padding:0 8px;font-size:19px;font-weight:700}.quick-special-options p{color:#43584d;font-size:13px}
.quick-special-row{display:grid;gap:7px;border-top:1px solid #c9cbb0;padding:14px 0}
.quick-special-label{display:flex;gap:9px;align-items:center;flex-wrap:wrap;cursor:pointer}.quick-special-label input{width:21px;height:21px;accent-color:#345949}.quick-special-label small{margin-left:auto;color:#43584d}
.quick-special-swatch{display:inline-block;width:19px;height:19px;border-radius:50%;box-shadow:inset -2px -3px 0 #0002;border:1px solid #344b4544}
.quick-special-first,.quick-special-default{font-size:12px;color:#4e6657}.quick-special-default{text-align:center}
.quick-special-row output{float:right;font-weight:700;font-variant-numeric:tabular-nums}
.quick-special-controls{display:flex;align-items:center;gap:12px}.quick-special-controls button{min-width:44px;min-height:44px;padding:4px;font-size:22px;background:#ebe1bf;color:#24483e;border:1px solid #8d9c7c}
.quick-special-track{position:relative;flex:1;min-width:0}.quick-special-track input{display:block;width:100%;height:34px;margin:0;accent-color:#466950;touch-action:pan-y}
.quick-special-marker{position:absolute;left:50%;top:30px;height:6px;border-left:2px solid #567750;pointer-events:none}
.quick-special-options>button{background:#294e42;color:#fff0c8;border:1px solid #15382c;min-height:44px}
.quick-special-options button:disabled,.quick-special-options input:disabled{opacity:.4;cursor:default}
.quick-special-empty{padding:12px;background:#e1e6cf;border-radius:8px}
@media(min-width:900px){#singleForm .quick-special-options{max-width:760px;width:100%;justify-self:center}}

body:not(.playing) #quickMatchScreen{max-height:none;height:auto}
.quick-special-label input{margin:0}.quick-special-controls button{margin:0}

.perpetual-pause{border-bottom:2px solid #acaf8b;padding:0 0 18px;margin-bottom:18px}.perpetual-pause[hidden]{display:none}.perpetual-pause>h3{margin:0}.perpetual-pause>p{font-size:13px}.perpetual-pause #restartMatch{min-height:44px;margin:8px 0;background:#e8ba82;color:#193b32}.perpetual-pause .quick-special-options{margin-top:12px}.perpetual-pause [role="status"]:empty{display:none}

.quick-special-timing{display:grid;gap:5px}.quick-special-timing+.quick-special-timing{margin-top:6px}
