html:has(.bell-viewport:not([hidden])),body:has(.bell-viewport:not([hidden])){overflow:hidden;overscroll-behavior:none}
.bell-viewport:not([hidden]){position:fixed;inset:0;height:100vh;height:100dvh;box-sizing:border-box;display:grid;grid-template-rows:auto 3px minmax(0,1fr) auto;overflow:hidden;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#f5ead5}
.bell-viewport .game-header{position:static;height:auto;min-height:42px;padding:3px clamp(6px,2vw,24px);gap:5px}
.bell-viewport .game-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);width:100%;max-width:1440px;min-height:0;margin:0 auto;padding:0;gap:0}
.bell-viewport .story-column{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,38fr) minmax(0,62fr);grid-template-rows:minmax(0,1fr);gap:0}
.bell-viewport .scene-stage{min-height:0;height:100%;max-height:none;aspect-ratio:auto;border-radius:0;margin:0}
.bell-viewport .scene-heading{padding:10px 14px;inset:auto 0 0}
.bell-viewport #scene-title{font-size:clamp(18px,3vw,37px);line-height:1.12}
.bell-viewport .story-paper{box-sizing:border-box;min-width:0;min-height:0;height:100%;padding:clamp(6px,1.5vw,20px);margin:0;overflow:hidden}
.bell-viewport #bell-reading:not([hidden]){height:100%;min-height:0;display:flex;flex-direction:column;position:relative;overflow:clip}
.bell-viewport .story-meta{margin:0;padding:0;min-height:0}
.bell-viewport #story-text{flex:1 1 0;min-height:0;height:auto!important;margin:0;padding:0}
.bell-viewport #bell-decisions{flex:none;padding:14px 2px}
.bell-viewport #bell-decisions[hidden]{display:none}
.bell-viewport #story-text .ih-reader{min-height:0}
.bell-viewport #story-text .ih-bar,.bell-viewport .reading-footer{display:none}
.bell-viewport ink-game-folio:not([hidden]){min-height:0;height:100%}
.bell-viewport #bell-decisions .choices-section,.bell-viewport #bell-decisions .puzzle-panel{margin-top:0}
.bell-viewport[data-pane=journey] .story-column{display:none}
.bell-viewport .journey-sidebar{display:block;position:static;height:auto;max-height:none;width:min(100%,800px);margin:0 auto;overflow:visible;padding:12px}
.bell-game-dock:not([hidden]){display:flex;justify-content:center;gap:6px;padding:4px;background:#eee0c3;border-top:1px solid #9f8558}
.bell-game-dock>button{min-height:40px;padding:4px 14px;background:#fff4dd;border:1px solid #927345;border-radius:4px;color:#38291b;font:600 16px/1.2 Georgia,serif}
.bell-game-dock>button[aria-pressed=true]{background:#413021;color:#fff3d4}

.bell-game-dock .bell-soundtrack{position:static;transform:none;align-self:center;box-sizing:border-box;width:auto;margin:0;border:1px solid #927345;border-radius:4px}
.bell-game-dock .bell-soundtrack>summary{display:flex;flex-direction:row;width:auto;height:auto;min-height:38px;padding:4px 9px;gap:3px}
.bell-game-dock .bell-music-title{writing-mode:horizontal-tb;letter-spacing:normal;font:600 14px Georgia,serif}
.bell-game-dock .bell-music-chevron,.bell-game-dock .bell-soundtrack>summary>span:first-child{display:none}
.bell-game-dock .bell-soundtrack-panel{position:fixed;inset:auto max(4px,env(safe-area-inset-right)) calc(54px + env(safe-area-inset-bottom)) auto;transform:none;width:min(360px,calc(100vw - 8px));max-width:none;max-height:calc(100dvh - 116px);box-sizing:border-box}
@media(max-width:400px){.bell-game-dock{gap:4px}.bell-game-dock>button{padding:4px 8px}.bell-game-dock .bell-soundtrack>summary{padding:4px 5px}}

@media(max-width:680px) and (orientation:portrait){
 .bell-viewport .story-column{grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(80px,19dvh,160px) minmax(0,1fr)}
 .bell-viewport .scene-topline,.bell-viewport .scene-location,.bell-viewport .chapter-name{display:none}
 .bell-viewport .scene-heading{padding:6px 12px}
}
@media(max-width:475px),(max-height:475px){
 .bell-viewport .header-status{display:none}.bell-viewport .header-actions{gap:2px}
 .bell-viewport .game-header .wordmark{max-width:38%;font-size:14px;white-space:normal}
}

.bell-viewport:not([hidden]){grid-template-columns:minmax(0,1fr)}
.bell-viewport .game-header,.bell-viewport .game-layout,.bell-game-dock{min-width:0;box-sizing:border-box}
.bell-game-dock{flex-wrap:wrap}
.bell-game-dock .bell-soundtrack:not([open]) .bell-soundtrack-panel{display:none}
@media(max-width:400px){.bell-game-dock>button,.bell-game-dock .bell-soundtrack>summary{min-width:0}.bell-viewport .game-header .wordmark{max-width:30%}}

