/* Shared game setup: the same seats, profile and rules in solo and online. */
body:is(.solo-setup,.network-lobby)>main{width:min(1040px,100%);padding:20px 24px 24px}
#room-screen .setup-intro{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 16px}
.setup-intro>div{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
#room-screen h1{font-size:32px;margin:0;line-height:1.25}
.setup-back{color:#b5c2d1;font-size:12px;text-decoration:none;padding:8px 0}.setup-back:hover{color:#eed6a5}
.room-code-tag{font-size:11px;color:#aabbd0;border:1px solid #53677c;border-radius:5px;padding:5px 8px;white-space:nowrap}
#room-screen .setup-layout{grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}
#room-screen .room-side,#room-screen .room-profile{display:block;min-width:0}
#room-screen #profile-panel,#room-screen #setup-panel{padding:18px}
#room-screen #profile-panel h2{font-size:22px;margin:0}
#room-screen #capital-stage,#room-screen #capital-stage[data-show-king=true]{height:142px}
#room-screen .capital-preview{border:0;border-radius:6px;background:transparent;margin:0 0 8px}
#room-screen #profile-panel fieldset{margin:16px 0 0}
#room-screen #profile-panel legend{margin-bottom:8px}
#room-screen #profile-panel .choices{gap:6px;flex-wrap:nowrap}
#room-screen .choices button{width:42px;height:42px;flex:0 1 42px;min-width:0}
#room-screen .emblems button .identity-emblem{width:30px;height:30px}
#room-screen #player-name{height:42px;margin:0}
#room-screen #profile-panel label{margin-bottom:8px}
#room-screen #profile-note{margin-top:10px;min-height:0}
#room-screen .setup-section h2{font:500 14px 'Golos Text',system-ui,sans-serif;color:#e4d7bd;margin:0 0 10px}
#room-screen .section-heading h2{margin-bottom:10px}
#room-screen .section-heading span{font-size:11px;font-variant-numeric:tabular-nums}
#room-screen .setup-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #64768b88;border-radius:7px;overflow:hidden;background:var(--ui-flat)}
#room-screen .setup-choices>.ui-button{border:0;border-right:1px solid #64768b66;border-radius:0;min-width:0;padding:9px 6px;min-height:36px;font-size:12px;background:transparent;box-shadow:none}
#room-screen .setup-choices>.ui-button:last-child{border-right:0}
#room-screen .setup-choices>.ui-button[aria-pressed=true]{background:#394b5d;color:#f2ddb0;box-shadow:inset 0 -2px 0 #cfb47c}
#room-screen .setup-choices>.ui-button:focus-visible{outline-offset:-3px}
#room-screen .setup-choices>.ui-button:disabled{opacity:.65}
#room-screen .setup-players{margin-top:10px;border:1px solid #53677c80;border-radius:7px;background:#101c2c55;overflow:hidden}
.setup-player{min-height:47px;display:flex;align-items:center;gap:10px;padding:7px 10px;border-bottom:1px solid #53677c55}
.setup-player:last-child{border-bottom:0}.setup-player-info{flex:1;min-width:0;display:flex;align-items:baseline;gap:9px}
#room-screen .setup-player .crest{width:27px;height:31px;padding-bottom:4px}
.setup-player .name{font-size:12px;font-weight:500;overflow-wrap:anywhere;color:#dce3ed}
.setup-player .meta{font-size:10px;color:#95a9bd;white-space:nowrap}
.setup-player .state{font-size:10px;color:#9eafc0;white-space:nowrap}.setup-player .ready{color:#a9c7ae}
.setup-player.is-empty .name{color:#9eafc0}.setup-player.is-empty .open-crest{clip-path:none;border:1px dashed #64768b77;border-radius:5px;background:transparent;color:#91a5b9;font-size:19px;padding:0}
#room-screen .seat-action{font-size:10px;padding:5px 8px;min-height:28px;flex:none;white-space:nowrap}
#room-screen #composition-note{font-size:10px;line-height:1.4;margin:8px 0 0}
#room-screen #match-options{display:grid;gap:12px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;margin-top:14px}
#room-screen .map-size-settings{display:block}
#room-screen .map-choices>.ui-button{display:flex;flex-direction:column;gap:3px;min-height:52px}
.map-choices small{font-size:10px;opacity:.75;font-weight:400}
#room-screen .setup-rules{border-top:1px solid #53677c66;padding-top:12px}
#room-screen #match-settings{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px}
#room-screen .round-limit-toggle{display:flex;align-items:center;margin:0;font-size:12px}
#room-screen .round-limit-value{margin:0}
#room-screen .round-limit-value label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#room-screen #round-limit{width:66px;min-height:30px;height:30px;margin:0;padding:4px 8px;font-size:12px}
#room-screen #round-limit-note{grid-column:1/-1;font-size:10px;line-height:1.4;margin:2px 0 0}
#room-screen #river-settings{display:flex;align-items:center;gap:12px;margin-top:10px}
#room-screen #river-settings>label{display:flex;gap:9px;align-items:center;margin:0;font-size:12px;white-space:nowrap}
#room-screen #river-settings>.note{font-size:10px;line-height:1.4;margin:0}
#room-screen #lobby-panel{padding:0;border:0;margin-top:14px;background:transparent;box-shadow:none}
#room-screen #invite{margin-top:0}
#room-screen #invite>label{font-size:11px;margin:0 0 7px}
#room-screen .invite-row{align-items:stretch}
#room-screen .invite-row input{margin:0;padding:6px 9px;min-height:32px;font-size:10px}
#room-screen .invite-row button{padding:6px 10px;font-size:11px;white-space:nowrap}
#room-screen #lobby-limits-note{font-size:10px;line-height:1.4;margin:8px 0 0}
#room-screen .lobby-actions{margin-top:12px;gap:8px}
#room-screen .lobby-actions>button{flex:1;min-height:38px}
#room-screen #lobby-note{font-size:11px;line-height:1.4;margin:8px 0 0}
#room-screen #lobby-note:empty,#room-screen #copy-note:empty{display:none}
#room-screen #start-bot{width:100%;margin-top:16px;min-height:40px}
@media(min-width:781px) and (max-height:800px){body:is(.solo-setup,.network-lobby)>main{padding-top:12px;padding-bottom:12px}#room-screen .setup-intro{margin-bottom:12px}#room-screen h1{font-size:28px}#room-screen .setup-player{min-height:42px;padding-top:5px;padding-bottom:5px}#room-screen #capital-stage,#room-screen #capital-stage[data-show-king=true]{height:120px}#room-screen #match-options{margin-top:10px;gap:10px}#room-screen #lobby-panel{margin-top:10px}}
@media(max-width:900px){.setup-player-info{display:block}.setup-player .meta{display:block;margin-top:3px;font-size:9px}}
@media(max-width:780px){body:is(.solo-setup,.network-lobby)>main{padding:20px 16px 28px}#room-screen .setup-layout{grid-template-columns:1fr;gap:16px}#room-screen #capital-stage,#room-screen #capital-stage[data-show-king=true]{height:132px}#room-screen .setup-intro h1{font-size:27px}#room-screen .setup-intro>div{gap:8px}.setup-player-info{display:flex}.setup-player .meta{margin-top:0}#room-screen #profile-panel .choices{flex-wrap:wrap}}
@media(max-width:390px){#room-screen #profile-panel,#room-screen #setup-panel{padding:14px}.setup-player-info{display:block}.setup-player .meta{margin-top:3px}#room-screen .invite-row button{max-width:120px;white-space:normal}#room-screen .setup-choices>.ui-button{font-size:11px}.setup-player{gap:8px}}

/* Four realms share a compact two-by-two board, not a tall numeric list. */
#room-screen .setup-players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#room-screen .setup-player{display:grid;grid-template-columns:27px minmax(0,1fr) auto;min-height:58px;border-right:1px solid #53677c55;border-bottom:1px solid #53677c55;gap:8px;padding:8px}
#room-screen .setup-player:nth-child(even){border-right:0}
#room-screen .setup-player:nth-last-child(-n+2){border-bottom:0}
#room-screen .setup-player:only-child{border-right:0}
#room-screen .setup-player-info{display:block}
#room-screen .setup-player .meta{display:block;font-size:9px;margin-top:4px;white-space:normal}
#room-screen .setup-player .name{display:block;font-size:12px;line-height:1.3}
#room-screen .setup-player .state{font-size:9px}
#room-screen .setup-player.is-empty .crest.open-crest{background:transparent;border:1px dashed #64768b77;border-radius:5px}
#room-screen .setup-player.is-empty .crest::before{display:none}
@media(min-width:781px) and (max-height:800px){body:is(.solo-setup,.network-lobby)>header{height:68px}#room-screen .setup-player{min-height:54px;padding:6px 8px}#room-screen .map-choices>.ui-button{min-height:46px;padding-top:6px;padding-bottom:6px}#room-screen .setup-rules{padding-top:8px}#room-screen #river-settings{margin-top:6px}}
@media(max-width:1000px) and (min-width:781px){#room-screen .setup-player{grid-template-columns:24px minmax(0,1fr);gap:7px}#room-screen .setup-player .seat-action,#room-screen .setup-player .state{grid-column:2;justify-self:start}#room-screen .setup-player .meta{margin-top:2px}}
@media(max-width:480px){#room-screen .setup-players{grid-template-columns:1fr}#room-screen .setup-player{border-right:0;min-height:52px}#room-screen .setup-player:nth-last-child(2){border-bottom:1px solid #53677c55}}

/* Copy feedback uses the invite label line, leaving the start controls in place. */
#room-screen #invite{position:relative}
#room-screen #copy-note{position:absolute;top:0;right:0;max-width:65%;margin:0;font-size:10px;line-height:1.4;text-align:right}

/* Native checkbox semantics and keyboard handling, with a compact switch face. */
#room-screen label.setup-switch{position:relative;display:inline-flex;align-items:center;gap:9px;cursor:pointer;min-height:20px}
#room-screen label.setup-switch>input{position:absolute;left:0;top:50%;transform:translateY(-50%);width:34px;height:20px;margin:0;opacity:0;cursor:pointer}
.setup-switch-track{position:relative;display:inline-block;flex:none;width:32px;height:18px;border:1px solid #677b90;border-radius:12px;background:#142336;transition:background .14s ease,border-color .14s ease;pointer-events:none}
.setup-switch-track::after{content:'';position:absolute;left:2px;top:2px;width:12px;height:12px;border-radius:50%;background:#adbac8;transition:transform .14s ease,background .14s ease}
.setup-switch>input:checked+.setup-switch-track{background:#786442;border-color:#b39b6c}
.setup-switch>input:checked+.setup-switch-track::after{background:#f3deb0;transform:translateX(14px)}
.setup-switch>input:focus-visible+.setup-switch-track{outline:2px solid #d1bc8d;outline-offset:3px}
.setup-switch:has(input:disabled){cursor:default;opacity:.55}
#room-screen #round-limit{appearance:textfield;text-align:center;font-variant-numeric:tabular-nums}
#room-screen #round-limit:disabled{opacity:.45;cursor:default}
@media(prefers-reduced-motion:reduce){.setup-switch-track,.setup-switch-track::after{transition:none}}
