.story-screen {
 --story-cream:#f7e8ce;--story-gold:#dcbc86;position:relative;isolation:isolate;display:flex;flex-direction:column;
 min-height:100vh;min-height:100svh;overflow:hidden;background:#0e1217;color:var(--story-cream);
}
.story-art {display:block;position:absolute;inset:0 0 12%;z-index:-1;overflow:hidden;background:#30201c;}
.story-art img {display:block;width:100%;height:100%;object-fit:cover;object-position:50% 38%;transform:scale(1.002);
 transition:transform 1s ease-out,object-position 1s ease-out;transform-origin:50% 47%;}
.story-screen[data-shot="toji"] .story-art img {transform:scale(1.046);transform-origin:68% 36%;}
.story-screen[data-shot="yui"] .story-art img {transform:scale(1.046);transform-origin:35% 36%;}
.story-screen[data-shot="table"] .story-art img {transform:scale(1.023);transform-origin:50% 72%;}
.story-art::after {content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#0a0d1752,transparent 18%,transparent 67%,#0e1217 100%);}
.story-header {width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:max(13px,env(safe-area-inset-top)) max(20px,4vw) 6px;}
.story-header>div {display:flex;align-items:center;gap:8px;}
.story-header .back-title,.story-skip,.story-header .sound-open {color:#f5e7cd;background:#15161ac9;border:1px solid #e0c49573;border-radius:2px;min-height:36px;padding:5px 10px;}
.story-header .back-title {font-size:12px;}
.story-skip {font:500 12px/1.35 var(--serif);display:inline-flex;align-items:center;gap:6px;}
.story-skip span {font:20px/1 Georgia,serif;}
.story-reading {width:min(830px,calc(100% - 48px));margin:auto auto 0;padding:72px 0 clamp(22px,5vh,55px);}
.story-location {width:fit-content;margin:0 0 12px 4px;text-shadow:0 2px 5px #050507,0 2px 15px #090b0c;}
.story-location>span {display:block;font:600 11px var(--serif);letter-spacing:.14em;color:#e6ceaa;margin-left:2px;}
.story-location h1 {font:italic 500 clamp(29px,3.6vw,52px)/1 Georgia,"Times New Roman",serif;padding:0;margin:4px 0 0;color:#f5dbad;}
#story-panel {position:relative;outline:none;background:linear-gradient(109deg,#161b21f5,#171a20f0 65%,#29201ff2);border:1px solid #c7a4749c;
 box-shadow:inset 0 0 0 3px #16181ab3,0 10px 32px #08090c52;padding:clamp(14px,2.2vw,25px) clamp(16px,3vw,32px) 5px;}
.story-words {min-height:106px;}
.story-speaker {display:flex;align-items:center;gap:9px;min-height:37px;font:600 clamp(14px,1.6vw,19px)/1.3 var(--serif);color:#edd09a;letter-spacing:.06em;}
.story-speaker img {width:35px;height:35px;border:1px solid #bb9a63a6;border-radius:50%;object-fit:cover;}
.story-words p {margin:6px 0 13px;font:500 clamp(16px,1.55vw,21px)/1.72 var(--serif);letter-spacing:.025em;line-break:strict;overflow-wrap:anywhere;}
.story-controls {display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;min-height:49px;border-top:1px solid #b39a7345;}
.story-controls button,.story-controls a {display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 6px;color:#e8d4ae;font:600 14px var(--serif);border:0;background:transparent;text-decoration:none;}
.story-controls i,.story-choices i {font:italic 20px/1 Georgia,serif;}
.story-previous {justify-self:start;}
.story-controls button:disabled {opacity:.38;cursor:default;}
.story-controls .story-next,.story-choice-hint {justify-self:end;}
.story-page {font:italic 12px/1 Georgia,serif;color:#cabda2;}
.story-page i {font:italic 11px Georgia,serif;color:#93846c;margin:0 2px;}
.story-choice-hint {color:#d0b991;font:500 11px var(--serif);}
.story-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:3px 0 11px;}
.story-choices button {min-height:43px;display:flex;align-items:center;justify-content:space-between;gap:7px;text-align:left;padding:7px 11px;background:#383229;color:#f7e3bf;border:1px solid #b79a645f;font:500 14px/1.5 var(--serif);}
.story-choices button:hover {background:#484034;}
.story-screen button:focus-visible,.story-screen a:focus-visible {outline:2px solid #f2d7a2;outline-offset:2px;}
@media(max-aspect-ratio:9/10) {
 .story-art {inset:0 0 auto;height:clamp(310px,62svh,690px);}
 .story-art img {object-position:50% 50%;}
 .story-art::after {background:linear-gradient(180deg,#0a0b1036,transparent 20%,transparent 77%,#0e1217 100%);}
 .story-header {padding:max(11px,env(safe-area-inset-top)) 13px 0;}
 .story-header .sound-open,.story-skip,.story-header .back-title {font-size:11px;min-height:35px;padding:4px 8px;}
 .story-header>div {gap:5px;}
 .story-reading {width:calc(100% - 26px);padding:clamp(220px,40svh,470px) 0 max(18px,env(safe-area-inset-bottom));}
 .story-location {margin-bottom:10px;}
 .story-location h1 {font-size:33px;}
 .story-words {min-height:115px;}
 .story-choices {grid-template-columns:1fr;gap:5px;}
 .story-choices button {min-height:39px;}
 .story-words p {font-size:16px;line-height:1.65;}
}
@media(orientation:landscape) and (max-height:550px) {
 .story-art {inset:0 0 0;}
 .story-reading {width:min(710px,calc(100% - 30px));padding:20px 0 8px;}
 .story-location {margin-bottom:5px;}
 .story-location>span {display:none;}
 .story-location h1 {font-size:23px;}
 #story-panel {padding:7px 14px 1px;}
 .story-words {min-height:0;}
 .story-speaker {min-height:25px;font-size:14px;}
 .story-speaker img {width:25px;height:25px;}
 .story-words p {font-size:14px;line-height:1.4;margin:3px 0 7px;}
 .story-controls {min-height:36px;}
 .story-controls button {min-height:35px;}
 .story-header {padding-top:6px;}
}
@media(prefers-reduced-motion:reduce) {
 .story-screen .story-art img {transform:none!important;transition:none;}
}

.large-tutorial-text .story-words p {font-size:clamp(20px,2vw,25px);line-height:1.75;}
.large-tutorial-text .story-choices button,.large-tutorial-text .guide-line p span {font-size:clamp(17px,1.6vw,22px);line-height:1.65;}

@media(max-aspect-ratio:9/10) and (max-height:740px) {
 .story-screen:has(.story-choices) .story-reading {padding-top:clamp(112px,20svh,155px);}
 .story-screen:has(.story-choices) .story-location h1 {font-size:27px;}
 .story-screen:has(.story-choices) .story-words {min-height:0;}
 .story-screen:has(.story-choices) .story-words p {margin:3px 0 9px;}
}
