*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;background:#0b141c;color:#f3eee4;font-family:"Yu Gothic","Meiryo",sans-serif}button{font:inherit;color:inherit;cursor:pointer}button:disabled{opacity:.38;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:2px solid #e7c998;outline-offset:4px}button{touch-action:manipulation}[hidden]{display:none!important}.game{position:relative;isolation:isolate;width:100%;height:100svh;min-height:670px;max-height:1200px;overflow:hidden;background:#17212c}.scene,.shade{position:absolute;inset:0;z-index:-3}.scene{background:url("assets/waiting-night-v2.webp") center center/cover no-repeat}.shade{z-index:-2;background:linear-gradient(180deg,rgba(5,14,22,.88) 0%,rgba(5,14,22,.12) 24%,rgba(5,14,22,.04) 52%,rgba(5,14,22,.8) 100%),linear-gradient(90deg,rgba(7,19,29,.42),transparent 48%)}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:23px 34px;border-bottom:1px solid #d2c09c2b;background:linear-gradient(180deg,#0c1724bb,#0c17240a)}.case-title{display:flex;align-items:center;gap:16px}.case-title h1{margin:0;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:29px;font-weight:500;letter-spacing:.13em}.chapter{font-size:12px;letter-spacing:.18em;border:1px solid #b7a382;color:#d9c59d;padding:5px 8px}.series{font-size:11px;color:#c8c2b4;letter-spacing:.1em;border-left:1px solid #9e927e5c;padding-left:16px}.utility{display:flex;gap:7px;align-items:center}.utility button{border:1px solid transparent;background:transparent;border-radius:3px;padding:8px 10px;font-size:12px;color:#e0ddcf;white-space:nowrap}.utility button:hover{border-color:#bca77c7d;background:#d7bb8a12}#evidenceCount{display:inline-block;min-width:18px;margin-left:4px;color:#e9c68b;font-size:11px}.location{position:absolute;top:102px;left:35px;display:flex;align-items:center;gap:10px;font-size:12px;letter-spacing:.1em;color:#dedbd0;text-shadow:0 1px 5px #000}.location-line{height:1px;width:24px;background:#d0b481}.location strong{font-weight:500}.location-separator{opacity:.4}.night{font-size:10px;color:#d9c29b;border:1px solid #cbb88c62;padding:1px 5px;margin-left:3px}.action-rail{position:absolute;left:34px;top:158px;width:208px;padding:19px 16px 16px;background:linear-gradient(130deg,#101e2bea,#142230d9);border:1px solid #c5b28a70;box-shadow:0 12px 45px #0003;backdrop-filter:blur(10px)}.rail-label{margin:0 0 13px;font-size:9px;letter-spacing:.24em;color:#c1ad88}.action-rail>button{display:flex;align-items:center;width:100%;gap:12px;background:none;border:0;border-bottom:1px solid #d6c4a22c;text-align:left;padding:13px 4px;font-size:17px;letter-spacing:.18em}.action-rail>button:hover,.action-rail>button.active{color:#efd6ab;background:linear-gradient(90deg,#d1b6821f,transparent)}.command-icon{width:19px;font-size:25px;color:#cbb58e;text-align:center;line-height:1}.arrow{font-size:21px;margin-left:auto;color:#aa9b81}.objective{margin-top:20px;padding-top:14px;border-top:1px solid #c5ad7b52}.objective>span{color:#c4ad83;font-size:10px;letter-spacing:.12em}.objective p{font-size:12px;line-height:1.9;margin:7px 0 0;color:#dadbd6}.sprite{position:absolute;right:5.5%;bottom:93px;height:calc(100% - 152px);max-height:960px;width:auto;max-width:58%;object-fit:contain;object-position:bottom;z-index:-1;filter:drop-shadow(0 7px 16px #04101955);transition:opacity .18s ease}.npc-presence{position:absolute;right:13%;top:23%;width:224px;padding:12px 12px 14px;border:1px solid #c7b28e88;background:#e6dfd2;box-shadow:0 16px 50px #07131b80;transform:rotate(1deg);color:#1c2931;text-align:center}.npc-presence .portrait{height:234px;width:198px}.npc-presence>span{display:block;font:20px "Yu Mincho",serif;margin-top:12px;letter-spacing:.15em}.portrait{background-repeat:no-repeat;background-color:#e8e2d8}.dialogue{position:absolute;bottom:25px;left:34px;right:34px;border:1px solid #c7b28a91;background:linear-gradient(115deg,#11202ef5,#10202ef2);box-shadow:0 15px 60px #0006;backdrop-filter:blur(9px);padding:0 27px 12px;min-height:190px}.speaker-row{display:flex;align-items:center;gap:15px;height:47px;border-bottom:1px solid #bca88142}.speaker-name{font:22px "Yu Mincho","Meiryo",serif;color:#ecd4a9;letter-spacing:.17em;min-width:54px}.speaker-role{font-size:10px;color:#bdc5c8;letter-spacing:.1em}.speaker-row>button{margin-left:auto;font-size:10px;letter-spacing:.08em;background:none;border:0;color:#aab6be}.dialogue-body{display:flex;align-items:flex-end;gap:25px;min-height:96px;padding-top:12px}.dialogue-body>p{white-space:pre-line;line-height:1.9;font-family:"Yu Mincho","Hiragino Mincho ProN","Meiryo",serif;font-size:21px;letter-spacing:.06em;margin:0;flex:1;padding:0 0 9px}.dialogue-body>button{border:0;background:transparent;white-space:nowrap;padding:15px 0 10px 14px;font-size:11px;letter-spacing:.12em;color:#d8bf91}.next-mark{display:inline-block;font-size:8px;transform:rotate(45deg);margin-left:15px}.dialogue-foot{display:flex;justify-content:space-between;color:#7e929e;font-size:9px;letter-spacing:.08em;margin-top:7px}.choices{position:absolute;left:267px;top:159px;max-height:calc(100% - 395px);overflow-y:auto;width:354px;background:#11202ff5;border:1px solid #c6b086a3;box-shadow:0 15px 50px #0005;z-index:4;padding:18px 20px;backdrop-filter:blur(9px)}.choices-head{display:flex;align-items:center;border-bottom:1px solid #a998793f;padding-bottom:12px;margin-bottom:5px}.choices h2{font-size:15px;margin:0;letter-spacing:.12em;font-weight:500;color:#e2caa2}.choices-head>button{margin-left:auto;background:none;border:0;font-size:10px;color:#adb8bf}.choices #choiceList>button{display:block;background:transparent;border:0;border-bottom:1px solid #b8a98927;padding:15px 3px;width:100%;text-align:left;font-size:14px;letter-spacing:.05em;line-height:1.6}.choices #choiceList>button:not(:disabled):hover{color:#f4d7a4;background:#dec08b10}.choices #choiceList>button small{display:block;color:#92a6b1;font-size:10px;margin-top:3px}.hotspots{position:absolute;inset:0;z-index:0;pointer-events:none}.spot{position:absolute;pointer-events:auto;background:transparent;border:0;padding:10px;display:flex;gap:8px;align-items:center;filter:drop-shadow(0 2px 4px #000)}.spot i{display:block;width:17px;height:17px;border:1px solid #e5c998;transform:rotate(45deg);background:#1b344188;box-shadow:0 0 0 5px #e7c99415}.spot span{font-size:11px;letter-spacing:.12em;background:#142430dd;padding:5px 8px;border:1px solid #b9a98166}.spot.camera{left:36%;top:31%}.spot.table{left:45%;top:62%}.spot.seat{left:23%;top:65%}.toast{position:absolute;top:107px;right:34px;background:#0c2430ed;border-left:3px solid #dec08b;padding:12px 19px;font-size:12px;box-shadow:0 5px 25px #0004;opacity:0;transform:translateY(-7px);transition:.2s;pointer-events:none;max-width:370px;z-index:8}.toast.show{opacity:1;transform:none}dialog{border:1px solid #bba47b;background:#eae4d9;color:#20313c;width:min(1050px,calc(100vw - 40px));max-height:88svh;padding:27px 30px;box-shadow:0 30px 100px #0009}dialog::backdrop{background:#07131bca;backdrop-filter:blur(7px)}.modal-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #a99a8555;padding-bottom:18px;margin-bottom:21px}.modal-head h2{font:27px "Yu Mincho",serif;letter-spacing:.15em;margin:5px 0 0}.modal-kicker{font-size:9px;letter-spacing:.24em;color:#7c6745}.modal-head>button{font-size:28px;border:0;background:none;color:#5d615f;padding:4px 9px}.notebook{display:grid;grid-template-columns:270px 1fr;gap:28px;min-height:360px}.evidence-list{border-right:1px solid #a99a8555;padding-right:22px}.evidence-list button{display:block;text-align:left;width:100%;border:0;border-bottom:1px solid #b6a68e55;background:transparent;padding:13px 9px;font-size:13px;color:#43535c}.evidence-list button.current{background:#d8cebb;color:#293d45}.evidence-list small{display:block;color:#7f725b;font-size:9px;margin-bottom:3px;letter-spacing:.12em}.evidence-detail h3{font:25px "Yu Mincho",serif;line-height:1.5;margin:10px 0 15px}.evidence-detail p{white-space:pre-line;line-height:2;font-size:14px}.file-kind{display:inline-block;border:1px solid #ac9872;padding:3px 7px;font-size:10px;color:#866d44}.paper-visual{height:150px;background:#ded7ca;display:flex;align-items:center;justify-content:center;margin:15px 0;gap:24px}.memo-paper{width:112px;height:130px;background:#fffcf4;box-shadow:1px 4px 12px #5f4e3433;display:flex;justify-content:center;align-items:center;transform:rotate(-5deg);border-radius:2px}.memo-paper span{display:block;font:95px Georgia,serif;color:#9f4f44;transform:rotate(90deg)}.memo-paper.upright span{transform:none}.small-button,.primary-button{border:1px solid #b0a187;background:transparent;color:#3b4e56;padding:9px 14px;font-size:12px}.primary-button{background:#1d3a48;color:#f0e7d4;border-color:#1d3a48}.person-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.person-card{padding:14px;border:1px solid #a99a8555;background:#f5f0e6}.person-card .portrait{width:150px;height:170px;margin:0 auto 13px}.person-card h3{margin:0 0 4px;font:20px "Yu Mincho",serif}.person-card small{color:#886f4b;font-size:10px}.person-card p{font-size:12px;line-height:1.9;color:#4e5b60}.log-entry{border-bottom:1px solid #b5a48955;padding:12px 0}.log-entry strong{font-size:12px;color:#8e7045}.log-entry p{white-space:pre-line;margin:5px 0;font:15px/1.9 "Yu Mincho",serif}.map-image{width:100%;height:auto;background:#f6f4ef}.help{max-width:650px;font-size:14px;line-height:2}.help .buttons{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.empty{padding:30px 0;line-height:2;color:#647178}.game.ui-hidden .topbar,.game.ui-hidden .location,.game.ui-hidden .action-rail,.game.ui-hidden .dialogue,.game.ui-hidden .choices{display:none!important}#restoreUiBtn{position:absolute;bottom:24px;left:30px;background:#102331d9;border:1px solid #bca881;color:#e7d6b7;padding:10px 17px;font-size:12px}.ending{line-height:2}.ending h3{font:29px "Yu Mincho",serif;letter-spacing:.15em}.ending p{font-size:15px}.ending .buttons{display:flex;gap:12px;margin-top:25px}@media(min-aspect-ratio:2/1){.sprite{right:12%}}@media(max-width:1000px){.series{display:none}.topbar{padding:20px 22px}.case-title h1{font-size:24px}.utility{gap:1px}.utility button{font-size:11px;padding:7px}.location{left:23px;top:95px}.action-rail{left:22px;top:143px;width:177px;padding:15px 12px}.action-rail>button{font-size:15px;padding:11px 3px}.sprite{right:-2%;height:calc(100% - 160px);max-width:67%}.choices{left:218px;top:143px;width:310px}.dialogue{left:22px;right:22px;padding-left:20px;padding-right:20px}.dialogue-body>p{font-size:19px}.npc-presence{right:9%}}@media(max-width:700px){.game{min-height:760px;max-height:none}.topbar{padding:16px 16px;align-items:flex-start;gap:8px}.case-title{gap:9px}.case-title h1{font-size:20px;letter-spacing:.08em}.chapter{font-size:10px;padding:4px}.utility{gap:0;flex-wrap:wrap;justify-content:flex-end;max-width:175px}.utility button{font-size:10px;padding:5px 7px}.location{top:90px;left:17px;font-size:10px;gap:5px}.location-line{width:15px}.action-rail{left:15px;top:134px;width:143px;padding:12px 10px}.rail-label{font-size:8px;letter-spacing:.12em}.action-rail>button{font-size:14px;gap:7px;padding:10px 2px}.command-icon{font-size:21px}.objective{margin-top:13px;padding-top:10px}.objective>span{font-size:9px}.objective p{font-size:10px}.sprite{right:-15%;bottom:165px;height:calc(100% - 218px);max-width:92%}.dialogue{bottom:16px;left:15px;right:15px;min-height:202px;padding:0 16px 10px}.speaker-row{height:43px;gap:9px}.speaker-name{font-size:20px}.speaker-role{font-size:8px;max-width:130px}.speaker-row>button{font-size:8px}.dialogue-body{gap:6px;min-height:119px;padding-top:12px}.dialogue-body>p{font-size:17px;line-height:1.85;letter-spacing:.02em}.dialogue-body>button{font-size:9px;padding-left:3px}.next-mark{margin-left:6px}.dialogue-foot{font-size:8px;gap:8px}.choices{left:15px;right:15px;top:135px;width:auto;max-height:calc(100% - 370px);z-index:5}.choices #choiceList>button{font-size:14px;padding:13px 2px}.hotspots .spot{z-index:2}.spot.camera{left:47%;top:31%}.spot.table{left:42%;top:61%}.spot.seat{left:22%;top:65%}.toast{top:103px;right:15px;font-size:10px;padding:8px 12px;max-width:90%}.npc-presence{width:170px;right:5%;top:24%;padding:10px}.npc-presence .portrait{width:148px;height:180px}.npc-presence>span{font-size:17px}.notebook{grid-template-columns:1fr;gap:16px}.evidence-list{border-right:0;padding-right:0;display:flex;overflow-x:auto;gap:5px;padding-bottom:12px;border-bottom:1px solid #b5a48955}.evidence-list button{min-width:146px;font-size:11px;border:1px solid #b5a48955}.person-grid{grid-template-columns:repeat(2,1fr);gap:10px}.person-card{padding:10px}.person-card .portrait{width:120px;height:140px}.person-card h3{font-size:16px}.person-card p{font-size:11px}dialog{padding:18px;width:calc(100vw - 22px);max-height:90svh}.modal-head h2{font-size:23px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* Small-screen header and dialogue refinement. */
@media(max-width:700px){.topbar{display:block;min-height:98px}.case-title{white-space:nowrap}.case-title h1{white-space:nowrap}.chapter{white-space:nowrap}.utility{position:absolute;top:61px;right:15px;max-width:none;flex-wrap:nowrap}.location{top:109px}.action-rail,.choices{top:145px}.dialogue-body{display:block;position:relative;padding-bottom:26px;min-height:119px}.dialogue-body>p{padding-bottom:0;width:100%}.dialogue-body>button{position:absolute;right:0;bottom:0;padding:5px 0}.dialogue-foot{margin-top:4px}}

