/* style.css — preserved cascade order */
@charset "UTF-8";
:root{color-scheme:dark;--ink:#edf0e5;--muted:#a7b6a9;--green:#15372e;--deep:#0c1e1a;--gold:#d4b77c;--line:#53604a;--paper:#efe3c9;--paper-ink:#2e3027;--serif:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif;--sans:"Segoe UI","Yu Gothic UI","Meiryo",sans-serif;font-family:var(--sans);font-size:16px;background:var(--deep);color:var(--ink)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 55% 0,#26443688,transparent 65%),var(--deep)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:transparent;border:1px solid #7e87624d;border-radius:5px;padding:.6rem .9rem;display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px}button:hover:not(:disabled){border-color:var(--gold);background:#d4b77c12}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}button.primary{background:var(--gold);color:#17271d;border-color:var(--gold);font-weight:700}button.primary:hover{background:#e5ce9b}svg{flex-shrink:0}h1,h2,p{margin-top:0}h1,h2{font-family:var(--serif);font-weight:500}p{line-height:1.8}h1{font-size:2rem;line-height:1.35}h2{font-size:1.35rem}small{font-size:.8rem}#app{min-height:100vh}.loading{height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;font:italic 3rem var(--serif);color:var(--gold);gap:1.5rem}.loading span{font:1rem var(--sans);color:var(--muted)}
.nav-button{border:0;border-radius:0;flex-direction:column;width:100%;padding:.85rem .1rem;color:var(--muted);position:relative;gap:.5rem}.nav-button span{font-size:.72rem}.nav-button.active{color:var(--gold);background:#d4b77c0d}.nav-button.active:before{content:"";width:3px;position:absolute;left:0;top:8px;bottom:8px;background:var(--gold)}.workspace{margin-left:88px;min-height:100vh}.topbar{height:99px;margin:0 36px;border-bottom:1px solid #c3ac7138;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font:2.25rem var(--serif);letter-spacing:-1.1px;padding:0;color:#f0e6c9;border:0;min-height:auto}.brand em{font-weight:400;color:var(--gold);margin-left:.15rem}.top-meta{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.edition{font-size:.72rem;letter-spacing:.14em;color:var(--gold)}.saved{color:#a3b79f;font-size:.75rem}.saved:before{content:"✓";padding-right:5px}.saved.error{color:#efba8c}.eyebrow{font-size:.72rem;letter-spacing:.16em;color:var(--gold);font-weight:600;margin-bottom:12px}.quiet,.footnote{color:var(--muted);font-size:.85rem}.footnote{margin:26px 0;line-height:1.8}
.casebook{max-width:1440px;margin:auto;padding:36px}.progress-number{display:flex;align-items:center;gap:10px;white-space:nowrap;color:var(--gold)}.progress-number strong{font:3.1rem var(--serif)}.progress-number span{font:1.15rem var(--serif);color:#acb5a1}.progress-number small{display:block;font:.7rem var(--sans);margin-top:5px}.overall-track{height:3px;background:#acb58c26;flex:1;position:relative}.overall-track i{display:block;height:100%;background:var(--gold)}.resume-card{display:flex;justify-content:flex-start;gap:18px;width:100%;text-align:left;background:#254f3c50;padding:18px 22px;border-color:#8a956050;margin-bottom:28px}.resume-card>svg{color:var(--gold)}.resume-card span{display:flex;flex-direction:column;gap:6px;flex:1}.resume-card small{color:var(--muted)}.resume-card strong{font-weight:500}.resume-card b{font-size:.85rem;color:var(--gold)}.section-bar{display:flex;justify-content:space-between;align-items:center;margin:15px 0 23px;gap:15px}.filters{display:flex;gap:8px}.filters button{border-color:transparent;border-radius:30px;color:var(--muted);padding:9px 16px}.filters button.active{color:var(--gold);border-color:#a48c554f;background:#c8ad6e12}.filters small{font-family:var(--serif);opacity:.7}.case-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.case-card{display:block;text-align:left;border:1px solid #b29e6438;border-radius:4px;background:linear-gradient(145deg,#24423570,#18312840);padding:18px 20px;position:relative;overflow:hidden;min-height:200px;transition:border-color .15s,transform .15s}.case-card:hover{transform:translateY(-2px)}.case-card:after{content:"";position:absolute;width:50px;height:50px;right:-27px;top:-27px;border:1px solid #cbb37342;transform:rotate(45deg)}.case-card.solved{background:#264737;border-color:#718158}.case-card.active{border-color:#b89f5d}.case-card-top{display:flex;justify-content:space-between;align-items:center;gap:6px}.case-tier{font-size:.75rem;color:var(--gold)}.state-tag{font-size:.65rem;color:#98a598;display:inline-flex;gap:3px;align-items:center}.state-tag.solved{color:#c5d8aa}.state-tag.active{color:#e1c18b}.case-number{font:3.3rem var(--serif);color:#e2dcc6;line-height:1.3;margin:14px 0 7px}.case-number span{font: .7rem var(--sans);margin-left:10px;color:var(--muted)}.case-source{font-size:.77rem;color:var(--muted);min-height:25px}.case-card-bottom{border-top:1px solid #9a9f7030;margin-top:13px;padding-top:12px;display:flex;justify-content:space-between;font-size:.75rem;color:#bec8b7}
.game{padding:24px 36px 0;max-width:1840px;margin:auto}.case-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.case-heading .eyebrow{margin-bottom:6px}.case-heading h1{font-size:1.35rem;margin:0;display:flex;align-items:center;gap:12px}.case-heading h1>span{font-size:2rem;line-height:1}.case-heading-meta{display:flex;align-items:center;gap:25px;font-size:.85rem;color:var(--muted)}.atmosphere{letter-spacing:.08em;font-size:.75rem}.solved-seal{display:inline-flex;align-items:center;gap:3px;color:#c5d8aa;font: .75rem var(--sans);border:1px solid #88965d78;border-radius:20px;padding:5px 9px}.investigation-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(310px,1fr);gap:26px;align-items:stretch}.placement-pane{min-width:0}.board-top{display:flex;justify-content:space-between;color:#c4c8ac;font-size:.75rem;margin-bottom:12px;gap:8px}.compass{color:var(--gold);font-family:var(--serif);white-space:nowrap;letter-spacing:4px}.mansion-board{border:1px solid #b8a16a75;border-radius:5px;padding:20px 10px 10px 24px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 8px;position:relative;background:#302a20;box-shadow:0 6px 24px #0003;isolation:isolate}.floor-label{position:absolute;left:4px;top:26px;writing-mode:vertical-rl;font-size:.65rem;letter-spacing:3px;color:#bca878}.floor-label:nth-of-type(2){top:calc(50% + 17px)}.room{position:relative;min-height:215px;background:#1b302a;border:1px solid #9f885966;border-radius:2px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-direction:column;padding:38px 5px 30px}.room-scene{position:absolute;inset:0;width:100%;height:100%;opacity:.74;pointer-events:none;z-index:-1}.room-title{position:absolute;top:0;left:0;right:0;font-family:var(--serif);font-size:.88rem;text-align:center;padding:8px 4px;line-height:1.2;color:#eee2c3;background:linear-gradient(#12241ded,#18291dbb);border-bottom:1px solid #9e885d4a;z-index:2}.room-title>span{display:block;font:.58rem var(--sans);letter-spacing:.12em;color:#f0d99f;margin-top:5px}.crime-room{border-color:#e2c88d;box-shadow:inset 0 0 18px #efd3971c}.crime-room .room-title{background:linear-gradient(#5a4b2c,#382d1be0)}.crime-marker{position:absolute;bottom:33px;left:12px;width:65%;max-width:155px;opacity:.62;transform:rotate(-5deg);fill:none;stroke:#ded5b7;stroke-width:2;pointer-events:none;z-index:0}.room-people{display:flex;gap:6px;width:100%;align-items:flex-end;justify-content:center;z-index:1}.person{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0;border:1px solid #ba9f6c;background:#504a39;border-radius:5px;overflow:hidden;position:relative;min-height:0;flex-shrink:0;box-shadow:0 3px 9px #0006;touch-action:manipulation}.room .person{width:calc(50% - 4px);max-width:108px;height:143px}.portrait-art{width:100%;height:100%;min-height:0;display:block;background:#514739;flex:1}.person-name{width:100%;padding:5px 1px;background:#e7d8b7;color:#2c3027;font-weight:600;font-size:.71rem;line-height:1.2;white-space:nowrap;text-align:center}.person.selected{border-color:#fff0ae;outline:2px solid #fff0ae;outline-offset:2px}.person.confirmed .person-name{color:#edf1d6;background:#446346}.person.confirmed{border-color:#afc78d}.room .person.pawns{height:150px;background:transparent}.person.pawns .portrait-art{background:#e9d5ad}.room-actions{position:absolute;bottom:0;left:0;right:0;min-height:29px;display:flex;align-items:center;justify-content:center;background:#11241bd4;z-index:2}.room-actions button{border:0;border-radius:0;min-height:29px;width:100%;padding:4px;font-size:.7rem;color:#d8d0b2}.room-actions button:hover{background:#8274465c}.room-count{font-size:.65rem;color:#a7b6a0}.empty-mark{font:1.15rem var(--serif);letter-spacing:.12em;color:#d7d2b8;border:1px solid #b4a57880;padding:10px 7px;background:#152a20c9}.empty-room .room-scene{opacity:.24}.empty-room .room-title{color:#abb29d}.suspect-tray{margin-top:16px;background:#182f2599;border:1px solid #b09d663b;border-radius:4px;padding:12px 13px 0}.tray-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:.75rem;color:var(--muted)}.tray-heading h2{font: .86rem var(--sans);margin:0;color:#d9d9bf}.tray-heading h2 span{color:var(--gold);margin-left:6px}.tray-people{display:flex;gap:9px;min-height:115px;overflow-x:auto;padding:4px 3px 9px;scrollbar-width:thin}.tray-people .person{width:69px;height:104px}.tray-people .person.pawns{height:123px}.tray-people .person-name{font-size:.64rem}.all-placed{display:flex;align-items:center;gap:10px;color:#b8c7a3;font-size:.8rem;min-height:94px}.clues-pane{background:var(--paper);color:var(--paper-ink);border:1px solid #c5ac73;border-radius:5px;display:flex;flex-direction:column;min-height:0;max-height:793px;box-shadow:0 4px 20px #0002}.clues-heading{display:flex;align-items:center;justify-content:space-between;padding:21px 22px 17px;border-bottom:1px solid #bda5727a}.clues-heading .eyebrow{color:#7f6a42;font-size:.62rem;letter-spacing:.12em;margin-bottom:8px}.clues-heading h2{font-size:1.5rem;margin:0}.clues-heading h2>span{font: .9rem var(--sans);margin-left:8px;color:#77694e}.clues-heading>span{font: .85rem var(--serif);color:#77694e}.clue-list{overflow:auto;flex:1;padding:0 17px;scrollbar-width:thin;scrollbar-color:#bba579 transparent;min-height:180px;max-height:640px;overscroll-behavior:contain}.clue{padding:16px 0;border-bottom:1px solid #bda57255;display:flex;align-items:flex-start;gap:5px;position:relative}.clue label{display:flex;align-items:flex-start;gap:10px;flex:1;cursor:pointer}.clue input{accent-color:#3b5c3b;appearance:none;width:17px;height:17px;border:1px solid #8c805f;border-radius:2px;margin:4px 0 0;flex-shrink:0;position:relative;background:#fff5}.clue input:checked{background:#4c6648;border-color:#4c6648}.clue input:checked:after{content:"✓";position:absolute;inset:-2px 0 0;color:white;font-size:14px;text-align:center}.clue-number{font: .85rem var(--serif);color:#8e7751;margin-top:3px;min-width:17px}.clue-text{font-size:1rem;line-height:1.7}.clue.checked .clue-text{color:#7e806c;text-decoration:line-through;text-decoration-color:#acac97}.clue-footer{padding:12px 17px;border-top:1px solid #bda5727a;color:#817451;font-size:.65rem;display:flex;align-items:center;gap:7px}.game-toolbar{display:flex;align-items:center;justify-content:space-between;padding:19px 0;gap:15px}.game-toolbar>div{display:flex;gap:6px}.game-toolbar>div button{font-size:.75rem;border-color:transparent;padding:8px 10px;color:#bbc6b2}.game-toolbar .verify{padding:14px 25px;font-size:1rem}.mobile-tabs{display:none}
.document-page{max-width:920px;margin:0 auto;padding:42px 36px}.document-page h1{margin-bottom:28px}.settings-card{padding:22px 25px;border:1px solid #a99a633b;background:#23403166;border-radius:5px;margin-bottom:18px}.settings-card h2{color:#ded6b8;font-size:1.15rem;margin-bottom:15px}.settings-card p{color:#b9c5af;font-size:.88rem;margin-bottom:0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-bottom:1px solid #b4ae7624;font-size:.95rem}.setting-row:first-child{padding-top:0}.setting-row:last-child{border-bottom:0;padding-bottom:0}select{appearance:none;color:#e5e5ce;background:#122b22;border:1px solid #a99a6361;border-radius:4px;padding:10px 34px 10px 12px;min-width:190px;max-width:62%;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d4b77c'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}input[type=checkbox][role=switch]{accent-color:#cfb77e;width:22px;height:22px}input[type=range]{accent-color:var(--gold);width:190px;max-width:60%}.button-row{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap}.settings-card .button-row{justify-content:flex-start}
dialog{color:#e9e8d2;background:#18392e;border:1px solid #c7ad70;border-radius:8px;max-width:610px;width:calc(100% - 32px);padding:0;box-shadow:0 24px 100px #0009;max-height:90dvh;overflow:auto}dialog::backdrop{background:#030d0cbb;backdrop-filter:blur(3px)}.dialog-body{padding:32px}.dialog-body h2{font-size:1.6rem}.dialog-body p{font-size:.9rem;color:#bdc9b3}.result-dialog{padding:32px;text-align:center;background:radial-gradient(ellipse at 50% 30%,#b49d4930,transparent 70%)}.result-dialog h2{font-size:2rem;color:#e6ce92;margin-bottom:24px}.result-dialog.incorrect h2{font-size:1.5rem;color:#e6dfca}.result-dialog p{color:#c3cdb8;font-size:.9rem}.result-portrait{width:180px;height:245px;margin:0 auto 20px;border:2px solid #c4a765;box-shadow:0 0 0 5px #b6a16b21;border-radius:60px 60px 5px 5px;overflow:hidden}.culprit-name{font:1.6rem var(--serif);color:#eddbac;margin-bottom:22px}.culprit-name small{display:block;font: .7rem var(--sans);letter-spacing:.15em;margin-bottom:7px;color:#bda875}.result-dialog .button-row{justify-content:center;margin-top:25px}.solution-list{margin:20px 0}.solution-list>div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #bda87540;font-size:.85rem}.solution-list strong{font-weight:500;color:var(--gold)}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);max-width:min(90vw,600px);padding:13px 22px;border:1px solid #ad9866;background:#263e30;color:#f3e8c8;border-radius:5px;opacity:0;pointer-events:none;z-index:100;font-size:.9rem;transition:opacity .15s,transform .15s}#toast.visible{opacity:1;transform:translate(-50%,0)}
body[data-time=day] .room-scene{opacity:.95}body[data-time=day] .room{background:#485846}body[data-time=night] .room-scene{opacity:.55}body[data-theme=christmas] .mansion-board{border-color:#b3b58a;background:#203f2e}body[data-theme=christmas] .room-title:before{content:"❧";color:#af6958;position:absolute;left:8px}body[data-theme=christmas] .room-title:after{content:"❧";color:#b9c49c;position:absolute;right:8px;top:8px}body[data-theme=halloween] .mansion-board{border-color:#b48f5a;background:#3a3026}body[data-theme=halloween] .room-title{border-bottom-color:#c58a57}body[data-theme=halloween] .room-title:before{content:"◆";color:#bf8a49;position:absolute;left:8px;font-size:.65rem}
@media(min-width:1600px){.room{min-height:245px}.room .person{height:170px;max-width:123px}.tray-people .person{width:78px;height:115px}.clues-pane{max-height:860px}.clue-list{max-height:710px}.case-grid{gap:22px}.case-card{min-height:215px}}
@media(max-width:1250px){.topbar{margin:0 24px}.game{padding:20px 24px 0}.investigation-layout{gap:17px;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr)}.room{min-height:199px}.room .person{height:128px}.room .person-name{font-size:.62rem}.clue-list{padding:0 13px}.clue label{gap:7px}.clue-text{font-size:.93rem}.casebook{padding:28px}.case-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.case-card{padding:16px}.tray-people{gap:7px}.tray-people .person{width:63px;height:99px}.room-title{font-size:.78rem}}
@media(max-width:1000px){.workspace{margin-left:70px}.topbar{height:85px}.brand{font-size:1.9rem}.edition{font-size:.6rem}.investigation-layout{grid-template-columns:minmax(0,1fr) minmax(290px,.85fr);gap:14px}.mansion-board{padding-left:19px;gap:20px 5px}.room{min-height:180px;padding-left:3px;padding-right:3px}.room .person{height:110px}.room-title{font-size:.7rem}.room-people{gap:4px}.room .person-name{font-size:.52rem}.room .person.pawns{height:120px}.board-top{font-size:.63rem}.tray-people .person{width:58px;height:94px}.clues-heading{padding:17px}.game-toolbar .verify{padding:12px 15px;font-size:.9rem}.game-toolbar>div{gap:0}.game-toolbar>div button{font-size:.65rem;padding:6px}.case-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.case-heading-meta{gap:15px}.atmosphere{font-size:.65rem}}
@media(max-width:760px){.nav-button{width:auto;flex:0 1 auto;flex-direction:row;padding:0 9px;min-height:44px;gap:4px}.nav-button svg{width:18px}.nav-button span{display:none}.nav-button.active:before{width:auto;height:2px;top:auto;bottom:0;left:5px;right:5px}.workspace{margin-left:0}.topbar{height:76px;margin:0 18px;gap:10px}.brand{font-size:1.8rem}.top-meta .edition{display:none}.saved{font-size:.6rem;max-width:90px;text-align:right}.game{padding:17px 12px 82px}.case-heading{padding:0 4px}.case-heading h1{font-size:1.05rem;gap:8px}.case-heading h1>span{font-size:1.6rem}.case-heading .eyebrow{font-size:.59rem}.case-heading-meta{gap:8px;flex-direction:column;align-items:flex-end;font-size:.75rem}.solved-seal{font-size:.6rem;padding:3px 6px}.investigation-layout{display:block}.mobile-board .clues-pane,.mobile-clues .placement-pane{display:none}.clues-pane{height:calc(100dvh - 300px);max-height:none;min-height:320px}.clue-list{max-height:none;padding:0 15px}.clue-text{font-size:1rem}.clue label{gap:9px}.clue{padding:17px 0}.clues-heading{padding:18px}.clues-heading h2{font-size:1.4rem}.clue-footer{font-size:.65rem}.board-top{font-size:.65rem;padding:0 4px}.mansion-board{padding:18px 7px 8px 19px;gap:20px 5px}.floor-label{font-size:.58rem;left:2px}.room{min-height:177px;padding:38px 3px 26px}.room-title{font-size:.73rem;padding:7px 2px}.room-title>span{font-size:.5rem}.room .person{height:104px;max-width:90px;width:calc(50% - 2px)}.room .person-name{font-size:.53rem;padding:5px 1px}.room-people{gap:3px}.room .person.pawns{height:109px}.room-actions button{font-size:.6rem;min-height:30px;padding:3px 0}.room-actions svg{display:none}.empty-mark{font-size:.8rem;letter-spacing:0;padding:8px 5px}.crime-marker{bottom:25px;width:85%;left:5px}.suspect-tray{margin-top:12px;padding:12px 10px 0}.tray-people .person{width:66px;height:100px}.tray-people .person-name{font-size:.62rem}.tray-people .person.pawns{height:120px}.game-toolbar{padding:12px 0;gap:8px;flex-wrap:wrap}.game-toolbar>div{display:flex;justify-content:space-between;width:100%}.game-toolbar>div button{font-size:.72rem;min-height:40px;padding:7px 10px}.game-toolbar .verify{width:100%;min-height:48px;font-size:1rem}.mobile-tabs{position:fixed;bottom:0;left:0;right:0;display:flex;z-index:12;background:#10291fee;border-top:1px solid #bfa56c66;padding:5px 10px max(5px,env(safe-area-inset-bottom));gap:8px;backdrop-filter:blur(8px)}.mobile-tabs button{flex:1;border-color:transparent;min-height:45px;color:#aebda8}.mobile-tabs button.active{background:#bfa56c1c;color:var(--gold);border-color:#bfa56c55}.mobile-tabs small{opacity:.75;font-size:.65rem}.casebook{padding:25px 18px}.resume-card{padding:15px 12px;gap:12px;margin-bottom:20px}.resume-card small{font-size:.7rem}.resume-card strong{font-size:.8rem}.resume-card b{font-size:.7rem;max-width:75px}.section-bar{display:block}.section-bar>.quiet{display:none}.filters{gap:3px;justify-content:space-between}.filters button{padding:8px 11px;font-size:.8rem;gap:5px}.case-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.case-card{padding:15px 14px;min-height:190px}.case-number{font-size:3rem}.state-tag{font-size:.62rem}.case-source{font-size:.7rem}.case-card-bottom{font-size:.7rem}.document-page{padding:28px 18px}.document-page h1{font-size:1.65rem}.settings-card{padding:20px 16px}.setting-row{font-size:.85rem;gap:10px}select{min-width:160px;font-size:.8rem;max-width:65%}.settings-card p{font-size:.8rem}.dialog-body,.result-dialog{padding:25px 22px}.dialog-body h2{font-size:1.35rem}.result-dialog h2{font-size:1.7rem}.result-portrait{width:150px;height:205px}.solution-list>div{flex-direction:column;gap:6px}.button-row button{font-size:.85rem}#toast{bottom:85px;font-size:.83rem;width:max-content;max-width:90vw}.footnote{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.room{isolation:isolate}
@media(min-width:761px) and (min-height:800px){
  .game{height:calc(100dvh - 99px);display:flex;flex-direction:column;padding-top:18px}
  .case-heading{flex-shrink:0;margin-bottom:13px}
  .investigation-layout{flex:1;min-height:0}
  .placement-pane{display:flex;flex-direction:column;min-height:0}
  .board-top{flex-shrink:0;margin-bottom:9px}
  .mansion-board{flex:1;min-height:0;padding-top:15px;gap:18px 8px}
  .room{min-height:120px}
  .room .person{height:clamp(86px,calc((100dvh - 690px)/2),155px)}
  .room .person.pawns{height:clamp(95px,calc((100dvh - 680px)/2),165px)}
  .suspect-tray{flex-shrink:0;margin-top:12px;padding-top:9px}
  .tray-heading{margin-bottom:6px}
  .tray-people{min-height:90px;padding-bottom:7px}
  .tray-people .person{width:64px;height:85px}
  .tray-people .person.pawns{height:90px}
  
  
  
  .clues-pane{height:100%;max-height:none}
  .clue-list{max-height:none}
  .game-toolbar{flex-shrink:0;padding:12px 0}
  .game-toolbar .verify{padding:10px 22px}
}
@media(min-width:761px){
  .tray-people{gap:6px}
  .tray-people .person{width:min(72px,calc((100% - 66px)/11));min-width:44px}
  .tray-people .person-name{font-size:.65rem;white-space:normal;overflow-wrap:anywhere;min-height:28px;display:flex;align-items:center;justify-content:center;padding:2px}
  .room .person-name{font-size:.72rem;white-space:normal;overflow-wrap:anywhere;min-height:25px}
}
.room-scene.room-artwork{opacity:1;filter:brightness(.86) saturate(.9)}
body[data-time=day] .room-scene.room-artwork{opacity:1;filter:brightness(1.05) saturate(.95)}
body[data-time=night] .room-scene.room-artwork{opacity:1;filter:brightness(.66) saturate(.72)}
.empty-room .room-scene.room-artwork{opacity:.4}
.crime-marker{opacity:.9;stroke:#eee5ce;stroke-width:2.5;filter:drop-shadow(0 1px 2px #201b12)}
.room .person.pawns{max-width:94px;box-shadow:none;border-color:#b69c69;background:#e9d5ad}
.person.pawns .portrait-art{background:#e9d5ad}
.result-portrait{width:220px;height:235px;border-radius:5px}

/* Game view follows the original mansion mockup; navigation moves to its header. */
body[data-screen=game]{background:radial-gradient(ellipse at 45% 5%,#30442e44,transparent 65%),#0b211b}
body[data-screen=game] .workspace{margin-left:0}
body[data-screen=game] .topbar{height:76px;margin:0 20px;border-bottom:2px solid #a58b50;position:relative;padding:0 16px;background:linear-gradient(90deg,#10271d,#1b3528 45%,#10271d);box-shadow:0 4px 0 #514329,0 5px 0 #c4a26655}
body[data-screen=game] .topbar:before,body[data-screen=game] .topbar:after{content:"❧";position:absolute;left:-7px;top:17px;font:35px var(--serif);color:#cbb071}
body[data-screen=game] .topbar:after{left:auto;right:-7px;transform:scaleX(-1)}
body[data-screen=game] .brand{font-size:clamp(2rem,3.1vw,3rem);letter-spacing:-1px;color:#f2d99b;text-shadow:0 2px 1px #000}
.header-actions{display:flex;gap:9px}.header-actions .nav-button{width:auto;flex-direction:row;border:1px solid #b59b5e8a;border-radius:4px;padding:8px 12px;min-height:36px;color:#e2d0a2;gap:6px}.header-actions .nav-button span{font-size:.8rem}.header-actions .nav-button:before{display:none}.header-actions .nav-button svg{width:17px}
body[data-screen=game] .top-meta{flex-direction:row;gap:18px;align-items:center}
body[data-screen=game] .saved{font-size:.67rem}
.mansion-game .case-heading{padding:0 5px;margin-bottom:8px;min-height:30px;font-size:.8rem;flex-shrink:0}
.case-heading>div:first-child{display:flex;align-items:center;gap:14px}.case-ribbon{font-family:var(--serif);font-size:1.1rem;color:#eed69f}.source-number{font-size:.7rem;color:#b4c0a3}.mansion-game .case-heading-meta{font-size:.7rem;gap:17px}.mansion-game .atmosphere{font-size:.65rem}
.mansion-game .investigation-layout{grid-template-columns:minmax(0,1.85fr) minmax(345px,1fr);gap:18px}
.mansion-building{display:flex;flex-direction:column;min-height:260px;flex:1;position:relative;filter:drop-shadow(0 5px 6px #0004)}
.mansion-roof{height:88px;min-height:65px;position:relative;flex-shrink:0;margin:0 -5px -2px;z-index:2}
.mansion-roof>svg{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 1px #0009)}
.roof-compass{position:absolute;right:27px;bottom:18px;border:1px solid #ae9258;background:#e9d9b6;color:#4c432b;border-radius:50%;font:13px var(--serif);width:58px;height:58px;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 3px #0005}
.mansion-game .mansion-board{position:relative;flex:1;min-height:230px;padding:16px 16px 16px 23px;gap:20px 16px;border:1px solid #bfad80;border-radius:0 0 3px 3px;background:linear-gradient(90deg,#9a865f,#c8b18c 2%,#7b6748 3%,#3d3629 4%,#9e8860 33%,#d1bc98 33.6%,#756247 34.3%,#3d3629 35%,#9e8860 65%,#d1bc98 66.5%,#756247 67.2%,#3d3629 68%,#9e8860 97%,#d1bc98 98%,#756247),#817253;box-shadow:inset 0 0 0 4px #302b20,inset 0 0 0 6px #bea575}
.mansion-game .mansion-board:before{content:"";position:absolute;left:0;right:0;top:calc(50% - 1px);height:12px;background:linear-gradient(#b79e74,#ddc69d 25%,#82704f 35%,#c0a77c 55%,#67543b 75%,#c7af84);box-shadow:0 2px 4px #0006;z-index:2;pointer-events:none}
.mansion-game .floor-label{color:#e2d0a4;left:5px;font-size:.63rem;top:40px;z-index:3;text-shadow:0 1px #000}.mansion-game .floor-label:nth-of-type(2){top:calc(50% + 33px)}
.mansion-game .room{border:1px solid #bca47699;border-radius:0;min-height:115px;overflow:visible;padding:38px 7px 19px;background:#1f3024;box-shadow:inset 0 0 0 3px #1b221b,0 1px 2px #0006;cursor:pointer}
.mansion-game .room-scene{overflow:hidden}.mansion-game .room-scene.room-artwork{filter:brightness(.95) saturate(.95)}
.mansion-game .room-title{top:-11px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:95%;min-width:63%;padding:7px 15px;white-space:nowrap;color:#322b1e;border:1px solid #b99b56;border-radius:14px 4px;font:600 1.01rem var(--serif);background:linear-gradient(115deg,#d6bb80,#f3e5bd 25%,#f6ebd1 60%,#d9bc7d);box-shadow:0 2px 2px #0008,inset 0 0 0 2px #f8eac3;z-index:4;text-shadow:0 1px #fff8}
.mansion-game .room-title:before,.mansion-game .room-title:after{content:"❧";position:absolute;left:1px;top:4px;color:#a98545;font-size:18px}.mansion-game .room-title:after{left:auto;right:1px;transform:scaleX(-1)}
.mansion-game .room-people{height:100%;min-height:0;gap:10px;align-items:flex-end;position:relative}
.mansion-game .room .person{height:clamp(100px,calc((100dvh - 650px)/2),183px);width:calc(50% - 7px);max-width:118px;border:2px solid #dbc38b;border-radius:12px 12px 4px 4px;box-shadow:0 0 0 1px #574530,0 4px 8px #0008}
.mansion-game .room .person .person-name{font:600 .84rem var(--serif);min-height:26px;padding:5px 2px;background:linear-gradient(#f6ebcc,#dbc291);border-top:1px solid #b79a5e}
.mansion-game .room .person.confirmed .person-name{color:#f2f1d3;background:linear-gradient(#537047,#294b32)}
.mansion-game .room .person.selected{outline:2px solid #f4e3a2;outline-offset:3px}
.mansion-game .room .person.pawns{height:clamp(108px,calc((100dvh - 610px)/2),200px);max-width:112px;border-radius:3px}
.mansion-game .room-actions{height:18px;min-height:18px;bottom:0;opacity:.8;background:#15241999}.mansion-game .room-count{font-size:.62rem}
.mansion-game .crime-room{box-shadow:0 0 0 2px #d5b363,inset 0 0 25px #be9d501a}
.crime-badge{position:absolute;bottom:21px;left:10px;font:600 .7rem var(--serif);color:#efe4bd;background:#4d3f25e6;border:1px solid #b79a5f;padding:3px 8px;border-radius:3px;z-index:3;pointer-events:none}
.mansion-game .crime-marker{bottom:24px;left:8px;max-width:150px;opacity:.8;z-index:0}
.mansion-game .selected-room{outline:3px solid #e9d694;outline-offset:-4px}
.mansion-game .room.accepts-person:hover,.mansion-game .room.drag-over{outline:3px solid #f0df9b;outline-offset:-4px;box-shadow:inset 0 0 25px #d0b76c44}
.mansion-game .empty-mark{font:1.3rem var(--serif);padding:10px 15px;background:#16281deb;border:2px solid #af9254;color:#e8d6a2;border-radius:3px;z-index:1;text-shadow:0 2px #000}
.placement-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;min-height:48px;padding:6px 11px;margin-top:8px;border:1px solid #a88a4e;border-radius:3px;background:linear-gradient(#1f3827,#10291f);box-shadow:inset 0 0 0 2px #a88a4e29}
.selection-status{color:#ead8a3;font-size:.78rem;line-height:1.5;min-width:0}.placement-buttons{display:flex;align-items:center;gap:7px;flex-shrink:0}.placement-buttons button{min-height:34px;font-size:.75rem;padding:6px 10px;border-color:#a68c5266;background:#10241c}.placement-buttons .confirm-placement{background:linear-gradient(#eee0b4,#c9ab68);color:#273022;border-color:#c9b071;font-weight:700;min-width:100px}.placement-buttons .confirm-placement:disabled{opacity:.48}
.mansion-game .suspect-tray{border:1px solid #a88a4e;border-radius:3px;background:linear-gradient(#1d3727,#10291e);box-shadow:inset 0 0 0 3px #a88a4e20;margin-top:9px;padding:8px 11px 4px;flex-shrink:0}.mansion-game .tray-heading{margin-bottom:5px}.mansion-game .tray-heading h2{font-family:var(--serif);font-size:1rem;color:#e0cca0}.mansion-game .tray-people{min-height:96px;padding:4px 3px 5px;gap:7px}.mansion-game .tray-people .person{height:89px;width:min(78px,calc((100% - 77px)/11));min-width:46px;border-color:#d8be83;border-radius:7px 7px 3px 3px}.mansion-game .tray-people .person-name{font-size:.72rem;min-height:28px;background:linear-gradient(#f1e5c3,#d4bd8f)}
.mansion-game .tray-people .person.pawns{height:90px}.tray-people.drag-over{outline:2px solid #e3d196;background:#e3d19612}.mansion-game .all-placed{min-height:80px}

.mansion-game .clues-pane{position:relative;background:radial-gradient(ellipse at 20% 0,#fff6dd99,transparent 75%),repeating-linear-gradient(0deg,#c3a76f08 0 1px,transparent 1px 5px),#eee0bd;border:2px solid #b99b5d;border-radius:18px 5px;box-shadow:inset 0 0 0 3px #f7edcf,inset 0 0 0 5px #b59a623b,0 5px 15px #0003;padding:4px}
.mansion-game .clues-heading{position:relative;padding:21px 21px 18px;border-color:#b79a5e80}.mansion-game .clues-heading:before,.mansion-game .clues-heading:after{content:"❧";position:absolute;left:3px;top:0;font:27px var(--serif);color:#aa8749}.mansion-game .clues-heading:after{left:auto;right:3px;transform:scaleX(-1)}.mansion-game .clues-heading .eyebrow{display:none}.mansion-game .clues-heading h2{font-size:1.9rem;display:flex;align-items:center;gap:5px;color:#3f3826}.mansion-game .clues-heading h2>span{margin-left:8px}.mansion-game .clue-list{padding:0 16px}.mansion-game .clue{padding:15px 0;border-color:#b79a5e44}.mansion-game .clue-text{font-size:1.04rem;line-height:1.7;color:#342f23}.mansion-game .clue-number{font:1rem var(--serif);color:#655235}.mansion-game .clue label{gap:9px}.mansion-game .clue input{width:18px;height:18px;margin-top:4px}.mansion-game .clue.checked .clue-text{color:#8b856f}.mansion-game .clue-footer{border-color:#b79a5e80;padding:10px 17px;font-size:.67rem}
.mansion-game .game-toolbar{padding:9px 0 7px;gap:12px}.mansion-game .game-toolbar>div{align-items:center;flex:1}.memo-reminder{font-size:.67rem;color:#bcc6a9;margin-right:auto}.mansion-game .game-toolbar>div button{font-size:.74rem}.mansion-game .verify{background:linear-gradient(#f0e2b8,#cfad68);border:2px solid #be9c54;box-shadow:inset 0 0 0 2px #fff0ca55;color:#303222;border-radius:6px;min-width:200px}
@media(min-width:761px){
  .mansion-game{height:calc(100dvh - 76px);padding:12px 18px 0;display:flex;flex-direction:column;max-width:2000px}
  .mansion-game .investigation-layout{flex:1;min-height:0}
  .mansion-game .placement-pane{display:flex;flex-direction:column;min-height:0}
  .mansion-game .clues-pane{height:100%;max-height:none}
  .mansion-game .clue-list{max-height:none}
  .mansion-game .game-toolbar{flex-shrink:0}
}
@media(min-width:761px) and (max-height:850px){
  .mansion-game .mansion-roof{height:65px;min-height:55px}
  .mansion-game .room{min-height:92px;padding-top:30px}
  .mansion-game .room .person{height:clamp(74px,calc((100dvh - 600px)/2),118px)}
  .mansion-game .room .person.pawns{height:clamp(84px,calc((100dvh - 570px)/2),135px)}
  .mansion-game .tray-people{min-height:77px}.mansion-game .tray-people .person{height:74px}
  .mansion-game .room .person-name{font-size:.73rem;padding:3px 1px}
  .mansion-game .clue-text{font-size:1rem}
}
@media(max-width:1100px) and (min-width:761px){.mansion-game .investigation-layout{grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:13px}.mansion-game .case-heading-meta>span:first-child{display:none}.mansion-game .room-title{font-size:.88rem;padding:6px 11px}.placement-controls{gap:5px;padding:6px}.selection-status{font-size:.68rem}.placement-buttons{gap:4px}.placement-buttons button{font-size:.65rem;padding:5px 7px}.placement-buttons .confirm-placement{min-width:82px}.mansion-game .clue-text{font-size:.94rem}.memo-reminder{display:none}}
@media(max-width:760px){body[data-screen=game] .topbar{height:100px;flex-wrap:wrap;margin:0 10px;padding:7px 10px;gap:2px}body[data-screen=game] .brand{font-size:1.8rem}body[data-screen=game] .top-meta{width:100%;justify-content:space-between}.header-actions{gap:6px}.header-actions .nav-button{padding:5px 8px;min-height:30px}.header-actions .nav-button span{display:block;font-size:.65rem}.header-actions .nav-button svg{width:14px}.mansion-game{padding-top:10px}.mansion-game .case-heading-meta>span:first-child,.source-number{display:none}.case-ribbon{font-size:.92rem}.mansion-game .case-heading>div:first-child{gap:6px}.mansion-game .mansion-roof{height:66px;min-height:0}.roof-compass{width:37px;height:37px;right:15px;bottom:7px;font-size:9px}.mansion-game .mansion-board{padding:14px 6px 10px 15px;gap:18px 6px;min-height:370px}.mansion-game .room{min-height:160px;padding:30px 3px 20px}.mansion-game .room-title{font-size:.71rem;padding:6px 8px;min-width:80%}.mansion-game .room-title:before,.mansion-game .room-title:after{font-size:11px}.mansion-game .room .person{height:104px;width:calc(50% - 2px);border-width:1px}.mansion-game .room .person-name{font-size:.54rem;padding:3px 0}.mansion-game .room-people{gap:3px}.mansion-game .room .person.pawns{height:112px}.crime-badge{font-size:.5rem;left:5px;bottom:20px;padding:2px 4px}.mansion-game .empty-mark{font-size:.85rem;padding:7px}.placement-controls{flex-wrap:wrap;padding:8px;gap:7px}.selection-status{font-size:.75rem;width:100%}.placement-buttons{width:100%}.placement-buttons .confirm-placement{flex:1}.placement-buttons button{font-size:.72rem}.mansion-game .tray-people .person{width:66px;min-width:66px;height:97px}.mansion-game .tray-people .person.pawns{height:105px}.mansion-game .suspect-tray{padding:8px 9px 1px}.mansion-game .clues-pane{height:calc(100dvh - 270px);min-height:320px}.mansion-game .clues-heading h2{font-size:1.5rem}.mansion-game .clue-text{font-size:1rem}.mansion-game .game-toolbar{padding-top:10px}.memo-reminder{display:none}.mansion-game .verify{width:100%}}
.mansion-game .mansion-board{grid-template-rows:repeat(2,minmax(0,1fr))}
.mansion-game .room-people{flex:1;min-height:0;height:100%;max-height:100%}
.mansion-game .room .person,.mansion-game .room .person.pawns{height:100%;max-height:100%;min-height:0}
.mansion-game .empty-mark{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
@media(min-width:761px){.mansion-game .room{padding-top:31px;padding-bottom:18px}.mansion-game .room .person{max-width:105px}.mansion-game .room .person.pawns{max-width:105px}}
.placement-buttons .confirm-placement:hover:not(:disabled){background:linear-gradient(#fff0ca,#dec085);color:#273022;border-color:#efd6a0}


/* presentation.css — preserved cascade order */

:root{--serif:"Cases Mincho","Yu Mincho",serif;--sans:"Cases Mincho","Yu Mincho",serif;--paper:#f4e8ce;--paper-ink:#261e13;font-family:var(--serif);font-weight:600}
body{background:radial-gradient(ellipse at 20% 15%,#26432977,transparent 65%),#091e16;color:#eee1bc}
button,input,select{font-family:var(--serif)}button{font-weight:700;border-radius:4px}
button.primary,.confirm-placement{background:linear-gradient(#24452c,#0c2c1b)!important;color:#f3e4ad!important;border:2px solid #ba9146!important;box-shadow:inset 0 0 0 2px #ead28c55,0 2px 2px #0004}
button.primary:hover:not(:disabled),.confirm-placement:hover:not(:disabled){background:linear-gradient(#3d5c34,#183e24)!important;color:#fff0bc!important;border-color:#e5bd62!important}
button:disabled{opacity:.48}.hidden-section{display:none!important}
.paper-panel,.clues-pane,.suspect-tray,.settings-dialog,.document-page,.dialog-body{border:20px solid transparent;border-image:url("assets/optimized/parchment-frame.webp") 90 fill / 20px / 0 stretch;background:#f3e6c8;color:#302416;box-shadow:0 3px 12px #0005}
.presentation-workspace{margin:0;min-height:100vh}
.presentation-workspace>.topbar{height:65px!important;margin:0!important;padding:5px 13px!important;border-bottom:2px solid #b79a57;background:linear-gradient(90deg,#10281b,#1b3323,#10281b);box-shadow:none!important;gap:14px!important;flex-wrap:nowrap!important}
.presentation-workspace>.topbar:before,.presentation-workspace>.topbar:after{display:none!important}
.brand{font-family:Georgia,serif!important;font-style:italic;font-weight:500;white-space:nowrap;font-size:clamp(26px,2.8vw,43px)!important;letter-spacing:-1px!important;line-height:1.1;color:#f0dca0!important;padding:2px 14px!important;border:1px solid #b59b5e!important;box-shadow:inset 0 0 0 2px #cdb37422;border-radius:25px 4px!important}
.brand em{font-style:inherit;color:inherit}.header-case{font-size:clamp(15px,1.3vw,22px);white-space:nowrap;color:#f0dfb4;border-left:1px solid #b39750;border-right:1px solid #b39750;padding:0 15px;line-height:1.2}.header-case small{display:block;font-size:10px;text-align:center;margin-top:4px}.header-rules{font-size:clamp(12px,1.15vw,19px);flex:1;text-align:center;white-space:nowrap}.header-actions{margin-left:auto;gap:7px}.header-actions .nav-button{font-family:var(--serif);border:1px solid #c7a35c;color:#ecdca9;padding:5px 11px;min-height:35px;background:linear-gradient(#173922,#092b1a)}.header-actions .nav-button span{font-size:15px;font-weight:700}.header-actions .nav-button svg{width:17px}.save-indicator{font:13px var(--serif);color:#bcc799;min-width:8px}.page-plaque{margin:0 auto;font:800 28px var(--serif);color:#f0e1b5;white-space:nowrap}
.mansion-game{height:calc(100dvh - 65px)!important;padding:4px 5px 5px!important;position:relative;max-width:none!important}
.mansion-game>.case-heading{display:none!important}
.mansion-game .investigation-layout{grid-template-columns:minmax(0,2fr) minmax(360px,1fr)!important;gap:12px!important;height:100%;flex:1;min-height:0}
.mansion-game .placement-pane{min-height:0;gap:0}
.mansion-game .mansion-building{min-height:300px;flex:1}
.mansion-game .mansion-roof{height:70px!important;min-height:60px!important;margin:0 -2px -3px;flex-shrink:0}
.mansion-game .roof-compass{width:41px;height:41px;font-size:10px;right:13px;bottom:8px}
.mansion-game .mansion-board{padding:10px 14px 11px 14px!important;gap:14px 12px!important;min-height:230px;border-color:#b69b62;border-radius:0;background:linear-gradient(90deg,#7b6141,#af9567 3%,#7d6749 3.5%,#56432c 4%,#9c8054 34%,#c8a76f 34.5%,#715739 35%,#56432c 36%,#b89960 66%,#c8a76f 67%,#715739 67.5%,#56432c 68%,#b89960 97%,#9b7d51 99%)!important}
.mansion-game .mansion-board:before{height:12px;top:calc(50% - 6px);background:linear-gradient(#be9d67,#dfc18d 24%,#8f6e44 37%,#bf9a60 55%,#66472d 80%,#bd9965);z-index:4}
.architecture-columns{position:absolute;inset:-1px 0 -1px;pointer-events:none;z-index:5;overflow:visible}.architecture-column{position:absolute;top:0;height:100%;width:25px;overflow:visible;filter:drop-shadow(2px 1px 2px #0006)}.column-0{left:-3px}.column-1{left:calc(33.333% - 12px)}.column-2{left:calc(66.666% - 12px)}.column-3{right:-3px}
.mansion-game .room{padding:33px 9px 8px!important;min-height:0!important;border:0!important;box-shadow:inset 0 0 0 1px #b99a68,0 1px 3px #0006!important;background:#18291e;overflow:visible}
.mansion-game .room-title{font:800 clamp(16px,1.35vw,22px)/1.1 var(--serif)!important;top:0;min-width:58%;padding:6px 17px!important;border-radius:9px 3px;border:2px solid #a88442;box-shadow:0 1px 3px #0008,inset 0 0 0 2px #fff1c9;background:linear-gradient(105deg,#e5c88f,#f8edd1 35%,#f1dfb3 80%,#d9b778)}
.mansion-game .room-title:before,.mansion-game .room-title:after{content:"";width:7px;height:7px;border:1px solid #a78239;border-radius:50%;top:calc(50% - 4px);left:3px;background:#c5a161}.mansion-game .room-title:after{left:auto;right:3px}
.mansion-game .floor-label{display:none}.mansion-game .room-actions{display:none}
.mansion-game .room-people{gap:12px;justify-content:center;align-items:flex-end;flex:1;height:100%;min-height:0;padding:0 2px}
.mansion-game .room .person.portraits{height:min(100%,235px)!important;max-height:100%;width:calc(50% - 8px);max-width:133px!important;border:2px solid #d7bd81;border-radius:13px 13px 5px 5px;box-shadow:0 0 0 1px #6c532d,0 4px 6px #0007;background:#44321f}
.person.portraits .portrait-art{background:#473521;min-height:0;height:100%;width:100%;overflow:hidden}
.person.portraits .person-name{font:800 16px/1.25 var(--serif)!important;white-space:nowrap!important;overflow-wrap:normal!important;display:flex;align-items:center;justify-content:center;color:#30271a;min-height:30px!important;padding:3px 2px!important;background:linear-gradient(#fbefcf,#e5c894)!important;border-top:1px solid #a98643}
.person.portraits.confirmed .person-name{background:linear-gradient(#315c37,#113b25)!important;color:#f3e5b4}
.mansion-game .room .person.pawns,.person.pawns{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0;overflow:visible}
.mansion-game .room .person.pawns{height:100%!important;max-height:100%!important;width:calc(50% - 6px);max-width:145px!important;gap:0}
.person.pawns .portrait-art{background:transparent!important;overflow:visible;filter:drop-shadow(0 2px 1px #0006);min-height:0;width:100%;height:100%}
.person.pawns .person-name{min-height:27px;font:800 16px/1.15 var(--serif)!important;white-space:nowrap;padding:4px 8px!important;border:2px solid #ad8640;border-radius:10px 3px;color:#30271a;background:linear-gradient(#fff1c8,#dec08a)!important;box-shadow:inset 0 0 0 1px #f9eac2,0 2px 2px #0006}
.person.pawns.confirmed .person-name{color:#f1e3ac;background:linear-gradient(#375c38,#103820)!important}
.person.pawns.selected{outline:0!important}.person.pawns.selected .portrait-art{filter:drop-shadow(2px 0 #e5bf5b) drop-shadow(-2px 0 #e5bf5b) drop-shadow(0 0 4px #e6ba4e)}
.person.pawns:hover:not(:disabled){background:transparent!important}.person.portraits.selected{outline:2px solid #f1cf77;outline-offset:2px}
.mansion-game .crime-badge{top:39px;bottom:auto;left:50%;transform:translateX(-50%);padding:2px 11px;font:800 13px var(--serif);color:#f9e4ad;background:#382d1bee;border-color:#c59b45}
.mansion-game .crime-marker{bottom:15px;left:10px;width:40%;max-width:125px;stroke-width:2.3;opacity:.85}
.mansion-game .crime-room{box-shadow:inset 0 0 0 2px #d6b459,0 0 7px #d6b45988!important}
.mansion-game .empty-mark{font:700 30px var(--serif);padding:12px 22px;border-radius:10px 3px;border:2px solid #bc974b;background:#173b24f2;color:#eedba2}
.placement-controls{min-height:46px;padding:5px 10px;gap:8px;margin-top:7px;border:2px solid #af8f47;background:linear-gradient(90deg,#183c25 38%,#f2e2bb 38%);box-shadow:inset 0 0 0 2px #f0d39355;flex-shrink:0}
.selection-status{font:700 16px var(--serif);color:#ead8a2;flex:1;max-width:38%}.placement-buttons{gap:8px;flex-shrink:0}.placement-buttons button{font:800 16px var(--serif)!important;min-height:34px;padding:4px 10px;color:#332819;border:1px solid #a88544;background:linear-gradient(#f9eccb,#dfc28b)}.placement-buttons .confirm-placement{min-width:124px;font-size:19px!important}
.mansion-game .suspect-tray{height:144px;min-height:135px;margin-top:7px;border-width:14px;border-image-width:14px;padding:0;display:flex;align-items:center;gap:12px;flex-shrink:0;border-radius:0;background:#f3e6c8;box-shadow:0 2px 5px #0003}
.mansion-game .tray-heading{width:155px;max-width:25%;flex-shrink:0;padding:9px;margin:0;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;border-right:1px solid #bd9b59;color:#45321e;height:100%;text-align:center}
.mansion-game .tray-heading h2{color:#3a2c1c;font:800 17px var(--serif)}.mansion-game .tray-heading>span{background:#1b4128;color:#f1e3b7;border:2px solid #b99850;border-radius:9px 2px;padding:6px 10px;font:700 19px var(--serif)}
.mansion-game .tray-people{flex:1;gap:7px;align-items:flex-end;justify-content:flex-start;min-height:0;height:100%;padding:0 2px 0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.mansion-game .tray-people .person.portraits{height:116px!important;width:min(94px,calc((100% - (var(--tray-count) - 1)*7px)/var(--tray-count)));min-width:60px;max-width:94px;flex-shrink:0;border-radius:10px 10px 3px 3px;background:#473521}
.mansion-game .tray-people .person.portraits .person-name{font-size:13px!important;min-height:25px!important;white-space:normal!important}
.mansion-game .tray-people .person.pawns{height:119px!important;min-width:60px;width:min(103px,calc((100% - (var(--tray-count) - 1)*7px)/var(--tray-count)));max-width:103px}
.mansion-game .tray-people .person.pawns .person-name{font-size:13px!important;padding:3px 4px!important;min-height:24px!important;white-space:normal}
.mansion-game .all-placed{color:#493b23;font:700 15px var(--serif);padding:15px}

.mansion-game .clues-pane{border-width:20px!important;border-image:url("assets/optimized/parchment-frame.webp") 90 fill / 20px / 0 stretch!important;padding:0 0 77px!important;border-radius:0!important;box-shadow:0 3px 10px #0005;background:#f4e8ce}
.mansion-game .clues-heading{padding:5px 7px 12px;min-height:96px;border-color:#c8ad78;display:block;text-align:center}
.mansion-game .clues-heading:before,.mansion-game .clues-heading:after{display:none}.mansion-game .clues-heading h2{display:inline-flex;min-width:60%;justify-content:center;margin:0;padding:5px 16px;color:#241c0f;font:800 30px/1.2 var(--serif);border:2px solid #b58c42;border-radius:17px 4px;background:linear-gradient(110deg,#e0bb77,#fff0cd 35%,#e5c990);box-shadow:inset 0 0 0 2px #f5e8bc}
.clue-total{position:absolute;right:0;top:14px;padding:4px 8px;border:1px solid #b28e45;border-radius:7px 2px;background:#143e25;color:#f8e7b2;font:700 14px var(--serif)}
.clue-memo{font:600 12px/1.4 var(--serif);margin:9px 0 0;color:#51422b}.mansion-game .clues-heading>span{font-size:13px}.mansion-game .clues-heading>span:last-child:not(.clue-total){display:none}
.mansion-game .clue-list{padding:0 2px;flex:1;min-height:0;overscroll-behavior:contain}.mansion-game .clue{padding:8px 0;border-color:#c6ad7944;gap:4px}.mansion-game .clue-text{font:750 17px/1.55 var(--serif)!important;letter-spacing:.01em;color:#211c14}.mansion-game .clue label{gap:7px}.mansion-game .clue-number{font:750 16px/1.6 var(--serif);color:#2e2418;min-width:18px;margin-top:0}.mansion-game .clue input{appearance:auto;width:19px;height:19px;min-width:19px;margin:4px 0 0;accent-color:#234a2b;cursor:pointer}.mansion-game .clue input:checked:after{display:none}.mansion-game .clue.checked .clue-text{color:#87816b}
.mansion-game .clue-footer{min-height:45px;padding:7px 4px;display:flex;justify-content:space-between;font:600 15px var(--serif);border-color:#c1a268}.clue-pagination{display:flex;gap:7px}.clue-pagination button{min-width:37px;min-height:33px;padding:2px 10px;color:#543a1c;border:1px solid #a88546;background:#f1dfb7;font-size:19px}.clue-pagination button.active{background:#173c24;color:#efdea9;border:2px solid #b28b3e}
.mansion-game .game-toolbar{position:absolute;right:22px;bottom:22px;width:calc((100% - 12px)/3 - 36px);min-height:53px;padding:0!important;gap:7px;z-index:3;justify-content:space-between}.mansion-game .game-toolbar>div{gap:6px;flex:0 1 auto}.mansion-game .memo-reminder{display:none}.mansion-game .game-toolbar>div button{font:800 13px var(--serif);padding:5px 7px;border:1px solid #b39659;color:#342718;background:linear-gradient(#f9eccb,#dfc38d);min-height:43px}.mansion-game .verify{font:800 19px var(--serif);padding:7px 10px;min-width:145px!important;flex:1}

/* A dense case ledger, with progress and resumption visible at the same time. */
.investigation-status{height:calc(100dvh - 65px);max-width:none;margin:0;padding:12px;display:grid;grid-template-columns:minmax(235px,.85fr) minmax(0,3fr);gap:14px;min-height:650px}
.casebook-side{display:flex;flex-direction:column;gap:13px;min-width:0}.mode-plaque{padding:18px 10px;text-align:center;background:linear-gradient(#1e492d,#0e2e1d);border:2px solid #d4ac54;box-shadow:inset 0 0 0 3px #efd69c55;border-radius:13px 3px}.mode-plaque h2{font-size:21px;color:#efdfaa;margin:0 0 8px}.mode-plaque p{margin:0;font-size:19px}.resume-panel{padding:8px 6px;text-align:center}.resume-panel h2{font-size:22px;background:#173c26;color:#f3e0ae;border:1px solid #c4a050;padding:8px 4px;border-radius:12px 3px}.resume-case{font-size:22px;font-weight:800;padding:8px 0;border-bottom:1px solid #c0a368}.resume-panel dl{margin:10px 0}.resume-panel dl>div{display:flex;justify-content:space-between;align-items:center;padding:11px 6px;border-bottom:1px solid #c0a368;font-size:19px}.resume-panel dd{margin:0}.resume-panel .resume-card{font:800 22px var(--serif);justify-content:center;padding:10px;margin:16px 0 0;min-height:53px;width:100%}.next-case{text-align:center;padding:6px}.next-case p{font-size:15px;margin:0 0 8px}.next-case button{font-size:19px;background:#f0d9a6;color:#3d2c16;border:2px solid #a98543;width:100%}.prototype-note{font-size:12px;color:#b7c3a1;line-height:1.65;margin:0;padding:5px}
.casebook-main{display:flex;flex-direction:column;gap:12px;min-height:0}.tier-tabs{display:flex;gap:12px}.tier-tabs button{flex:1;color:#302416;font-size:23px;border:2px solid #c39c50;background:linear-gradient(#fbefd0,#e3c58f);box-shadow:inset 0 0 0 2px #fff2d9;min-height:56px}.tier-tabs button span{font:600 19px Georgia,serif;margin-left:9px}.tier-tabs button.active,.status-filters button.active{background:linear-gradient(#254b2a,#0d311c);color:#f8eab8;border-color:#d6b662;box-shadow:inset 0 0 0 2px #9d8641}
.progress-panel{min-height:99px;display:flex;align-items:center;gap:18px;padding:0 10px}.progress-panel>strong{font-size:28px;white-space:nowrap}.progress-panel>div{flex:1;font-size:21px;white-space:nowrap}.progress-panel .overall-track{margin-top:9px;height:16px;border:1px solid #8c713c;border-radius:9px;box-shadow:inset 0 2px 3px #5a482c55;background:#e6d1a7;overflow:hidden}.progress-panel .overall-track i{background:linear-gradient(#486c33,#163d20);border-radius:7px}.progress-panel>b{font:700 25px Georgia,serif}.progress-state{font-size:17px;border-left:1px solid #ad8d4d;padding-left:16px;white-space:nowrap}
.casebook-paper{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 4px;overflow:hidden}.status-filters{display:flex;justify-content:center;gap:9px;padding:0 4px 14px;flex-shrink:0}.status-filters button{min-height:39px;font-size:18px;color:#3c2b15;background:#f1ddb5;border:1px solid #aa8440;min-width:105px}.casebook-paper .case-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;overflow:auto;min-height:0;padding:2px;align-content:start}.casebook-paper .case-card{height:120px;min-height:120px;border:2px solid #bd9545;background:linear-gradient(125deg,#f8edcf,#ead0a1);box-shadow:inset 0 0 0 2px #fff3d6,0 2px 2px #5b452b44;color:#302619;padding:9px 11px;border-radius:8px 3px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;align-items:center;position:relative}.casebook-paper .case-card:after{display:none}.casebook-paper .case-card:hover{transform:none;border-color:#e1af37;box-shadow:0 0 0 2px #d4b65b}.casebook-paper .case-card.solved{background:linear-gradient(#2e512e,#10321d);color:#f5e4b6;border-color:#dfbc65}.casebook-paper .case-card.active{background:linear-gradient(#f6db8f,#cfa544);color:#30230e;border-color:#a87624}.casebook-paper .case-card-top{grid-column:1/-1;display:flex;justify-content:space-between;font-size:14px}.casebook-paper .case-tier{font-size:13px;color:inherit}.casebook-paper .case-number{font:600 35px/1 Georgia,serif;color:inherit;margin:0}.casebook-paper .state-tag{font-size:15px;grid-column:1/-1;color:inherit}.casebook-paper .case-card>small{position:absolute;right:9px;bottom:10px;font-size:9px;opacity:.75}.casebook-footer{text-align:right;padding:9px 8px 0;color:#5b4526;font-size:15px}

/* Settings and result surfaces use the same paper, type and metal as the board. */
dialog{max-width:min(920px,calc(100vw - 30px));width:850px;border:0;border-radius:0;padding:0;overflow:visible;background:transparent;box-shadow:none;color:#352819;max-height:95dvh}dialog::backdrop{background:#0009;backdrop-filter:none}
.settings-dialog{padding:4px 18px 9px;max-height:91dvh;display:flex;flex-direction:column}.dialog-plaque{position:relative;flex-shrink:0;align-self:center;text-align:center;min-width:60%;padding:3px 25px 7px;margin:-4px 0 12px;background:linear-gradient(#183f25,#0c2e1c);color:#f7e7ad;border:2px solid #b48e43;border-radius:21px 4px;box-shadow:inset 0 0 0 2px #e6ca7a66}.dialog-plaque h2{font:800 32px/1.2 var(--serif);margin:0}.dialog-plaque>span{font:600 14px Georgia,serif;letter-spacing:4px}.dialog-plaque button{position:absolute;right:-137px;top:5px;border:2px solid #bc9850;border-radius:50%;background:#f5e5be;color:#292316;width:42px;height:42px;min-height:0;padding:5px}.settings-tabs{display:flex;gap:8px;justify-content:center;flex-shrink:0;padding-bottom:10px;border-bottom:1px solid #bea366}.settings-tabs button{font-size:16px;padding:6px 16px;min-height:37px;color:#41301c;background:#efdbb2;border:1px solid #b28c42}.settings-tabs button.active{color:#f0e0aa;background:#163b24}.settings-content{overflow:auto;min-height:0;flex:1;padding:5px 12px}.settings-section h3{margin:12px 0;font:800 21px var(--serif);padding:6px 12px;border-bottom:1px solid #b69654;color:#352919}.settings-section .setting-row{font-size:20px;color:#382c1e;border-color:#c2a77177;padding:13px 0}.settings-section select{background-color:#f4e6c7;border-color:#a78240;color:#382a17;min-width:260px;max-width:65%;font-size:19px;min-height:46px}.settings-section p{font-size:14px;color:#5c4c32;line-height:1.7;margin:12px 0 4px}.language-preview{border:1px solid #c5a66e;background:#fff6df66;border-radius:5px;padding:10px 12px;display:flex;gap:14px;margin:10px 0;font-size:16px;align-items:center}.language-preview strong{white-space:nowrap;color:#644b24}.language-preview small{display:block;font:italic 13px Georgia,serif;margin-top:5px}.appearance-preview{display:flex;justify-content:center;gap:30px;padding:7px 0}.appearance-preview>div{display:flex;align-items:center;justify-content:center;gap:15px;flex:1;border:1px solid #b2965a;border-radius:12px 4px;background:#fff7e333;min-height:150px;padding:7px;font-size:21px}.preview-piece .portrait-art{height:150px;width:85px;background:transparent!important}.preview-portrait .portrait-art{height:135px;width:104px;background:#493523;border:2px solid #b8974d;border-radius:12px 12px 3px 3px}.settings-actions{display:flex;justify-content:center;gap:28px;padding:13px 0 0;margin-top:10px;border-top:1px solid #c0a16a;flex-shrink:0}.settings-actions button{min-width:190px;font-size:25px;min-height:52px;color:#332719;background:linear-gradient(#fff0cd,#e4c68f);border:2px solid #b28a3e}
.result-dialog{border:3px double #d4ad58;border-radius:12px 3px;width:100%;display:grid;grid-template-columns:39% 61%;padding:20px;background:radial-gradient(ellipse at 65% 40%,#24492c,#0b2318);color:#f0ddaa;min-height:460px;box-shadow:inset 0 0 0 2px #8a7136,0 10px 30px #0007;text-align:center}
.result-person{display:flex;flex-direction:column;justify-content:center;align-items:center;padding-right:12px;min-width:0}.result-dialog .result-portrait{width:100%;max-width:300px;height:365px;border:2px solid #c6a450;border-radius:16px 16px 3px 3px;margin:0;background:#44311f;overflow:hidden;box-shadow:0 0 0 3px #c9a96422}.result-portrait .portrait-art{background:#4a3420}.result-message{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;padding:15px 10px}.result-dialog .eyebrow{font:600 17px Georgia,serif;color:#e1c16c;letter-spacing:4px;margin-bottom:17px}.result-dialog h2{font:800 48px/1.3 var(--serif);color:#edca73;margin:0 0 14px;text-shadow:0 2px 2px #000}.result-case{font:700 20px var(--serif);border:1px solid #a58442;border-radius:8px 2px;padding:4px 20px;color:#ecdaac}.result-dialog .culprit-name{font:800 26px/1.5 var(--serif);margin:15px 0;padding:0 6px;color:#322315;white-space:normal}.result-person>.culprit-name{color:#f0dfb0;background:#163923;border:1px solid #c0a057;width:95%;font-size:23px;padding:6px;margin:7px 0 0}.result-dialog p{font:600 16px/1.8 var(--serif);color:#eadfbd;margin:12px 0}.result-dialog .button-row{gap:14px;flex-wrap:nowrap;width:100%;margin-top:19px}.result-dialog .button-row button{font-size:20px;min-height:51px;flex:1;color:#352716;background:linear-gradient(#ffefd0,#e0bf85);border:2px solid #b38a42}
.result-dialog.incorrect{background:#6b2020;border-color:#c1a05c;padding:24px;min-height:400px}.result-dialog.incorrect .result-message{background:#f4e6c7;color:#442119;border:10px solid #ddc18a}.result-dialog.incorrect h2{font-size:32px;color:#702423;text-shadow:none}.result-dialog.incorrect .eyebrow{color:#6c412f;letter-spacing:2px;font-size:12px}.result-dialog.incorrect .result-case{color:#644127;border-color:#ac8c50}.result-dialog.incorrect p{color:#443326;font-size:17px}.result-dialog.incorrect .result-portrait{height:300px}.result-dialog.incorrect .button-row button{color:#f2e1ae;background:#163e25}
.document-page{max-width:980px;margin:20px auto;padding:15px 25px}.document-page h1{font-size:30px;color:#302719}.document-page .settings-card{background:transparent;border-color:#bea264;color:#302719}.document-page .settings-card h2,.document-page .settings-card p{color:#3f321f}
@media(min-width:1600px){.mansion-game .clue-text{font-size:19px!important}.mansion-game .person-name{font-size:18px!important}.mansion-game .room .person.portraits{max-width:153px!important;height:min(100%,265px)!important}.mansion-game .room .person.pawns{max-width:170px!important}.mansion-game .suspect-tray{height:155px}.mansion-game .tray-people .person.portraits{height:127px!important}.mansion-game .tray-people .person.pawns{height:130px!important}.casebook-paper .case-card{height:135px;min-height:135px}.casebook-paper .case-number{font-size:41px}}
@media(max-height:850px) and (min-width:761px){.mansion-game .mansion-roof{height:57px!important;min-height:50px!important}.mansion-game .suspect-tray{height:120px;min-height:115px}.mansion-game .tray-people .person.portraits{height:94px!important}.mansion-game .tray-people .person.pawns{height:95px!important}.mansion-game .room .person.portraits{max-width:110px!important}.mansion-game .room .person.pawns{max-width:120px!important}.mansion-game .clues-heading{min-height:78px}.mansion-game .clue-text{font-size:15px!important}.mansion-game .clue{padding:7px 0}.settings-dialog{max-height:94dvh}.appearance-preview>div{min-height:105px}.preview-piece .portrait-art{height:102px}.preview-portrait .portrait-art{height:100px}.settings-section .setting-row{padding:6px 0}.settings-section h3{margin:6px 0}.casebook-paper .case-card{height:98px;min-height:98px}.casebook-paper .case-number{font-size:29px}.investigation-status{min-height:590px}.progress-panel{min-height:77px}.resume-panel dl>div{padding:7px 4px}.result-dialog{min-height:380px}.result-dialog .result-portrait{height:300px}}
@media(max-width:1100px) and (min-width:761px){.header-actions .nav-button span{font-size:12px}.header-actions .nav-button{padding:4px 7px}.brand{font-size:28px!important}.header-case{padding:0 8px;font-size:13px}.header-rules{font-size:11px}.mansion-game .investigation-layout{grid-template-columns:minmax(0,1.85fr) minmax(310px,1fr)!important}.mansion-game .game-toolbar{width:calc(35% - 32px)}.mansion-game .verify{min-width:115px!important;font-size:16px}.placement-buttons{gap:5px}.placement-buttons button{font-size:13px!important;padding:4px 7px}.placement-buttons .confirm-placement{font-size:15px!important;min-width:102px}.selection-status{font-size:13px}.mansion-game .tray-heading{width:125px}.mansion-game .tray-heading h2{font-size:14px}.mansion-game .tray-people .person.portraits{min-width:53px}.mansion-game .tray-people .person-name{font-size:11px!important}.investigation-status{grid-template-columns:220px minmax(0,1fr)}.casebook-paper .case-grid{gap:7px}.casebook-paper .case-card{padding:7px}.casebook-paper .case-card-top{font-size:11px}.casebook-paper .state-tag{font-size:12px}.progress-state{display:none}.status-filters button{min-width:80px;font-size:15px}}
@media(max-width:760px){.presentation-workspace>.topbar{height:auto!important;min-height:76px;flex-wrap:wrap!important;gap:5px!important;padding:6px!important}.header-rules{display:none}.brand{font-size:24px!important;padding:3px 8px!important}.header-case{font-size:12px;border:0;padding:0}.header-actions{width:100%;justify-content:flex-end}.header-actions .nav-button{min-height:27px;padding:3px 7px}.header-actions .nav-button span{font-size:12px}.save-indicator{display:none}.mansion-game{height:auto!important;padding-bottom:75px!important}.mansion-game .investigation-layout{display:block!important}.mansion-game .mansion-building{min-height:450px}.mansion-game .room{padding:35px 3px 6px!important}.mansion-game .room-title{font-size:12px!important;padding:5px 8px!important}.mansion-game .room .person.portraits{max-width:70px!important;height:160px!important}.mansion-game .person.portraits .person-name{font-size:9px!important}.mansion-game .room .person.pawns{height:170px!important;max-width:85px!important}.mansion-game .room .person.pawns .person-name{font-size:10px!important;padding:3px!important}.mansion-game .crime-badge{font-size:9px;top:30px;padding:2px 5px}.placement-controls{background:#183c25}.selection-status{max-width:100%;font-size:13px}.mansion-game .suspect-tray{height:135px;gap:7px}.mansion-game .tray-heading{width:90px;max-width:27%;padding:4px}.mansion-game .tray-heading h2{font-size:12px}.mansion-game .tray-heading>span{font-size:15px;padding:4px}.mansion-game .tray-people .person.portraits{width:68px;min-width:68px;height:108px!important}.mansion-game .tray-people .person.pawns{width:70px;min-width:70px;height:110px!important}.mansion-game .clues-pane{height:calc(100dvh - 160px);min-height:420px;padding-bottom:65px!important}.mansion-game .clue-text{font-size:16px!important}.mansion-game .game-toolbar{position:static;width:100%;padding:9px 3px!important;flex-wrap:wrap}.mansion-game .game-toolbar>div{width:auto}.mansion-game .verify{min-height:44px}.page-plaque{font-size:22px}.investigation-status{height:auto;min-height:0;display:block;padding:8px}.casebook-side{display:none}.tier-tabs{gap:5px}.tier-tabs button{font-size:15px;min-height:43px}.tier-tabs button span{font-size:12px;margin-left:1px}.progress-panel{min-height:86px;gap:8px;border-width:12px;border-image-width:12px;padding:4px}.progress-panel>strong{font-size:18px}.progress-panel>div{font-size:16px}.progress-state{display:none}.casebook-paper{border-width:12px;border-image-width:12px;margin-top:9px}.status-filters{gap:5px;padding-bottom:8px}.status-filters button{min-width:0;flex:1;font-size:13px;padding:4px}.casebook-paper .case-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.casebook-paper .case-card{height:108px;min-height:108px;padding:8px}.casebook-paper .case-card-top{font-size:11px}.casebook-paper .state-tag{font-size:12px}.casebook-paper .case-card>small{display:none}.settings-dialog{padding:0 4px 4px;border-width:13px;border-image-width:13px;max-height:94dvh}.dialog-plaque{min-width:70%;padding:3px 14px}.dialog-plaque h2{font-size:26px}.dialog-plaque button{right:-35px;width:30px;height:30px}.settings-tabs{gap:4px}.settings-tabs button{font-size:12px;padding:4px 7px}.settings-content{padding:3px}.settings-section h3{font-size:17px}.settings-section .setting-row{font-size:15px}.settings-section select{min-width:150px;font-size:14px}.language-preview{font-size:12px;padding:7px;gap:7px}.language-preview small{font-size:10px}.appearance-preview{gap:9px}.appearance-preview>div{font-size:15px;gap:5px;flex-direction:column}.preview-piece .portrait-art{height:110px}.preview-portrait .portrait-art{height:103px;width:78px}.settings-actions{gap:10px}.settings-actions button{min-width:115px;font-size:20px;min-height:43px}.result-dialog{padding:12px;grid-template-columns:36% 64%;min-height:340px}.result-dialog .result-portrait{height:210px}.result-dialog h2{font-size:28px}.result-dialog .eyebrow{font-size:10px;letter-spacing:1px}.result-dialog .culprit-name{font-size:16px;border-width:9px;border-image-width:9px}.result-dialog p{font-size:12px}.result-dialog .button-row{flex-direction:column;gap:7px;margin-top:10px}.result-dialog .button-row button{font-size:15px;min-height:38px}.result-case{font-size:13px}.result-dialog.incorrect{padding:10px}.result-dialog.incorrect .result-message{padding:8px;border-width:4px}.result-dialog.incorrect h2{font-size:20px}.result-dialog.incorrect p{font-size:12px}.result-dialog.incorrect .result-portrait{height:180px}}
.language-options,.appearance-options{display:flex;gap:24px;justify-content:center;margin:12px 0}
.setting-choice,.appearance-choice{display:flex;gap:17px;align-items:center;justify-content:center;flex:1;border:1px solid #ae8a4a;background:#f9edcf66;border-radius:13px 4px;padding:14px 20px;cursor:pointer;font-size:27px;font-weight:750;color:#2f2517}
.setting-choice.active,.appearance-choice.active{background:#ece6bd;border:2px solid #43633b}
.setting-choice input,.appearance-choice input{appearance:none;width:27px;height:27px;border:2px solid #372b18;border-radius:50%;margin:0;flex-shrink:0;position:relative;background:transparent;color:#f6e6b1;cursor:pointer}
.setting-choice input:checked,.appearance-choice input:checked{background:#214d2d;border-color:#856c32}
.setting-choice input:checked:after,.appearance-choice input:checked:after{content:"✓";position:absolute;inset:-4px 0 0;text-align:center;font:22px var(--serif);color:#f7e7b3}
.appearance-choice{padding:10px 13px;min-height:177px;font-size:24px;gap:12px}.appearance-choice>div{flex-shrink:0}.appearance-choice .portrait-art{flex:none!important}.appearance-choice .preview-piece .portrait-art{width:77px;height:160px;background:transparent!important}.appearance-choice .preview-portrait .portrait-art{width:100px;height:145px}
.appearance-choice>span{white-space:nowrap}.settings-section:first-child{overflow:hidden}.settings-content{scrollbar-width:thin}.settings-section:first-child>p{font-size:13px}
.mansion-game .suspect-tray{border-image:url("assets/optimized/parchment-frame.webp") 90 fill / 14px / 0 stretch!important}
body .mansion-game .clue-text{font-size:clamp(16px,1.12vw,19px)!important;line-height:1.38!important}
.mansion-game .clue{padding:2px 0}.mansion-game .clues-heading{min-height:82px;padding-bottom:8px}.mansion-game .clue-footer{min-height:41px}
.mansion-game .clue input{color-scheme:light;appearance:none;background:transparent;border:2px solid #302719;border-radius:1px;position:relative}
.mansion-game .clue input:checked{background:#254d2c;border-color:#254d2c}.mansion-game .clue input:checked:after{display:block;content:"✓";font:19px/1 var(--serif);position:absolute;top:-4px;left:0;color:#fff3cf}
@media(min-width:761px){.mansion-game .room{padding-top:48px!important}.mansion-game .crime-room .room-people{padding-top:18px}.casebook-paper .case-card{height:118px;min-height:118px}}
@media(max-width:760px){.language-options,.appearance-options{gap:9px}.setting-choice{font-size:20px;padding:10px 7px;gap:7px}.appearance-choice{font-size:15px;gap:5px;min-height:150px;padding:7px;flex-wrap:wrap}.appearance-choice input{width:23px;height:23px}.appearance-choice .preview-piece .portrait-art{height:109px;width:65px}.appearance-choice .preview-portrait .portrait-art{height:99px;width:74px}}
body[data-screen=game][data-appearance=pawns] .topbar{background:linear-gradient(90deg,#e8d2a6,#faedcf 40%,#ecdbb8)!important;color:#2d2315;box-shadow:inset 0 0 0 2px #ac8745!important}
body[data-screen=game][data-appearance=pawns] .brand{color:#5b3e1b!important;background:transparent}
body[data-screen=game][data-appearance=pawns] .header-case,body[data-screen=game][data-appearance=pawns] .header-rules{color:#2d2315}
dialog:has(.result-dialog){width:min(1020px,calc(100vw - 32px));max-width:1020px}
.result-dialog{min-height:530px}.result-dialog .result-portrait{height:auto;aspect-ratio:1;max-width:355px;max-height:355px}.result-dialog h2{font-size:56px}.result-dialog .culprit-name{font-size:30px}
dialog:has(.result-dialog.incorrect){width:min(1100px,calc(100vw - 32px));max-width:1100px;margin:0;left:57%;top:64%;transform:translate(-50%,-50%)}
dialog:has(.result-dialog.incorrect)::backdrop{background:#0003}.result-dialog.incorrect{grid-template-columns:30% 70%;min-height:360px}.result-dialog.incorrect .result-portrait{height:auto;aspect-ratio:1;max-width:260px}.result-dialog.incorrect .result-message{border:15px solid transparent;border-image:url("assets/optimized/parchment-frame.webp") 90 fill / 15px / 0 stretch;color:#442119}.result-dialog.incorrect h2{font-size:35px}.result-dialog.incorrect .culprit-name{font-size:22px}
@media(max-width:760px){dialog:has(.result-dialog){width:calc(100vw - 20px)}dialog:has(.result-dialog.incorrect){left:50%;top:50%}.result-dialog{min-height:330px}.result-dialog h2{font-size:28px}.result-dialog .culprit-name{font-size:17px}.result-dialog .result-portrait{max-width:135px}.result-dialog.incorrect{grid-template-columns:35% 65%;min-height:320px}.result-dialog.incorrect h2{font-size:20px}}
@media(min-width:761px){.mansion-game .room .person.portraits{height:min(100%,165px)!important;max-width:114px!important}.mansion-game .room .person.portraits .person-name{font-size:14px!important}}
@media(min-width:1600px) and (min-height:850px){.mansion-game .suspect-tray{height:136px;min-height:125px;border-width:9px!important;border-image-width:9px!important}.mansion-game .tray-people .person.portraits{height:113px!important}.mansion-game .tray-people .person.pawns{height:115px!important}}


/* ornament.css — preserved cascade order */
/* PC-only implementation of the approved v2 visual proposal. */
body{isolation:isolate;background:#0c241d!important;--metal:#b98c42;--header-height:76px}
body:before{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background:#102b22 var(--theme-backdrop,url("assets/optimized/manor-backdrop.webp")) center top/cover no-repeat}
body:after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(#041c1410,#041c1422);transition:background .2s}
body[data-time=day]:before{filter:brightness(1.4) saturate(.85)}body[data-time=night]:before{filter:brightness(.8)}
body[data-theme=halloween]:after{background:linear-gradient(#57300b22,#3a16062e)}body[data-theme=christmas]:after{background:linear-gradient(#133e4430,#0e263811)}
.ui-icon{display:inline-block;flex-shrink:0;vertical-align:middle;pointer-events:none}
button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.presentation-workspace>.topbar,body[data-screen=game][data-appearance=pawns] .topbar{height:var(--header-height)!important;min-height:var(--header-height);padding:6px 20px!important;background:transparent!important;border:0;box-shadow:none!important;gap:17px!important;overflow:visible;position:relative;z-index:12}
.brand{position:relative;border:0!important;border-radius:29px!important;background:linear-gradient(#173b2be8,#09281df2)!important;box-shadow:none!important;color:#f5e1a7!important;font-size:clamp(29px,2.6vw,43px)!important;padding:7px 29px!important;line-height:1.05;overflow:visible;flex-shrink:0}
body[data-screen=game][data-appearance=pawns] .brand{color:#f5e1a7!important;background:linear-gradient(#173b2be8,#09281df2)!important}
.brand:before,.page-plaque:before,.dialog-plaque:before{content:"";position:absolute;inset:-3px -7px;background:var(--theme-plaque,url("assets/plaque-edge.svg")) center/100% 100% no-repeat;pointer-events:none}
.brand:after{content:"✦";position:absolute;font-size:15px;color:#e7c477;top:-8px;left:calc(50% - 5px)}
.header-case,.header-rules{background:linear-gradient(105deg,#e9d1a1,#fff0cf 45%,#e7c995)!important;border:2px solid #b68b43!important;border-radius:20px 8px;box-shadow:inset 0 0 0 2px #fff1ca,0 2px 3px #0007;color:#302516!important}
.header-case{padding:5px 19px;font-weight:800;font-size:clamp(13px,1.2vw,20px)}.header-case small{font-size:10px;margin-top:2px}
.header-rules{padding:7px 13px;margin-right:74px;font-size:clamp(11px,1.05vw,18px);font-weight:800;flex:1;max-width:400px;white-space:nowrap}
.header-actions{gap:12px;flex-shrink:0}.header-actions .nav-button{border:2px solid #c29b4c;border-radius:12px 5px!important;box-shadow:inset 0 0 0 1px #edd38a66,0 2px 3px #0005;padding:5px 12px;gap:8px;min-height:38px;background:linear-gradient(#173c2b,#082a1c)}
.header-actions .nav-button svg{width:24px;height:24px}.header-actions .nav-button span{font-size:16px}
.save-indicator{position:absolute;right:5px;bottom:1px;font-size:10px;color:#bcd29d;opacity:.65}
.page-plaque{position:relative;background:linear-gradient(105deg,#e9d2a7,#fff0d1,#e7c796);color:#281e10;font-size:33px;padding:5px 54px;border-radius:25px 8px;border:0;box-shadow:0 2px 4px #0007}
.mansion-game{height:calc(100dvh - var(--header-height))!important;padding:0 6px 6px!important}
.mansion-game .investigation-layout{gap:13px!important}
.mansion-game .mansion-building{overflow:visible;position:relative}
.mansion-game .mansion-roof{position:relative;height:65px!important;min-height:58px!important;overflow:visible;z-index:6}
.mansion-game .roof-compass{position:absolute;width:80px;height:80px;top:-72px;right:-88px;bottom:auto;background:transparent;border:0;border-radius:50%;padding:0;box-shadow:0 2px 5px #0009;z-index:22;font-size:initial;letter-spacing:normal;overflow:visible}
.mansion-game .roof-compass:before,.mansion-game .roof-compass:after{display:none}
.mansion-game .room{padding-top:35px!important;padding-bottom:7px!important}
.mansion-game .room-title{min-width:0;width:49%;max-width:90%;font-size:clamp(14px,1.13vw,19px)!important;padding:3px 11px!important;border-radius:12px 5px;line-height:1.1;white-space:nowrap;min-height:27px;box-shadow:inset 0 0 0 1px #fff4d6,0 2px 3px #0008}
.mansion-game .room-title:before,.mansion-game .room-title:after{width:4px;height:4px;top:calc(50% - 2px);left:3px}.mansion-game .room-title:after{left:auto;right:3px}
.mansion-game .room-people{padding-top:0!important;gap:18px}.mansion-game .crime-badge{top:30px;font-size:12px;padding:0 8px;border-radius:6px 2px}.mansion-game .crime-room .room-people{padding-top:18px!important}
.mansion-game .room .person.portraits{height:min(100%,165px)!important;max-width:114px!important;border:2px solid #d6b77a!important;border-radius:14px 14px 6px 6px;box-shadow:0 3px 4px #0008;overflow:hidden;background:#5a4026}
.person.portraits .portrait-art{display:block;flex:1;width:100%;height:0;min-height:0;align-self:stretch;background:#5a4026;overflow:hidden}
.person.portraits .person-name{width:100%;min-height:29px!important;flex-shrink:0;border-top:1px solid #a78344;font-size:14px!important}
.person.portraits.selected{outline:2px solid #f3c54f;outline-offset:0;box-shadow:0 0 8px #e1ad3cbb!important;border-color:#f6d16d!important}
.mansion-game .room .person.pawns{max-width:145px!important;max-height:100%!important;height:100%!important}
.mansion-game .room .person.pawns .portrait-art{filter:drop-shadow(1.6px 0 #f8edcf) drop-shadow(-1.6px 0 #f8edcf) drop-shadow(0 1.6px #f8edcf) drop-shadow(0 -1.6px #f8edcf) drop-shadow(0 2px 2px #0008);overflow:visible}
.mansion-game .room .person.pawns.selected .portrait-art{filter:drop-shadow(2px 0 #fbd064) drop-shadow(-2px 0 #fbd064) drop-shadow(0 2px #fbd064) drop-shadow(0 -2px #fbd064) drop-shadow(0 0 5px #e8a728)}
.person.pawns .person-name{min-height:27px;border-radius:9px 3px;padding:3px 7px!important;font-size:15px!important}
.mansion-game .crime-marker{width:43%;max-width:151px;height:auto;left:4%;bottom:13px;stroke:#f5ead0;stroke-width:2.9;fill:none;opacity:1;filter:drop-shadow(0 1px 2px #352714);transform:rotate(-10deg) skewX(-12deg) scaleY(.8);transform-origin:50% 80%;z-index:1}
.mansion-game .crime-room .room-people{position:relative;z-index:2;justify-content:flex-end;padding-right:12px}
.placement-controls{border-radius:11px 5px;box-shadow:inset 0 0 0 2px #f6df9a77,0 2px 3px #0005;margin-top:8px;padding:5px 9px}
.placement-buttons button{border-radius:8px 3px}
.paper-panel,.mansion-game .clues-pane,.mansion-game .suspect-tray,.settings-dialog,.document-page,.dialog-body{position:relative;border:2px solid #ac7838!important;border-image:none!important;background:radial-gradient(ellipse at 30% 18%,#fff6e3bb,transparent 65%),repeating-linear-gradient(37deg,#c6aa7333 0px,transparent .5px,transparent 7px),linear-gradient(120deg,#f2dfb7,#fff1d4 50%,#efdab1)!important;border-radius:19px 8px 19px 8px;box-shadow:inset 0 0 0 3px #fff2cf,inset 0 0 0 5px #c39b5a,0 3px 7px #0008;color:#302416}
.paper-panel:after,.mansion-game .clues-pane:after,.mansion-game .suspect-tray:after,.settings-dialog:after,.document-page:after,.dialog-body:after{content:"";position:absolute;inset:3px;pointer-events:none;z-index:5;border-radius:inherit;background:var(--theme-corner,url("assets/ornament-corner.svg")) left top/43px 43px no-repeat}
.paper-panel:before,.mansion-game .clues-pane:before,.mansion-game .suspect-tray:before,.settings-dialog:before,.document-page:before,.dialog-body:before{content:"";position:absolute;inset:3px;pointer-events:none;z-index:5;border-radius:inherit;background:var(--theme-corner,url("assets/ornament-corner.svg")) left top/43px 43px no-repeat;transform:rotate(180deg)}
.mansion-game .suspect-tray{height:136px;min-height:125px;padding:8px 8px 6px!important;margin-top:8px;border-radius:20px 8px 16px 6px;gap:13px}
.mansion-game .tray-heading{width:150px;padding:5px 13px;height:100%;border-color:#c4a060}.mansion-game .tray-people{padding:0 2px;height:100%;align-items:flex-end;gap:10px;overflow-y:hidden;overflow-x:auto}
.mansion-game .tray-people .person.pawns{height:112px!important;width:min(108px,calc((100% - (var(--tray-count) - 1)*10px)/var(--tray-count)));min-width:64px;max-width:108px;flex-shrink:0}
.mansion-game .tray-people .person.pawns .portrait-art{height:0;flex:1;overflow:hidden;filter:drop-shadow(0 1px 1px #0005)}
.mansion-game .tray-people .person.pawns.selected .portrait-art{filter:drop-shadow(1px 0 #e9b546) drop-shadow(-1px 0 #e9b546) drop-shadow(0 0 3px #dca737)}
.mansion-game .tray-people .person.pawns .person-name{font-size:13px!important;width:100%;min-height:25px}
.mansion-game .tray-people .person.portraits{height:113px!important;width:min(94px,calc((100% - (var(--tray-count) - 1)*10px)/var(--tray-count)));min-width:64px;max-width:94px;flex-shrink:0;border:2px solid #c4a15c;overflow:hidden;border-radius:11px 11px 5px 5px}
.mansion-game .tray-people .person.portraits .person-name{font-size:13px!important;min-height:24px!important;padding:2px!important}
.mansion-game .clues-pane{height:calc(100% - 7px)!important;border-radius:65px 17px 20px 17px!important;padding:9px 15px 80px!important;margin-top:7px;overflow:hidden;min-height:0}
.mansion-game .clues-pane:after{inset:4px 4px 4px 9px;background-size:63px 63px;border-radius:inherit}
.mansion-game .clues-heading{min-height:89px;padding:0 0 9px!important;position:relative;border-bottom:1px solid #b58e5155}
.mansion-game .clues-heading h2{border:0!important;background:transparent!important;box-shadow:none!important;font-size:33px!important;display:inline-flex;gap:11px;min-width:0;padding:0 8px!important;line-height:1.3;align-items:center;margin-right:36px}
.mansion-game .clues-heading .icon-search{color:#b6882f;filter:drop-shadow(0 1px #573813)}
.clue-total{right:0;top:12px;border:2px solid #b49348;border-radius:13px 4px;padding:3px 9px;font-size:17px;box-shadow:inset 0 0 0 1px #f2d58655}
.clue-memo{font-size:11px;margin-top:6px}.mansion-game .clue-list{padding:0 2px;overflow:auto;scrollbar-width:thin}
.mansion-game .clue{padding:2px 0;border-color:#b98e4255;gap:0}.mansion-game .clue label{padding-right:0;gap:7px;width:100%}.mansion-game .clue input{border-radius:4px;min-width:19px;width:19px;height:19px}
body .mansion-game .clue-text{font-size:clamp(16px,1.12vw,19px)!important;line-height:1.38!important}
.mansion-game .clue-footer{min-height:46px;align-items:center;border-color:#c5a566;padding:7px 4px;flex-shrink:0}
.clue-pagination button{border-radius:9px 3px;box-shadow:inset 0 0 0 1px #fff0cc}
.mansion-game .game-toolbar{right:23px;bottom:22px;width:calc((100% - 13px)/3 - 36px);gap:8px;min-height:55px;align-items:stretch}
.mansion-game .game-toolbar>div{display:flex;gap:7px;flex:0 1 auto;align-items:stretch}.mansion-game .game-toolbar>div button{display:inline-flex;align-items:center;gap:4px;font-size:12px!important;padding:5px 8px;min-height:48px;white-space:nowrap;border:1px solid #aa7c3e;border-radius:10px 4px;box-shadow:inset 0 0 0 2px #fff1cd,0 2px 2px #65472166}
.mansion-game .game-toolbar>div .ui-icon{width:23px;height:23px}
.mansion-game .verify{font-size:clamp(17px,1.28vw,22px);gap:10px;min-width:166px!important;border-radius:15px 6px!important;box-shadow:inset 0 0 0 2px #ebd18077,0 2px 3px #0007;white-space:nowrap}.verify .icon-detective{width:34px;height:34px}
.investigation-status{height:calc(100dvh - var(--header-height));padding:17px 18px 12px;gap:22px;grid-template-columns:minmax(235px,.85fr) minmax(0,3fr)}
.mode-plaque{border-radius:23px 8px;border:2px solid #d4b064;box-shadow:inset 0 0 0 2px #e7c47d77,0 3px 6px #0007}.mode-plaque h2{font-size:20px}
.resume-panel{padding:12px 20px 15px}.resume-panel h2{margin:4px 0 8px;border-radius:18px 5px;font-size:21px}.resume-panel dl>div{padding:10px 5px}.resume-panel dt{display:flex;gap:9px;align-items:center;font-weight:800}.resume-panel dt .ui-icon{color:#705025}.resume-panel .resume-card{gap:8px;min-height:58px;border-radius:17px 6px}.resume-card .icon-search{color:#edc866}.next-case{padding:15px 17px}.next-case button{border-radius:14px 5px}.prototype-note{font-size:11px;color:#efe4c4}
.tier-tabs button{border-radius:21px 7px;box-shadow:inset 0 0 0 2px #fff2d7,0 2px 4px #0006;min-height:56px}
.tier-tabs button.active{box-shadow:inset 0 0 0 2px #edd08c66,0 0 6px #d9a93777}
.progress-panel{padding:12px 21px;min-height:90px}.casebook-paper{padding:15px 18px 11px}.status-filters{padding-bottom:10px}.status-filters button{border-radius:13px 4px}
.casebook-paper .case-card{border-radius:13px 5px;padding:9px 11px;min-height:116px;height:116px;border:1px solid #a47c39;box-shadow:inset 0 0 0 2px #fff4d9,0 2px 2px #5b452b55}
.casebook-paper .case-card.active{box-shadow:inset 0 0 0 2px #ffedb4,0 0 5px #ebbd4d77}.state-tag{display:flex;align-items:center;gap:5px}.unstarted-ring{width:14px;height:14px;border:1px solid currentColor;border-radius:50%;display:inline-block}
.settings-dialog{border-radius:30px 11px 30px 11px;padding:14px 36px 20px;max-height:91dvh}.settings-dialog:before,.settings-dialog:after{background-size:66px 66px}
.dialog-plaque{min-width:65%;padding:4px 20px 8px;margin:0 0 15px;border:0;border-radius:29px!important;box-shadow:none}.dialog-plaque h2{display:flex;align-items:center;justify-content:center;gap:13px}.dialog-plaque button{right:-112px;top:3px}
.settings-tabs{gap:10px;padding-bottom:12px;overflow:visible}.settings-tabs button{gap:6px;border-radius:12px 4px;white-space:nowrap;padding:7px 12px;font-size:16px}.settings-tabs .ui-icon{width:23px;height:23px}.settings-content{padding:4px 12px}.settings-section h3{display:flex;align-items:center;gap:11px;padding:5px 0}.settings-section h3 .ui-icon{color:#795727}.language-options{gap:24px}.setting-choice,.appearance-choice{border-radius:14px 5px}.appearance-choice{min-height:173px}.settings-actions{gap:22px}.settings-actions button{display:inline-flex;gap:12px;border-radius:17px 5px;min-width:210px;font-size:26px}.document-page,.dialog-body{padding:30px}
@media(max-width:1450px){body{--header-height:72px}.presentation-workspace>.topbar{padding:5px 12px!important;gap:12px!important}.brand{font-size:33px!important;padding:8px 21px!important}.header-case{font-size:14px;padding:6px 11px}.header-rules{font-size:13px;margin-right:61px;padding:6px 10px}.header-actions{gap:8px}.header-actions .nav-button{padding:5px 9px;gap:5px}.header-actions .nav-button span{font-size:13px}.header-actions .nav-button svg{width:20px;height:20px}.mansion-game .roof-compass{width:68px;height:68px;top:-66px;right:-75px}.mansion-game .room-title{font-size:16px!important;width:55%;min-height:25px}.mansion-game .clues-pane{padding-left:11px!important;padding-right:11px!important}.mansion-game .clues-heading h2{font-size:27px!important;margin-right:28px;gap:7px}.mansion-game .clues-heading h2 .ui-icon{width:34px;height:34px}.clue-total{font-size:14px;padding:3px 6px}.clue-memo{font-size:10px}.mansion-game .game-toolbar{right:20px;bottom:20px;width:calc((100% - 13px)/3 - 29px);gap:5px}.mansion-game .game-toolbar>div{gap:5px}.mansion-game .game-toolbar>div button{padding:5px 6px;font-size:11px!important;gap:3px}.mansion-game .game-toolbar>div .ui-icon{width:19px;height:19px}.mansion-game .verify{min-width:144px!important;font-size:18px;gap:6px;padding:6px 8px}.verify .icon-detective{width:28px;height:28px}.investigation-status{gap:14px;padding:12px;grid-template-columns:250px minmax(0,1fr)}.casebook-paper{padding:14px 12px}.resume-panel{padding:12px}.casebook-paper .case-card{height:118px;min-height:118px}.mansion-game .tray-heading{width:125px}.selection-status{font-size:13px}.placement-buttons button{font-size:13px!important}.placement-buttons .confirm-placement{font-size:16px!important}}
@media(max-width:1150px){.brand{font-size:27px!important;padding:8px 16px!important}.header-actions .nav-button span{font-size:12px}.header-rules{font-size:11px;margin-right:52px}.header-case{font-size:12px}.mansion-game .roof-compass{right:-65px;width:58px;height:58px;top:-61px}.mansion-game .investigation-layout{grid-template-columns:minmax(0,1.7fr) minmax(350px,1fr)!important}.mansion-game .game-toolbar{width:calc((100% - 13px)/2.7 - 29px)}.mansion-game .room-title{font-size:13px!important;width:66%}.selection-status{font-size:11px}.placement-buttons{gap:4px}.placement-buttons button{padding:4px 6px}.placement-buttons .confirm-placement{min-width:88px;font-size:14px!important}.mansion-game .tray-people .person.pawns{min-width:82px}.investigation-status{grid-template-columns:215px minmax(0,1fr)}.resume-panel dt{font-size:16px}.tier-tabs button{font-size:19px}.progress-panel{gap:10px}.progress-panel>strong{font-size:22px}.progress-panel>div{font-size:18px}.casebook-paper .case-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

.presentation-workspace>.topbar{border:0!important}
.mansion-game .room .person.portraits.selected{outline:2px solid #f5c54b;outline-offset:0}
.mansion-game .empty-mark{white-space:nowrap;max-width:90%;width:auto;letter-spacing:.12em;font-size:clamp(23px,1.8vw,30px);padding:10px 18px}
.mansion-game .crime-marker{transform:skewX(-8deg) scaleY(.9)}
html[lang=en] .mansion-game .verify{font-size:18px;gap:7px}
html[lang=en] .mansion-game .game-toolbar>div button{font-size:11px!important;padding:5px 6px;gap:4px}
html[lang=en] .mansion-game .crime-badge{white-space:nowrap}
@media(max-width:1150px){
  body{--header-height:88px}
  .presentation-workspace>.topbar{align-items:flex-start;padding-top:6px!important}
  .header-actions{margin-top:0}
  .header-rules{position:absolute;left:18px;top:55px;width:520px;max-width:calc(100% - 440px);padding:5px 8px;font-size:11px;margin:0;line-height:1}
  .mansion-game .roof-compass{top:-78px;right:-16px;width:58px;height:58px}
  .mansion-game .clues-pane{padding-bottom:123px!important}
  .mansion-game .game-toolbar{flex-wrap:wrap;min-height:96px;bottom:17px;gap:5px}
  .mansion-game .game-toolbar>div{width:100%;flex:1 0 100%;gap:7px}
  .mansion-game .game-toolbar>div button{flex:1;min-height:37px}
  .mansion-game .verify{width:100%;flex:1 0 100%;min-height:48px;font-size:19px}
  html[lang=en] .mansion-game .verify{font-size:18px}
  html[lang=en] .mansion-game .room-title{font-size:11px!important;width:68%}
}


/* refinement.css — preserved cascade order */
/* PC 0.6: illustrated handbook, joined portrait labels and result presentation. */
.person.portraits{gap:0!important;display:grid;grid-template-rows:minmax(0,1fr) 29px;align-items:stretch;justify-content:stretch;container-type:inline-size}
.person.portraits .portrait-art{display:block;width:100%;height:100%!important;max-height:100%;min-height:0;flex:none;align-self:stretch;overflow:hidden}
.person.portraits .person-name{margin:0!important;gap:0!important;align-self:stretch;min-height:0!important;height:100%;padding:2px 1px!important;line-height:1.15!important;white-space:nowrap!important}
.mansion-game .suspect-tray:has(.person.portraits){height:158px!important;min-height:158px!important}
.mansion-game .tray-people:has(.person.portraits){gap:7px}
.mansion-game .tray-people .person.portraits{height:136px!important;grid-template-rows:minmax(0,1fr) 25px;width:min(94px,calc((100% - (var(--tray-count) - 1)*7px)/var(--tray-count)))}
.mansion-game .tray-people .person.portraits .person-name{height:25px;min-height:25px!important;font-size:13px!important;overflow:hidden;white-space:nowrap!important}
body .mansion-game .tray-people .person.portraits[data-person=Christina] .person-name{font-size:min(11.5px,13cqw)!important;letter-spacing:-.025em;white-space:nowrap!important}

/* The diagrams use existing room/portrait atlases; text stays live and localized. */
.document-page.illustrated-help{width:calc(100% - 28px);max-width:none!important;height:calc(100dvh - var(--header-height) - 20px);margin:10px 14px;padding:20px 20px 12px;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;overflow:hidden}
.help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;min-height:0;overflow:auto;scrollbar-width:thin}
.help-step{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #c29b5f;border-radius:17px 6px;padding:10px 12px 5px;background:#fff4dc55}
.help-step h2{margin:0;padding:6px 13px;font:800 clamp(18px,1.45vw,24px)/1.25 var(--serif);color:#f9e9b9;background:linear-gradient(#244d32,#0c301f);border:2px solid #bf9547;border-radius:15px 4px;box-shadow:inset 0 0 0 1px #f4db9699;white-space:nowrap}
.help-graphic{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;margin:10px 0 5px;border-radius:12px 4px}
.help-step p{font:750 clamp(14px,1.04vw,17px)/1.5 var(--serif);color:#332719;text-align:center;margin:5px 0 0;min-height:53px;display:flex;align-items:center;justify-content:center;flex-direction:column}
.help-step p br{display:block;content:"";margin:0}
.help-footnote{display:flex;gap:15px;justify-content:space-between;align-items:center;font:650 13px/1.5 var(--serif);border-top:1px solid #b79655;padding:8px 10px 0;color:#463722}.help-footnote span{font-size:11px;white-space:nowrap}
.help-footnote{display:grid;grid-template-columns:1fr auto;gap:3px 15px}.help-footnote small{grid-column:1/-1;font-size:11px}
.help-person{display:grid;grid-template-rows:minmax(0,1fr) 22px;gap:0;border:2px solid #c6a15c;border-radius:11px 11px 5px 5px;overflow:hidden;background:#51402a;min-width:0;width:80px;height:111px;box-shadow:0 2px 3px #0005;flex-shrink:0}
.help-person>.portrait-art{width:100%;height:100%;min-height:0;display:block;background:#51402a}
.help-person>span{display:flex;align-items:center;justify-content:center;font:800 11px/1 var(--serif);color:#302416;white-space:nowrap;background:linear-gradient(#fff0cd,#e1c48b);border-top:1px solid #b18943}
.help-person.marked>span{background:linear-gradient(#335a38,#123b25);color:#fae7b4}
.help-room{position:relative;overflow:hidden;isolation:isolate;border:2px solid #b4924a;border-radius:11px 4px;background:#233a29;min-width:0;min-height:0;flex:1;align-self:stretch}
.help-room .room-scene{position:absolute;inset:0;width:100%;height:100%;z-index:-1;filter:brightness(.88)}
.help-room-title{position:absolute;left:9%;top:3px;width:82%;text-align:center;white-space:nowrap;font:800 11px/1.3 var(--serif);color:#302416;background:linear-gradient(#faebc9,#e4c998);padding:3px;border:1px solid #9f763c;border-radius:7px 2px;z-index:2}
.help-room-people{position:absolute;inset:33px 5px 7px;display:flex;align-items:flex-end;justify-content:center;gap:6px}
.help-room-people .help-person{height:min(100%,135px);width:calc(50% - 4px);max-width:90px;grid-template-rows:minmax(0,1fr) 21px}
.help-crime .help-room-people{justify-content:flex-end}.help-crime .help-room-people .help-person{width:47%}
.help-body{position:absolute;bottom:7px;left:2px;width:52%;height:auto;fill:none;stroke:#f8eed4;stroke-width:3;filter:drop-shadow(0 1px #32220c);z-index:0}
.help-empty{position:absolute;inset:44% 9% auto;text-align:center;padding:7px 4px;font:800 13px var(--serif);white-space:nowrap;border:2px solid #caab64;border-radius:10px 3px;color:#ffeab2;background:#15412ce8}
.help-mansion{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:4px;padding:5px;background:#5c492e;border:2px solid #c6a266;border-radius:8px;min-width:0;min-height:0;height:100%}
.help-mansion .help-room{border-radius:0;border:0}.help-mansion .help-room-title{font-size:7px;left:1%;width:98%;padding:2px 0;top:1px}.help-mansion .help-room-people{inset:20px 2px 3px;gap:2px}.help-mansion .help-person{height:100%;width:65%;max-width:64px;grid-template-rows:minmax(0,1fr);border-width:1px;border-radius:5px}.help-mansion .help-person>span{display:none}.help-mansion .help-body{width:48%;bottom:2px;stroke-width:4}
.help-read{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%;height:100%;min-height:0}
.help-clues{position:relative;background:linear-gradient(120deg,#fff4da,#eedbb1);border:2px solid #bb9450;border-radius:12px 4px;padding:12px 9px;min-width:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px;overflow:hidden;color:#382918}
.help-clues>div:not(.help-pages){display:flex;gap:7px;align-items:flex-start;font:750 14px/1.45 var(--serif);border-bottom:1px solid #c7a46a88;padding-bottom:10px}.help-clues>strong{display:flex;align-items:center;justify-content:center;gap:7px;font-size:16px}.help-checkbox{width:20px;height:20px;flex-shrink:0;border:2px solid #3b301f;border-radius:3px;text-align:center;line-height:17px;color:#fff1c8;font-weight:800}.example-checked{color:#857e69}.example-checked .help-checkbox{background:#2b5434;border-color:#2b5434}
.help-pages{display:flex;gap:7px;justify-content:flex-end}.help-pages>*{padding:4px 12px;border:1px solid #ae8542;border-radius:6px;color:#3a2917;font-size:17px}.help-pages b{color:#f7e4ad;background:#1a4129}.help-read .help-clues{padding:8px 7px;gap:8px}.help-read .help-clues>div:not(.help-pages){font-size:11px;gap:5px;padding-bottom:7px}.help-read .help-checkbox{width:14px;height:14px;border-width:1px}.help-read .help-clues>strong{font-size:14px}
.help-move{display:grid;grid-template-columns:34% 1fr;gap:17%;padding:5px 0;width:100%;height:100%;position:relative}.help-move>.help-person{width:100%;height:90%;max-width:145px;align-self:center;justify-self:center;grid-template-rows:minmax(0,1fr) 27px}.help-move>.help-person span{font-size:14px}.help-move>.help-room:after{content:"";position:absolute;inset:45% 24% 8%;border:2px dashed #f3e4b9;border-radius:9px}.help-move .help-arrow{position:absolute;left:30%;top:27%;width:31%;height:38%;z-index:3;filter:drop-shadow(0 1px 2px #0009)}.help-hand{position:absolute;width:60px;height:73px;left:22%;bottom:17%;z-index:4;transform:rotate(-14deg);filter:drop-shadow(0 1px 2px #0007)}
.help-capacity{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:100%;height:100%}.help-capacity>div{display:flex;flex-direction:column;gap:4px;min-width:0}.help-capacity>div>span{text-align:center;padding:4px 2px;font:800 14px var(--serif);color:#3b2914;background:#f8e6bb;border:1px solid #b28c43;border-radius:8px 3px}.help-capacity>div:last-child>span{color:#fff0be;background:#75292b}.help-capacity .help-person>span{font-size:10px}.help-capacity .help-person:has([aria-label="クリスティーナ"])>span{font-size:8px}
.help-confirm{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;gap:9px}.help-confirm>div:first-child{position:relative;isolation:isolate;min-width:0}.help-confirm>div:first-child>.help-room{position:absolute;inset:0;z-index:-1}.help-confirm>div:first-child>.help-person{position:absolute;top:22%;bottom:8%;left:5%;height:70%;width:46%;max-width:100px}.help-confirm-button{position:absolute;right:4%;bottom:9%;font:800 15px var(--serif);display:flex;align-items:center;gap:3px;color:#302414;background:#f3dfac;border:2px solid #bb9850;border-radius:7px 2px;padding:6px}.help-confirm .help-empty{inset:44% 3% auto;font-size:14px}
.help-verify{display:grid;grid-template-columns:2fr 1fr;gap:12px;height:100%;width:100%;align-items:center}.help-verify .help-mansion{height:100%;max-height:230px}.help-verify-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;padding:16px 6px;font:800 20px/1.35 var(--serif);color:#f6e4ae;border:3px solid #cba44f;outline:1px solid #f6df97;outline-offset:2px;border-radius:16px 4px;background:linear-gradient(#264e34,#103322);text-align:center}

/* Result frames and decoration never share the text's safe area. */
dialog:has(.result-v3.success){width:min(1160px,calc(100vw - 48px));max-width:1160px;max-height:calc(100dvh - 30px)}
.result-dialog.result-v3{position:relative;isolation:isolate;border:2px solid #c29a43;border-radius:24px 6px;box-shadow:inset 0 0 0 4px #113726,inset 0 0 0 6px #d3aa54,0 6px 22px #0009;overflow:visible}
.result-v3 .result-corner{position:absolute;width:44px;height:44px;background:var(--theme-corner,url("assets/ornament-corner.svg")) center/100% 100%;filter:brightness(1.7);pointer-events:none;z-index:7}.result-corner.tl{left:0;top:0}.result-corner.tr{right:0;top:0;transform:scaleX(-1)}.result-corner.bl{left:0;bottom:0;transform:scaleY(-1)}.result-corner.br{right:0;bottom:0;transform:rotate(180deg)}
.result-dialog.result-v3.success{display:grid;grid-template-columns:39% minmax(0,1fr);gap:0;height:min(630px,calc(100dvh - 40px));min-height:0!important;padding:12px;background:radial-gradient(ellipse at 65% 20%,#284a2f88,transparent 70%),linear-gradient(130deg,#102e20,#123523 60%,#08271a);color:#f5e6b6}
.result-v3.success .result-person{min-width:0;min-height:0;display:block;height:100%}
.result-v3.success .result-portrait{margin:0;width:100%;height:100%;max-height:none;max-width:none;aspect-ratio:auto;border:0;border-radius:16px 0 0 3px;background:#203b27;overflow:hidden;box-shadow:none}
.result-v3.success .result-portrait .portrait-art{display:block;width:100%;height:100%;flex:none;min-height:0;background:transparent}
.result-v3.success .result-message{padding:7px 24px 12px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:8px;min-width:0;min-height:0;text-align:center;border:0;background:transparent}
.result-v3.success .eyebrow{font:700 18px Georgia,serif;letter-spacing:4px;color:#efd07d;margin:0}
.result-title{display:flex;align-items:center;justify-content:center;gap:5px;min-height:95px;flex-shrink:0}.result-v3.success h2{font:800 clamp(43px,4.2vw,68px)/1.15 var(--serif);color:#f5d270;margin:0;white-space:nowrap;text-shadow:0 2px #8c6422,0 4px 3px #0008}.result-laurel{width:57px;height:95px;flex-shrink:0;overflow:visible}.result-laurel.right{transform:scaleX(-1)}
.result-v3 .result-case{align-self:center;display:inline-flex;justify-content:center;align-items:center;padding:3px 18px;border:1px solid #c8a65b;border-radius:15px 3px;font:800 21px/1.25 var(--serif);color:inherit;background:#163b27;min-height:32px;margin:0}
.result-v3.success .culprit-name{position:relative;container-type:inline-size;min-height:80px;display:flex;align-items:center;justify-content:center;border:2px solid #a87b38!important;border-image:none!important;border-radius:17px 5px;background:linear-gradient(115deg,#eed8ab,#fff1d3 50%,#ecd3a3);box-shadow:inset 0 0 0 3px #fff0ca,inset 0 0 0 4px #c19c5c,0 2px 3px #0006;color:#2d2112;margin:4px 0 0;padding:12px 24px;white-space:nowrap;line-height:1.25}
.result-v3.success .culprit-name:before,.result-v3.success .culprit-name:after{display:none!important}
.result-v3.success .culprit-name>span{display:block;font:800 clamp(20px,calc(92cqw / var(--name-units)),38px)/1.25 var(--serif);white-space:nowrap}
.result-summary{display:grid;grid-template-columns:minmax(0,1fr) 122px;gap:8px;align-items:center;min-height:133px}.result-v3.success .result-summary p{font:750 18px/1.6 var(--serif);margin:0;color:#f1e4b9;text-wrap:balance}.clear-medallion{display:block;width:122px;height:145px;overflow:visible;filter:drop-shadow(0 3px 2px #0008)}
.result-v3 .button-row{display:flex;gap:14px;justify-content:center;align-items:stretch;margin:0!important;flex-shrink:0}.result-v3 .button-row>button{flex:1;min-height:57px;border:2px solid #b18a40;border-radius:13px 4px;font:800 23px/1.25 var(--serif);padding:9px 14px;background:linear-gradient(#fff0cc,#dfbf88);color:#322616;box-shadow:inset 0 0 0 2px #fff4d6,0 2px 3px #0007;white-space:nowrap}
html[lang=en] .result-v3.success h2{font-size:43px;letter-spacing:0}html[lang=en] .result-v3 .button-row>button{font-size:20px}

dialog:has(.result-v3.incorrect){width:min(1160px,calc(100vw - 48px));max-width:1160px;max-height:calc(100dvh - 30px);margin:0;left:50%;top:64%;transform:translate(-50%,-50%)}
.result-dialog.result-v3.incorrect{display:grid;grid-template-columns:25% minmax(0,1fr);gap:15px;padding:25px;min-height:410px!important;height:auto;background:radial-gradient(ellipse at 30% 20%,#8c3536,#5a171d 75%);box-shadow:inset 0 0 0 4px #752329,inset 0 0 0 6px #cda54e,0 5px 18px #0008;color:#4e1820}
.result-v3.incorrect .result-person{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;gap:7px}
.review-person-label{border:2px solid #c4a04d;border-radius:14px 4px;background:#69242a;color:#ffedb9;font:800 14px/1.3 var(--serif);padding:5px 9px;width:100%;text-align:center;white-space:nowrap}
.result-v3.incorrect .result-portrait{width:100%;height:auto;aspect-ratio:1;max-width:240px;max-height:240px;min-height:0;border:2px solid #d3b16c;border-radius:15px 5px;overflow:hidden;background:#674b2c;flex:1}
.result-v3.incorrect .result-portrait .portrait-art{display:block;height:100%;width:100%;min-height:0}
.result-v3.incorrect .culprit-name{min-height:39px;padding:5px 10px;margin:0;width:100%;font:800 23px/1.2 var(--serif);color:#f6e8bb;background:linear-gradient(#294d32,#103625);border:2px solid #c5a457;border-radius:12px 4px;white-space:nowrap;text-align:center}
.result-v3.incorrect .result-message{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px 25px;border:2px solid #bd9651!important;border-image:none!important;border-radius:21px 6px;background:radial-gradient(ellipse at 35% 20%,#fff7e4,transparent 65%),linear-gradient(120deg,#f0dcb4,#fff0d0 50%,#edd5a9);box-shadow:inset 0 0 0 3px #fff0ce,inset 0 0 0 4px #cca466;min-width:0;color:#581b23}
.review-eyebrow{display:flex;align-items:center;justify-content:center;gap:12px;font:700 13px/1.3 Georgia,serif;letter-spacing:2px;white-space:nowrap}.review-eyebrow .result-case{font-size:12px;background:transparent;letter-spacing:0;min-height:22px;padding:2px 7px;border-color:#b38d4d}
.result-v3.incorrect h2{font:800 clamp(26px,2.7vw,44px)/1.3 var(--serif);margin:2px 0 0;color:#641f27;white-space:nowrap}
.result-v3.incorrect .review-prompt{font:800 clamp(17px,1.35vw,22px)/1.5 var(--serif);color:#302515;white-space:nowrap;margin:0;padding:10px 0 0;border-top:1px solid #b79558;width:100%;text-align:center}
.result-v3.incorrect .review-kept{font:700 16px/1.4 var(--serif);color:#49341d;white-space:nowrap;margin:0;padding:0}
.result-v3.incorrect .button-row{width:100%;padding-top:3px}.result-v3.incorrect .button-row button{flex:0 1 420px;gap:11px;min-height:55px;font-size:25px}
html[lang=en] .result-v3.incorrect h2{font-size:clamp(24px,2.1vw,34px)}
@media(max-height:850px){.result-dialog.result-v3.success{height:min(570px,calc(100dvh - 40px))}.result-v3.success .result-message{gap:7px;padding:7px 18px}.result-title{min-height:78px}.result-laurel{height:78px;width:48px}.result-v3.success h2{font-size:52px}.result-v3.success .culprit-name{min-height:69px;padding:9px 19px}.result-v3.success .culprit-name>span{font-size:clamp(20px,calc(92cqw / var(--name-units)),32px)}.result-summary{min-height:111px;grid-template-columns:minmax(0,1fr) 108px}.clear-medallion{width:108px;height:128px}.result-v3 .button-row>button{min-height:49px;font-size:21px}.result-v3.success .result-summary p{font-size:16px}.result-v3.incorrect{top:auto}.help-step h2{font-size:19px}.help-step p{font-size:14px}}
@media(max-width:1150px){.document-page.illustrated-help{padding:15px 16px 10px}.help-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:310px}.help-footnote{flex-direction:column;gap:2px;font-size:12px;padding-top:5px}.help-step h2{font-size:19px}.help-step p{font-size:14px}.result-v3.success .result-message{padding-left:16px;padding-right:16px}.result-v3.success h2{font-size:48px}.result-laurel{width:44px;height:78px}.result-v3 .button-row>button{font-size:20px;padding:9px}.result-dialog.result-v3.incorrect{padding:22px;gap:12px;min-height:380px!important}.result-v3.incorrect .result-message{padding:18px;gap:12px}.result-v3.incorrect h2{font-size:30px}.result-v3.incorrect .review-prompt{font-size:17px}.result-v3.incorrect .review-kept{font-size:14px}.review-eyebrow{font-size:11px;gap:7px;letter-spacing:1px}.review-person-label{font-size:12px}.result-v3.incorrect .button-row button{font-size:22px}.result-v3.incorrect .culprit-name{font-size:20px}html[lang=en] .result-v3.success h2{font-size:33px}html[lang=en] .result-v3 .button-row>button{font-size:17px}html[lang=en] .result-v3.incorrect h2{font-size:25px}}


/* revision-v4.css — preserved cascade order */
/* PC 0.7 — approved v4 presentation and theme asset hooks. */
.person.pawns{container-type:inline-size}
.mansion-game .tray-people .person.pawns .person-name{font-size:min(13px,16.5cqw)!important;white-space:nowrap!important;letter-spacing:-.015em}
body .mansion-game .tray-people .person.pawns[data-person=Christina] .person-name{font-size:min(11.5px,12cqw)!important;white-space:nowrap!important;letter-spacing:-.025em;height:25px;min-height:25px;overflow:hidden}
.mansion-game .room-people{display:block!important;position:relative;min-height:0;padding:0!important}
.mansion-game .room .person-slot{position:absolute;width:46%;height:100%;transform:translateX(-50%);display:flex;align-items:flex-end;justify-content:center;pointer-events:none}
.mansion-game .room .person-slot>.person{pointer-events:auto;width:100%!important;flex-shrink:0}
.mansion-game .crime-room .person-slot{height:calc(100% - 20px)}
.mansion-game .crime-room{box-shadow:inset 0 0 0 3px var(--theme-crime,#6d252d),inset 0 0 0 5px #d3af5b!important}
.mansion-game .crime-badge{top:30px;min-height:28px;min-width:50%;max-width:91%;padding:2px 11px;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;border:2px solid var(--theme-gold,#c4a052);border-radius:10px 3px;background:linear-gradient(#85393d,var(--theme-crime,#6d252d));box-shadow:inset 0 0 0 1px #e3c77988,0 2px 3px #0008;color:#fff0c4;font:800 14px/1.1 var(--serif);z-index:6}
.mansion-game .crime-marker{position:absolute;left:var(--mark-x,4%);top:var(--mark-y,62%);width:var(--mark-w,43%);height:var(--mark-h,33%);bottom:auto;max-width:none;transform:none;fill:none;color:#f7edcf;stroke:currentColor;opacity:1;filter:drop-shadow(0 1px 1px #20170d);pointer-events:none;z-index:1}
.crime-frame-corner{position:absolute;width:28px;height:28px;background:var(--theme-corner,url("assets/ornament-corner.svg")) center/100% 100%;filter:brightness(1.8);z-index:5;pointer-events:none}.crime-frame-corner.tl{top:2px;left:2px}.crime-frame-corner.tr{top:2px;right:2px;transform:scaleX(-1)}.crime-frame-corner.bl{bottom:2px;left:2px;transform:scaleY(-1)}.crime-frame-corner.br{bottom:2px;right:2px;transform:rotate(180deg)}
.help-body{color:#f8eed4;stroke:currentColor}
.document-page.illustrated-help{grid-template-rows:auto minmax(0,1fr) auto}
.help-topline{display:flex;justify-content:space-between;align-items:center;min-height:38px;padding:0 8px 7px;border-bottom:1px solid #c39b58}
.help-topline>strong{font:800 23px/1.2 var(--serif);color:var(--theme-ink,#2d2316)}
.help-topline button{font:800 19px/1.2 var(--serif);padding:7px 19px;min-height:37px;border:2px solid #b99045;border-radius:12px 4px;background:linear-gradient(#fff0cd,#e0c18a);color:#372918;box-shadow:inset 0 0 0 2px #fff0c5}
.header-actions .nav-button[aria-pressed=true]{border-color:#edcf79;box-shadow:inset 0 0 0 1px #e8d39577,0 0 5px #e6bc5266}
.result-v3.incorrect .empty-suspect{display:flex;align-items:center;justify-content:center;background:linear-gradient(#4b5941,#263e2d);color:#e7d7ad}
body:after{background:var(--theme-overlay,#041c1418)!important}
body[data-time-artwork=true]:before{filter:none!important}
body button.primary,body .confirm-placement{background:linear-gradient(#285037,var(--theme-green,#143a27))!important;border-color:var(--theme-gold,#c4a052)!important}
.paper-panel,.mansion-game .clues-pane,.mansion-game .suspect-tray,.settings-dialog,.document-page,.dialog-body{background:radial-gradient(ellipse at 30% 18%,#fff6e3bb,transparent 65%),repeating-linear-gradient(37deg,#c6aa7333 0px,transparent .5px,transparent 7px),linear-gradient(120deg,var(--theme-paper,#f4e6c9),#fff1d4 50%,var(--theme-paper,#f4e6c9))!important;color:var(--theme-ink,#2d2316)}
@media(max-width:1150px){.mansion-game .crime-badge{font-size:11px;gap:4px;padding:2px 7px;min-height:25px;top:28px}.mansion-game .crime-badge .ui-icon{width:13px;height:13px}.crime-frame-corner{width:23px;height:23px}.mansion-game .crime-room .person-slot{height:calc(100% - 24px)}.help-topline>strong{font-size:20px}.help-topline button{font-size:16px;min-height:33px;padding:5px 13px}}

/* Approved compact case-closed dialog, centered in the viewport. */
dialog:has(.result-v3.success){width:min(1160px,calc(100vw - 48px));max-width:1160px;margin:0;left:50%;top:50%;transform:translate(-50%,-50%);max-height:calc(100dvh - 40px)}
.result-dialog.result-v3.success{height:410px;grid-template-columns:28% minmax(0,1fr);padding:12px;gap:8px}
.result-v3.success .result-message{padding:8px 20px;gap:6px}
.result-v3.success .eyebrow{font-size:14px;letter-spacing:3px}
.result-v3.success .result-title{min-height:58px;gap:6px}
.result-v3.success h2{font-size:46px}
.result-v3.success .result-laurel{height:58px;width:36px}
.result-v3.success .result-case{font-size:17px;min-height:27px;padding:2px 14px}
.result-v3.success .culprit-name{min-height:60px;padding:8px 18px;margin:2px 0 0}
.result-v3.success .culprit-name>span{font-size:clamp(20px,calc(92cqw / var(--name-units)),30px)}
.result-v3.success .result-summary{min-height:88px;grid-template-columns:minmax(0,1fr) 83px;gap:10px}
.result-v3.success .result-summary p{font-size:17px}
.result-v3.success .clear-medallion{width:83px;height:99px}
.result-v3.success .button-row{gap:12px}
.result-v3.success .button-row>button{font-size:21px;min-height:47px;padding:8px 12px}
html[lang=en] .result-v3.success h2{font-size:35px}
@media(max-width:1150px){.result-dialog.result-v3.success{height:380px;grid-template-columns:27% minmax(0,1fr)}.result-v3.success .result-message{padding:4px 12px;gap:4px}.result-v3.success h2{font-size:40px}.result-v3.success .result-title{min-height:51px}.result-v3.success .result-laurel{height:51px;width:31px}.result-v3.success .result-summary{min-height:80px;grid-template-columns:minmax(0,1fr) 76px}.result-v3.success .clear-medallion{width:76px;height:90px}.result-v3.success .result-summary p{font-size:15px}.result-v3.success .culprit-name{min-height:54px}.result-v3.success .button-row>button{font-size:18px;min-height:45px}html[lang=en] .result-v3.success h2{font-size:29px}}


/* 0.8: independent room colors and character styles; fixed neutral atmosphere. */
body[data-atmosphere=static]:before{filter:none!important}
body[data-room-palette=matched]{--room-color-filter:none}
body[data-room-palette=vivid]{--room-color-filter:saturate(1.38) contrast(1.035)}
body[data-room-palette=muted]{--room-color-filter:saturate(.5) contrast(.96)}
body[data-atmosphere=static] .room-scene.room-artwork,
body[data-atmosphere=static] .help-room .room-scene,
.room-color-preview .room-scene{filter:var(--room-color-filter,none)!important;opacity:1!important}
.room-color-preview{position:relative;overflow:hidden;aspect-ratio:4/3;max-width:390px;margin:20px auto 12px;border:2px solid #b28a3e;border-radius:8px}
.room-color-preview .room-scene{position:absolute;inset:0;width:100%;height:100%}
body[data-character-style=caricature] .appearance-choice .preview-piece .portrait-art{width:110px}
body[data-character-style=caricature] .mansion-game .room .person.pawns .portrait-art{overflow:hidden}
.settings-section:first-child{overflow:visible}

/* 0.8.1: keep the settings room preview above its parchment background. */
.room-color-preview{width:100%;max-width:390px;isolation:isolate}
.room-color-preview .room-scene{display:block;z-index:0}

/* 0.8.3: one portrait matte color, including the unplaced tray and SVG padding. */
body[data-character-style=caricature] svg.portrait-art.caricature-portrait-art{background:#95816b!important}
/* Connected bust portraits retain their painted brown background in SVG padding. */
body[data-character-style=caricature] svg.portrait-art.connected-portrait-art{background:#70411e!important}
/* In the tray, narrow cards shrink with the whole portrait instead of leaving
   a fixed-height SVG band above the name. Keep the existing wide-card limit. */
body[data-character-style=caricature] .mansion-game .tray-people .person.portraits:has(.connected-portrait-art){height:auto!important;grid-template-rows:auto 25px}
body[data-character-style=caricature] .mansion-game .tray-people .person.portraits .connected-portrait-art{height:auto!important;aspect-ratio:1122 / 1402;max-height:107px}
/* Approved pawn-tray upper bodies: one crop and scale for every character. */
body[data-character-style=caricature] .mansion-game .tray-people .person.pawns:has(.pawn-tray-art){height:auto!important;display:grid;grid-template-rows:auto 25px;gap:0;align-items:stretch;justify-content:stretch;border:1px solid #b69553;background:#968772}
body[data-character-style=caricature] .mansion-game .tray-people .person.pawns .pawn-tray-art{width:100%;height:auto!important;aspect-ratio:640 / 740;max-height:85px;flex:none;filter:none;background:#968772!important}
body[data-character-style=caricature] .mansion-game .tray-people .person.pawns:has(.pawn-tray-art) .person-name{height:25px;min-height:25px;display:flex;align-items:center;justify-content:center;margin:0;border-radius:0;line-height:1;padding:2px!important}
/* About and release version share one package.json version in both clients. */
.settings-about{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #b5965c77;margin:8px 12px 0;padding:10px 0;color:#4c3821}
.settings-about>button{font:700 15px var(--serif);min-height:36px;border:1px solid #b49352;border-radius:9px 3px;padding:6px 12px;color:inherit;gap:6px}
.settings-about>span{font:600 13px var(--serif);white-space:nowrap}
dialog:has(.about-dialog){width:min(620px,calc(100vw - 28px));max-width:620px;max-height:calc(100dvh - 28px);margin:0;left:50%;top:50%;transform:translate(-50%,-50%);overflow:auto}
.about-dialog{border:2px solid #c6a35d;border-radius:19px 6px;padding:22px;color:#f4e6be;background:linear-gradient(125deg,#244b34,#102d20);box-shadow:inset 0 0 0 3px #123323,inset 0 0 0 4px #b29458}
.about-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #b99b5c88;padding-bottom:10px}
.about-dialog h2{display:flex;align-items:center;gap:8px;font:700 23px var(--serif);margin:0;color:#f3d98f}
.about-dialog>header>button{flex:none;width:35px;min-height:35px;padding:5px;border:0;color:#f4e6be}
.about-content{padding:22px 4px 12px}.about-content h3{font:700 28px Georgia,serif;color:#f4dfab;margin:0 0 8px}
.about-version{font:600 14px var(--serif);margin:0 0 20px;color:#d8c79d}.about-credit{font:600 17px/1.9 var(--serif);margin:0;overflow-wrap:anywhere}
.about-dialog>footer{display:flex;justify-content:center;margin-top:12px}.about-dialog>footer>button{min-width:130px;min-height:41px;font:700 17px var(--serif);border:1px solid #bfa05e;border-radius:10px 3px;background:linear-gradient(#f9e9c3,#dbbb81);color:#302718}
@media(max-width:900px){.settings-about{margin:6px 2px 0;gap:8px;flex-wrap:wrap}.settings-about>button{font-size:13px;padding:5px 8px}.settings-about>span{font-size:12px}.about-dialog{padding:16px}.about-dialog h2{font-size:19px}.about-content{padding:16px 1px 8px}.about-content h3{font-size:25px}.about-credit{font-size:15px;line-height:1.8}}
