/* Room-first escape layout. Shared platform navigation and core objects retain their IDs. */
.study-main{max-width:1920px;padding:20px 24px 45px}.study-layout{grid-template-columns:minmax(0,1fr) 324px;gap:20px}.study-room.panorama-active{aspect-ratio:auto;height:clamp(540px,72vh,860px);min-height:540px}.study-heading{margin-bottom:14px}.study-heading h1{font-size:34px}.study-heading .study-tools button{font-size:14px;min-height:44px}.study-tools #show-bag,.study-tools #show-clues,.study-tools #hint,.study-tools #study-story-open,.study-tools>a{display:none}.escape-roadmap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 18px}.escape-roadmap button{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid #c5b68f;background:#f4efdf;padding:12px 18px;border-radius:7px;min-height:60px;color:#81775f}.escape-roadmap button>span{font:26px StudyKai,KaiTi,serif;border-right:1px solid #baac865e;padding-right:14px;color:#aa9464}.escape-roadmap strong{font-size:16px;letter-spacing:.06em}.escape-roadmap small{margin-left:auto;font-size:12px}.escape-roadmap button[aria-current=step]{background:#2c5046;color:#f1e5bf;border-color:#b89b5b;box-shadow:inset 0 0 0 3px #3d5f4e}.escape-roadmap button[aria-current=step]>span{color:#ddc18b}.companion-panel{position:sticky;top:calc(var(--escape-header-height,80px) + 14px);overflow:hidden;border-radius:9px;background:#f4efdf;border:1px solid #ac9c75}.companion-portrait{height:112px;aspect-ratio:auto;background:linear-gradient(100deg,#102f30,#32473c)}.companion-portrait>img{position:absolute;right:0;top:0;width:120px;height:150px;object-position:50% 8%;opacity:.95}.companion-portrait:after{background:linear-gradient(90deg,#153231,transparent 80%),linear-gradient(0deg,#203b35a1,transparent 45%)}.companion-name{left:18px;bottom:18px}.companion-name strong{font-size:26px}.companion-name em{font-size:12px}.companion-copy{padding:12px 16px;background:#eae7d7}.companion-copy p{font-family:system-ui,'Microsoft YaHei',sans-serif;font-size:13px;line-height:1.8;color:#526556}.story-teaser,.study-story-panel{display:none}.escape-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;border-top:1px solid #c9bea2;border-bottom:1px solid #c9bea2;background:#e7dfc9}.escape-nav button{border:0;border-bottom:3px solid transparent;color:#685f47;background:transparent;min-height:52px;font-size:14px;font-weight:700;padding:8px 2px}.escape-nav button[aria-pressed=true]{background:#f7f3e7;border-bottom-color:#52715b;color:#244d3e}.escape-content{padding:17px;max-height:min(620px,62vh);overflow:auto;scrollbar-width:thin;scrollbar-color:#b5a77e transparent;scroll-margin-top:calc(var(--escape-header-height,80px) + 15px)}.escape-section-heading>small{color:#9d8051;font-size:11px;letter-spacing:.12em}.escape-section-heading h2{font:23px/1.5 StudyKai,KaiTi,serif;color:#2e5143;margin:6px 0}.escape-section-heading p{font-size:12px;line-height:1.8;color:#7a7c66;margin-bottom:14px}.escape-desk .quest-card{padding:4px 0 16px;border-bottom:1px solid #cfc5aa;margin-bottom:14px}.escape-desk .quest-card summary{font-size:14px}.escape-desk .quest-card summary strong{font-size:13px}.escape-desk .quest-card li strong{font-size:14px;font-weight:600}.escape-desk .quest-card li small{font-size:12px;color:#737b68;line-height:1.7}.escape-desk .quest-card li{padding-left:20px}.escape-card{padding:14px;border:1px solid #c9c1a7;background:#faf7eb;border-radius:6px;margin-bottom:12px}.escape-card h3{font-size:15px;line-height:1.6;margin:0 0 7px;color:#3c5745}.escape-card p{font-size:12px;line-height:1.8;color:#707864;margin-bottom:10px}.escape-card button,.escape-content>button,.escape-locations button{display:inline-block;border:1px solid #baa67a;background:#f1ead7;color:#4c644e;border-radius:4px;min-height:44px;font-size:12px;padding:8px 10px;margin:3px 5px 0 0}.escape-card>small{display:block;font-size:11px;line-height:1.7;color:#8b7d5d}.escape-card button:disabled{background:#e6e2d5;color:#858572}.escape-locations{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:15px}.escape-locations button{margin:0;background:#36574b;color:#f5eac8;border-color:#738775;font-size:13px}.study-save{font-size:11px;padding:13px 16px;display:block}.study-save button{font-size:11px;min-height:40px;display:block;text-decoration:underline;text-underline-offset:4px}.room-camera-controls{padding:12px 18px;border-color:#b9aa83;background:#eae5d4}.room-camera-controls strong{font-size:16px}.room-camera-controls small{font-size:12px;line-height:1.7;max-width:420px}.camera-buttons button{min-width:44px;min-height:44px;font-size:14px}.room-locations{padding:12px 15px;gap:8px}.room-locations button{font-size:13px;min-height:44px;padding:9px 14px}.scene-caption{font-size:17px}.scene-caption button{font-size:12px;min-height:44px}.room-action{font-size:13px;line-height:1.8;bottom:20px;padding:11px 18px}.inventory-panel{padding:18px;margin:0}.inventory-panel h2{font-size:23px}.inventory-panel h2 span,.inventory-panel>header>span{font-size:12px}.bag-item,.bag-empty{font-size:13px;min-height:84px}.inventory-panel #status{font-size:12px;line-height:1.8}.study-page .escape-puzzle-board{padding:20px;background:linear-gradient(135deg,#e7dbc1,#f1e8d4);border:double 4px #b4a175;border-radius:8px;margin:20px 0;color:#4e5f46}.escape-puzzle-board>small{font-size:12px;line-height:1.8;display:block;margin-bottom:12px}.escape-poem-grid{display:grid;gap:10px}.escape-poem-grid button{display:grid;grid-template-columns:1fr 1fr;text-align:center;gap:10px;border:1px solid #a69a78;background:#f8f2e3;padding:12px;color:#465744;min-height:62px;font:23px StudyKai,KaiTi,serif}.escape-poem-grid button>strong{border-left:1px dashed #b5a475;color:#967842;font-weight:400}.escape-token-pool{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}.escape-token-pool button{padding:12px;border:1px solid #a18959;background:linear-gradient(100deg,#d9c79d,#eee0ba,#d1b985);border-radius:4px;min-height:48px;font:21px StudyKai,KaiTi,serif;color:#4e5140;flex:1;white-space:nowrap;box-shadow:0 3px 6px #806c4122}.escape-token-pool button[aria-pressed=true]{outline:3px solid #466c54;outline-offset:2px;background:#d4e0c5}.escape-token-pool button:disabled{opacity:.35}.escape-token-pool small{display:block;font:11px system-ui;margin-top:8px}.escape-register{padding:14px;border:1px solid #c0af8c;border-radius:4px;background:repeating-linear-gradient(#f4ead3 0 29px,#b9ab8e44 29px 30px);line-height:1.9}.escape-register b{font-size:13px;color:#8b6d3c}.study-page .escape-register p{font-size:14px;line-height:1.9;margin:10px 0;color:#55614a}.escape-register small{font-size:12px}.escape-book-slots{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:17px}.escape-book-slots button{border:1px solid #876f46;border-bottom:7px solid #7b6141;background:#394e3f;min-height:155px;padding:12px 8px;color:#e9ddb8;border-radius:4px}.escape-book-slots small{display:block;font-size:12px;margin-bottom:18px;color:#a6bd9e}.escape-book-slots strong{font:22px StudyKai,KaiTi,serif;writing-mode:vertical-rl;min-height:70px;font-weight:400}.escape-confirm{display:block;width:100%;min-height:48px;background:#36594b!important;color:#f4e7c4!important;border:1px solid #87986a!important;padding:12px;margin:12px 0;border-radius:4px;font-weight:700}.escape-puzzle-board>button:not(.escape-confirm){padding:8px 12px;min-height:44px;color:#766a4d;border:1px solid #baa77f;background:#f7efdb;border-radius:4px}.escape-puzzle-status{border-left:3px solid #ab8c50;padding:10px 14px;background:#e7ddc3;min-height:45px}.escape-puzzle-status.success{border-color:#567850;background:#dde5c9;color:#3c5f45!important}.escape-parcel-order{min-height:80px;padding:16px 16px 16px 40px;border:1px dashed #b8a47a;background:#f4e9cf}.escape-parcel-order li{font-size:16px;line-height:2}.escape-prop-emblem{font:64px StudyKai,KaiTi,serif;text-align:center;color:#a7894f;padding:20px;margin:18px auto;background:#e6dbc0;border:double 4px #af9560;width:125px}.escape-prop{margin:20px 0;padding:20px;border:1px solid #c4b58f;background:#ebe2cc;border-radius:5px}.escape-prop>span{float:right;font:40px StudyKai,KaiTi,serif;color:#ac8c53}.escape-prop h3{font-size:22px;color:#4d674c}.escape-prop button{border:1px solid #9a956c;padding:11px 16px;background:#3f5c4b;color:#f3e5bd;border-radius:4px;min-height:46px}.escape-restored-poem{white-space:pre-line;font:24px/2 StudyKai,KaiTi,serif;color:#506448;background:#e8e4d1;margin:18px 0;padding:22px;border-left:3px solid #ae9360}.escape-immersive .study-layout{grid-template-columns:minmax(0,1fr)}.escape-immersive .companion-panel{display:none}.escape-immersive .study-room.panorama-active{height:clamp(580px,78vh,1100px)}.study-page dialog{width:min(780px,calc(100% - 24px))}.study-page dialog p{font-size:15px}.study-page dialog #dialog-actions button{font-size:14px}.study-page dialog>header{position:sticky;top:-24px;z-index:10;background:#f4eddf;padding-top:8px}.study-page dialog>header button{min-width:44px;min-height:44px}.study-page dialog .escape-puzzle-board p{color:#53614b}.study-page .story-tabs button{min-height:44px;font-size:14px}.study-page dialog:has(.escape-puzzle-content) #dialog-actions{display:grid;grid-template-columns:1fr 1fr}.study-page:has(.escape-desk) .study-tools{max-width:none}.study-page .study-footer{font-size:12px}.study-page .study-story-panel{display:none}
@media(min-width:1500px){.study-layout{grid-template-columns:minmax(0,1fr) 350px}.study-main{padding-left:32px;padding-right:32px}}
@media(max-width:1050px){.study-main{padding:16px}.study-layout{grid-template-columns:minmax(0,1fr) 290px;gap:14px}.study-room.panorama-active{height:600px;min-height:500px}.escape-content{padding:13px}.escape-roadmap button{padding:10px 12px}.escape-roadmap small{font-size:10px}.escape-roadmap strong{font-size:14px}.escape-roadmap button>span{font-size:22px;padding-right:8px}.room-camera-controls{display:block}.room-camera-controls>div:first-child{margin-bottom:10px}.room-camera-controls small{max-width:none}.companion-copy p{font-size:12px}.room-locations button{font-size:12px}}
@media(max-width:800px){.study-layout{grid-template-columns:1fr}.companion-panel{position:static;display:block}.companion-portrait{height:90px;min-height:0}.companion-portrait>img{width:100px;height:140px}.companion-copy{padding:12px 16px}.escape-content{max-height:560px;padding:18px}.escape-desk .quest-card ol{grid-template-columns:1fr}.escape-desk .quest-card li small{display:block}.escape-desk .quest-card li strong{font-size:15px}.study-room.panorama-active{height:clamp(420px,65vh,650px);min-height:420px}.escape-roadmap{gap:7px}.escape-roadmap button{display:grid;grid-template-columns:auto 1fr;gap:5px 8px;min-height:72px;padding:9px}.escape-roadmap button>span{grid-row:1/3}.escape-roadmap small{margin:0}.escape-roadmap strong{font-size:14px}.study-save{display:flex;align-items:center}.study-save button{display:inline-block}.study-heading{align-items:center}.study-heading .study-tools{gap:5px}.study-heading .study-tools button{font-size:12px;padding:9px 10px}.escape-immersive .study-room.panorama-active{height:72vh;min-height:440px}.study-heading h1{font-size:30px}}
@media(max-width:500px){.study-main{padding:12px 10px 90px}.study-heading{display:block}.study-heading .study-tools{justify-content:flex-start;margin-top:10px}.study-heading .study-tools button{font-size:12px;min-height:44px}.study-tools #motion{font-size:12px;min-height:44px;padding:8px 10px}.study-heading h1{font-size:30px}.study-heading h1 span{font-size:11px}.escape-roadmap{margin-bottom:12px;gap:5px}.escape-roadmap button{gap:3px 5px;padding:7px;min-height:70px}.escape-roadmap button>span{font-size:18px;padding-right:5px}.escape-roadmap strong{font-size:12px;letter-spacing:0}.escape-roadmap small{font-size:10px}.study-room.panorama-active{height:440px;min-height:380px;aspect-ratio:auto}.scene-caption{top:12px;left:12px;right:12px;gap:5px}.scene-caption>span{font-size:12px}.scene-caption button{font-size:11px;min-height:44px;padding:8px}.room-action{font-size:12px;max-width:93%;width:auto;min-width:80%;bottom:13px}.room-camera-controls{padding:12px}.room-camera-controls small{font-size:11px}.camera-buttons button{font-size:12px}.room-locations button{font-size:12px;min-height:44px;flex:1 0 27%}.inventory-panel{padding:14px 12px}.inventory-panel h2{font-size:21px}.bag-item,.bag-empty{font-size:12px}.inventory-panel #status{font-size:12px}.escape-nav button{font-size:15px;min-height:52px}.escape-content{padding:16px;max-height:610px}.escape-section-heading h2{font-size:25px}.escape-section-heading p,.escape-card p{font-size:13px}.escape-card h3{font-size:16px}.escape-card button{font-size:13px}.companion-name{bottom:12px}.companion-name em{display:block;font-size:11px}.study-save{font-size:11px;flex-wrap:wrap}.study-save button{font-size:11px}.escape-puzzle-board{padding:13px!important}.escape-poem-grid button{font-size:20px;gap:5px;padding:12px 5px}.escape-token-pool{gap:8px}.escape-token-pool button{font-size:19px;white-space:normal;min-width:40%}.escape-book-slots{gap:7px}.escape-book-slots button{min-height:145px;padding:10px 5px}.escape-book-slots strong{font-size:21px}.study-page dialog{padding:18px 14px}.study-page dialog>header{top:-18px}.study-page dialog p{font-size:15px}.study-page dialog .escape-register p{font-size:13px}.study-page dialog:has(.escape-puzzle-content) #dialog-actions{grid-template-columns:1fr}.escape-restored-poem{font-size:21px;padding:16px}.study-page .study-footer{font-size:11px}}

.escape-desk>.quest-card{padding:15px 17px;margin:0;background:#f7f3e7}.escape-desk>.quest-card ol{gap:12px}.escape-desk>.quest-card li small{display:block}

.escape-mobile-tools{display:none}.companion-panel{scroll-margin-top:calc(var(--escape-header-height,80px) + 12px)}@media(max-width:800px){.escape-mobile-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:0 0 12px}.escape-mobile-tools button{border:1px solid #b9aa84;background:#e9e2d0;color:#375b49;border-radius:5px;min-height:44px;font-size:13px}}

.escape-run-summary{background:#e4e8d3;border:1px solid #98aa7d;padding:18px;margin:20px 0;border-radius:5px}.escape-run-summary h3{font-size:18px;color:#3c5b45}.escape-run-summary button,.escape-result>button{border:1px solid #8d9d73;background:#3b5f4d;color:#f7edca;padding:12px 16px;min-height:46px;border-radius:4px}.escape-result blockquote{font-size:17px;line-height:1.9}
