/* The reader stays in the story; interventions belong beside the prose. */
body.story-reading{background:#20201f}
body.story-reading :is(.sidebar,.topbar,.story-module-nav,.page-footer){display:none}
body.story-reading .workspace{margin-left:0;padding-bottom:0;width:100%}
body.story-reading main{max-width:980px;margin:0 auto;padding:0 42px 130px}
body.story-reading #theaterView{animation:none}
body.story-searching{background:#20201f}
body.story-searching :is(.sidebar,.topbar,.story-module-nav,.page-footer){display:none}
body.story-searching .workspace{margin-left:0;padding-bottom:0;width:100%}
body.story-searching main{max-width:980px;margin:0 auto;padding:0 42px 40px}
body.story-searching #theaterView{animation:none}
.story-mode[data-page="search"]>.sd-subnav{position:sticky;top:0;z-index:30;min-height:64px;margin:0 -20px 18px;padding:12px 20px;background:#20201ff5;backdrop-filter:blur(16px);border-bottom:1px solid #c9bea112}
.story-mode[data-page="search"] :is(.sd-search-form,.sd-search-history,.sd-search-recommendations,.sd-book){scroll-margin-top:82px}
.story-mode .sl-reader-nav{position:sticky;top:0;z-index:30;margin:0 -20px 24px;padding:15px 20px;background:#20201fee;backdrop-filter:blur(16px);border-bottom:1px solid #c9bea112}
.story-mode .sl-reader-nav>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}
.story-mode .sl-reader-nav .sd-icon-button{border:0;background:none;font-size:23px}
.story-mode .sl-reader-nav>.sm-text-button{font-size:17px;color:#c8c2b6}
.story-mode .sl-book-intro{display:block;max-width:680px;margin:0 auto 24px}
.story-mode .sl-book-intro .sd-detail-cover{margin:0;padding:20px 0 25px;border:0;border-radius:0;background:transparent}
.story-mode .sl-book-intro .sd-main-cover{width:168px;aspect-ratio:.73}
.story-mode .sl-book-intro .sd-main-cover .sd-cover-title strong{font-size:22px;line-height:1.6}
.story-mode .sl-book-intro .sd-blur-cover{opacity:.23;inset:-80px;filter:blur(45px)}
.story-mode .sl-book-intro .sd-detail-copy>h1{text-align:center;font:600 23px/1.6 var(--sans);letter-spacing:.3px}
.story-mode .sl-book-intro .sd-byline{justify-content:center;color:#99968c;margin:12px 0 26px}
.story-mode .sl-book-intro .sd-intro-text{font-size:14px;line-height:2;color:#aaa79e}
.story-mode .sl-intro-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.story-mode .sl-intro-text.is-expanded{display:block;-webkit-line-clamp:unset;overflow:visible}
.story-mode .sl-intro-toggle{display:inline-flex;align-items:center;min-height:36px;margin-top:3px;padding:5px 0;background:transparent;color:#d6bd8d;font-size:12px;line-height:1.6}
.story-mode .sl-intro-toggle:hover{color:#ffdda1}
.story-mode .sd-reader-body{max-width:680px;padding-bottom:20px}
.story-mode .sl-chapter{scroll-margin-top:90px;padding-top:22px;margin-bottom:30px}
.story-mode .sl-chapter-caption{display:flex;justify-content:space-between;align-items:baseline;gap:20px;margin:4px 0 25px;color:#8e8b80;font-size:11px}
.story-mode .sl-chapter-caption>span:first-child{flex-shrink:0;letter-spacing:1px;color:#b5a481}
.story-mode .sl-chapter-caption>span:last-child{text-align:right;line-height:1.7}
.story-mode .sl-chapter>p{font-size:18px;line-height:2.2;margin-bottom:28px;color:#ddd9cf;letter-spacing:.3px}
.story-mode .sl-chapter p.sd-reader-response{font-size:13px;margin:0 0 28px;line-height:1.9;color:#cdbb94;border-color:#bca679}
.story-mode .sl-chapter .sd-reader-response>span{display:block;color:#948770;font-size:10px;margin-bottom:5px}
.story-mode .sl-next{border-top:1px solid #c8b68822;padding:28px 0 16px;scroll-margin-top:90px}
.story-mode .sl-next-actions{display:flex;gap:12px}
.story-mode .sl-next-actions .sd-gold{min-width:0;flex:1;min-height:48px;font-size:14px}
.story-mode .sl-intervene{flex:1;display:inline-flex;gap:8px;justify-content:center;align-items:center;min-width:0;border:1px solid #b4a18255;border-radius:99px;color:#d1c4a9;background:#d9c09209;font-size:14px}
.story-mode .sl-intervene:hover{background:#d9c09215}
.story-mode .sl-next-hint{color:#8e8a80;font-size:11px;line-height:1.9;margin:14px 0 8px;text-align:center}
.story-mode .sl-composer{margin-top:24px;padding:22px;border:1px solid #bfaa7855;background:#2b2b28;border-radius:13px;scroll-margin-top:90px}
.story-mode :is(.sl-composer-heading,.sl-composer-footer){display:flex;justify-content:space-between;align-items:center;gap:14px}
.story-mode .sl-composer-heading label{color:#e2d7bf;font-size:14px}
.story-mode .sl-composer .sm-text-button{font-size:12px;color:#a69a81}
.story-mode .sl-composer textarea{width:100%;min-height:110px;padding:16px 0;margin-top:7px;border:0;resize:vertical;background:transparent;color:#eee6d7;font:16px/1.9 var(--sans);outline:0}
.story-mode .sl-composer textarea::placeholder{color:#88877d}
.story-mode .sl-composer-footer{border-top:1px solid #b6a78520;padding-top:14px;margin-top:14px}
.story-mode .sl-composer-footer small{color:#8c877a}
.story-mode .sl-composer-footer .sd-gold{font-size:12px;min-height:40px}
.story-mode .sl-suggestions{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px}
.story-mode .sl-suggestions>span{flex-basis:100%;font-size:10px;color:#9d988b;margin-bottom:4px}
.story-mode .sl-suggestions button{text-align:left;border:1px solid #c6b28925;border-radius:7px;color:#c3baa7;background:#bda47508;font-size:12px;line-height:1.7;padding:9px 12px;max-width:100%;overflow-wrap:anywhere}
.story-mode .sl-suggestions button:hover{border-color:#c6b28980;color:#ebd7ae}
.story-mode .sl-writing{display:flex;align-items:center;gap:15px;min-height:78px;padding:12px 19px;background:#d4bd8410;border:1px solid #d4bd8430;border-radius:12px}
.story-mode .sl-writing-dot{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#e1c48b;box-shadow:0 0 0 5px #e1c48b13;animation:sl-pulse 1.4s ease-in-out infinite}
.story-mode .sl-writing>div{flex:1}
.story-mode .sl-writing strong{color:#e2d3b6;font-size:13px;font-weight:500}
.story-mode .sl-writing p{color:#a2957c;font-size:11px;margin-top:4px}
.story-mode .sl-writing button{color:#b8a98c}
.story-mode .sl-error{padding:14px 16px;margin:18px 0 4px;border:1px solid #c58d6850;background:#80593613;border-radius:9px;color:#d7b998;font-size:12px;line-height:1.9}
.story-mode .sl-error button{color:#edcc92;margin-right:20px}
.story-mode .sl-panel{border:1px solid #c5b98a30;background:#292926;padding:23px;margin-top:20px;border-radius:12px;scroll-margin-top:90px}
.story-mode .sl-panel>header{display:flex;align-items:center;justify-content:space-between;gap:15px}
.story-mode .sl-panel h2{font-size:15px;color:#ded4be;font-weight:500}
.story-mode .sl-panel h2 small{color:#8d8777;font-size:11px;margin-left:10px}
.story-mode .sl-panel .sm-text-button{font-size:12px;color:#b9a783}
.story-mode .sl-panel p{color:#8f887a;font-size:11px;line-height:1.9;margin:18px 0 0}
.story-mode .sl-contents ol{list-style:none;padding:0;margin:15px 0 0;max-height:310px;overflow-y:auto}
.story-mode .sl-contents li{display:flex;align-items:center;gap:14px;border-top:1px solid #c9b78415;padding:12px 0}
.story-mode .sl-contents li>button:first-child{display:flex;flex:1;align-items:baseline;gap:15px;min-width:0;background:transparent;color:#c5beae;text-align:left;font-size:12px;line-height:1.8}
.story-mode .sl-contents li>button:first-child span{color:#9d8d6c}
.story-mode .sl-contents li>:last-child{flex-shrink:0;font-size:11px}
.story-mode .sl-contents small{color:#9d8d6c}
.story-mode .sl-settings{display:flex;flex-wrap:wrap;gap:24px;margin-top:14px}
body.story-reading .story-mode .sl-dock{position:fixed;z-index:40;bottom:0;left:50%;right:auto;transform:translateX(-50%);width:min(100%,760px);max-width:none;margin:0;padding:13px 24px calc(13px + env(safe-area-inset-bottom));gap:28px;background:#242422f5;border:1px solid #bfb18b20;border-bottom:0;border-radius:15px 15px 0 0;backdrop-filter:blur(16px);box-shadow:0 -12px 35px #11110e24}
body.story-reading .story-mode .sl-dock>button{flex-direction:column;gap:5px;min-height:42px;font-size:10px;padding:0 8px}
body.story-reading .story-mode .sl-dock>.sd-gold{flex-direction:row;flex:1;max-width:180px;margin-left:auto;min-height:42px;font-size:13px}
body.story-reading .story-mode[data-page="remix"]{max-width:870px;margin:0 auto;padding-top:26px}
body.story-reading main:has(.story-mode[data-page="remix"]){padding-bottom:max(28px,env(safe-area-inset-bottom))}
body.story-reading .story-mode[data-page="remix"] [data-sm-catalog]{display:none}
.story-mode .sd-privacy-note{font-size:11px;line-height:1.9;text-align:center;margin-top:15px}
@keyframes sl-pulse{50%{opacity:.4}}
@media(max-width:650px){
body.story-reading main{padding:0 22px 115px}
body.story-searching main{padding:0 18px max(28px,env(safe-area-inset-bottom))}
.story-mode[data-page="search"]>.sd-subnav{min-height:58px;margin:0 -18px 14px;padding:8px 18px}
.story-mode[data-page="search"] :is(.sd-search-form,.sd-search-history,.sd-search-recommendations,.sd-book){scroll-margin-top:74px}
.story-mode .sl-reader-nav{margin:0 -22px 12px;padding:10px 18px;min-height:58px}
.story-mode .sl-book-intro .sd-detail-cover{margin:0 -22px;padding:16px 0 22px}
.story-mode .sl-book-intro .sd-main-cover{width:144px}
.story-mode .sl-book-intro .sd-main-cover .sd-cover-title strong{font-size:19px}
.story-mode .sl-book-intro .sd-detail-copy>h1{font-size:20px}
.story-mode .sl-book-intro .sd-byline{margin:9px 0 24px;font-size:11px}
.story-mode .sl-chapter{scroll-margin-top:78px;padding-top:15px}
.story-mode .sl-chapter>p{font-size:17px;line-height:2.2;margin-bottom:27px}
.story-mode .sl-chapter-caption{font-size:10px;gap:12px}
.story-mode .sl-next{padding-top:23px}
.story-mode .sl-next-actions{gap:10px}
.story-mode :is(.sl-next-actions .sd-gold,.sl-intervene){font-size:13px;min-height:46px;padding-left:13px;padding-right:13px}
.story-mode .sl-composer{padding:17px;margin-left:-3px;margin-right:-3px}
.story-mode .sl-composer-heading label{font-size:13px}
.story-mode .sl-composer-footer .sd-gold{padding:10px 15px}
.story-mode .sl-panel{padding:18px}
body.story-reading .story-mode .sl-dock{gap:16px;padding:11px 20px calc(11px + env(safe-area-inset-bottom));border-radius:0}
body.story-reading .story-mode .sl-dock>button{padding:0 3px;min-width:36px}
body.story-reading .story-mode .sl-dock>.sd-gold{max-width:140px}
body.story-reading .story-mode[data-page="remix"]{padding-top:16px}
}
@media(prefers-reduced-motion:reduce){.story-mode .sl-writing-dot{animation:none}}
/* The host's mobile navigation is normally forced visible; reading owns the bottom bar. */
body.story-reading:has(.module-sidebar) :is(.module-sidebar,.topbar){display:none!important}
body.story-reading:has(.module-sidebar) .workspace{padding-bottom:0}
body.story-searching:has(.module-sidebar) :is(.module-sidebar,.topbar){display:none!important}
body.story-searching:has(.module-sidebar) .workspace{padding-bottom:0}
