/* A screen-sized casebook: one view replaces another, never a long page. */
body.mystery-app{height:100vh;height:100svh;height:100dvh;min-height:0;display:grid;grid-template-rows:54px minmax(0,1fr) 54px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);box-sizing:border-box}.mystery-app>.site-header{width:100%;max-width:1080px;height:54px;min-height:0;padding:5px 16px;gap:12px}.mystery-app .brand{width:135px}.mystery-main{width:min(100%,780px);margin:0 auto;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) 50px;padding:8px 16px 0;gap:8px}.case-heading{margin:0;text-align:left}.case-heading>div{display:flex;align-items:center;justify-content:space-between;height:44px}.case-heading>div>span{font-size:13px;letter-spacing:.1em;color:#a7c7ba}.case-heading h1{font-size:clamp(26px,5.5vw,32px);line-height:1.14;margin:0 0 3px}.case-heading button{min-height:44px;padding:4px 8px;background:none;border:0;color:#cdbb83;font-size:16px}.mystery-stage{min-height:0;position:relative;display:grid;align-items:stretch}.game-view{min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:12px;width:100%;max-width:580px;margin:auto;padding:16px 20px;background:linear-gradient(140deg,#14261e,#10150f);border:1px solid #3d5141;border-radius:10px}.game-view h2{font-size:clamp(27px,5.6vw,32px);line-height:1.13;margin:0}.game-view p{font-size:18px;line-height:1.6;color:#d4dccc;margin:0}.view-eyebrow{display:block;font-size:13px;letter-spacing:.12em;color:#b5cbb9}.game-view .soft-note{color:#b8c7af;font-size:15px;line-height:1.5}.game-view .button{min-height:48px;font-size:16px;margin:0;flex-shrink:0;padding:10px 14px}.quiet-button{background:none;border:1px solid #566349;color:#d8dfce;min-height:44px;padding:10px 14px;border-radius:4px;font-size:16px;flex-shrink:0}.game-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;align-items:center;border-top:1px solid #33432f}.game-tabs button{min-width:0;min-height:44px;border:0;border-radius:5px;background:none;color:#b3c2a8;font-size:16px;padding:8px 5px}.game-tabs button[aria-pressed=true]{color:#f0dfab;background:#303823}.game-tabs span{font-size:14px;margin-left:3px;color:#e1c98d}.mystery-scene{position:relative;border:1px solid #6f7660;border-radius:9px;overflow:hidden;width:100%;max-width:min(100%,calc((100dvh - 260px)*1.69));margin:auto}.mystery-scene>svg{width:100%;display:block}.scene-spot{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:44px;min-height:44px;padding:2px 4px;background:#101c17ed;border:1px solid #d9c184;border-radius:7px;color:#f2e5bf;box-shadow:0 3px 10px #0008}.scene-spot span{font:17px Georgia,serif}.scene-spot small{font-size:12px;line-height:1.2}.scene-spot:hover,.scene-spot[aria-pressed=true]{background:#d6c38e;color:#15251f}.scene-spot.found{border-color:#9fcaba}.scene-spot.found:after{content:'✓';position:absolute;top:-6px;right:-6px;border-radius:50%;background:#95b7a5;color:#14251b;font-size:10px;width:16px;height:16px;line-height:16px}.scene-caption{display:flex;justify-content:space-between;gap:12px;color:#b8c7af;font-size:14px;line-height:1.4}.scene-caption strong{color:#d6c99d;font-weight:400}.game-view#view-room{border:0;padding:0;background:none;gap:10px;max-width:660px}.room-note{text-align:center;font-size:15px!important}#clue-card{display:flex;flex-direction:column;gap:14px}#notebook-entry{display:flex;flex-direction:column;gap:13px}.notebook-pager{display:flex;align-items:center;justify-content:space-between;margin-top:5px}.notebook-pager button{width:48px;height:44px;border:1px solid #64714f;background:#202b1b;color:#dedfbd;border-radius:4px}.notebook-pager span{font-size:15px;color:#bfc7af}button:disabled{cursor:default!important}.game-view#view-solve{gap:10px;padding:15px}.game-view#view-solve h2{font-size:27px}#deduction-guide{font-size:16px;line-height:1.5;color:#acbba0}#theories{display:grid;gap:8px}#theories button{min-height:46px;text-align:left;padding:9px 12px;font-size:17px;line-height:1.45;color:#e1e4d7;background:#131b11;border:1px solid #566548;border-radius:5px}#theories button:not(:disabled):hover{border-color:#ddc78c;background:#28301e}#theories button:disabled{opacity:.5}#theory-feedback{font-size:17px;line-height:1.5;color:#e4d19a}#theory-feedback:empty{display:none}#view-solved{gap:10px}#view-solved h2{font-size:28px}#view-solved p{font-size:18px;line-height:1.6}.solved-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#view-solved .button,#view-solved .quiet-button{font-size:16px;padding:10px}.mystery-app>.site-footer{max-width:780px;width:100%;height:54px;margin:0 auto;padding:4px 16px;flex-wrap:nowrap;gap:10px;font-size:10px}.mystery-app .site-footer>.text-link{font-size:10px;min-height:44px;white-space:nowrap}.mystery-app .site-footer .motion-toggle{min-width:44px;font-size:9px}.mystery-app .sound-controls{flex-wrap:nowrap}.mystery-app .sound-volume{display:none}.mystery-app .sound-toggle{font-size:10px;min-width:72px;min-height:44px;padding:6px 8px}.mystery-app .sound-entry-prompt{display:none!important}.mystery-app .sound-controls [role=status].sound-feedback{position:absolute;right:10px;bottom:60px;max-width:240px;padding:10px;background:#152012;border:1px solid #80764f;z-index:20;font-size:12px}.mystery-app .site-header .nav-links{z-index:25}@media(min-width:621px)and(max-width:970px){.mystery-app .nav-links{gap:10px}.mystery-app .nav-links a{font-size:9px;letter-spacing:0}.mystery-app .brand{width:115px}}@media(max-height:620px){body.mystery-app{grid-template-rows:48px minmax(0,1fr) 46px}.mystery-app>.site-header{height:48px;padding-top:2px;padding-bottom:2px}.mystery-app>.site-footer{height:46px;padding-top:1px;padding-bottom:1px}.mystery-main{padding-top:3px;gap:5px;grid-template-rows:auto minmax(0,1fr) 46px}.case-heading h1{font-size:26px}.case-heading>div{height:44px}.game-view{padding:13px 15px;gap:10px}.game-view h2{font-size:27px}.game-view p{font-size:18px;line-height:1.6}.mystery-scene{max-width:min(100%,calc((100dvh - 230px)*1.69))}.room-note{display:none}.game-view#view-solve{padding:12px;gap:8px}#theories{gap:6px}#theories button{min-height:44px;padding:8px 10px}#view-solved h2{font-size:28px}}@media(max-width:350px){.mystery-main{padding-left:10px;padding-right:10px}.case-heading h1{font-size:26px}.game-view{padding-left:13px;padding-right:13px}.mystery-app>.site-footer{padding-left:10px;padding-right:10px}.mystery-app>.site-header{padding-left:10px;padding-right:10px}}

.game-view:focus{outline:none}.game-view:focus-visible{outline:1px solid #b6c89b;outline-offset:2px}

/* Keep reciprocal room links visible inside the existing footer row. */
.mystery-room-links{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0}.mystery-room-links a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:3px 2px;color:#d4c38e;font-size:10px;letter-spacing:0;white-space:nowrap;border-bottom:1px solid #39452e}.mystery-room-links a:hover{border-color:#cbb77a}.mystery-app>.site-footer{gap:6px}.mystery-app>.site-footer .motion-toggle{padding-left:0;padding-right:0;letter-spacing:0}

.mystery-room-links a{max-width:98px;white-space:normal;text-align:center;line-height:1.2}

/* Larger reading type without hiding content on short screens or when zoomed.
   Only the active card scrolls; the investigation tabs stay in reach. */
.game-view{max-height:100%;overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start}
.game-view>*{flex-shrink:0}
.game-view h2,.game-view p,#theories button{overflow-wrap:anywhere}
.scene-caption{flex-wrap:wrap;gap:4px 12px}
.scene-caption strong{white-space:nowrap}
.notebook-pager button{font-size:20px}
.solved-actions{grid-template-columns:1fr}
.mystery-app .menu-button{font-size:14px}
.mystery-app>.site-footer{height:64px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px;letter-spacing:0}
body.mystery-app{grid-template-rows:54px minmax(0,1fr) 64px}
.mystery-app .site-footer .motion-toggle,.mystery-app .sound-toggle,.mystery-room-links a{font-size:12px;line-height:1.3}
.mystery-app .site-footer .motion-toggle{max-width:52px}
.mystery-room-links{gap:6px}
.mystery-room-links a{min-width:0;flex:1}
.mystery-app .sound-toggle{min-width:68px}
@media(max-height:620px){body.mystery-app{grid-template-rows:48px minmax(0,1fr) 60px}.mystery-app>.site-footer{height:60px}}
