:root{color-scheme:dark;--v20-speech-size:20px}
html[data-font-size="small"]{--v20-speech-size:18px}
html[data-font-size="standard"]{--v20-speech-size:20px}
html[data-font-size="large"]{--v20-speech-size:22px}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{background:#1e1713;color:#f4e6d2;font-family:"Yu Gothic","Meiryo",sans-serif;line-height:1.6}
button,a{font:inherit}
button{color:#f4e6d2;cursor:pointer;touch-action:manipulation;border:1px solid #aa8760;background:#392a20;border-radius:7px;padding:9px 16px;min-height:44px}
button:hover:not(:disabled){background:#5c422d}button:disabled{opacity:.4;cursor:default}
[hidden]{display:none!important}
.player{width:100%;height:100vh;height:100dvh;max-width:1280px;margin:auto;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:radial-gradient(ellipse at center,#463326,#211914 80%)}
.topbar{width:100%;min-height:0;margin:0;padding:3px 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #775a3d;gap:8px}
.topbar>div:first-child{flex:1;min-width:0;display:flex;align-items:baseline;gap:16px}.brand-small{font-size:12px;letter-spacing:.12em;color:#d0b797;white-space:nowrap}.topbar h1{font-size:15px;line-height:1.4;letter-spacing:0;max-width:50vw;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-actions{display:flex;align-items:center;gap:6px;flex:none}.topbar button,.topbar a{font-size:13px;min-height:32px;padding:3px 9px;border:1px solid #aa8760;border-radius:7px;background:#392a20;color:#f4e6d2;text-decoration:none;white-space:nowrap}#textMotion{font-size:12px;padding-inline:8px}
.screen{width:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 126px;overflow:hidden}
.stage{min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;cursor:pointer;background:#17110e}
.stage .scene-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.stage:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 32px #160d0630}
.dialogue{height:auto;min-height:0;padding:5px 12px 8px;cursor:pointer;align-self:stretch;display:flex;flex-direction:column;justify-content:flex-start;background:repeating-linear-gradient(0deg,#3c2c2280 0,#573b2a60 1px,#392a21b0 3px,#392a21b0 8px);border:0}
.dialogue .speech{margin:0!important;max-width:none;width:100%;padding:6px 14px 9px;flex:1;min-height:0;display:flex;flex-direction:column;border:1px solid #aa8c68;border-radius:7px;box-shadow:0 3px 18px #0002;background:rgba(45,36,27,.88)}
.dialogue .speech.misa{background:rgba(24,62,77,.90);border-color:#78a7b7}.dialogue .speech.munehiko{background:rgba(40,60,49,.90);border-color:#8eaf91}.dialogue .speech.tomoya{background:rgba(43,34,80,.90);border-color:#b5a9e2}
.speech-head{flex:0 0 auto;min-height:32px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:12px}.speaker{font-size:16px;font-weight:bold;color:#e5c899;white-space:nowrap}.speech.misa .speaker,.speech.munehiko .speaker,.speech.tomoya .speaker{color:#fff5e7}
.speech-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:flex-start}.dialogue .speech p{width:100%;max-width:none;margin:0 auto;font-size:var(--v20-speech-size);line-height:1.6;text-align:center;white-space:normal;overflow-wrap:anywhere}
.controls{width:auto;min-width:0;margin:0;padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-shrink:0}.controls button{width:96px;min-width:96px;min-height:32px;padding:2px 10px;font-size:14px;background:#1e17134d}.controls span{min-width:44px;font-size:12px;text-align:center;white-space:nowrap;color:#d8c2a3}
.diagram{max-height:100%}.end-card{max-width:600px;text-align:center}.end-card a{display:inline-block;margin:10px;color:#ffe0a6}
@media(min-width:901px){.screen{grid-template-rows:minmax(0,1fr) 90px}.dialogue{padding:4px 12px 6px}.dialogue .speech{padding:4px 14px 5px}}
@media(max-width:600px){html{--v20-speech-size:18px}html[data-font-size="small"]{--v20-speech-size:16px}html[data-font-size="standard"]{--v20-speech-size:18px}html[data-font-size="large"]{--v20-speech-size:20px}.topbar{padding:3px 8px;gap:4px}.topbar>div:first-child{display:none}.reader-actions{width:100%;justify-content:space-between;gap:3px}.brand-small{display:none}.topbar h1{font-size:13px;max-width:48vw}.topbar button,.topbar a{padding-inline:5px;font-size:12px}#textMotion{font-size:11px;padding-inline:5px}.screen{grid-template-rows:minmax(0,1fr) 172px}.dialogue{padding:5px 8px 8px}.dialogue .speech{padding:3px 12px 8px}.speech-head{min-height:44px;gap:4px}.dialogue .speech p{font-size:var(--v20-speech-size);line-height:1.65}.controls{gap:4px}.controls button{min-height:44px;padding-inline:6px}.controls span{min-width:37px;font-size:11px}}
@media(max-height:570px) and (orientation:landscape){html{--v20-speech-size:17px}html[data-font-size="small"]{--v20-speech-size:15px}html[data-font-size="standard"]{--v20-speech-size:17px}html[data-font-size="large"]{--v20-speech-size:19px}.brand-small{display:none}.screen{grid-template-rows:minmax(0,1fr) 126px}.dialogue{padding:6px}.dialogue .speech p{font-size:var(--v20-speech-size);line-height:1.55}}
