/* The board is the main screen; all secondary information opens on demand. */
.app[data-view=board]:has(.board-screen){padding:0;max-width:none;min-height:100dvh;background:#f5f6f8}
.app:has(.board-screen) .topbar,.app:has(.board-screen) .main-nav{display:none}
.board-screen.screen{width:100%;height:100dvh;max-width:none;min-height:0;padding:0;display:grid;grid-template:42px minmax(0,1fr) 58px / minmax(0,1fr);gap:0;overflow:hidden;background:#f5f6f8}
.board-heading{grid-row:1;grid-column:1;display:flex;align-items:center;gap:9px;margin:0;padding:3px 12px;background:#fbfaf1;border-bottom:1px solid #d9dfcc;z-index:5;font-size:10px}
.table-back,.board-heading>.round-button{display:grid;place-items:center;width:30px;height:30px;min-width:30px;min-height:30px;border-radius:9px;background:#e8eddf;color:#416452;padding:6px}.match-room{display:flex;gap:6px;align-items:center;font-size:10px;letter-spacing:1px;color:#8b947c}.match-room .live-dot{width:5px;height:5px}.current-player{display:flex;align-items:center;gap:7px;background:transparent;margin-left:auto;padding:0 10px 0 0;border-right:2px solid var(--player);min-width:0;max-width:230px;text-align:left}.current-player .player-avatar{height:31px;width:24px}.current-player>span{display:grid;gap:1px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.current-player small{font-size:9px;color:#8b957d}
.board-stage{grid-row:2;grid-column:1;position:relative;width:100%;height:100%;min-height:0;overflow:hidden;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 35%,#ffffff,#f3f5f8 75%,#e9edf2);box-shadow:none;touch-action:none;cursor:grab;user-select:none}
.board-stage.camera-moving>.board-svg,.board-stage.camera-moving>.table-dice-arena{will-change:transform}
.board-stage:active{cursor:grabbing}.board-stage:before,.board-stage:after{display:none}.board-stage>.board-svg{position:absolute;inset:0;width:100%;height:100%;max-height:none;overflow:hidden;touch-action:none}.board-tile{cursor:pointer}.board-tile:focus-visible{outline:none}.board-tile:hover>polygon:nth-child(2),.board-tile:focus-visible>polygon:nth-child(2){stroke:#ffeaa5;stroke-width:2}
.board-lot-label{cursor:pointer;touch-action:none}.board-lot-label:focus-visible rect{stroke:#8d6732;stroke-width:1.5}.table-dice-arena.rolling,.table-dice-arena.settled{animation:none!important;transform:translate(-50%,-50%)}
.table-camera{position:absolute;right:12px;top:12px;display:flex;gap:5px;z-index:3}.table-camera .button{display:grid;place-items:center;width:31px;height:31px;min-height:31px;padding:6px;border:1px solid #adc1a1;border-radius:9px;background:#f4f5e5dc;color:#466851;box-shadow:0 2px 7px #183f3320}.table-camera .button span{display:none}.table-camera .button svg{width:16px;height:16px}

.turn-bar{grid-row:3;grid-column:1;display:flex;align-items:center;gap:10px;min-width:0;width:100%;border:0;border-radius:0;padding:7px 14px;box-shadow:none;background:#fbfaf1;z-index:5}.turn-label{flex:1;min-width:0}.turn-label strong{display:block;font-size:12px;color:#3c5e49;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.turn-label small{display:flex;align-items:center;gap:7px;font-size:9px;color:#92a084;line-height:1.6}.turn-label #match-clock{margin:0;font-size:9px}.turn-label #match-clock:before{content:'· ';}.turn-bar>.button{min-height:38px;padding:8px 18px;min-width:100px;max-width:240px;font-size:12px;border-radius:11px;background:#276451;color:#fff8e4}.turn-bar>.button.secondary{background:#e7ecdf;color:#7d8972}.turn-bar>.round-button{width:33px;min-width:33px;height:33px;min-height:33px;padding:7px;border-radius:10px;background:#e9eddf;color:#527252;border:1px solid #dce1cf}.phase-extras{display:flex;gap:5px;min-height:0}.phase-extras:empty{display:none}.phase-extras .button{font-size:10px;min-height:30px;padding:5px 8px;color:#8c754c;background:#f0ebd8}.phase-extras .button svg{width:14px;height:14px}
.match-players{display:grid;gap:8px}.match-player{display:flex;align-items:center;gap:12px;border-left:3px solid var(--player);border-radius:12px;background:#eef1e5;padding:10px}.match-player.current{background:#f8edc9}.match-player .player-avatar{height:45px;width:33px}.match-player>div{display:grid;gap:4px}.match-player strong{font-size:13px}.match-player small{font-size:11px;color:#8b967c}.match-player>span{margin-left:auto;font-size:10px;color:#9c803f}
.table-dice-arena{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100px;aspect-ratio:1.5;height:auto;z-index:4;pointer-events:none;background:none;padding:0}.table-dice-arena[hidden]{display:none}.dice-webgl{width:100%;height:100%;aspect-ratio:1.5}.dice-webgl canvas,.dice-3d-snapshot{display:block;width:100%;height:100%;object-fit:contain}.dice-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.dice-fallback img{width:45%;height:auto}.dice-item-view{width:100%;height:100%;display:grid;place-items:center}.dice-item-view canvas{width:100%;height:100%;max-height:370px}.dice-item-view .detail-art{width:100%;height:100%;object-fit:contain}.table-decks [role=button]{cursor:pointer}
.app:has(.board-screen)~.toast{bottom:78px}
.rolling .dice-fallback img{animation:dice-fallback-bounce .45s ease-in-out infinite alternate}.rolling .dice-fallback img+img{animation-delay:-.2s}@keyframes dice-fallback-bounce{from{transform:translateY(0) rotate(-12deg)}to{transform:translateY(-8px) rotate(15deg)}}
@media(max-width:700px){
 .board-screen.screen{grid-template-rows:calc(38px + env(safe-area-inset-top)) minmax(0,1fr) calc(56px + env(safe-area-inset-bottom));height:100dvh;padding:0;gap:0}.board-heading{padding:calc(3px + env(safe-area-inset-top)) 8px 3px;gap:6px}.match-room{font-size:8px;letter-spacing:.3px}.current-player{gap:4px;padding-right:5px;max-width:135px}.current-player .player-avatar{height:27px;width:20px}.current-player>span{font-size:10px}.current-player small{font-size:8px}.table-back,.board-heading>.round-button{width:27px;height:27px;min-width:27px;min-height:27px;padding:5px}.board-heading>.round-button svg{width:17px;height:17px}
 .board-stage{border-radius:0}.board-stage>.board-svg{inset:0;width:100%;height:100%}.table-camera{top:8px;right:8px;gap:4px}.table-camera .button{width:29px;height:29px;min-height:29px;padding:6px}.table-camera .button svg{width:15px;height:15px}
 .turn-bar{padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:6px}.turn-label strong{font-size:10px;max-width:none}.turn-label small{font-size:8px;max-width:none;display:flex}.turn-label #match-clock{display:none}.turn-bar>.button{font-size:10px;min-height:35px;min-width:80px;max-width:150px;padding:8px 10px}.turn-bar>.button svg{display:none}.turn-bar>.round-button{width:30px;min-width:30px;height:30px;min-height:30px;padding:6px}.phase-extras .button{font-size:9px;padding:5px}.phase-extras .button svg{display:none}.table-dice-arena{width:78px}.dice-item-view{height:100%}
}
@media(max-width:360px){.match-room{font-size:7px}.current-player{max-width:112px}.turn-bar{gap:4px}.turn-bar>.button{font-size:9px;max-width:125px;min-width:65px;padding:6px 8px}.turn-bar>.round-button{width:27px;min-width:27px}.turn-label strong{font-size:9px}.turn-label small{font-size:7px}.phase-extras .button{font-size:8px}.table-dice-arena{width:68px}}
.deed-dialog{width:min(94vw,480px);background:#f9eceb;border-color:#dcadb2}.deed-dialog .dialog-header{background:#eecfd0;border-bottom-color:#deb9bd}.deed-dialog .dialog-header h2{color:#744f59;font-size:17px}.deed-dialog .dialog-body{padding:16px}.property-deed{border:1px solid #d7a7ad;border-radius:12px;background:linear-gradient(135deg,#fff8f3,#f7e0df);padding:16px;box-shadow:inset 0 0 0 4px #fff9f26b}.deed-crest{display:flex;justify-content:center;align-items:center;gap:8px;color:#b38960}.deed-crest span{font-size:7px;font-weight:700;letter-spacing:1.5px}.property-deed h3{text-align:center;margin:12px 0 5px;color:#795461;font-size:25px}.deed-owner{text-align:center;font-size:10px;color:#9b7b82;margin-bottom:13px}.deed-buy-price{display:flex;justify-content:space-between;align-items:center;padding:10px 3px;border-top:1px solid #dfbfc2;border-bottom:1px solid #dfbfc2;font-size:11px;color:#9b7c7f;margin-bottom:9px}.deed-buy-price strong{font-size:18px;color:#795461}.deed-table{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed;color:#825e65}.deed-table thead{font-size:9px;letter-spacing:.3px;color:#ab8b8e}.deed-table th,.deed-table td{padding:8px 5px;border-bottom:1px solid #e7cbcd;text-align:right;font-variant-numeric:tabular-nums}.deed-table th:first-child{text-align:left;width:40%;font-weight:600}.deed-table tr.current-level{background:#e6c4c64a}.deed-table tbody td{font-weight:650}.deed-note{font-size:9px;line-height:1.8;color:#a28287;margin:11px 0 0}.deed-dialog .property-actions{margin-top:13px}.deed-dialog .property-actions .button{font-size:10px;min-height:35px;min-width:40%;padding:8px}.deed-dialog .dialog-actions{margin-top:13px}
.draw-dialog{width:min(92vw,430px)}.draw-dialog .dialog-header{background:#f3eedc}.deck-prompt{text-align:center}.deck-prompt .eyebrow{font-size:8px;line-height:1.8;color:var(--deck-color)}.draw-stack{width:100%;background:radial-gradient(ellipse,#e4ddc166,transparent 72%);display:grid;place-items:center;padding:10px 0 20px;transition:transform .2s}.draw-stack:hover{transform:translateY(-5px)}.draw-stack img{height:min(30dvh,230px);width:100%;object-fit:contain;filter:drop-shadow(0 10px 8px #30483320)}.draw-stack span{display:block;margin-top:12px;background:var(--deck-color);color:#fff9e2;font-size:12px;padding:10px 15px;border-radius:20px}.deck-prompt>p:last-child{font-size:10px;color:#909b82;line-height:1.8}.revealed-card-scene{perspective:1000px;padding:6px 13px 18px}.revealed-game-card{position:relative;border:2px solid #c7ac70;border-radius:18px;padding:25px 20px;text-align:center;min-height:300px;background:radial-gradient(ellipse at 50% 10%,#fffff4,#f0e8cc);box-shadow:inset 0 0 0 5px #fbf6e5,inset 0 0 0 6px #dfc993,0 12px 20px #3c553c17;animation:table-card-flip .6s ease-out both;backface-visibility:hidden;transform-origin:center}.card-series{font-size:9px;letter-spacing:4px;color:var(--deck-color);font-weight:750}.card-medallion{display:grid;place-items:center;width:73px;height:73px;border:1px solid #cfb76f;border-radius:50%;margin:22px auto 17px;background:#ece0b9;color:var(--deck-color);box-shadow:inset 0 0 0 5px #f7edd0}.revealed-game-card h3{color:var(--deck-color);font-size:24px;line-height:1.25;margin-bottom:13px}.revealed-game-card>p{font-size:14px;line-height:1.8;color:#818367;min-height:52px}.card-signed{font-size:10px;color:#a69a77;border-top:1px solid #ddcfa8;padding-top:15px;margin-top:20px}.card-status{display:block;font-size:9px;color:#b5aa87;margin-top:10px}@keyframes table-card-flip{from{transform:rotateY(-95deg) translateY(10px);opacity:0}to{transform:rotateY(0) translateY(0);opacity:1}}
@media(max-width:700px){.deed-dialog .dialog-header{padding:12px 15px}.deed-dialog .dialog-header h2{font-size:14px}.deed-dialog .dialog-body{padding:12px}.property-deed{padding:12px}.property-deed h3{font-size:22px;margin-top:9px}.deed-table{font-size:11px}.deed-table th,.deed-table td{padding:7px 4px}.deed-buy-price{padding:8px 3px}.deed-note{font-size:8px;margin-top:9px}.deed-crest span{font-size:6px;letter-spacing:.7px}.deed-owner{font-size:9px;margin-bottom:10px}.revealed-card-scene{padding:5px 5px 15px}.revealed-game-card{min-height:260px;padding:20px 16px}.revealed-game-card h3{font-size:22px}.revealed-game-card>p{font-size:13px}.card-medallion{margin:17px auto;width:65px;height:65px}.draw-stack span{font-size:11px}}

/* Small local effects never cover pawn faces or neighbouring cells. */
.character-aura .aura-glint{animation:aura-glint 2.2s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:center}
@keyframes aura-glint{from{opacity:.35}to{opacity:1}}
.reduced-motion .aura-glint{animation:none}
.collection-controls .segment{flex-wrap:wrap}.collection-controls .segment>button{flex:1 1 auto}
.results-dialog{width:min(94vw,520px)}.match-results{display:grid;gap:12px}.results-winner{display:flex;align-items:center;justify-content:center;gap:10px;color:#a77d29;font-weight:750;font-size:20px;margin:0}.ranking-list{display:grid;gap:6px}.ranking-row{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#f1f3ee;border-radius:10px;border:1px solid transparent}.ranking-row.mine{background:#fff4d6;border-color:#dfc584}.ranking-row>img{width:28px;height:38px;object-fit:contain}.ranking-place{width:22px;color:#a18141;font-size:19px}.ranking-row>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.ranking-row small{display:block;font-size:10px;color:#9a854c}.ranking-row>b{font-size:11px;color:#687963;white-space:nowrap}.results-cleanup{font-size:11px;color:#869080;text-align:center;margin:0}
@media(max-width:700px){.results-dialog .dialog-body{padding:12px}.ranking-row{padding:6px 8px;gap:7px}.ranking-row>img{height:31px;width:23px}.ranking-row>span{font-size:12px}.results-winner{font-size:17px}.ranking-row>b{font-size:10px}.solo-look-preview{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.aura-glint{animation:none!important}}

.gender-picker{display:flex;align-items:center;gap:5px}.gender-picker button{padding:8px 16px;border-radius:9px;background:#edf0e5;color:#65745e}.gender-picker button.active{background:#2e6b54;color:white}.gender-picker small{font-size:10px;color:#819078;margin-left:7px}
.collection-card .card-art{display:flex;align-items:center;justify-content:center;overflow:hidden}.collection-card .card-art img{min-width:0;min-height:0;max-height:100%;object-fit:contain}
