/* Match layout: board actions stay on the board; build choices live in the sidebar. */
.board-column{min-width:0;display:flex;flex-direction:column;align-self:start;height:calc(100svh - 86px);min-height:610px}
.board-column>.world,.online #gameShell .board-column>.world{position:relative;flex:1;min-height:0;height:auto;max-height:none;isolation:isolate}
.board-column #viewport{inset:30px 0 35px}.board-column .world-top,.online #gameShell .world-top{top:16px;left:24px;max-width:calc(100% - 260px)!important;z-index:2}
.board-column .world-top h1,.online #gameShell .world-top h1{font:600 clamp(23px,2.3vw,32px)/1.2 system-ui;margin:6px 0 8px}
.board-column .world-top p{max-width:420px;font-size:12px;line-height:1.5}.board-column .world-top .storm-prompt{padding:8px 10px}
.board-column .view-controls{left:50%;bottom:15px;transform:translateX(-50%);max-width:calc(100% - 390px);white-space:normal;flex-wrap:wrap;justify-content:center;z-index:3;gap:4px}
.board-column .view-controls button{padding:6px 9px;font-size:11px}.board-column .world-bottom{display:none}
/* Hand and trade entry point */
.board-hand{position:relative;flex-shrink:0;padding:12px 145px 16px 18px;background:#0d1e29;border-top:1px solid #40535f;min-height:134px}
.hand-heading,.players-heading{font:600 12px system-ui!important;letter-spacing:.4px;margin:0 0 9px!important;color:#c6d5df}
.hand-cards{display:flex;justify-content:center;gap:9px}.hand-card{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px;width:108px;min-width:0;padding:10px;border:1px solid var(--resource-color);border-radius:8px;background:linear-gradient(145deg,var(--resource-color),#142832 87%);box-shadow:2px 3px 0 #070f17}
.hand-symbol{font-size:27px;grid-column:1}.hand-name{font-size:11px;grid-column:1}.hand-count{grid-column:2;grid-row:1/3;font-size:25px;color:white}.empty-hand-card{opacity:.5}
.hand-trade{position:absolute;inset-inline-end:16px;top:50%;transform:translateY(-50%);width:113px;min-height:48px;border-color:#d4b578;color:#ffe3aa;background:#30352e}.hand-trade:not(:disabled):hover{background:#484839}
/* Free-standing dice; larger dice mark the action available now. */
.board-dice{position:absolute;inset-inline-end:18px;bottom:20px;z-index:20;width:auto;padding:0;background:none;border:0;box-shadow:none}
.board-dice .dice-pair,.board-dice .dice-pair:hover{display:flex;background:none;border:0;box-shadow:none;padding:13px;gap:22px}.board-dice .die{width:61px;height:61px;padding:10px;gap:4px;transition:width .2s,height .2s,padding .2s}
.board-dice .ready-to-roll .die{width:116px;height:116px;padding:19px;gap:5px;box-shadow:3px 5px 0 #9a8768,0 0 22px #e4bc7440}.board-dice .dice-pair:focus-visible{outline:3px solid #e4bc74;outline-offset:2px;border-radius:12px}
.board-dice .roll-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Public roster */
.world>.player-list{position:absolute;inset-inline-end:12px;top:14px;width:205px;z-index:4;margin:0;padding:10px;border:1px solid #405461;border-radius:10px;background:#102330eb}
.player-row{display:flex;justify-content:space-between;align-items:flex-start;gap:6px;border:1px solid #354a57;border-inline-start:4px solid var(--player-color);border-radius:7px;padding:7px;margin:5px 0;background:#11212c}
.player-row:last-child{margin-bottom:0}.player-row.current-player{border-color:var(--player-color);background:#293c45;box-shadow:inset 0 0 0 1px var(--player-color)}
.player-info{display:grid;gap:3px;min-width:0}.player-name{font-size:12px;overflow-wrap:anywhere}.player-stats,.player-status{font-size:10px;color:#b9cbd6}.current-player .player-status{color:#ffdfa2}
.player-more{position:relative;flex-shrink:0}.player-more>summary{cursor:pointer;font-size:10px!important;padding:4px!important;color:#d8e6ee!important;list-style:none}.player-more>summary:focus-visible{outline:2px solid #e4bc74}
.player-options{position:absolute;inset-inline-end:0;top:25px;z-index:8;width:205px;padding:12px;border:1px solid #597281;border-radius:8px;background:#192e3b;box-shadow:0 8px 30px #0009}
.player-options p{font-size:13px!important;margin:0 0 8px;overflow-wrap:anywhere}.player-options button{display:block;width:100%;font-size:12px;margin:6px 0;text-align:start}.player-options small{display:block;font-size:11px;line-height:1.5;color:#bdcbd2}
/* Bank belongs at the lower-left, away from the dice action. */
.world>.board-bank{position:absolute;inset-inline-start:12px;bottom:12px;width:225px;z-index:3;margin:0;padding:10px;background:#102330eb;border:1px solid #405461;border-radius:10px;text-align:center}
.board-bank .bank-heading{font-size:11px!important;margin:0 0 9px!important}.board-bank .bank-stacks{gap:5px}.board-bank .bank-stack{padding:7px 1px 6px}.board-bank .bank-icon{font-size:20px}.board-bank .bank-name{font-size:9px}.board-bank .harvest-receipts{display:none}
/* Build buttons, fallback list, and selection confirmation */
.build-grid button,.room-actions .build-piece{position:relative;padding:12px 25px 21px 12px;text-align:start}.build-piece small{display:block;font-size:11px;color:#b4c6d0;line-height:1.5;margin-top:6px}.build-piece.active{border-color:#e4bc74;background:#383a30}.piece-count{position:absolute;inset-inline-end:7px;bottom:5px;font-size:12px;color:#ffdf99}
.location-fallback{margin:14px 0}.location-fallback summary{font-size:12px;cursor:pointer;color:#becfda!important}.location-fallback select{font-size:12px;margin:10px 0}.location-fallback button{font-size:12px;width:100%}
.selection-note{font-size:12px!important;color:#c5d8dc!important;line-height:1.5}.board-confirm{position:absolute;z-index:7;display:flex;gap:6px;padding:0;background:none;border:0;box-shadow:none;pointer-events:auto}.board-confirm button{min-width:44px!important;width:44px;height:44px;border-radius:50%;padding:4px;font-size:23px!important;margin:0;box-shadow:0 3px 10px #0008}.board-confirm[hidden]{display:none}
.online #onlinePanel #presence,.online #onlinePanel #hand{display:none}.online #onlinePanel #match{padding:16px;margin:0}.online #onlinePanel #turn{font:600 19px system-ui;margin:16px 0}.online #onlinePanel .invite-row{display:none}.online #onlinePanel .room-actions{gap:9px}.online #onlinePanel #leave{font-size:12px;background:transparent}.online #onlinePanel{padding:18px;min-height:0}.turn-end{margin-top:16px;order:20;border-color:#d8b578}
@media(max-width:1000px) and (min-width:721px){.world>.player-list{width:170px;padding:7px}.board-column .world-top,.online #gameShell .world-top{max-width:calc(100% - 205px)!important;left:16px}.board-dice .ready-to-roll .die{width:96px;height:96px;padding:16px;gap:4px}.board-dice .die{width:52px;height:52px;padding:9px;gap:3px}.board-dice{inset-inline-end:9px}.world>.board-bank{width:195px;padding:8px}.board-hand{padding-inline-end:117px}.hand-trade{width:94px;inset-inline-end:10px;font-size:12px}.hand-card{padding:8px 5px;gap:4px}.hand-count{font-size:21px}.hand-name{font-size:10px}.board-column .view-controls{max-width:120px}}
@media(max-width:720px){
 .board-column{height:auto;min-height:0;width:100%}.board-column>.world,.online #gameShell .board-column>.world{height:590px;min-height:590px;max-height:none;flex:none}
 .board-column #viewport,.online .board-column #viewport{inset:130px 0 100px}.board-column .world-top,.online #gameShell .world-top{top:12px;left:12px;max-width:calc(100% - 182px)!important}.board-column .world-top h1,.online #gameShell .world-top h1{font-size:23px}.board-column .world-top p{font-size:11px;line-height:1.4}
 .world>.player-list{width:154px;padding:6px;inset-inline-end:8px;top:10px}.player-row{padding:5px;gap:3px}.player-status{display:none}.current-player .player-status{display:block}.player-name{font-size:11px}.player-more>summary{padding:3px!important}.player-options{width:190px}
 .world>.board-bank{width:188px;inset-inline-start:8px;bottom:8px;padding:8px}.board-bank .bank-name{font-size:8px}.board-bank .bank-icon{font-size:18px}
 .board-dice{inset-inline-end:6px;bottom:18px}.board-dice .die{width:44px;height:44px;padding:7px;gap:3px}.board-dice .ready-to-roll .die{width:84px;height:84px;padding:14px;gap:4px}.board-dice .dice-pair{gap:13px;padding:8px}
 .board-column .view-controls{left:50%;bottom:110px;max-width:95%;transform:translateX(-50%)}.board-hand{padding:12px;min-height:0}.hand-cards{gap:6px}.hand-card{padding:8px 4px;display:flex;flex-direction:column;gap:4px}.hand-symbol{font-size:22px}.hand-name{font-size:10px}.hand-count{font-size:21px}.hand-trade{position:static;transform:none;width:100%;margin-top:12px;min-height:40px}
 .online #onlinePanel{padding:12px}.online #onlinePanel #match{padding:14px}
}
@media(prefers-reduced-motion:reduce){.board-dice .die{transition:none}}

.build-piece:disabled{opacity:.65}.build-piece .build-unavailable{font-size:10px;color:#e6bd9e;margin-top:5px}

.storm-attention{position:absolute;inset:35% 5% auto;z-index:9;text-align:center;font-size:clamp(25px,4vw,48px);font-weight:800;color:#eff9ff;text-shadow:0 3px 18px #000,0 0 30px #142b40;pointer-events:none;animation:storm-notice 2.6s both}
@keyframes storm-notice{0%{opacity:0;transform:scale(.85)}15%,75%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.storm-attention{animation:none}}

.bank-count{display:block;font-size:15px;color:#fff;margin-top:4px;font-variant-numeric:tabular-nums}.bank-empty{opacity:.5}.board-bank .bank-notice{font-size:11px;line-height:1.35;margin:9px 0 0;color:#ffdcac}.bank-options{border:1px solid #405461;border-radius:8px;padding:12px;margin:14px 0}.bank-options legend{font-size:13px;color:#d7e3ea;padding:0 5px}.bank-hide-option{display:flex!important;align-items:center;gap:8px;margin-top:10px;font-size:12px!important}.bank-hide-option input{width:auto!important;margin:0!important}.bank-options .help-inline{margin-bottom:0}.view-controls .world-transparency[aria-pressed="true"]{border-color:#81c9e7;background:#204658;color:#e9fbff}
.board-end-turn{position:absolute;right:24px;bottom:145px;z-index:9;min-width:120px;padding:12px 18px!important;border:1px solid #8b9ba6!important;background:#243b49!important;color:#ecf3f7!important;border-radius:9px!important;box-shadow:0 4px 15px #0006}.board-end-turn:hover{background:#365365!important}.board-end-turn:focus-visible{outline:3px solid #e4bc74}.board-confirm .upgrade-hint{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);width:210px;padding:8px;margin-bottom:6px;border-radius:7px;background:#10212ef2;color:#ffe1a4;text-align:center;font-size:12px}.board-confirm .placement-confirm:disabled{background:#424b53!important;color:#aab1b7!important;border-color:#7b858f!important;cursor:not-allowed}@media(max-width:720px){.board-end-turn{right:16px;bottom:200px;min-width:104px;padding:10px!important}}

/* Let the globe render behind its overlays instead of clipping it into a strip. */
.board-column #viewport,.online .board-column #viewport{inset:0}
@media(max-width:720px){
 .board-end-turn{right:10px;bottom:72px;min-width:104px;margin:0;padding:9px!important}
 .board-dice{bottom:8px;inset-inline-end:8px}
 .board-dice .dice-pair{gap:12px;padding:6px}
 .board-dice .die{width:38px;height:38px;padding:6px}
 .board-column .view-controls{bottom:112px}
}

.match-info{margin:16px 0;padding:12px;border:1px solid #405461;border-radius:8px;background:#11232ddd}.match-info summary{cursor:pointer;font-weight:600;font-size:14px}.match-info p,.match-info dd{font-size:12px;line-height:1.5;color:#bdcdd8}.match-info dt{font-size:13px;margin-top:8px}.match-info dd{margin:3px 0 10px}.match-info h3{margin:16px 0 8px}.match-info a{color:#e4bc74}.match-options{border:1px solid #405461;border-radius:8px;padding:12px}.match-options input[type=checkbox]{width:auto!important;display:inline}.match-options input[type=range]{width:100%}.match-options output{float:right;font-weight:bold;color:#ffe0a4}

.board-confirm .route-choice{width:auto;min-width:76px!important;height:auto;min-height:44px;border-radius:9px;padding:8px;font-size:12px!important;background:#245642;border-color:#78cda0}.board-confirm:has(.route-choice){flex-wrap:wrap;max-width:260px}

.world>.player-list{max-height:45%;overflow-y:auto;scrollbar-width:thin}.player-options{position:static;width:auto;margin-top:6px}.player-more[open]{min-width:125px}

.player-row{flex-wrap:wrap}.player-info{flex:1}.player-more[open]{flex-basis:100%;min-width:0}.player-more[open]>.player-options{box-sizing:border-box;width:100%}

.options-panel button[aria-pressed="true"]{border-color:#a9cfad;background:#294636}.options-panel button[aria-pressed="true"]::before{content:"✓ ";}

/* Compact roster: name and hand summary first; secondary details under More. */
.world>.player-list{padding:6px}
.player-list .players-heading{margin:0 0 4px;font-size:12px}
.player-list .player-row{padding:4px 6px;margin:3px 0;gap:4px;align-items:center}
.player-list .player-info{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:5px;row-gap:1px;line-height:1.2}
.player-list .player-name{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-list .player-stats{flex-basis:100%;font-size:10px}
.player-list .player-bot{font-size:9px;color:#b9cbd6}
.player-list .player-status{display:block;color:#ffcf91;font-size:10px;flex-basis:100%}
.player-list .current-player .player-name::before{content:'▸ ';color:#ffdfa2}
.player-list .player-award{font-size:9px;margin:0;padding:1px 3px}

.block-dialog{width:min(480px,90vw);max-height:80vh;overflow:auto;background:#142733;color:#eef4f6;border:1px solid #647e8b;border-radius:12px;padding:20px}.block-dialog::backdrop{background:#0009}.block-dialog p{font-size:13px;line-height:1.5}.block-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}.block-row span{overflow-wrap:anywhere}.block-row button{flex-shrink:0}

/* Compact rule reference and illustrated building costs. */
.match-info{padding:14px;background:linear-gradient(145deg,#1a303c,#10212c);border-color:#60717a;box-shadow:0 5px 16px #0003}
.match-info>summary{color:#f0d6a1;letter-spacing:.03em}
.match-info .match-rule-list{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:0;margin:12px 0 16px}
.match-info .match-rule-list dt,.match-info .match-rule-list dd{margin:0;padding:8px 0;border-bottom:1px solid #40546166;font-size:12px;line-height:1.5}
.match-info .match-rule-list dt{color:#b8cbd5}.match-info .match-rule-list dd{text-align:right;color:#f0f4f5;overflow-wrap:anywhere;padding-left:10px}
.match-info .match-cost-list{display:grid;gap:7px;margin:10px 0 16px}
.match-cost-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;background:#081a2470;border:1px solid #40546180;border-radius:8px}
.match-cost-name{font-size:12px;color:#e9ded0}.match-cost-cards{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px;max-width:175px;flex-shrink:0}
.match-cost-cards img{display:block;width:27px;height:38px;object-fit:cover;border-radius:3px;box-shadow:0 2px 4px #0006}
.match-info>a{display:inline-block;font-size:12px;padding:4px 0}

.rotation-tool{position:relative}.rotation-tool>summary{cursor:pointer;list-style:none;padding:10px 12px;background:#142430ed;border:1px solid #52616c;border-radius:6px;font-size:13px}.rotation-pad{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,44px);gap:4px;padding:8px;border:1px solid #60717a;border-radius:10px;background:#10232ef5;box-shadow:0 4px 15px #0008}.rotation-pad button{min-width:44px;min-height:44px;padding:8px!important}.rotation-pad button:first-child{grid-column:2}.rotation-pad button:nth-child(2){grid-column:1;grid-row:2}.rotation-pad button:nth-child(3){grid-column:3;grid-row:2}.rotation-pad button:last-child{grid-column:2;grid-row:3}
