/* Mobile play has one task surface. Desktop keeps the established composition. */
.mobile-play-sheet,.mobile-play-status{display:none}
@media(max-width:700px),(max-height:500px) and (max-width:1100px){
 body.mobile-play #game{height:100dvh;min-height:0;isolation:isolate}
 body.mobile-play .masthead{left:max(12px,env(safe-area-inset-left));top:calc(8px + env(safe-area-inset-top));right:146px;pointer-events:none}
 body.mobile-play .masthead .brand{font-size:7px;letter-spacing:1.5px;gap:5px;height:13px}
 body.mobile-play .brand-mark{font-size:16px}
 body.mobile-play h1{font-size:15px;letter-spacing:-.3px;line-height:1.15;margin:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.mobile-play h1 span{display:inline;color:#696257;margin-left:3px}
 body.mobile-play .edition,body.mobile-play .strap,body.mobile-play .game-about-link,body.mobile-play .era-caption,body.mobile-play .inventory,body.mobile-play .session-panel,body.mobile-play .coach,body.mobile-play .camera-hint,body.mobile-play .toast{display:none!important}
 body.mobile-play .tools{top:calc(3px + env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));gap:0;z-index:8}
 body.mobile-play .tools .icon-button{width:44px;height:44px;font-size:18px;border:0;background:transparent;backdrop-filter:none;box-shadow:none}
 body.mobile-play .tools #skins,body.mobile-play .tools #sound{display:none}
 body.mobile-play .tools .icon-button:hover{transform:none;background:#fffaf1b8}
 .mobile-play-status{display:flex;align-items:flex-start;gap:6px;position:absolute;top:calc(47px + env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));z-index:9;pointer-events:none}
 .mobile-play-status>button{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:44px;padding:8px 11px;border:1px solid #cbbda480;border-radius:12px;background:#fffaf0eb;color:#655643;box-shadow:0 2px 8px #46391c0a;font:600 11px/1.25 'Segoe UI',sans-serif;pointer-events:auto}
 .mobile-resources-toggle{flex:none}
 .mobile-roster-toggle{flex:1}
 .mobile-roster-toggle>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-resource-details,.mobile-roster-details{position:absolute;left:0;right:0;top:50px;max-height:min(34dvh,230px);overflow-y:auto;overscroll-behavior:contain;padding:12px;background:#fff9effa;border:1px solid #d4c3aa;border-radius:13px;box-shadow:0 8px 22px #48351b20;pointer-events:auto;scrollbar-width:thin;touch-action:pan-y}
 .mobile-resource-details #pawnStatus{display:flex;width:100%;min-height:55px;margin:0;padding:0;border:0;background:transparent;text-align:left;color:#675841}
 .mobile-resource-details #pawnPortrait{width:44px;height:50px;object-fit:contain;flex:none}
 .mobile-resource-details #pawnStatusTitle{display:block;font-size:13px}
 .mobile-resource-details #pawnStatusText{display:block;font-size:11px;margin-top:4px}
 .mobile-resource-details #innerProgress{margin:8px 0}
 .mobile-resource-details #innerProgress span{font-size:10px;min-height:28px;padding:7px 5px}
 .mobile-resource-details p{font-size:12px;line-height:1.45;margin:8px 0 0}
 .mobile-resource-details>.icon-button{display:inline-grid;place-items:center;width:44px;height:44px;margin:10px 6px 0 0;backdrop-filter:none;background:#f3e8d6;font-size:20px}
 .mobile-roster-details .participant-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;margin:0 0 8px;padding:0;gap:6px}
 .mobile-roster-details .participant-chip{min-height:44px;max-width:none;min-width:0;font-size:11px;padding:10px}
 .mobile-roster-details .participant-cell{font-size:10px}
 .mobile-roster-details #nextPlayer{min-height:44px;padding:10px 13px;font-size:12px}
 .mobile-roster-details #sessionExport{min-width:44px;min-height:44px;margin-left:8px}
 .mobile-play-sheet{display:grid;position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));height:42dvh;min-height:220px;max-height:370px;grid-template-rows:46px minmax(0,1fr);background:#fff9effa;border:1px solid #dbc9ae;border-radius:19px;box-shadow:0 9px 30px #61432926;z-index:6;overflow:hidden;transition:height .18s ease}
 .mobile-play-sheet[data-sheet=expanded]{height:min(68dvh,calc(100dvh - 250px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));max-height:none;min-height:0}
 .mobile-play-sheet[data-sheet=collapsed]{height:54px;min-height:54px;max-height:54px;grid-template-rows:52px}
 .mobile-play-sheet[data-mode=turn]:not([data-sheet=collapsed]){height:154px;min-height:154px;max-height:154px}
 .mobile-play-head{display:flex;align-items:center;border-bottom:1px solid #ded0bb;min-width:0;background:#fbf1e1}
 .mobile-play-head button{border:0;background:transparent;color:#69533d;min-height:44px}
 .mobile-play-collapse{display:flex;align-items:center;gap:8px;flex:1;min-width:0;text-align:left;padding:4px 11px}
 .mobile-play-chevron{flex:none;font-size:23px;line-height:1}
 .mobile-play-summary{display:block;min-width:0}
 .mobile-play-summary small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 8px/1.3 'Segoe UI',sans-serif;letter-spacing:1px;color:#967957}
 .mobile-play-summary strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12px/1.4 'Segoe UI',sans-serif}
 .mobile-play-expand{flex:none;min-width:60px;padding:4px 10px;font:600 11px/1.3 'Segoe UI',sans-serif;border-left:1px solid #e1d1b7!important}
 .mobile-play-panels{min-height:0;overflow:hidden}
 .mobile-play-sheet[data-sheet=collapsed] .mobile-play-panels{display:none}
 body.mobile-play #mobilePlayPanels>.mobile-play-panel{display:none!important}
 body.mobile-play #mobilePlayPanels>.mobile-play-panel.mobile-panel-active:not([hidden]){display:grid!important;grid-template-rows:minmax(0,1fr) auto;position:relative!important;inset:auto!important;transform:none!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;overflow:hidden!important;animation:none!important}
 .mobile-panel-content{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c7ad8d #f7eddf;padding:12px 14px 14px;touch-action:pan-y;scroll-padding:12px;}
 .mobile-panel-content:focus-within{scroll-behavior:auto}
 .mobile-panel-content::-webkit-scrollbar{width:4px}
 .mobile-panel-content::-webkit-scrollbar-thumb{background:#c7ad8d;border-radius:4px}
 body.mobile-play .mobile-panel-content>.step-head,body.mobile-play #finaleToggle{display:none}
 body.mobile-play .mobile-panel-content>.step-body{display:block!important}
 body.mobile-play .mobile-panel-content h2{font:24px/1.08 Georgia,serif;letter-spacing:-.5px;margin:0 0 10px}
 body.mobile-play .mobile-panel-content p,body.mobile-play .mobile-panel-content #stepSetup{font-size:12px;line-height:1.45;margin:8px 0 12px;color:#857055}
 body.mobile-play .mobile-panel-content .step-task{font:21px/1.28 Georgia,serif;color:#675139;margin:12px 0 10px}
 body.mobile-play .mobile-panel-content .step-private{font-size:10px;color:#9c8465;margin-bottom:5px}
 body.mobile-play .mobile-panel-content .eyebrow{font-size:8px}
 body.mobile-play .step-methods{margin:10px 0;gap:5px}
 body.mobile-play .step-methods button,body.mobile-play .mac-tabs button{min-height:44px;font-size:11px;line-height:1.25;padding:7px 5px;white-space:normal}
 body.mobile-play .mobile-panel-content .mac-tabs{position:static;flex:none;top:auto;}
 body.mobile-play .mobile-panel-content .reflection{margin:10px 0 0;padding:0;overflow:visible;}
 body.mobile-play .mobile-panel-content .mac-art{float:none;width:100%;height:auto;aspect-ratio:3/2;margin:9px 0 11px}
 body.mobile-play .mobile-panel-content .mac-art img:not(.mac-pawn-preview):not(.mac-detail-image){display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain}
 body.mobile-play .mobile-panel-content details summary{min-height:44px;padding:12px 0;font-size:12px}
 body.mobile-play .mobile-panel-content .text-button{min-height:44px;padding:9px 2px;font-size:11px}
 body.mobile-play .mobile-panel-actions{padding:8px 12px calc(8px + env(safe-area-inset-bottom));margin:0;max-height:135px;min-height:60px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;border-top:1px solid #ded0bb;background:#fffaf2;scrollbar-width:thin;scroll-padding:8px}
 body.mobile-play .step-footer{display:flex;gap:7px;flex-wrap:nowrap;align-items:stretch}
 body.mobile-play .step-footer .primary-button{flex:1;min-width:0;min-height:44px;font-size:12px;line-height:1.25;padding:8px 10px}
 body.mobile-play .step-footer .text-button{width:76px;flex:none;min-height:44px;font-size:10px;line-height:1.3;padding:5px}
 body.mobile-play .mobile-panel-actions .action-button{width:100%;min-height:48px;font-size:12px;line-height:1.3;padding:10px 12px;gap:8px;margin:0;box-shadow:none}
 body.mobile-play .mobile-panel-actions .action-button small{font-size:10px;line-height:1.25;text-align:right}
 body.mobile-play #routeActions{display:grid;gap:7px}
 body.mobile-play .final-actions{display:flex;flex-direction:row;gap:10px;align-items:center}
 body.mobile-play .final-actions .primary-button{flex:1;min-height:44px;font-size:11px;padding:10px}
 body.mobile-play .final-actions .text-button{min-height:44px;max-width:100px;font-size:11px}
 body.mobile-play .mobile-panel-content .finale-top{display:none}
 body.mobile-play #finale.mobile-panel-active>.mobile-panel-content{display:block!important}
 body.mobile-play #finale.mobile-panel-active>.final-actions{display:flex!important}
 body.mobile-play .mobile-panel-content .finale h2,body.mobile-play .mobile-panel-content #finalSummary{display:block!important}
 body.mobile-play #finalSummary{font-size:12px!important;line-height:1.4;margin:10px 0!important}
 body.mobile-play #turnDock .mobile-panel-content{display:flex;align-items:center;gap:10px;padding:8px 12px;overflow:hidden}
 body.mobile-play #turnDock .turn-detail{flex:1;min-width:0}
 body.mobile-play #turnDock .turn-detail .eyebrow,body.mobile-play #turnDock .turn-detail strong{display:none}
 body.mobile-play #turnDock .turn-detail p{font-size:11px;line-height:1.4;margin:0;max-width:140px}
 body.mobile-play #turnDock .roll-button{min-height:48px;padding:12px;gap:8px;border-radius:12px}
 body.mobile-play #turnDock .roll-button>span:nth-child(2){font-size:11px}
 body.mobile-play #turnDock .roll-button small{font-size:6px}
 body.mobile-play #turnDock .move-count{min-width:90px}
 body.mobile-play #turnDock .move-count b{font-size:30px}
 body.mobile-play .mobile-panel-content .mac-dialogue{margin:10px 0 6px}
 body.mobile-play .mac-dialogue button{min-height:44px;padding:8px 10px;font-size:11px}
 body.mobile-play .md-perspective{display:flex;flex:1;min-width:0}
 body.mobile-play .md-perspective button{flex:1;min-width:44px;font-size:10px;padding:7px 5px}
 body.mobile-play .md-palette{max-height:176px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;grid-template-columns:repeat(4,minmax(0,1fr));padding-bottom:5px}
 body.mobile-play .md-palette .md-role{min-height:84px;min-width:44px;font-size:10px;padding:6px 3px}
 body.mobile-play .md-palette-tabs{display:flex;gap:6px;margin:8px 0}
 body.mobile-play .md-palette-tabs button{flex:1;min-height:44px}
 body.mobile-play .md-family select{min-height:44px;font-size:14px;padding:9px}
 body.mobile-play .md-family-fields label,body.mobile-play .md-family-response{font-size:12px}
 body.mobile-play .md-edit-help{flex-wrap:wrap}
 body.mobile-play .mac-dialogue .md-question{font:15px/1.4 Georgia,serif}
 body.mobile-play .mac-lens-controls{gap:7px;flex-wrap:wrap}
 body.mobile-play .mac-lens-toggle{min-height:44px;font-size:11px;padding:8px}
 body.mobile-play .mac-lens-note{font-size:10px}
 body.mobile-play dialog:not(.lgr-dice-dialog){position:fixed;inset:calc(8px + env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));width:auto;max-width:none;max-height:none;height:auto;margin:0;padding:24px 18px;overflow-y:auto;overscroll-behavior:contain;border-radius:19px}
 body.mobile-play dialog:not(.lgr-dice-dialog) .dialog-close{position:sticky;top:0;float:right;right:auto;margin:-10px -5px 0 0;z-index:10;width:44px;height:44px;border-radius:50%;background:#fff9efed;font-size:28px}
 body.mobile-play dialog h2{font-size:30px;margin:22px 0 16px}
 body.mobile-play dialog .primary-button,body.mobile-play dialog .text-button{min-height:44px}
 body.mobile-play #artDialog{display:none;grid-template-rows:auto auto minmax(100px,1fr) auto auto;gap:10px;padding:14px;height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:hidden}
 body.mobile-play #artDialog[open]{display:grid}
 body.mobile-play #artDialog .dialog-close{position:absolute;top:5px;right:5px;margin:0;float:none;background:#fff9ef}
 body.mobile-play #artDialog #artLayer{min-height:32px;display:flex;align-items:center;padding-right:50px;font-size:9px}
 body.mobile-play #artDialog h2{font:25px/1.15 Georgia,serif;margin:0;padding-right:4px;max-height:88px;overflow-y:auto}
 body.mobile-play #artImage{width:100%;height:100%;max-height:none;object-fit:contain;aspect-ratio:auto;border-radius:11px}
 body.mobile-play #artQuestion{font:17px/1.4 Georgia,serif;margin:0;max-height:18dvh;overflow-y:auto}
 body.mobile-play #artDone{width:100%;min-height:48px;margin:0;font-size:12px}
 body.mobile-play .board-label{font-size:6px}
 body.mobile-play .other-pawn-label,body.mobile-play .pawn-label{font-size:7px}
}
@media(max-width:350px){
 body.mobile-play .masthead h1{font-size:13px}
 body.mobile-play .tools{right:3px}
 .mobile-play-status>button{font-size:10px;padding:7px 9px}
 .mobile-resources-toggle{max-width:146px}
 body.mobile-play .mobile-panel-content{padding:10px 12px}
 body.mobile-play .mobile-panel-content h2{font-size:22px}
 body.mobile-play .step-methods button{font-size:10px}
 body.mobile-play .step-footer .primary-button{font-size:11px}
 body.mobile-play .md-family-fields{grid-template-columns:1fr}
}
@media(max-height:500px) and (max-width:1100px) and (orientation:landscape){
 body.mobile-play .masthead{top:calc(9px + env(safe-area-inset-top))}
 body.mobile-play .tools{right:calc(min(40vw,350px) + 16px);top:calc(3px + env(safe-area-inset-top))}
 .mobile-play-status{top:calc(47px + env(safe-area-inset-top));right:calc(min(40vw,350px) + 16px)}
 .mobile-play-sheet{left:auto;top:calc(8px + env(safe-area-inset-top));right:calc(8px + env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));height:auto!important;min-height:0!important;max-height:none!important;width:min(40vw,350px);grid-template-rows:46px minmax(0,1fr)}
 .mobile-play-sheet[data-sheet=expanded]{width:47vw}
 .mobile-play-sheet[data-sheet=collapsed]{top:auto;bottom:calc(8px + env(safe-area-inset-bottom));height:54px!important;min-height:54px!important;max-height:54px!important}
 .mobile-play-sheet[data-mode=turn]:not([data-sheet=collapsed]){top:auto;height:154px!important}
 body.mobile-play .mobile-panel-content h2{font-size:22px}
 body.mobile-play #artDialog{grid-template-columns:minmax(0,1fr) minmax(200px,.8fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:18px}
 body.mobile-play #artLayer{grid-column:2;grid-row:1}
 body.mobile-play #artTitle{grid-column:2;grid-row:2;align-self:start;max-height:80px;font-size:23px}
 body.mobile-play #artImage{grid-column:1;grid-row:1/4}
 body.mobile-play #artQuestion{grid-column:2;grid-row:2;align-self:end;max-height:calc(100dvh - 190px);font-size:15px}
 body.mobile-play #artDone{grid-column:2;grid-row:3}
}
@media(prefers-reduced-motion:reduce){.mobile-play-sheet{transition:none}}