/* Larger advance control and keyboard navigation. */
#nextBtn{display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;min-width:136px;min-height:58px;padding:12px 20px;font-size:18px;font-weight:600;letter-spacing:.1em;color:#142631;background:linear-gradient(135deg,#e9d4ae,#cdb281);border:1px solid #eedbbe;border-radius:4px;box-shadow:0 4px 16px #0003}
#nextBtn:hover{background:linear-gradient(135deg,#f5e4c5,#e2c89d)}
#nextBtn:active{transform:translateY(1px)}
#nextBtn .next-mark{font-size:27px;line-height:1;transform:none;margin-left:13px}
.keyboard-mode button:focus{outline:3px solid #eac990;outline-offset:3px}
.keyboard-mode .action-rail>button:focus,.keyboard-mode #choiceList>button:focus{background:#cdb18124;color:#ffe3b4}
.keyboard-mode .evidence-list>button:focus{background:#d8cdb8;color:#20313c}
@media(max-width:700px){#nextBtn{min-width:120px;min-height:50px;font-size:17px;padding:9px 16px}.dialogue-body{padding-bottom:64px;min-height:153px}.dialogue-body>#nextBtn{right:0;bottom:2px}.choices{max-height:calc(100% - 410px)}.dialogue-foot{font-size:8px;letter-spacing:0}}


/* Title, illustrated opening and console-style controls. */
.game{--controller-height:102px;--dialogue-height:235px;min-height:760px}
.game[data-screen="title"]>.topbar,.game[data-screen="title"]>.location,.game[data-screen="title"]>.action-rail,.game[data-screen="title"]>.choices,.game[data-screen="title"]>.hotspots,.game[data-screen="title"]>.sprite,.game[data-screen="title"]>.npc-presence,.game[data-screen="title"]>.dialogue,.game[data-screen="opening"]>.topbar,.game[data-screen="opening"]>.location,.game[data-screen="opening"]>.action-rail,.game[data-screen="opening"]>.choices,.game[data-screen="opening"]>.hotspots,.game[data-screen="opening"]>.sprite,.game[data-screen="opening"]>.npc-presence,.game[data-screen="opening"]>.dialogue{display:none!important}
.title-screen{position:absolute;inset:0 0 var(--controller-height);z-index:10;display:grid;place-items:center;overflow:hidden}
.title-art,.title-veil{position:absolute;inset:0;z-index:-2}
.title-art{background:url("assets/opening-bus.webp") center/cover}
.title-veil{z-index:-1;background:linear-gradient(90deg,#08121dd9,#08121daa 50%,#08121d70),linear-gradient(0deg,#08121dee,transparent 65%)}
.title-content{width:min(760px,90%);text-align:center;padding:24px}
.title-series{letter-spacing:.28em;font-size:21px;color:#e7d2ac;margin:0 0 20px}
.title-chapter{display:inline-block;margin:0 0 13px;padding:5px 18px;border:1px solid #e1c69a;color:#ead4b0;font-size:18px;letter-spacing:.3em}
.title-content h2{font:500 clamp(35px,5vw,65px)/1.5 "Yu Mincho",serif;letter-spacing:.14em;margin:0;text-shadow:0 4px 24px #000}
.title-sub{font-size:16px;letter-spacing:.25em;color:#c4cbd1;margin:8px 0 30px}
.title-menu{width:min(390px,100%);margin:0 auto;display:grid;gap:14px}
.title-menu button{display:flex;align-items:center;justify-content:space-between;border:3px double #d6c5a5;background:#112637e8;padding:17px 25px;min-height:68px;font-size:26px;letter-spacing:.15em;text-align:left}
.title-menu button small{font-size:14px;letter-spacing:.05em;color:#c4c7c7}
.title-menu button:focus,.title-menu button:hover:not(:disabled){background:#344958;color:#ffe6b9;outline:3px solid #edcf9a;outline-offset:4px}
.load-info,.title-help{font-size:15px;color:#d0d4d6;line-height:1.8;margin:22px 0 0}.title-help{margin-top:10px;color:#ddc398}
.controller{position:absolute;bottom:0;left:0;right:0;min-height:102px;z-index:12;border-top:4px double #c0ae89;display:flex;align-items:center;justify-content:center;gap:28px;padding:10px 25px;background:linear-gradient(#263544,#172431);box-shadow:0 -5px 20px #0005}
.dpad{position:relative;width:100px;height:80px;flex-shrink:0;display:grid;grid-template:repeat(3,26px)/repeat(3,31px);gap:0}
.dpad button,.pad-center{border:1px solid #101820;background:#d8d3c6;color:#24323e;display:grid;place-items:center;font-size:15px;padding:0;box-shadow:1px 2px 1px #0005}
.dpad button:active{background:#b2a384}.pad-up{grid-area:1/2}.pad-left{grid-area:2/1}.pad-center{grid-area:2/2}.pad-right{grid-area:2/3}.pad-down{grid-area:3/2}
.controller-guide{font-size:17px;letter-spacing:.07em;margin:0;color:#efe4ce}.controller-guide small{display:block;font-size:12px;color:#b8c3ca;margin-top:6px}
.ab-controls{display:flex;gap:22px;margin-left:28px}.ab-controls>div{display:grid;justify-items:center;gap:5px}
.ab-controls button{width:50px;height:50px;border-radius:50%;border:2px solid #d69d91;background:radial-gradient(circle at 35% 28%,#b95652,#7a2c35);box-shadow:0 4px 0 #07131b;color:#fff4de;font:bold 23px/1 sans-serif}
.ab-controls button:active{transform:translateY(2px);box-shadow:0 2px 0 #07131b}.ab-controls span{font-size:12px;color:#d7d2c5}
.opening-screen{position:absolute;inset:0 0 var(--controller-height);background:#0c1824;display:flex;flex-direction:column;z-index:8}
.opening-head{display:flex;justify-content:space-between;gap:10px;padding:15px 30px;font-size:16px;letter-spacing:.13em;color:#d8c299;border-bottom:1px solid #ac96725c}
.opening-art{position:relative;flex:1;min-height:0;overflow:hidden;background:#080f17;display:grid;place-items:center}
.opening-art>img{width:100%;height:100%;object-fit:contain;min-height:0}
#openingNotice{position:absolute;top:24px;left:24px;background:#f6eee2;color:#312a25;border:2px solid #403830;padding:13px 22px;font-size:22px;font-weight:bold;transform:rotate(-3deg)}
.opening-cast{position:absolute;bottom:12px;right:24px;display:flex;gap:10px;max-width:calc(100% - 48px)}
.opening-person{background:#122435ee;border:2px double #d1bd96;padding:5px 5px 7px;text-align:center;box-shadow:0 3px 12px #0006}
.opening-person .portrait{width:94px;height:107px}
.opening-person>span{display:block;font-size:14px;margin-top:5px;color:#f3e3c8}
.opening-copy{padding:18px 38px 20px;border:4px double #cfbf9f;margin:12px 20px 18px;background:#102333;box-shadow:0 6px 25px #0003}
#openingPlace{font-size:14px;color:#b5c1ca;margin:0 0 9px;letter-spacing:.12em}
#openingSpeaker{font-size:22px;font-weight:500;letter-spacing:.15em;color:#ecd1a0;margin:0 0 9px}
#openingText{font:26px/1.8 "Yu Gothic","Meiryo",sans-serif;letter-spacing:.04em;white-space:pre-line;margin:0}
.opening-buttons{display:flex;justify-content:space-between;gap:15px;margin-top:16px}
.opening-buttons button{font-size:17px;background:#20384a;border:1px solid #acb5b7;padding:10px 18px;min-height:46px}
#openingNext{background:#e4cda3;color:#162d3d;border-color:#f7e5c7;font-size:19px;min-width:180px;font-weight:600}
.topbar{padding:20px 28px}.utility button{font-size:15px}.series{font-size:13px}.chapter{font-size:14px}
.location{top:103px;font-size:14px}.night{font-size:12px}
.action-rail{left:28px;top:143px;width:220px;border:4px double #c4b393;padding:13px;max-height:calc(100% - var(--dialogue-height) - var(--controller-height) - 175px);overflow:auto}
.rail-label{font-size:11px}.action-rail>button{font-size:21px;letter-spacing:.1em;padding:12px 4px}.command-icon{display:none}.action-rail>button:before{content:'▶';width:16px;font-size:13px;visibility:hidden}.action-rail>button:focus:before{visibility:visible}
.objective{margin-top:12px;padding-top:10px}.objective>span{font-size:13px}.objective p{font-size:15px;line-height:1.7}
.choices{top:143px;left:268px;width:390px;border:4px double #c4b393;padding:14px 18px;max-height:calc(100% - var(--dialogue-height) - var(--controller-height) - 175px)}
.choices h2{font-size:19px}.choices-head>button{font-size:15px}.choices #choiceList>button{font-size:20px;padding:13px 7px}.choices #choiceList>button small{font-size:14px}
.choices #choiceList>button:focus:before{content:'▶ ';font-size:14px}
.dialogue{left:28px;right:28px;bottom:calc(var(--controller-height) + 14px);border:4px double #d3c2a2;min-height:205px;padding:0 23px 12px;backdrop-filter:blur(12px)}
.speaker-row{height:50px}.speaker-name{font-size:25px}.speaker-role{font-size:13px}.speaker-row>button{font-size:12px}
.dialogue-body{min-height:104px;align-items:flex-end;gap:24px;padding-top:15px}
.dialogue-body>p{font-family:"Yu Gothic","Meiryo",sans-serif;font-size:26px;line-height:1.8;letter-spacing:.03em}
.dialogue-foot{font-size:12px;letter-spacing:0;gap:10px;color:#adbbc4}
#nextBtn{min-width:150px;min-height:62px;font-size:21px}
.sprite{right:7%;bottom:calc(var(--dialogue-height) + var(--controller-height) + 30px);height:calc(100% - var(--dialogue-height) - var(--controller-height) - 158px);width:auto;max-width:42%;max-height:none;object-fit:contain}
.npc-presence{top:auto;bottom:calc(var(--dialogue-height) + var(--controller-height) + 35px);right:13%;width:200px}.npc-presence .portrait{width:174px;height:190px}
.evidence-list button{font-size:18px}.evidence-list small{font-size:12px}.evidence-detail p,.help,.person-card p,.ending p{font-size:18px;line-height:1.9}.person-card small{font-size:13px}.log-entry strong{font-size:17px}.log-entry p{font:20px/1.9 "Yu Gothic",sans-serif}.small-button,.primary-button{font-size:17px;min-height:44px}.modal-kicker,.file-kind{font-size:12px}.spot span{font-size:14px}
@media(max-width:1000px) and (min-width:701px){.utility button{font-size:13px}.topbar{padding:20px}.action-rail{left:20px;width:180px}.choices{left:215px;width:350px}.action-rail>button{font-size:19px}.sprite{right:4%;max-width:38%}.dialogue-body>p{font-size:24px}}
@media(max-width:700px){
 .game{min-height:760px}.controller{gap:12px;padding:8px 14px;min-height:100px;justify-content:space-between}
 .dpad{width:85px;height:78px;grid-template:repeat(3,25px)/repeat(3,27px)}
 .controller-guide{font-size:12px;letter-spacing:0}.controller-guide small{font-size:10px}
 .ab-controls{gap:14px;margin-left:0}.ab-controls button{width:44px;height:44px;font-size:21px}.ab-controls span{font-size:11px}
 .title-content{padding:12px 2px}.title-series{font-size:16px;letter-spacing:.15em}.title-content h2{font-size:34px;letter-spacing:.08em}.title-chapter{font-size:16px}
 .title-sub{font-size:13px;margin-bottom:25px}.title-menu{width:280px}.title-menu button{font-size:25px;padding:14px 20px}.load-info,.title-help{font-size:13px}
 .opening-head{padding:13px 16px;font-size:13px;letter-spacing:.03em}
 .opening-copy{padding:13px 16px 15px;margin:8px 12px 12px}
 #openingPlace{font-size:12px;letter-spacing:0}#openingSpeaker{font-size:20px;margin-bottom:7px}
 #openingText{font-size:20px;line-height:1.75;letter-spacing:0;white-space:normal}
 .opening-buttons{margin-top:13px;gap:8px}.opening-buttons button{font-size:14px;padding:9px 10px}
 #openingNext{font-size:16px;min-width:145px}
 .opening-cast{right:10px;bottom:8px;gap:5px;max-width:calc(100% - 20px)}
 .opening-person{padding:3px}.opening-person .portrait{width:64px;height:72px}.opening-person>span{font-size:11px}
 #openingNotice{top:12px;left:12px;padding:8px 12px;font-size:17px}
 .topbar{min-height:99px;padding:15px 16px}.utility button{font-size:13px;padding:5px 7px}.utility{top:62px;right:12px}
 .case-title h1{font-size:22px}.chapter{font-size:12px}.location{left:16px;top:111px;font-size:12px}.night{font-size:10px}
 .action-rail{left:12px;top:147px;width:145px;padding:10px 7px;max-height:calc(100% - var(--dialogue-height) - var(--controller-height) - 175px)}
 .action-rail>button{font-size:18px;gap:4px;padding:9px 1px;letter-spacing:.04em}.action-rail>button:before{width:12px;font-size:10px}
 .rail-label{font-size:9px;margin-bottom:7px}.objective{display:none}
 .choices{top:147px;left:12px;right:12px;width:auto;max-height:calc(100% - var(--dialogue-height) - var(--controller-height) - 175px);padding:10px 12px}
 .choices h2{font-size:17px}.choices #choiceList>button{font-size:18px;padding:12px 4px}.choices #choiceList>button small{font-size:13px}
 .dialogue{left:12px;right:12px;bottom:calc(var(--controller-height) + 10px);padding:0 14px 10px;min-height:0}
 .speaker-row{height:45px;gap:8px}.speaker-name{font-size:22px}.speaker-role{font-size:11px;max-width:140px}.speaker-row>button{font-size:10px}
 .dialogue-body{display:block;position:relative;padding-top:12px;padding-bottom:65px;min-height:0}
 .dialogue-body>p{font-size:20px;line-height:1.75;letter-spacing:0;padding-bottom:0}
 .dialogue-body>#nextBtn{position:absolute;right:0;bottom:4px;min-width:132px;min-height:50px;font-size:19px;padding:9px 15px}
 .dialogue-foot{font-size:10px;gap:6px;margin-top:4px}.dialogue-foot>span:first-child{max-width:220px}
 .sprite{right:5%;bottom:calc(var(--dialogue-height) + var(--controller-height) + 22px);height:calc(100% - var(--dialogue-height) - var(--controller-height) - 165px);max-width:51%}
 .npc-presence{right:6%;bottom:calc(var(--dialogue-height) + var(--controller-height) + 24px);width:155px;padding:8px}.npc-presence .portrait{width:135px;height:145px}.npc-presence>span{font-size:17px}
 .evidence-detail p,.help,.person-card p,.ending p{font-size:17px}.evidence-list button{font-size:16px;min-width:170px}.evidence-list small{font-size:12px}.person-card h3{font-size:18px}.person-card small{font-size:12px}
 .log-entry p{font-size:18px}.notebook{min-height:0}.person-grid{grid-template-columns:1fr 1fr}.person-card .portrait{width:120px;height:140px}
 .toast{font-size:13px;top:100px;z-index:20}
}

/* Series and episode title. */
.title-series{font:500 clamp(24px,3.2vw,38px)/1.6 "Yu Mincho",serif;letter-spacing:.18em;margin-bottom:16px;color:#ead6b2}
.title-content h2{font-size:clamp(30px,4vw,50px);letter-spacing:.08em}
.title-content h2>span{display:inline-block}.title-content h2>span+span{margin-left:.12em}
.case-title h1{font-size:26px;letter-spacing:.08em}
@media(max-width:1000px){.case-title h1{font-size:22px}}
@media(max-width:700px){.title-series{font-size:26px;letter-spacing:.08em}.title-content h2{font-size:34px;line-height:1.5}.title-content h2>span{display:block}.title-content h2>span+span{margin-left:0}.case-title h1{font-size:18px;letter-spacing:.025em}.opening-head{font-size:12px}}
@media(max-width:380px){.controller{gap:6px}.controller-guide{font-size:11px}.controller-guide small{font-size:9px}.ab-controls{gap:10px}.ab-controls button{width:40px;height:40px}.dpad{width:78px;grid-template-columns:repeat(3,25px)}.title-series{font-size:24px}.case-title h1{font-size:17px}}

/* Portrait captions follow what the player has learned. */
.opening-person{width:128px;flex:0 0 128px}.opening-person .portrait{margin-inline:auto}.opening-person>span{font-size:13px;line-height:1.5;min-height:3em;display:flex;align-items:center;justify-content:center}
@media(max-width:700px){.opening-person{width:90px;flex-basis:90px}.opening-person>span{font-size:11px;line-height:1.5}}

/* Close-up of an examined object. */
.item-presence{position:absolute;top:143px;bottom:calc(var(--dialogue-height) + var(--controller-height) + 30px);right:28px;width:min(48%,620px);margin:0;padding:8px;display:flex;flex-direction:column;z-index:3;border:4px double #cfbd9a;background:#102331;box-shadow:0 8px 35px #0005}
.item-presence img{display:block;width:100%;height:0;flex:1;min-height:0;object-fit:contain}
.item-presence figcaption{text-align:center;font-size:16px;line-height:1.6;padding:8px 5px 2px;color:#ead6b3}
.game[data-detail="cup"]>.sprite,.game[data-detail="cup"]>.npc-presence{display:none!important}
.game[data-screen="title"]>.item-presence,.game[data-screen="opening"]>.item-presence{display:none!important}
.evidence-photo{display:block;width:100%;max-height:320px;object-fit:contain;margin:15px 0;background:#17232c}
@media(max-width:700px){.item-presence{top:147px;left:12px;right:12px;width:auto;bottom:calc(var(--dialogue-height) + var(--controller-height) + 24px)}.item-presence figcaption{font-size:13px;padding-top:5px}.evidence-photo{max-height:240px}}

/* Conversation portrait: upper body in the foreground, lower edge behind dialogue. */
.sprite{top:var(--portrait-top,125px);bottom:auto;right:7%;height:var(--portrait-height,500px);width:var(--portrait-width,470px);max-width:52%;max-height:none;object-fit:cover;object-position:center top}
@media(max-width:1000px) and (min-width:701px){.sprite{right:3%;max-width:49%}}
@media(max-width:700px){.sprite{top:var(--portrait-top,146px);right:0;width:var(--portrait-width,310px);height:var(--portrait-height,330px);max-width:88%;bottom:auto;object-fit:cover;object-position:center top}}

/* Display controls are available on every game screen. */
.game{--portrait-start:125px;--controls-on-side:0;height:100dvh}
.display-controls{position:absolute;top:12px;right:16px;z-index:30;display:flex;gap:6px}
.display-controls button{min-width:70px;min-height:44px;padding:8px 11px;border:1px solid #c9b38a;background:#142b3eef;color:#f5e6ca;font-size:14px;line-height:1.3;white-space:nowrap;box-shadow:0 3px 12px #0003}
.display-controls button:hover:not(:disabled){background:#3a4e5d}.display-controls button:disabled{opacity:.42}
.utility{margin-right:172px}
.opening-head{padding-right:188px}
.orientation-hint{display:none}
.immersive,.immersive body{overflow:hidden}
.immersive .game{position:fixed;inset:0;z-index:999;width:100vw;height:100dvh;max-height:none}
@media(max-width:700px) and (orientation:portrait){
 .game{--portrait-start:188px}
 .topbar{min-height:143px}
 .display-controls{top:53px;right:12px}
 .display-controls button{min-height:42px}
 .utility{top:104px;right:12px;margin-right:0}
 .location{top:154px}
 .action-rail,.choices,.item-presence{top:188px}
 .opening-head{padding-right:0;min-height:45px}
 .opening-head>span:first-child{max-width:calc(100% - 55px)}
 .game[data-screen="opening"] .display-controls{top:51px}
 .opening-art{padding-top:49px}
 .title-content{padding-top:28px}
 .title-sub{margin-bottom:10px}
 .orientation-hint{display:block;font-size:13px;line-height:1.7;color:#ead3aa;margin:0 0 17px}
 .title-menu{gap:11px}
}
@media(min-width:701px){.utility{margin-right:172px}}

/* Short landscape viewports: controls on the right, no page scrolling. */
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 .game{--controls-on-side:1;--controller-height:0px;--portrait-start:82px;height:100dvh;min-height:0;max-height:none}
 .scene,.shade{right:106px}
 .display-controls{top:8px;right:8px;width:90px;flex-direction:column;gap:4px}
 .display-controls button{min-width:0;min-height:34px;padding:7px 5px;font-size:13px}
 .controller{left:auto;right:0;top:0;bottom:0;width:106px;min-height:0;padding:94px 6px 10px;border-top:0;border-left:4px double #c0ae89;flex-direction:column;justify-content:center;gap:18px}
 .controller-guide{display:none}
 .dpad{width:78px;height:78px;grid-template:repeat(3,26px)/repeat(3,26px)}
 .dpad button{font-size:14px}
 .ab-controls{margin:0;gap:10px}.ab-controls button{width:40px;height:40px;font-size:21px}.ab-controls>div{gap:5px}.ab-controls span{font-size:10px}
 .title-screen,.opening-screen{inset:0 106px 0 0}
 .title-content{width:96%;padding:10px}
 .title-series{font-size:24px;line-height:1.3;letter-spacing:.1em;margin:0 0 6px}
 .title-chapter{font-size:13px;letter-spacing:.18em;padding:2px 10px;margin:0 0 5px}
 .title-content h2{font-size:30px;line-height:1.4;letter-spacing:.06em}
 .title-content h2>span{display:inline-block}.title-content h2>span+span{margin-left:.15em}
 .title-sub{font-size:12px;margin:4px 0 12px}
 .title-menu{width:min(480px,94%);display:grid;grid-template-columns:1fr 1fr;gap:12px}
 .title-menu button{min-height:52px;font-size:22px;padding:10px 15px;letter-spacing:.08em}
 .title-menu button small{font-size:12px;letter-spacing:0}
 .load-info{font-size:12px;line-height:1.5;margin:10px 0 0}
 .title-help{font-size:12px;line-height:1.5;margin:6px 0 0}
 .orientation-hint{display:none}
 .topbar{display:flex;min-height:0;height:52px;margin-right:106px;padding:8px 12px;gap:8px;align-items:center}
 .case-title{gap:8px;white-space:nowrap}.case-title h1{font-size:18px;letter-spacing:.03em}.chapter{font-size:11px;padding:3px 5px}.series{display:none}
 .utility{position:static;margin:0;max-width:none;gap:0;flex-wrap:nowrap}
 .utility button{font-size:12px;padding:7px 6px}.utility #evidenceCount{font-size:10px;margin-left:2px;min-width:12px}
 .location{top:59px;left:15px;font-size:11px;gap:5px}.night{font-size:10px}
 .action-rail{left:12px;top:82px;width:190px;padding:7px;display:grid;grid-template-columns:1fr 1fr;gap:0 8px;max-height:calc(100% - var(--dialogue-height) - 108px);border-width:3px}
 .rail-label,.objective{display:none}
 .action-rail>button{min-height:40px;padding:8px 1px;font-size:17px;letter-spacing:0;gap:2px}
 .action-rail>button:before{width:10px;font-size:9px}.arrow{font-size:18px}
 .choices{top:82px;left:218px;right:118px;width:auto;padding:9px 12px;max-height:calc(100% - var(--dialogue-height) - 108px);border-width:3px}
 .choices-head{padding-bottom:7px;margin-bottom:0}.choices h2{font-size:16px}.choices-head>button{font-size:12px}
 .choices #choiceList>button{font-size:18px;line-height:1.5;padding:9px 4px}.choices #choiceList>button small{font-size:12px}
 .dialogue{left:12px;right:118px;bottom:10px;min-height:0;padding:0 14px 7px;border-width:3px}
 .speaker-row{height:33px;gap:10px}.speaker-name{font-size:20px}.speaker-role{font-size:11px;max-width:none}.speaker-row>button{font-size:10px}
 .dialogue-body{display:flex;align-items:flex-end;gap:16px;position:static;min-height:58px;padding:8px 0 0}
 .dialogue-body>p{font-size:20px;line-height:1.5;letter-spacing:0;flex:1;min-width:0;padding:0 0 4px;white-space:pre-line}
 .dialogue-body>#nextBtn{position:static;min-width:112px;min-height:44px;font-size:18px;padding:8px 12px}
 .dialogue-foot{font-size:10px;line-height:1.4;margin-top:4px;letter-spacing:0}
 .sprite{right:132px;max-width:44%;top:var(--portrait-top,82px);height:var(--portrait-height,170px);width:var(--portrait-width,160px);bottom:auto}
 .npc-presence{right:140px;bottom:calc(var(--dialogue-height) + 22px);width:142px;padding:7px;top:auto}.npc-presence .portrait{width:124px;height:112px}.npc-presence>span{font-size:16px;margin-top:5px}
 .item-presence{top:82px;left:218px;right:118px;bottom:calc(var(--dialogue-height) + 22px);width:auto;padding:5px;border-width:3px}.item-presence figcaption{font-size:12px;padding-top:3px}
 .toast{top:59px;right:118px;max-width:330px;font-size:12px;padding:8px 12px}
 #restoreUiBtn{bottom:12px;left:15px}
 .opening-screen{display:grid;grid-template-columns:48% 52%;grid-template-rows:36px minmax(0,1fr)}
 .opening-head{grid-column:1/-1;grid-row:1;padding:9px 12px;font-size:12px;min-height:0;letter-spacing:.03em}
 .opening-art{grid-column:1;grid-row:2;min-height:0;height:100%;padding:0}
 .opening-copy{grid-column:2;grid-row:2;margin:6px 10px 10px 4px;padding:9px 12px;min-height:0;overflow:hidden;display:flex;flex-direction:column;border-width:3px}
 #openingPlace{flex-shrink:0;font-size:11px;line-height:1.5;letter-spacing:0;margin:0 0 5px}
 #openingSpeaker{flex-shrink:0;font-size:19px;line-height:1.4;letter-spacing:.08em;margin:0 0 6px}
 #openingText{font-size:20px;line-height:1.55;letter-spacing:0;white-space:normal;overflow-y:auto;flex:1;min-height:0}
 .opening-buttons{flex-shrink:0;gap:8px;margin:0;padding-top:9px}
 .opening-buttons button{font-size:13px;min-height:40px;padding:8px 10px}
 #openingNext{font-size:15px;min-width:0;flex:1}
 .opening-cast{right:7px;bottom:8px;gap:5px;max-width:calc(100% - 14px)}
 .opening-person{width:64px;flex-basis:64px;padding:3px}.opening-person .portrait{width:54px;height:60px}.opening-person>span{font-size:10px;min-height:3em}
 #openingNotice{top:12px;left:12px;font-size:16px;padding:7px 10px}
 dialog{max-height:94dvh;padding:16px;width:calc(100vw - 24px)}
 .modal-head{padding-bottom:10px;margin-bottom:12px}.modal-head h2{font-size:22px}
 .notebook{min-height:0}.person-grid{grid-template-columns:repeat(3,1fr)}.person-card .portrait{height:110px;width:100px}
}
@media(max-width:680px) and (max-height:600px) and (orientation:landscape){
 .case-title h1{font-size:16px}.utility button{font-size:11px;padding:7px 4px}
 .title-content h2{font-size:26px}.title-series{font-size:21px}
 .title-menu button{font-size:20px;padding:9px 11px}.title-menu button small{display:none}
 .dialogue-body{gap:10px}.dialogue-body>#nextBtn{min-width:98px;font-size:17px}
 .choices{left:208px}.action-rail{width:180px}.item-presence{left:208px}
}

:fullscreen .game{height:100dvh;max-height:none}:fullscreen body{overflow:hidden}

.command-prompt{display:none}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.game.command-mode .dialogue-body>#dialogueText,.game.command-mode .dialogue-body>#nextBtn{display:none}.game.command-mode .dialogue-body{min-height:0;padding-top:7px}.game.command-mode .dialogue-body>.command-prompt{display:block;font-size:18px;line-height:1.5;margin:0;padding:0 0 3px}.choices #choiceList>button small{display:none}}

@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.toast{top:54px;left:12px;right:118px;max-width:none;font-size:11px;padding:5px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* Stable reading panels: only viewport changes may alter illustration geometry. */
.game{--conversation-height:clamp(230px,28dvh,290px);--opening-copy-height:clamp(300px,36dvh,360px)}
.dialogue{height:var(--conversation-height);min-height:0;display:flex;flex-direction:column;overflow:hidden}
.speaker-row{flex:0 0 50px;min-height:0}
.dialogue-body{flex:1;min-height:0;display:flex;align-items:stretch;overflow:hidden}
.dialogue-body>p{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}
.dialogue-body>#nextBtn{position:static;flex:0 0 auto;align-self:flex-end}
.dialogue-foot{flex:0 0 auto}
.opening-screen{display:grid;grid-template-rows:auto minmax(0,1fr) var(--opening-copy-height)}
.opening-head{min-height:0}
.opening-art{min-height:0;min-width:0}
.opening-copy{min-height:0;overflow:hidden;display:flex;flex-direction:column}
#openingPlace,#openingSpeaker,.opening-buttons{flex:0 0 auto}
#openingText{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}
.dialogue-body>p::-webkit-scrollbar,#openingText::-webkit-scrollbar{width:7px}
.dialogue-body>p::-webkit-scrollbar-thumb,#openingText::-webkit-scrollbar-thumb{background:#ad967078;border-radius:4px}
@media(max-width:700px){
 .game{--conversation-height:300px;--opening-copy-height:320px}
 .speaker-row{flex-basis:45px}
 .dialogue-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 50px;gap:8px;padding:8px 0 0}
 .dialogue-body>p{width:100%;padding:0}
 .dialogue-body>#nextBtn{position:static;justify-self:end;align-self:end;min-height:50px}
}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 .game{--conversation-height:clamp(112px,35dvh,160px)}
 .dialogue{height:var(--conversation-height)}
 .speaker-row{flex-basis:33px}
 .dialogue-body,.game.command-mode .dialogue-body{display:flex;min-height:0;gap:16px;padding:8px 0 0;align-items:stretch}
 .dialogue-body>p{width:auto}
 .dialogue-body>#nextBtn{min-height:44px;align-self:flex-end}
 .game.command-mode .dialogue-body>.command-prompt{min-height:0;overflow-y:auto}
 .opening-screen{grid-template-columns:48% 52%;grid-template-rows:36px minmax(0,1fr)}
 .opening-copy{height:auto}
}

/* Temporary BGM controls: same positions on title, story, and investigation. */
.music-settings{margin-top:22px;padding-top:15px;border-top:1px solid #a99a8555}
.music-settings h3{margin:0;font-size:20px}.music-settings p{font-size:16px;line-height:1.7}
.music-settings label{display:flex;align-items:center;gap:14px;font-size:18px;margin:12px 0}
.music-settings input{flex:1;min-width:80px;max-width:320px;min-height:44px;accent-color:#886d42}
.music-settings output{min-width:4em}.music-settings .music-status{font-size:14px}
@media(min-width:701px){.utility{margin-right:270px}.opening-head{padding-right:282px}}
@media(max-width:700px) and (orientation:portrait){.display-controls{gap:5px}.display-controls button{padding:8px;min-width:70px}}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 .display-controls button{min-height:32px;padding:6px 3px}
 .controller{padding-top:128px;gap:13px}
 .utility{margin-right:0}.opening-head{padding-right:12px}
}

/* Props and scene changes preserve the fixed reading panel. */
.story-card{position:absolute;right:8%;top:calc(var(--portrait-top,125px) + 40px);width:min(430px,42%);padding:32px 28px;background:#f6f1e6;color:#26343b;border:1px solid #cbbb9d;box-shadow:0 12px 40px #0005;z-index:2}
.story-card small,.story-card span{display:block;font-size:15px;letter-spacing:.12em}
.story-card strong{display:block;margin:22px 0;font:30px/1.5 "Yu Mincho",serif;letter-spacing:.12em}
.story-card span{font-size:12px;color:#7e715c}
.game[data-screen="title"]>.story-card,.game[data-screen="opening"]>.story-card{display:none!important}
@media(max-width:700px){.story-card{top:208px;right:18px;width:245px;max-width:80%;padding:20px}.story-card strong{font-size:24px;margin:12px 0}.story-card small{font-size:13px}}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.story-card{top:87px;right:132px;width:235px;padding:14px 18px}.story-card strong{font-size:22px;margin:10px 0}.story-card small{font-size:12px}.story-card span{font-size:10px}}

@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.story-card{padding:10px 15px;max-height:calc(100% - var(--conversation-height) - 104px);overflow:auto}.story-card strong{font-size:20px;line-height:1.3;margin:6px 0}.story-card small{font-size:11px;line-height:1.3}.story-card span{font-size:9px;line-height:1.3}}

@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.ending-with-audio h3{font-size:23px;line-height:1.4;margin:8px 0}.ending-with-audio p{font-size:14px;line-height:1.6;margin:8px 0}.ending-with-audio .buttons{flex-wrap:wrap;gap:8px;margin-top:12px}.ending-with-audio .buttons button{font-size:13px;min-height:36px;padding:6px 10px}.ending-with-audio .music-settings{margin-top:14px;padding-top:8px}.ending-with-audio .music-settings h3{font-size:18px}.ending-with-audio .music-settings p{font-size:13px}}

/* Ending preview is available from the title without changing game progress. */
.title-menu #titleEdBtn{min-height:48px;font-size:20px;padding:10px 18px}.title-menu #titleEdBtn small{font-size:12px}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.title-menu #titleEdBtn{grid-column:1/-1;min-height:38px;font-size:16px;padding:7px 12px}.title-menu{gap:8px}.title-help{margin-top:4px}}
@media(max-width:700px) and (orientation:portrait) and (max-height:800px){.game[data-screen="title"] .title-content{padding-top:15px}.title-series{font-size:24px;margin-bottom:10px}.title-chapter{margin-bottom:8px}.title-content h2{font-size:30px}.title-sub{margin-bottom:13px}.orientation-hint{margin-bottom:12px}.title-menu button{min-height:56px;padding:10px 16px}.load-info{margin-top:12px}.title-help{margin-top:6px}}

@media(max-width:700px) and (orientation:portrait){.game[data-screen="title"] .title-screen{padding-top:70px}}

/* Dialogue is paged with A: prose never requires dragging or scrolling. */
.opening-speaker-row{display:flex;align-items:center;gap:14px;flex:0 0 32px;min-width:0;margin:0 0 10px}
.opening-speaker-row #openingSpeaker{margin:0;line-height:1.3;white-space:nowrap;flex:0 1 auto;min-width:0}
.opening-speaker-row #openingPlace{margin:0;font-size:14px;line-height:1.3;letter-spacing:.03em;white-space:nowrap;flex:0 0 auto}
#openingText,.dialogue-body>#dialogueText{font-size:26px;line-height:1.6;white-space:pre-wrap;overflow:hidden;scrollbar-gutter:auto;padding:0;max-width:100%;overflow-wrap:anywhere;line-break:strict;word-break:normal}
.speaker-row{height:36px;flex-basis:36px;gap:14px;white-space:nowrap}
.speaker-role{max-width:none;font-size:13px;white-space:nowrap}
.page-status{font:12px/1.2 "Yu Gothic","Meiryo",sans-serif;letter-spacing:0;white-space:nowrap;color:inherit;opacity:.82}
#nextBtn,#openingNext{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.game:not(.command-mode) #nextBtn{width:154px;min-width:154px;max-width:154px}
#nextBtn[data-pages="true"] .next-mark{display:none}
@media(min-width:701px) and (max-width:1000px){#openingText,.dialogue-body>#dialogueText{font-size:24px}}
@media(max-width:700px){
 .opening-speaker-row{flex-basis:29px;gap:10px;margin-bottom:8px}
 .opening-speaker-row #openingSpeaker{font-size:20px}
 .opening-speaker-row #openingPlace{font-size:12px}
 #openingText,.dialogue-body>#dialogueText{font-size:20px;line-height:1.6}
 .speaker-row{height:36px;flex-basis:36px;gap:8px}.speaker-role{font-size:11px}
 .page-status{font-size:11px}
}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 .opening-speaker-row{flex-basis:24px;gap:8px;margin-bottom:6px}
 .opening-speaker-row #openingSpeaker{font-size:17px}
 .opening-speaker-row #openingSpeaker[data-long="true"]{font-size:14px}
 .opening-speaker-row #openingPlace{font-size:10px}
 #openingText,.dialogue-body>#dialogueText{font-size:20px;line-height:1.5}
 .speaker-row{height:30px;flex-basis:30px}
 .game:not(.command-mode) #nextBtn{width:112px;min-width:112px;max-width:112px;padding-inline:10px;gap:5px}
 .page-status{font-size:10px}
 #openingNext{gap:5px}
}

/* Page labels must never change the height used to measure the prose. */
.opening-buttons{height:54px;min-height:54px;padding-top:0;align-items:stretch}
.opening-buttons button{height:100%;min-height:0;max-height:100%;white-space:nowrap}
#openingNextText{white-space:nowrap}
@media(max-width:700px){.opening-buttons{height:48px;min-height:48px}}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
 .opening-buttons{height:44px;min-height:44px;margin-top:9px;padding-top:0;gap:8px}
 .opening-buttons button{font-size:12px;padding:7px 6px;min-height:0}
 #openingBack{flex:0 0 82px}
 #openingNext{font-size:14px;gap:4px;padding:7px 6px}
}

/* 日数は場面が変わっても表示を維持する */
.location .night{white-space:nowrap;letter-spacing:.02em}
.opening-time{font-size:.8em;margin-left:1em;white-space:nowrap;color:#d1d8d9}
@media(max-width:700px){.opening-time{margin-left:.5em}}

.ending .buttons{flex-wrap:wrap}

/* クリア後の物語鑑賞 */
.game[data-screen="replay"]>.topbar,.game[data-screen="replay"]>.location,.game[data-screen="replay"]>.action-rail,.game[data-screen="replay"]>.choices,.game[data-screen="replay"]>.hotspots,.game[data-screen="replay"]>.sprite,.game[data-screen="replay"]>.npc-presence,.game[data-screen="replay"]>.dialogue,.game[data-screen="replay"]>#storyCard,.game[data-screen="replay"]>#itemPresence{display:none!important}
.story-player{position:absolute;inset:0 0 var(--controller-height,102px);z-index:9;background:#0d1924;display:grid;grid-template-rows:56px minmax(0,1fr) 292px 58px;overflow:hidden}
.sp-head{display:flex;align-items:center;gap:18px;padding:10px 30px;padding-right:300px;border-bottom:1px solid #ae99714d;white-space:nowrap;font-size:15px;color:#ddc69e}.sp-head strong{font-size:19px;font-weight:500}.sp-head #spProgress{margin-left:auto;color:#bbc7ce;font-size:13px}
.sp-art{position:relative;min-height:0;overflow:hidden;display:grid;place-items:center;background:#081019}.sp-art>img{width:100%;height:100%;object-fit:contain;min-height:0}
.sp-copy{min-height:0;display:grid;grid-template-rows:36px minmax(0,1fr) 20px 48px;gap:8px;margin:10px 20px;padding:12px 24px;border:3px double #c9b48e;background:#112433}
.sp-speaker-row{display:flex;align-items:center;gap:14px;min-width:0;white-space:nowrap;overflow:hidden}.sp-speaker-row strong{font-size:23px;font-weight:500;color:#ebcf9c;flex-shrink:0}.sp-speaker-row span{font-size:12px;color:#bfcbd2;overflow:hidden;text-overflow:ellipsis}
#spText{font:26px/1.65 "Yu Gothic","Meiryo",sans-serif;white-space:pre-line;overflow:hidden;min-height:0;margin:0;letter-spacing:.02em}
.sp-page-row{display:flex;justify-content:space-between;font-size:11px;color:#b9c4cb}.sp-buttons{display:flex;justify-content:space-between;gap:12px}.sp-buttons button,.sp-tools button{background:#233b4d;border:1px solid #bcae94;padding:8px 20px;font-size:17px;min-height:44px}.sp-buttons #spNext{background:#e5cda0;color:#132b3d;font-weight:bold;min-width:160px}.sp-buttons #spPause{min-width:140px}
.sp-tools{display:flex;justify-content:center;align-items:center;gap:20px;padding:4px 20px 10px}.sp-tools label{display:flex;align-items:center;gap:8px;font-size:12px;color:#ccb892}.sp-tools select{font:14px "Meiryo",sans-serif;background:#142b3d;color:#f1e8da;border:1px solid #9e9279;padding:7px;max-width:280px;min-height:38px}.sp-tools button{min-height:38px;font-size:13px;padding:7px 14px}
.sp-cast{position:absolute;right:22px;bottom:10px;display:flex;gap:10px}.sp-person{padding:5px;background:#102333ed;border:1px solid #c3ab7a;box-shadow:0 3px 12px #0006;text-align:center}.sp-face{width:98px;height:110px;background-repeat:no-repeat;background-color:#ddd5c7}.sp-person>span{display:block;font-size:13px;margin-top:5px;color:#ead8b6}
#spCard{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#eee5d3;color:#28333a;padding:24px 40px;border:1px solid #bba98a;box-shadow:0 10px 35px #0006;text-align:left;white-space:nowrap}#spCard>*{display:block}#spCard strong{font:29px "Yu Mincho",serif;margin:12px 0}#spCard small{font-size:13px}#spCard span{font-size:10px;letter-spacing:.15em}
#spNotice{position:absolute;top:15px;left:20px;background:#eee5d6;color:#252827;padding:10px;border:1px solid #8b7a62;font-size:19px}
#titleStoryBtn span{font-size:.85em;letter-spacing:.05em}
@media(max-width:700px){.story-player{grid-template-rows:105px minmax(0,1fr) 310px 100px}.sp-head{padding:12px 15px;align-items:flex-start;gap:9px;padding-top:15px;font-size:11px;white-space:normal}.sp-head strong{font-size:16px;white-space:nowrap}.sp-head #spProgress{font-size:11px;white-space:nowrap}.sp-copy{margin:7px 12px;padding:9px 14px;grid-template-rows:32px minmax(0,1fr) 18px 46px;gap:7px}.sp-speaker-row{gap:9px}.sp-speaker-row strong{font-size:20px}.sp-speaker-row span{font-size:10px}#spText{font-size:20px;line-height:1.65}.sp-buttons{gap:7px}.sp-buttons button{font-size:14px;padding:7px 8px;min-width:0!important;flex:1}.sp-tools{flex-wrap:wrap;gap:5px 10px;padding:3px 12px 8px}.sp-tools label:first-child{width:100%}.sp-tools label:first-child select{flex:1;max-width:none;min-width:0}.sp-tools select{font-size:12px}.sp-tools button{margin-left:auto}.sp-face{width:66px;height:75px}.sp-person>span{font-size:11px}.sp-cast{right:10px;bottom:7px}#spCard{padding:15px 25px}#spCard strong{font-size:24px}}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){
.story-player{right:106px;bottom:0;grid-template-columns:46% 54%;grid-template-rows:36px minmax(0,1fr) 52px}
.sp-head{grid-column:1/-1;grid-row:1;padding:5px 12px;font-size:11px;align-items:center;white-space:nowrap}.sp-head strong{font-size:15px}.sp-head #spProgress{font-size:11px}
.sp-art{grid-column:1;grid-row:2}.sp-copy{grid-column:2;grid-row:2;margin:5px 8px 5px 3px;padding:7px 10px;grid-template-rows:30px minmax(0,1fr) 15px 40px;gap:4px}.sp-speaker-row{gap:7px}.sp-speaker-row strong{font-size:18px}.sp-speaker-row span{font-size:10px}#spText{font-size:20px;line-height:1.5;letter-spacing:0}.sp-page-row{font-size:10px}.sp-buttons{gap:5px}.sp-buttons button{font-size:12px;padding:5px 4px;min-height:38px;min-width:0!important;flex:1}
.sp-tools{grid-column:1/-1;grid-row:3;padding:3px 10px;gap:8px;flex-wrap:nowrap}.sp-tools label:first-child{width:auto;flex:1;min-width:0}.sp-tools label{gap:4px;font-size:10px}.sp-tools select{font-size:11px;min-height:34px;padding:5px;max-width:230px}.sp-tools label:first-child select{min-width:0;flex:1}.sp-tools button{font-size:11px;min-height:34px;padding:5px 7px;margin:0}.sp-face{width:58px;height:65px}.sp-person>span{font-size:10px}.sp-cast{right:7px;bottom:7px}#spNotice{font-size:13px;padding:5px;left:9px;top:10px}#spCard{padding:10px 18px}#spCard strong{font-size:20px;margin:8px 0}#spCard small{font-size:10px}
.title-menu:has(#titleStoryBtn:not([hidden])){grid-template-columns:1fr 1fr}.title-menu:has(#titleStoryBtn:not([hidden])) #titleEdBtn{grid-column:auto}.title-menu:has(#titleStoryBtn:not([hidden])) button{min-height:40px}
}

/* TOPからゲームを終了する */
.game[data-screen="exit"]>*:not(.quit-screen){display:none!important}.quit-screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;background:#0c1b29;color:#eee1c8;z-index:50}.quit-screen h2{font:28px "Yu Mincho",serif;margin:20px 0}.quit-screen p{font-size:16px;line-height:1.9;max-width:620px}.quit-screen button{margin-top:24px;min-height:48px;background:#21394b;border:1px solid #c5b18a;padding:10px 24px;font-size:17px}#titleExitBtn{min-height:44px;padding:9px 20px;font-size:19px;color:#d4d7d3}#titleExitBtn small{font-size:12px}
@media(max-width:700px) and (orientation:portrait){.title-menu{grid-template-columns:1fr 1fr;gap:9px}.title-menu button{font-size:20px;letter-spacing:.04em;padding:10px 12px;min-height:54px}.title-menu button small{display:none}#titleEdBtn,#titleExitBtn{grid-column:1/-1}#titleStoryBtn:not([hidden]){grid-column:1/-1}#titleExitBtn{min-height:42px;font-size:17px}}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){#titleExitBtn{grid-column:1/-1;min-height:32px;padding:5px;font-size:14px}.title-menu{gap:6px}}

/* Published OP/ED video shortcuts, 2026-10-17 */
.title-video-links{display:flex;justify-content:center;gap:12px;margin:12px auto 0;flex-wrap:wrap}
.title-video-links button{border:1px solid #bca881;background:#112637e8;color:#efd6ab;font-size:16px;padding:8px 16px;min-height:38px}
@media(max-width:1180px) and (max-height:600px) and (orientation:landscape){.title-video-links{margin-top:7px;gap:10px}.title-video-links button{font-size:14px;min-height:30px;padding:4px 12px}}
