/* Browser-only controls; desktop artwork and presentation come from the PC client. */
:root{--serif:Georgia,"Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP",serif}
.mansion-game .pin-button{display:flex;align-items:center;justify-content:center;flex:none;width:30px;min-height:32px;padding:4px;border:0;color:#796039;background:transparent}
.mansion-game .pin-button[aria-pressed=true]{color:#fff0bf;background:#20462e;border-radius:6px}
.mansion-game .pinned-clue{display:none}
.mansion-game .pinned-clue.has-pin{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-top:6px;background:#f2e4c3;color:#302518;border:1px solid #b49551;border-radius:12px 3px;font:700 14px/1.5 var(--serif);flex-shrink:0}
.pinned-clue>span{flex:1}.pinned-clue>svg{flex:none}.pinned-clue button{padding:2px 9px;min-height:30px}
@media(max-width:900px){
  html.browser-client,html.browser-client body{min-width:0!important;width:100%;overflow-x:hidden}
  body{overflow-y:auto!important}
  .workspace{margin-left:0!important;min-height:100dvh}
  .presentation-workspace>.topbar,body[data-screen=game][data-appearance=pawns] .topbar{height:auto!important;min-height:0!important;flex-wrap:wrap!important;padding:6px 8px!important;gap:5px!important;align-items:center!important}
  .brand{font-size:24px!important;padding:4px 8px!important;max-width:65%}.header-case{font-size:12px!important;padding:3px 7px!important}.header-rules{display:none!important}.header-actions{width:100%;justify-content:flex-end;gap:5px}.header-actions .nav-button{font-size:12px;min-height:33px;padding:4px 8px}.header-actions .nav-button span{display:inline}.top-meta{display:none}
  .mansion-game{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:4px 7px 85px!important}
  .mansion-game .investigation-layout{display:block!important;height:auto!important;min-height:0!important}
  .mansion-game .placement-pane{display:flex!important;min-height:0;overflow:visible}
  .mansion-game.mobile-clues .placement-pane,.mansion-game.mobile-board .clues-pane{display:none!important}
  .mansion-game .mansion-roof{height:55px!important;min-height:50px!important}
  .roof-compass{width:46px!important;height:46px!important;top:-46px!important;right:2px!important}
  .mansion-game .mansion-board{height:410px!important;min-height:410px!important;flex:none!important;padding:8px 5px!important;gap:12px 5px!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
  .mansion-game .room{min-width:0;min-height:0!important;height:auto!important;padding:0!important}
  .mansion-game .room-title{font-size:11px!important;width:90%!important;min-height:22px!important;padding:2px!important}
  html[lang=en] .mansion-game .room-title{font-size:10px!important;width:94%!important}
  .mansion-game .crime-badge{font-size:9px!important;top:25px!important;gap:2px;padding:2px 3px;min-height:20px}.mansion-game .crime-badge .ui-icon{width:10px;height:10px}
  .mansion-game .room .person{height:122px!important;max-height:140px!important;min-width:0!important}
  .mansion-game .room .person-name{font-size:8px!important;padding:2px 0!important;min-height:18px!important;white-space:nowrap}
  .mansion-game .room .person[data-person=Christina] .person-name{font-size:6.5px!important}
  .architecture-column{width:13px!important}
  .mansion-game .placement-controls{height:auto!important;min-height:70px;display:flex!important;flex-wrap:wrap;gap:4px;padding:6px!important}
  .selection-status{width:100%;font-size:12px!important}.placement-buttons{display:flex;width:100%;gap:4px!important}.placement-buttons button{min-height:36px!important;font-size:12px!important;padding:5px 7px!important}.placement-buttons .confirm-placement{flex:1}
  .mansion-game .suspect-tray,.mansion-game .suspect-tray:has(.person.portraits){display:block!important;height:auto!important;min-height:75px!important;padding:8px!important;margin-top:7px}
  .mansion-game .tray-heading{display:flex!important;align-items:center;justify-content:space-between;width:100%!important;min-width:0!important;border-right:0!important;padding:4px!important;font-size:12px}.tray-heading h2{font-size:14px!important}
  .mansion-game .tray-people{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(64px,1fr))!important;align-items:start;gap:6px!important;overflow:visible!important;padding:4px!important}
  .mansion-game .tray-people .person{width:100%!important;min-width:0!important;max-width:100%!important}
  .mansion-game .tray-people .person-name{font-size:10px!important}.mansion-game .tray-people .person[data-person=Christina] .person-name{font-size:8px!important}.all-placed{grid-column:1/-1;font-size:12px!important}
  .mansion-game .clues-pane{height:calc(100dvh - 235px)!important;min-height:360px!important;max-height:none!important;padding:12px 9px!important;overflow:hidden}
  .mansion-game .clues-heading{padding:8px 5px!important}.mansion-game .clues-heading h2{font-size:27px!important}.mansion-game .clue-memo{font-size:11px!important}.mansion-game .clue-list{min-height:150px!important;max-height:none!important;flex:1;padding:0 5px!important}.mansion-game .clue-text{font-size:16px!important;line-height:1.65}.mansion-game .clue{padding:11px 0!important}.clue label{gap:5px}.mansion-game .clue-footer{padding:8px 3px!important;flex-shrink:0}.clue-pagination button{min-width:35px;min-height:35px}
  .mansion-game .game-toolbar{position:static!important;display:flex!important;flex-wrap:wrap;width:100%!important;gap:7px!important;padding:8px 0!important;margin:0!important;height:auto!important}.mansion-game .game-toolbar>div{display:flex!important;width:100%!important;justify-content:space-between}.game-toolbar .memo-reminder{display:none!important}.mansion-game .game-toolbar>div button{font-size:12px!important}.mansion-game .game-toolbar .verify{width:100%!important;min-height:44px!important;font-size:19px!important}
  .mansion-game .mobile-tabs{display:flex!important;position:fixed;inset:auto 0 0;z-index:30;gap:6px;padding:6px 8px max(6px,env(safe-area-inset-bottom));background:#102c22f5;border-top:1px solid #bd9c56}.mobile-tabs button{flex:1;min-height:44px;font-size:15px}.mobile-tabs button.active{color:#ffe3a0;background:#315039}.mobile-tabs small{font-size:11px}
  .casebook{padding:15px 10px}.case-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.case-card{min-width:0!important;padding:12px!important}.case-number{font-size:36px!important}.filters{flex-wrap:wrap}.section-bar{display:block}
  .settings-dialog{padding:15px!important;max-height:85dvh!important;overflow:auto}.settings-tabs{flex-wrap:wrap}.settings-columns,.settings-layout{display:block!important}.setting-row{flex-wrap:wrap;gap:6px}.setting-row select{max-width:100%;min-width:140px}
  .document-page.illustrated-help{padding:12px}.help-grid{grid-template-columns:1fr!important;grid-auto-rows:310px}.help-topline{flex-wrap:wrap;gap:6px}.help-topline>strong{font-size:18px!important}
  dialog{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 30px)!important}
  dialog:has(.result-v3){width:calc(100vw - 20px)!important;margin:0!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;overflow:auto!important}
  .result-dialog.result-v3.success,.result-dialog.result-v3.incorrect{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;padding:13px!important;gap:8px!important}
  .result-v3 .result-person{height:135px!important;min-height:0!important;flex:none!important;display:flex!important;align-items:center;justify-content:center;padding:0!important}
  .result-v3.success .result-portrait,.result-v3.incorrect .result-portrait{height:135px!important;width:125px!important;max-width:125px!important;flex:none!important;border-radius:12px!important}
  .result-v3.incorrect .result-person{height:180px!important}.review-person-label{font-size:11px!important}.result-v3.incorrect .culprit-name{font-size:16px!important;min-height:25px!important;padding:3px!important}
  .result-v3.success .result-message,.result-v3.incorrect .result-message{padding:6px!important;gap:6px!important}
  .result-v3 .eyebrow{font-size:11px!important}.result-v3.success .result-title{min-height:44px!important}.result-v3.success h2{font-size:32px!important}.result-v3.success .result-laurel{height:43px!important;width:25px!important}.result-v3 .result-case{font-size:14px!important}
  .result-v3.success .culprit-name{min-height:45px!important;padding:7px!important}.result-v3.success .culprit-name>span{font-size:clamp(13px,calc(91cqw / var(--name-units)),24px)!important}.result-v3.success .result-summary{min-height:64px!important;grid-template-columns:minmax(0,1fr) 55px!important}.result-v3.success .result-summary p{font-size:13px!important}.result-v3.success .clear-medallion{width:55px!important;height:65px!important}
  .result-v3 .button-row{gap:6px!important}.result-v3 .button-row>button{font-size:14px!important;min-height:40px!important;padding:7px!important}
  .result-v3.incorrect h2{font-size:21px!important;white-space:normal!important}.result-v3.incorrect .review-prompt,.result-v3.incorrect .review-kept{font-size:13px!important;white-space:normal!important}.review-eyebrow{flex-wrap:wrap;justify-content:center}
}
/* Portrait phones use a vertical document flow, independent of desktop flex sizes. */
@media(max-width:900px){
 html.browser-client body,body[data-screen=game],.presentation-workspace{height:auto!important;min-height:100dvh!important;max-height:none!important;overflow-y:auto!important}
 html.browser-client .mansion-game{width:100%!important;margin:0!important;max-width:100%!important;position:static!important}
 html.browser-client .mansion-game .investigation-layout{width:100%!important;max-width:100%!important;position:static!important;flex:none!important}
 html.browser-client .mansion-game .placement-pane{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;position:static!important;flex:none!important}
 html.browser-client .mansion-game.mobile-clues .placement-pane{display:none!important}
 html.browser-client .mansion-game .mansion-building{display:block!important;position:relative!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;flex:none!important;filter:none!important}
 html.browser-client .mansion-game .mansion-roof{display:block!important;width:100%!important;height:43px!important;min-height:43px!important;margin:0!important;position:relative!important}
 html.browser-client .mansion-game .mansion-roof>svg:not(.roof-compass){display:block;width:100%!important;height:43px!important}
 html.browser-client .mansion-game .roof-compass{display:none!important}
 html.browser-client .mansion-game .mansion-board{display:grid!important;width:100%!important;max-width:100%!important;height:360px!important;min-height:360px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;position:relative!important;flex:none!important;margin:0!important}
 .mansion-board>.floor-label{display:none!important}.mansion-board>.architecture-columns{position:absolute!important;inset:0!important}
 html.browser-client .mansion-game .room{width:auto!important;max-width:100%!important;height:auto!important;min-width:0!important;align-self:stretch;flex:none!important;position:relative!important;overflow:hidden!important}
 html.browser-client .mansion-game .room-people{position:absolute!important;inset:32px 1px 2px!important;height:auto!important;max-height:none!important;width:auto!important}
 html.browser-client .mansion-game .room .person-slot{height:100%!important}
 html.browser-client .mansion-game .room .person{height:112px!important;max-height:112px!important;min-width:0!important;padding:0!important}
 html.browser-client .mansion-game .placement-controls{width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;position:static!important;flex:none!important;display:block!important;padding:7px!important;background:#183c25!important}
 html.browser-client .mansion-game .selection-status{width:100%!important;max-width:100%!important;flex:none!important;height:auto!important;min-height:24px!important;padding:0 0 4px!important}
 html.browser-client .mansion-game .placement-buttons{width:100%!important;height:auto!important;position:static!important;flex:none!important;display:flex!important;flex-wrap:wrap!important;justify-content:space-between}
 html.browser-client .mansion-game .placement-buttons button{font-size:12px!important;min-height:40px!important}
 html.browser-client .mansion-game .suspect-tray,html.browser-client .mansion-game .suspect-tray:has(.person.portraits){width:100%!important;position:static!important;flex:none!important;max-height:none!important}
 html.browser-client .mansion-game .tray-heading{height:auto!important;min-height:29px!important;max-height:34px!important;flex:none!important}
 html.browser-client .mansion-game .tray-people{display:flex!important;flex-wrap:nowrap!important;width:100%!important;height:137px!important;overflow-x:auto!important;overflow-y:hidden!important;align-items:flex-start!important;gap:7px!important;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html.browser-client .mansion-game .tray-people .person{width:76px!important;min-width:76px!important;max-width:76px!important;height:123px!important;flex:0 0 76px!important;grid-template-rows:minmax(0,1fr) 25px!important}
 html.browser-client .mansion-game .tray-people .person .portrait-art{width:100%!important;height:98px!important;max-height:98px!important;flex:none!important}
 html.browser-client .mansion-game .tray-people .person .person-name{font-size:11px!important;height:25px!important;min-height:25px!important}
 html.browser-client .mansion-game .tray-people .person[data-person=Christina] .person-name{font-size:8px!important}
 html.browser-client .mansion-game .clues-pane{position:relative!important;width:100%!important;display:flex!important;flex-direction:column!important;margin:0!important;border-radius:25px 8px!important}
 html.browser-client .mansion-game.mobile-board .clues-pane{display:none!important}
 html.browser-client .mansion-game .clues-pane .clue-text{font-size:16px!important;line-height:1.7!important}
 html.browser-client .mansion-game .game-toolbar{right:auto!important;bottom:auto!important;left:auto!important;top:auto!important;max-height:none!important;min-height:0!important;flex:none!important}
 html.browser-client .mansion-game .game-toolbar>div button{min-height:40px!important;flex:1!important}
 html.browser-client .mansion-game .mobile-tabs{height:auto!important;max-height:70px!important;width:100%!important}
 html.browser-client .topbar .header-actions{height:auto!important;flex:none!important}.header-actions .nav-button{width:auto!important;flex-direction:row!important}.header-actions .nav-button .ui-icon{width:17px;height:17px}
 html.browser-client .brand{font-size:22px!important;white-space:nowrap!important}.brand:before,.brand:after{display:none!important}
 body:before,body:after{filter:none!important;backdrop-filter:none!important}.mansion-building,.room-scene,.portrait-art{filter:none!important}
}
@media(max-width:900px){
 html.browser-client .settings-content{height:auto!important;max-height:55dvh!important;overflow-y:auto!important;padding:6px!important;min-width:0!important}
 html.browser-client .settings-dialog{width:100%!important;min-width:0!important;padding:12px!important}
 html.browser-client .settings-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px}.settings-tabs button{font-size:12px!important;min-width:0!important;padding:7px 2px!important}
 html.browser-client .appearance-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.appearance-choice{min-width:0!important;padding:8px!important}.appearance-choice>span{font-size:14px!important}
 html.browser-client .language-preview{display:block!important;font-size:12px!important}.language-preview small{font-size:11px!important}.settings-actions{gap:6px!important;padding:8px 0!important}.settings-actions button{font-size:14px!important;min-height:40px!important;padding:7px 10px!important}
}
/* Multiple selected clues: inline on desktop, a non-modal bottom drawer on phones. */
.tray-count-label{display:none}
.clue-drawer{margin-top:7px;border:1px solid #b99a58;border-radius:12px 4px;background:#183b29;color:#f5e7c1;min-width:0;flex-shrink:0}
.pin-drawer-handle{display:flex;align-items:stretch;min-height:43px;touch-action:none}
.pin-drawer-handle>button{position:relative;flex:1;min-width:0;min-height:43px;padding:8px 10px;border:0;gap:8px;font:700 14px/1.4 var(--serif);color:#f6e7bb}
.pin-drawer-handle>button>span:nth-last-child(2){flex:1;text-align:left}.pin-drawer-handle>button[data-action=pin-drawer-close]{flex:0 0 42px;padding:5px}
.pin-grip{display:none}
#pin-drawer-body[hidden]{display:none!important}
.pin-drawer-list{max-height:210px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 10px;background:#f4e7c9;color:#302619;touch-action:pan-y}
.pinned-item{display:flex;align-items:flex-start;gap:6px;padding:10px 0;border-bottom:1px solid #b59b6977}
.pinned-item>label{display:flex;align-items:flex-start;gap:8px;flex:1;min-width:0;font:600 15px/1.65 var(--serif)}
.pinned-item input{flex:none;width:19px;height:19px;margin:4px 0 0;accent-color:#2b5737}
.pinned-item>button{flex:none;min-height:35px;width:32px;padding:5px;color:#5e482d;border:0}
.pinned-item.checked>label>span{color:#7b7d67;text-decoration:line-through}.pin-empty{margin:0;padding:12px 2px;font-size:14px;line-height:1.7}
#pin-drawer-body>footer{display:flex;justify-content:flex-end;padding:5px 10px;border-top:1px solid #b99a58}
#pin-drawer-body>footer button{font-size:13px;min-height:35px;border:0;padding:4px 8px;color:#f5e7bc}
@media(max-width:900px){
 html.browser-client .mansion-game .tray-heading{max-width:none!important;flex-direction:row!important;justify-content:center!important;gap:0!important;margin:0 0 4px!important;padding:0!important;height:auto!important;max-height:none!important;min-height:29px!important}
 html.browser-client .mansion-game .tray-heading h2{display:none!important}
 html.browser-client .mansion-game .tray-heading>span{display:inline-flex!important;align-items:center;justify-content:center;gap:3px;font-size:14px!important;line-height:1.3!important;padding:3px 12px!important;margin:0!important;min-height:28px;white-space:nowrap}
 .tray-count-label{display:inline}
 /* Only the upper-left ornamental corner remains on phone panels. */
 html.browser-client .paper-panel:before,html.browser-client .mansion-game .clues-pane:before,html.browser-client .mansion-game .suspect-tray:before,html.browser-client .settings-dialog:before,html.browser-client .document-page:before,html.browser-client .dialog-body:before{display:none!important;content:none!important}
 html.browser-client .result-v3 .result-corner:not(.tl){display:none!important}
 html.browser-client .mansion-game{padding-bottom:145px!important}
 html.browser-client .mansion-game .clue-drawer{position:fixed;z-index:40;left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));width:100%;margin:0;border:1px solid #c9a65c;border-bottom:0;border-radius:15px 15px 0 0;box-shadow:0 -3px 12px #0005;max-height:calc(50dvh + 12px);overflow:hidden}
 html.browser-client .pin-drawer-handle{min-height:48px}
 html.browser-client .pin-drawer-handle>button{min-height:48px;padding-top:13px;font-size:14px}
 .pin-grip{display:block;position:absolute;top:5px;left:calc(50% - 17px);width:34px;height:3px;background:#dbc18b;border-radius:3px;pointer-events:none}
 html.browser-client .pin-drawer-list{max-height:min(36dvh,320px);overflow-y:auto;font-size:15px;padding:3px 12px}
 html.browser-client .pinned-item>label{font-size:15px;line-height:1.65}
 html.browser-client .mansion-game .mobile-tabs{min-height:58px!important;height:calc(58px + env(safe-area-inset-bottom))!important;max-height:none!important;box-sizing:border-box!important;padding:5px 8px calc(5px + env(safe-area-inset-bottom))!important;align-items:stretch}
 html.browser-client .mansion-game .mobile-tabs button{min-height:44px!important}
}
