/* v4.2 device layouts. Keep the board readable instead of shrinking all text. */
html{scrollbar-gutter:stable;scroll-padding-bottom:120px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.modal-open{overflow:hidden}
body{min-width:280px}
main{width:100%;max-width:1580px;padding:32px clamp(16px,3vw,48px) 0}
header{height:auto;min-height:84px;padding:18px clamp(16px,3vw,48px);gap:20px}
.brand,.intro>div,.atlas-bar>div,.player-info,.online-heading>div,.layout>*{min-width:0}
nav{flex-wrap:wrap;justify-content:flex-end}
button{touch-action:manipulation;min-height:44px}
input,select,textarea{max-width:100%}
.atlas-bar{gap:24px;padding:20px 24px}
.atlas-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,600px);max-width:none;flex:0 1 600px;gap:8px}
.atlas-actions>span{grid-column:1/-1}.atlas-actions>button{min-width:0;font-size:12px;padding:10px 12px;white-space:nowrap}
.extra-tools{display:contents}.extra-tools>button{font-size:12px;padding:10px;min-width:0}
#toolsToggle{display:none}
.layout{grid-template-columns:minmax(0,1fr) clamp(270px,24vw,330px);gap:22px}
.board-shell{min-width:0;padding:12px 12px 0}
.board-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:44px;margin-bottom:8px;font-size:11px;color:#63765e}
.board-toolbar button{border:1px solid #c8d4bf;border-radius:7px;background:#f6f8ed;color:var(--ink);padding:8px 14px;flex-shrink:0;font-size:12px}
.board-viewport{width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#9eaf91 #e9eddf;border-radius:5px}
.board{width:100%;min-width:0}
.board-shell[data-zoom=in] .board{width:max(100%,calc(var(--board-width,600px)*1.45))}
.tile .tile-name{font-size:clamp(9px,.78vw,12px);line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;overflow-wrap:anywhere;letter-spacing:0}
.tile .price{font-size:clamp(9px,.72vw,11px);line-height:1.2}
.player{gap:9px;padding:12px 7px}.avatar{flex:0 0 32px}.player-name{overflow-wrap:anywhere;line-height:1.35}.player-money{flex-shrink:0}
.center-title{line-height:1.08}.center-title span{line-height:1.5}.turn-text{max-width:90%;text-align:center;overflow-wrap:anywhere}
.roll,.end{min-height:44px}
.panel{padding:18px}.panel-title{gap:10px}
.prop-row{align-items:flex-start;flex-wrap:wrap}.prop-row>div{min-width:0}.prop-row button{font-size:12px;min-height:42px;padding:9px 12px}.prop-row>div:last-child:not(:first-child){display:flex;flex-wrap:wrap;gap:5px}
.modal-backdrop{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom));z-index:60}
.modal{max-width:640px;max-height:calc(var(--visual-height,100dvh) - 32px - env(safe-area-inset-bottom));padding:30px;overscroll-behavior:contain;scroll-padding-top:60px;overflow-wrap:anywhere}
.modal h2{padding-right:28px;line-height:1.35}.modal p,.modal li{font-size:14px}.modal input,.modal select{font-size:16px;min-height:46px}.modal button{font-size:14px}.modal .close{width:44px;height:44px;top:8px;right:8px;display:grid;place-items:center;background:#f9faf2;z-index:2;border-radius:50%;font-size:27px;padding:0}
.modal .primary,.wide{min-height:46px}.save-tools>*{min-height:44px}.save-tools .import-label{display:flex;align-items:center;position:relative}.save-tools .import-label input{min-height:0;margin:0}
.map-card{padding:15px}.map-card.chosen{padding:14px}.map-card b{font-size:15px}.map-card span{font-size:12px}.map-card em{font-size:11px}
.online-heading{align-items:flex-start}.online-heading h2{overflow-wrap:anywhere;letter-spacing:1px}.online-tools button{font-size:12px;min-height:44px}.online-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}.online-members>span{min-width:0;overflow-wrap:anywhere}.online-note{font-size:12px}
.mobile-dock{display:none}
.toast{bottom:max(24px,env(safe-area-inset-bottom));line-height:1.5;text-align:center;max-width:min(90vw,520px)}
@media(hover:hover) and (pointer:fine){.tile:hover{transform:translateY(-1px)}}
@media(hover:none){button:hover,.tile:hover{transform:none;filter:none;box-shadow:none}}
@media(min-width:1400px){.board-center .city-art{margin-bottom:12px}.center-title{font-size:56px}.tile .tile-name{font-size:12px}.tile .price{font-size:11px}}
@media(min-width:701px) and (max-width:1050px){
 .layout{grid-template-columns:minmax(0,1fr) 260px;gap:16px}.board-shell{padding:8px 8px 0}.board{gap:3px}.city-art{display:none}.center-title{font-size:34px}.dice-area{margin:16px 0 12px}.turn-text{font-size:11px}.roll,.end{font-size:13px;min-width:148px;padding:12px}.center-foot{font-size:7px;left:10px;right:10px;bottom:12px}.center-top{font-size:7px;top:12px;left:12px;right:12px}.tile .tile-name{font-size:10px}.tile .price{font-size:9px}.tile .symbol{font-size:17px}.token{width:10px;height:10px;border-width:1px}.tokens{gap:1px;bottom:2px}.tile.occupied{padding-bottom:12px}.tile .owner-mark,.tile .houses{font-size:7px}.atlas-bar{flex-wrap:wrap}.atlas-actions{width:100%;flex-basis:100%}.players-panel .player{flex-wrap:wrap}.players-panel .player-money{margin-left:auto}.panel{padding:14px}
}
@media(min-width:701px) and (max-width:820px){.layout{grid-template-columns:minmax(0,1fr)}aside{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:0}.action-panel{grid-column:1;grid-row:1}.players-panel{grid-column:2;grid-row:1/3}.feed-panel{grid-column:1;grid-row:2}.panel{margin:0}.city-art{display:block;transform:scale(.8);height:110px}.center-title{font-size:44px}}
@media(max-width:700px){
 html{scrollbar-gutter:auto}.has-mobile-dock body{padding-bottom:calc(105px + env(safe-area-inset-bottom))}
 header{min-height:72px;padding:12px 16px;gap:10px;flex-wrap:wrap}.brand{font-size:16px;flex:1 1 145px}.brand-icon{width:34px;height:38px;font-size:27px;flex-shrink:0}.brand small{font-size:7px;letter-spacing:2px}header nav{flex:1 1 170px;gap:6px}.saved{display:none}.icon{padding:8px;width:44px;height:44px}.quiet,.dark{font-size:12px;padding:10px 12px}
 main{padding:20px max(12px,env(safe-area-inset-left)) 0;padding-right:max(12px,env(safe-area-inset-right))}.intro{align-items:flex-start;gap:12px;margin-bottom:18px}.intro>div:first-child{flex:1}.intro .eyebrow{font-size:8px;letter-spacing:2px}h1{font-size:clamp(21px,5.5vw,30px);margin:8px 0;letter-spacing:-.8px}.intro p{font-size:12px;line-height:1.6}.round{flex:0 0 95px;font-size:12px;padding-top:4px}.round small{font-size:10px;line-height:1.6;max-width:95px;margin-top:6px}
 .atlas-bar{display:block;padding:15px 16px;margin-bottom:15px;gap:0}.atlas-bar h2{font-size:21px;margin:7px 0}.atlas-bar p{font-size:12px;max-width:none}.atlas-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin-top:14px;gap:8px}.atlas-actions>span{text-align:left;font-size:11px;margin-bottom:0}.atlas-actions>button{font-size:12px;padding:10px 7px;min-height:44px}#toolsToggle{display:block}.extra-tools{display:none;grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tools-open .extra-tools{display:grid}.extra-tools>button{font-size:12px;min-height:44px;padding:10px 5px}
 .map-rule{padding:12px 14px;margin:0 0 16px;display:block}.map-rule>span{font-size:13px;white-space:normal}.map-rule p{font-size:12px;line-height:1.7;margin-top:5px}
 .layout{display:flex;flex-direction:column;gap:14px}.board-shell{order:1;padding:7px 7px 0;width:100%;border-radius:12px}.board-toolbar{font-size:11px;margin:0 3px 7px;gap:7px}.board-toolbar button{font-size:12px;padding:8px 10px}.board{gap:2px;aspect-ratio:1}.tile{padding:4px 1px;border-radius:4px;min-height:0}.tile .stripe{height:3px}.tile .tile-name{font-size:clamp(8.5px,2.4vw,12px);line-height:1.12;font-weight:700;margin:1px 0;letter-spacing:0}.tile .price{display:none}.tile .symbol{font-size:15px;line-height:1}.tile .owner-mark,.tile .houses{font-size:7px}.tokens{bottom:1px;gap:0}.token{width:9px;height:9px;border-width:1px}.tile.occupied{padding-bottom:9px}
 .board-center{justify-content:center;padding:24px 7px 25px}.city-art{display:none}.center-top{top:9px;left:9px;right:9px;font-size:7px;letter-spacing:0}.center-title{font-size:clamp(28px,7vw,45px);letter-spacing:1px}.center-title>b{font-size:.6em;max-width:100%;overflow-wrap:anywhere}.center-title span{font-size:10px;letter-spacing:1px;margin-top:8px}.dice-area{gap:10px;margin:14px 0 10px}.dice{width:38px;height:38px;line-height:34px;font-size:34px;border-radius:8px}.turn-text{font-size:11px;margin-bottom:10px;line-height:1.45}.roll,.end{font-size:13px;min-width:145px;min-height:44px;padding:11px 15px}.roll span{margin-left:20px}.center-foot{font-size:7px;left:8px;right:8px;bottom:9px;justify-content:center}.center-foot span:last-child{display:none}
 .board-shell[data-zoom=in] .board{width:max(620px,calc(var(--board-width,400px)*1.45))}.board-shell[data-zoom=in] .tile .tile-name{font-size:12px;line-height:1.2}.board-shell[data-zoom=in] .tile .price{display:block;font-size:10px}.board-shell[data-zoom=in] .city-art{display:block;transform:none;height:130px;margin:0 0 5px}.board-shell[data-zoom=in] .center-title{font-size:45px}.board-shell[data-zoom=in] .tile .symbol{font-size:20px}.board-shell[data-zoom=in] .token{width:12px;height:12px}.board-shell[data-zoom=in] .tile.occupied{padding-bottom:14px}
 .board-caption{font-size:10px;gap:8px;padding:2px;min-height:46px}.board-caption>span{line-height:1.6}.board-caption .text-btn{font-size:12px;white-space:nowrap;padding:8px 4px}
 aside{display:contents}.action-panel{order:2}.players-panel{order:3}.feed-panel{order:4}.panel{width:100%;margin:0;padding:17px;border-radius:12px}.panel-title{margin-bottom:12px}.panel-title h2{font-size:16px}.panel-title .label{font-size:9px}.action-panel .eyebrow{font-size:9px}.action-panel h2{font-size:19px;line-height:1.4}.action-panel p{font-size:13px;line-height:1.8}.action-panel button{font-size:14px;min-height:46px;padding:12px}
 .player{padding:12px 7px;gap:10px;margin:0 0 3px}.avatar{width:34px;height:34px;flex-basis:34px;font-size:19px}.player-name{font-size:14px}.player-info small{font-size:11px}.player-money{font-size:16px}.player-money small{font-size:11px}.feed-panel #feed{display:block}.feed-item{font-size:13px;line-height:1.8}.feed-item small{font-size:9px}footer{font-size:10px;line-height:1.6;gap:12px;padding:20px 0}
 .modal-backdrop{align-items:flex-end;padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}.modal{border-radius:18px;padding:24px 20px;max-height:calc(var(--visual-height,100dvh) - 24px - env(safe-area-inset-bottom))}.modal h2{font-size:23px;margin-top:15px;margin-bottom:17px}.modal p,.modal li{font-size:14px}.modal label{font-size:13px}.modal input,.modal select{font-size:16px;padding:12px;min-height:46px}.map-grid{gap:9px}.map-card{padding:12px}.map-card.chosen{padding:11px}.map-card b{font-size:14px}.map-card small{font-size:9px}.map-card span{font-size:12px}.map-card em{font-size:11px;line-height:1.6}.stat-grid{gap:8px}.stat-grid div{font-size:12px}.stat-grid strong{font-size:19px}.prop-row{gap:10px}.prop-row>div{width:100%}.prop-row>strong{margin-left:auto}.prop-row small{font-size:12px}.prop-row button{min-height:44px;font-size:13px;flex:1 1 auto;margin:0}.save-tools{display:grid;grid-template-columns:1fr 1fr}.save-tools button,.save-tools .import-label{font-size:13px;justify-content:center;text-align:center;padding:10px}.save-card button{font-size:13px;min-height:44px}.save-card small{font-size:11px}.save-card label{font-size:13px}.save-note{font-size:12px}.guide-target strong{font-size:22px}
 .online-panel{padding:16px;margin-bottom:16px}.online-heading{display:block}.online-heading h2{font-size:23px}.online-heading p{font-size:12px}.online-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}.online-tools button{font-size:12px;padding:10px 7px;white-space:normal}.online-tools button:first-child:last-child{grid-column:1/-1}.online-members{grid-template-columns:repeat(2,minmax(0,1fr));margin:14px 0;gap:8px}.online-members>span{font-size:14px;padding:12px}.online-members small{font-size:11px}.online-note,.online-panel>p{font-size:12px;line-height:1.8}
 .mobile-dock:not([hidden]){display:block;position:fixed;bottom:0;left:0;right:0;background:#f8faf1f7;border-top:1px solid #c9d5bf;padding:8px max(12px,env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));z-index:40;box-shadow:0 -5px 24px #173f3612;backdrop-filter:blur(10px)}.dock-status{font-size:11px;color:#64775f;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px}.dock-buttons{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr);gap:8px}.dock-buttons button{min-height:46px;padding:9px 6px;border:1px solid #c6d2bb;border-radius:8px;background:#edf2e5;color:var(--ink);font-size:13px;line-height:1.25;overflow-wrap:anywhere}.dock-buttons .dock-primary{background:var(--ink);color:#fff;border-color:var(--ink)}
 .toast{bottom:calc(116px + env(safe-area-inset-bottom));font-size:13px;padding:12px 16px;max-width:calc(100vw - 24px)}.ceremony,.round-ribbon{top:max(16px,env(safe-area-inset-top))}.ceremony{max-width:calc(100vw - 24px);padding:16px;gap:12px}.ceremony strong{font-size:18px;line-height:1.4;overflow-wrap:anywhere}.ceremony small{font-size:7px;letter-spacing:1.5px}.ceremony div>span{font-size:10px;line-height:1.6}.ceremony-mark{font-size:35px;flex-shrink:0}.chance-reveal{bottom:calc(116px + env(safe-area-inset-bottom));right:12px;max-width:calc(100vw - 24px);width:225px}.chance-reveal span{font-size:12px}
}
@media(max-width:360px){header{padding:10px 12px}.brand{flex-basis:120px;font-size:15px}header nav{flex-basis:150px}.quiet,.dark{padding:10px;font-size:11px}.intro{display:block}.round{display:flex;gap:7px;align-items:center;text-align:left;margin-top:8px}.round small{max-width:none;margin:0;font-size:10px}.round .live-dot{margin:0}.center-title span{font-size:9px}.center-top span:last-child{display:none}.turn-text{font-size:10px}.roll,.end{min-width:130px;font-size:12px}.board-toolbar>span{font-size:10px}.map-grid{grid-template-columns:1fr}.map-card em{font-size:12px}.modal{padding:22px 16px}.extra-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-grid{grid-template-columns:1fr 1fr}.dock-buttons button{font-size:12px}}
@media(max-width:1000px) and (max-height:500px) and (pointer:coarse){
 .intro{display:none}header{min-height:60px;padding:8px 16px}header .brand-icon{display:none}main{padding-top:12px}.atlas-bar{padding:12px 16px;margin-bottom:12px}.atlas-bar h2{font-size:18px}.atlas-bar p,.map-rule{display:none}.atlas-actions{margin-top:8px}.layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.75fr);gap:12px;align-items:start}.board-shell{grid-column:1;grid-row:1/4}aside{display:contents}.action-panel{grid-column:2;grid-row:1}.players-panel{grid-column:2;grid-row:2}.feed-panel{grid-column:2;grid-row:3}.city-art{display:none}.center-title{font-size:28px}.center-title span{display:none}.center-top{font-size:7px}.center-foot{font-size:7px}.dice-area{margin:12px 0}.roll,.end{min-width:125px}.has-mobile-dock body{padding-bottom:100px}.mobile-dock:not([hidden]){display:block;position:fixed;bottom:0;left:0;right:0;background:#f8faf1f7;border-top:1px solid var(--line);padding:6px max(16px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));z-index:40}.dock-status{font-size:10px;margin-bottom:4px}.dock-buttons{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px}.dock-buttons button{min-height:42px;background:#edf2e5;border:1px solid #bcccb0;border-radius:7px;color:var(--ink)}.dock-buttons .dock-primary{background:var(--ink);color:white}.modal{max-height:calc(var(--visual-height,100dvh) - 20px)}.toast,.chance-reveal{bottom:100px}
}
