@charset "UTF-8";
:root{color-scheme:dark;--bg:#141c1d;--panel:#1a2425;--ink:#ebe6d9;--muted:#a8b0a9;--gold:#d2b37e;--line:#ffffff16;--serif:"Hiragino Mincho ProN","Yu Mincho",YuMincho,serif;--sans:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px}button,a,input{ -webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:5px}button:disabled{cursor:wait}a{color:var(--gold)}[hidden]{display:none!important}.app{max-width:1600px;margin:auto;padding:0 44px}.header{height:100px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--ink);font-family:Georgia,serif;letter-spacing:3px;font-size:19px}.brand-symbol{display:grid;place-items:center;width:35px;height:44px;border:1px solid #a98e6266;font-size:25px;color:var(--gold)}.brand small{display:block;font-family:var(--sans);font-size:8px;letter-spacing:4px;margin-bottom:4px;color:var(--gold)}nav{display:flex;gap:8px}nav button{background:none;border:0;padding:12px 14px;font-size:12px;color:#c4c9c0}nav button:hover{color:var(--gold);background:#ffffff05}#note-count{font-size:10px;color:var(--gold);margin-left:5px}main{min-height:calc(100svh - 153px);display:grid;grid-template-columns:1.08fr 1fr}.stage{position:relative;display:flex;flex-direction:column;padding:52px 46px 24px 0;border-right:1px solid var(--line);overflow:hidden}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--gold)}h1{font-family:var(--serif);font-weight:500;font-size:clamp(23px,2.25vw,34px);letter-spacing:.07em;margin:16px 0 12px}.night-heading p{font-family:var(--serif);font-size:13px;letter-spacing:.08em;color:var(--muted)}.room{position:relative;isolation:isolate;width:100%;height:340px;margin:auto 0;overflow:hidden;background:radial-gradient(ellipse at 62% 23%,#90724719,transparent 65%),linear-gradient(180deg,#1b2221,#172021 83%);border-bottom:1px solid #b8996333;border-radius:3px}.window{position:absolute;width:19%;height:48%;left:5%;top:7%;border:5px solid #30322a;background:linear-gradient(150deg,#1e3238,#192529);box-shadow:0 0 0 1px #080d0e;overflow:hidden}.window-cross{position:absolute;left:48%;top:0;bottom:0;width:4px;background:#353a32}.window-cross:after{content:"";position:absolute;width:110px;height:4px;top:53%;left:-50px;background:#353a32}.window i{position:absolute;width:1px;height:65px;top:5%;left:20%;background:linear-gradient(transparent,#91adb630,transparent);transform:rotate(12deg);animation:rain 4s linear infinite}.window i:nth-child(2){left:48%;animation-delay:-1s}.window i:nth-child(3){left:69%;animation-delay:-2.5s}.window i:nth-child(4){left:87%;animation-delay:-3.6s}@keyframes rain{to{translate:-10px 190px}}.room.dry .window i{animation:none;opacity:.15}.shelves{position:absolute;right:7%;top:20%;width:23%}.shelf{height:52px;border-bottom:4px solid #554a3770;display:flex;align-items:flex-end;gap:8px;padding:0 7px 4px}.shelf i{display:block;width:13px;height:29px;background:#55604d;border-radius:3px 3px 1px 1px;opacity:.65;position:relative}.shelf i:before{content:"";position:absolute;top:-8px;left:4px;width:5px;height:9px;background:inherit}.shelf i:after{content:"";position:absolute;left:2px;right:2px;top:12px;height:9px;background:#b6a68455}.shelf i:nth-child(2n){background:#896e47;height:34px}.shelf i:nth-child(3n){background:#8b8572;height:23px}.lamp{position:absolute;top:0;width:1px;height:52px;background:#7c705444;left:40%}.lamp:before{content:"";position:absolute;bottom:-4px;left:-23px;width:46px;height:15px;border-radius:50% 50% 10% 10%;background:#bca371;box-shadow:0 5px 22px 7px #d0a45215}.lamp:after{content:"";position:absolute;top:50px;left:-70px;width:140px;height:180px;background:linear-gradient(#cda46510,transparent);clip-path:polygon(34% 0,66% 0,100% 100%,0 100%)}.lamp-two{left:74%;height:36px}.lamp-two:after{top:36px}.back-label{position:absolute;top:27%;left:30%;width:35%;font-family:Georgia,serif;letter-spacing:3px;font-size:12px;text-align:center;color:#b4a08070}.back-label span{display:block;letter-spacing:2px;font-size:7px;margin-top:8px}.counter{position:absolute;height:60px;bottom:18%;left:0;right:0;background:linear-gradient(180deg,#6f5b3b 0,#635238 20%,#3d3529 23%,#302b23 92%,#4d402e 95%);box-shadow:0 12px 20px #0003}.counter-line{height:1px;background:#d8b67955;position:absolute;top:4px;left:0;right:0}.glass{position:absolute;width:16px;height:22px;border:1px solid #c4d1c360;border-top:2px solid #c4d1c380;background:linear-gradient(transparent 35%,#ae863d33 36%);top:-22px;left:14%;transform:skew(3deg)}.glass-two{left:64%}.flower{position:absolute;left:46%;top:-30px;width:10px;height:30px;background:#8baba04a;border:1px solid #c5d0b95c;border-radius:2px 2px 4px 4px}.flower:before{content:"";position:absolute;height:31px;bottom:5px;width:1px;background:#9eaa77;left:4px;rotate:8deg}.flower i{position:absolute;width:10px;height:9px;border-radius:50%;background:#deded0;top:-8px;left:1px;box-shadow:4px -3px 0 #dad8c6,-3px -3px 0 #ebe7d4}.stools{position:absolute;bottom:0;left:3%;right:3%;height:47px;display:flex;justify-content:space-around}.stools i{display:block;width:35px;height:10px;background:#534331;border:1px solid #81735e4a;border-radius:50%;position:relative}.stools i:after{content:"";position:absolute;width:4px;height:34px;background:#44453d;top:9px;left:14px}.patrons{position:absolute;inset:0}.patron{position:absolute;bottom:35%;width:64px;height:93px;transition:opacity .4s}.patron:before{content:"";position:absolute;width:30px;height:36px;top:0;left:17px;background:#a49c8566;border-radius:45% 45% 44% 44%}.patron:after{content:"";position:absolute;bottom:0;height:57px;width:64px;background:#586b6766;border-radius:28px 28px 4px 4px}.patron.mizuno{left:10%}.patron.saki{left:52%}.patron.saki:before{height:45px;width:35px;left:15px;background:#88765c90}.patron.saki:after{background:#9a897252}.patron.brother{left:28%}.patron.brother:after{background:#64788966}.patron span{position:absolute;z-index:3;top:-28px;width:90px;left:-13px;text-align:center;font-size:10px;letter-spacing:1px;color:#c7cbbb}.scene-status{display:flex;justify-content:space-between;align-items:center;min-height:45px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.scene-status b{font-weight:400;font-variant-numeric:tabular-nums;font-size:13px;color:var(--ink);margin-left:15px}.stage-foot{display:flex;justify-content:space-between;padding-top:20px;font-size:10px;letter-spacing:1px;color:#869189}.night-dots{display:flex;gap:7px}.night-dots i{height:5px;width:18px;background:#ffffff14}.night-dots .active{background:var(--gold)}.conversation{padding:36px 0 24px 46px;display:flex;flex-direction:column;min-width:0}.conversation-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}#save-status{font-size:10px;color:#91a294}#story-content{outline:none}.speaker-row{display:flex;align-items:center;gap:10px;margin:0 0 19px}.speaker-mark{width:4px;height:14px;background:var(--gold)}h2{font-size:13px;font-weight:500;letter-spacing:2px;margin:0}#passage{min-height:210px;font-family:var(--serif);font-size:16px;line-height:2.05;letter-spacing:.025em}#passage p{margin:0 0 13px;animation:enter .25s ease-out}#passage p:last-child{margin-bottom:0}@keyframes enter{from{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}.choices{display:flex;flex-direction:column;gap:10px;margin-top:28px}.choice{width:100%;display:flex;text-align:left;align-items:center;gap:14px;background:#ffffff03;border:1px solid #c6c0a628;border-radius:3px;padding:16px 17px;transition:background .15s,border-color .15s;min-height:56px}.choice .number{color:#b79c71;font-size:10px;font-family:Georgia,serif;min-width:13px}.choice .choice-label{font-size:13px;line-height:1.7}.choice small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.choice .arrow{margin-left:auto;color:var(--gold);font-size:18px}.choice.single{margin-top:7px;border-color:#d2b37e77;background:#b2925912}.conversation-foot{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--line);margin-top:auto;padding-top:20px;font-size:9px;color:#8f9991;letter-spacing:.04em}.choices+.conversation-foot{margin-top:28px}.conversation-foot span:last-child{white-space:nowrap;font-family:var(--serif)}.page-foot{height:53px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;color:#89948d;font-size:9px;letter-spacing:1px}.page-foot span:first-child{font-family:Georgia,serif;letter-spacing:2px}.inline-news{background:none;text-align:left;border:0;border-bottom:1px solid var(--line);padding:13px 0;color:var(--gold);font-size:11px;line-height:1.8;margin-top:14px}.inline-news span{float:right}.primary-button{width:100%;padding:17px;border:1px solid #d2b37e88;background:#b2925914;margin-top:24px;border-radius:3px}.text-button{border:0;background:none;color:var(--muted);padding:16px;width:100%;font-size:12px}.text-button:hover{color:var(--gold)}dialog{background:#1e2828;color:var(--ink);border:1px solid #b9ac843f;padding:28px;max-width:540px;width:calc(100% - 32px);max-height:85svh;border-radius:6px;box-shadow:0 25px 100px #0009}dialog::backdrop{background:#081011bc;backdrop-filter:blur(5px)}.panel-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:17px;margin-bottom:22px}.panel-header h2{font-family:var(--serif);font-size:20px}.panel-header button{background:none;border:0;font-size:27px;padding:0 8px;color:var(--muted)}.panel-description{font-size:12px;color:var(--muted);line-height:1.9}.journal-night{font-family:var(--serif);font-size:16px;color:var(--gold);margin:27px 0 15px}.memory{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.85;margin:0}.memory:before{content:"—";color:#b49e72;margin-right:10px}.news-item{display:block;color:var(--ink);font-size:13px;line-height:1.85;text-decoration:none;padding:15px 0;border-bottom:1px solid var(--line)}.news-item:hover{color:var(--gold)}.news-item small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.save-id{font-family:monospace;word-break:break-all;font-size:12px;color:var(--gold);padding:15px;background:#0002}.danger{color:#d3a496}.file-message{font-size:12px;line-height:1.8}.stats{display:flex;gap:20px;padding:17px 0;color:var(--gold);font-size:12px}.news-note{padding:12px;background:#ffffff04;line-height:1.9;font-size:12px;color:var(--muted)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:14px 23px;background:#34423e;color:var(--ink);border:1px solid #a18d6566;border-radius:4px;z-index:20;font-size:12px;max-width:90vw}.choice.single .choice-label{color:var(--gold)}
@media(min-width:1300px){.app{padding:0 70px}.stage{padding-right:60px}.conversation{padding-left:60px}#passage{font-size:17px}.room{height:390px}}
@media(max-width:900px){.app{padding:0 25px}.header{height:80px}.stage{padding:32px 25px 20px 0}.conversation{padding:30px 0 20px 25px}.room{height:280px}h1{font-size:24px}#passage{font-size:15px}.choice{padding:13px}.back-label{font-size:9px;letter-spacing:2px}.conversation-top{margin-bottom:25px}.conversation-foot span:last-child{display:none}}
@media(max-width:680px){.app{padding:0 20px}.header{height:68px}.brand{font-size:14px;letter-spacing:2px;gap:9px}.brand-symbol{width:26px;height:34px;font-size:21px}.brand small{font-size:6px;margin-bottom:3px}nav{gap:0}nav button{font-size:11px;padding:12px 8px}#note-count{margin-left:3px}main{display:block;min-height:0}.stage{border-right:0;padding:23px 0 0}.night-heading{position:relative}h1{font-size:23px;margin:10px 0 8px}.night-heading p{display:none}.eyebrow{font-size:9px}.room{height:185px;margin:16px 0 0}.window{height:52%;border-width:3px}.shelves{top:9%;width:25%}.shelf{height:39px;gap:6px}.shelf i{height:22px;width:11px}.shelf i:nth-child(2n){height:25px}.back-label{top:25%;font-size:10px}.lamp{height:25px}.lamp:after{top:25px;height:100px}.lamp-two{height:18px}.lamp-two:after{top:18px}.patron{scale:.73;transform-origin:bottom center;bottom:31%}.counter{bottom:12%;height:35px}.stools{height:23px;bottom:-3px}.stools i{width:26px;height:7px}.stools i:after{left:11px;height:23px}.glass{scale:.8;transform-origin:bottom center}.scene-status{font-size:10px;min-height:38px}.scene-status b{font-size:11px}.stage-foot{display:none}.conversation{padding:22px 0 10px}.conversation-top{margin-bottom:22px}#passage{font-size:15px;line-height:1.95;min-height:0}#passage p{margin-bottom:11px}.speaker-row{margin-bottom:13px}.choices{margin-top:23px;gap:9px}.choice{min-height:54px;padding:13px 14px}.choice .choice-label{font-size:12px}.conversation-foot{margin-top:25px;padding-top:16px;padding-bottom:8px}.page-foot{height:45px;font-size:8px;padding-bottom:env(safe-area-inset-bottom)}dialog{padding:23px}.flower{scale:.8;transform-origin:bottom center}#end-actions{padding-bottom:15px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media(max-width:680px){.room{height:150px}.stage{padding-top:18px}.conversation{padding-top:18px}.conversation-top{margin-bottom:17px}}

/* The reading surface follows the selected mode. The illustrated bar stays dim. */
:root[data-theme="light"]{color-scheme:light;--bg:#f4f1e9;--panel:#fffdf7;--ink:#272e2c;--muted:#606960;--gold:#79571f;--line:#2431272b}
:root[data-theme="dark"]{color-scheme:dark}
.appearance{display:flex;justify-content:flex-end;align-items:center;gap:3px;min-height:42px;border-bottom:1px solid var(--line);font-size:11px}
.appearance>span{color:var(--muted);margin-right:10px}
.appearance button{border:1px solid transparent;background:none;padding:7px 12px;border-radius:3px;color:var(--muted);font-size:11px}
.appearance button[aria-pressed="true"]{border-color:var(--gold);color:var(--gold);background:#ab8c6010}
main{min-height:calc(100svh - 195px)}
nav button,.stage-foot,.conversation-foot,.page-foot{color:var(--muted)}
#save-status{color:var(--muted)}
.choice .number{color:var(--gold)}
#passage p{animation:none}
dialog{background:var(--panel)}
:root[data-theme="light"] .choice{background:#fffcf5;border-color:#76644366}

:root[data-theme="light"] .choice.single,:root[data-theme="light"] .primary-button{background:#eae0cc;border-color:#94744199}
:root[data-theme="light"] .night-dots i{background:#85724b33}
:root[data-theme="light"] .night-dots .active{background:var(--gold)}
:root[data-theme="light"] .news-note{background:#eae5d9}
:root[data-theme="light"] .danger{color:#914132}
:root[data-theme="light"] #toast{background:#e8ecdf;color:var(--ink)}
@media(max-width:680px){main{min-height:0}.appearance{justify-content:flex-end;min-height:43px}.appearance button{padding:8px 10px}}
.story-navigation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 16px;margin:14px 0 20px}
#back-button{background:none;border:1px solid var(--line);border-radius:3px;min-height:44px;padding:10px 14px;color:var(--ink);font-size:12px}
#back-button:hover:not(:disabled){border-color:var(--gold);color:var(--gold)}
#back-button:disabled{color:var(--muted);opacity:.45;cursor:default}
#back-help{font-size:10px;color:var(--muted);line-height:1.7}
 ruby{ruby-position:over;ruby-align:center}
 rt{font-family:var(--sans);font-size:max(.58em,9px);font-weight:400;letter-spacing:0;line-height:1.1;color:inherit}
 .speaker-row h2,.scene-status,.memory,.choice-label{line-height:2}
 .patron span{top:-35px;line-height:2}
/* Warm paper follows the reading theme, so a dark room never contains a glaring sheet. */
#passage .note{--note-bg:#30322b;--note-ink:#ded7c3;--note-muted:#b7ad96;--note-placeholder:#afa58f;background:var(--note-bg);color:var(--note-ink);border:1px solid #68604a66;padding:24px 26px 18px;border-radius:2px;box-shadow:0 1px 0 #00000026,0 14px 32px #0000004d;rotate:-.4deg;margin:22px 2px 20px}
#passage .note p{margin:0 0 12px}
#passage .note .note-sign{text-align:right;font-size:13px;color:var(--note-muted);margin:6px 0 0}
#passage .note .note-sign:before{content:"— "}
:root[data-theme="light"] #passage .note{--note-bg:#fffaf0;--note-ink:#2b2720;--note-muted:#6b6250;--note-placeholder:#9a8f78;background:var(--note-bg);box-shadow:0 1px 0 #0000001f,0 10px 26px #4b3c1f29}
@media(prefers-reduced-motion:reduce){#passage .note{rotate:none}}
.primary-button.secondary{margin-top:10px;background:none}
.memory.locked{color:var(--muted)}
.memory small{display:block;font-size:11px;color:var(--muted);margin:4px 0 0 26px}
.stats{flex-wrap:wrap;row-gap:6px}
/* Paced arrival of a new scene: paragraphs one by one, choices last. */
#passage>p,#passage>div{animation:enter .45s ease-out both;animation-delay:calc(var(--scene-offset,0s) + var(--i,0)*230ms)}
#passage .note p{animation:none}
/* Choices are rebuilt every scene, so the animation sits on them (the container persists). */
@keyframes choices-arrive{from{opacity:0;translate:0 3px}to{opacity:1;translate:0 0}}
.choices .choice{animation:choices-arrive .45s ease-out both;animation-delay:calc(var(--scene-offset,0s) + var(--n,0)*230ms)}
@media(prefers-reduced-motion:reduce){#passage>p,#passage>div,.choices .choice{animation:none}}
/* After closing, the lamps are turned down. */
.room .lamp:after,.room .lamp:before{transition:opacity 1.2s,box-shadow 1.2s}
.room.after-hours .lamp:after{opacity:.25}
.room.after-hours .lamp:before{box-shadow:0 5px 22px 2px #d0a45208}
.room.after-hours .back-label{opacity:.5}
.patron.driver{left:58%}.patron.driver:before{background:#9b8f7a80}.patron.driver:after{background:#6d625466}
/* A drink in front of each guest served tonight; the counter's spare glasses step aside while guests are in. */
.patron-glass{position:absolute;bottom:-3px;left:47px;width:13px;height:18px;border:1px solid #c4d1c370;border-top-width:2px;background:linear-gradient(transparent 30%,#c0954a55 31%);transform:skew(3deg);animation:enter .5s ease-out both}
.room.occupied .glass{opacity:0;transition:opacity .4s}
/* Between nights: a title card that fades in and out without blocking the page. */
#night-card{position:fixed;inset:0;z-index:30;display:grid;place-content:center;gap:14px;text-align:center;background:#0b1112;color:#ebe6d9;pointer-events:none;opacity:0}
#night-card.show{animation:night-card 2.6s ease-in-out both}
#night-card small{font-size:11px;letter-spacing:.4em;color:#d2b37e}
#night-card strong{font-family:var(--serif);font-weight:500;font-size:clamp(24px,4vw,40px);letter-spacing:.12em}
#night-card span{font-size:12px;letter-spacing:.3em;color:#a8b0a9}
@keyframes night-card{0%{opacity:0}22%{opacity:1}70%{opacity:1}100%{opacity:0}}
/* 振り返る: past scenes as a list of buttons, newest first. */
#history-button{background:none;border:1px solid var(--line);border-radius:3px;min-height:44px;padding:10px 14px;color:var(--ink);font-size:12px;margin-left:8px}
#history-button:disabled{opacity:.45;cursor:default}
.history-item{display:block;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);padding:12px 0;font-size:13px;line-height:1.8;color:var(--ink)}
.history-item:hover{color:var(--gold)}
.history-item small{display:block;font-size:10px;color:var(--muted)}
/* The chosen line lights up for a moment; the others step back. */
.choices.choosing .choice{pointer-events:none;transition:opacity .2s,background .15s,border-color .15s}
.choices.choosing .choice:not(.chosen){opacity:.35}
.choice.chosen{border-color:var(--gold);background:#d2b37e1f}
/* --- Living bar art --- */
/* Lamps breathe a little; dust drifts through their light. */
.lamp:before{animation:lamp-breathe 6s ease-in-out infinite alternate}
.lamp-two:before{animation-delay:-2.5s}
@keyframes lamp-breathe{from{box-shadow:0 5px 22px 7px #d0a45215}to{box-shadow:0 5px 26px 9px #d0a45222}}
.motes{position:absolute;inset:0;pointer-events:none}
.motes i{position:absolute;width:2px;height:2px;border-radius:50%;background:#f3d9a0;opacity:0;animation:mote 11s linear infinite}
.motes i:nth-child(1){left:37%;top:30%;animation-delay:-1s}.motes i:nth-child(2){left:42%;top:45%;animation-delay:-4s}
.motes i:nth-child(3){left:39%;top:58%;animation-delay:-7s}.motes i:nth-child(4){left:71%;top:26%;animation-delay:-2s}
.motes i:nth-child(5){left:76%;top:40%;animation-delay:-6s}.motes i:nth-child(6){left:73%;top:55%;animation-delay:-9s}
.motes i:nth-child(7){left:44%;top:35%;animation-delay:-5s}
@keyframes mote{0%{opacity:0;translate:0 0}20%{opacity:.5}80%{opacity:.35}100%{opacity:0;translate:14px 34px}}
.room.after-hours .motes{opacity:.3}
/* Someone opens the door: warm street light sweeps in from the left. */
.door-light{position:absolute;inset:0 auto 0 0;width:38%;background:linear-gradient(90deg,#e9c88a33,transparent);opacity:0;pointer-events:none;z-index:2}
.door-light.open{animation:door-light 1.6s ease-out}
@keyframes door-light{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
/* Guests arrive and leave softly. */
.patron.arriving{animation:patron-in .9s ease-out both}
.patron.leaving{animation:patron-out .8s ease-in both;pointer-events:none}
.patron.leaving span{display:none}
@keyframes patron-in{from{opacity:0;translate:-10px 0}to{opacity:1;translate:0 0}}
@keyframes patron-out{from{opacity:1}to{opacity:0;translate:-12px 0}}
/* A drink served just now fills from the bottom. */
.patron-glass.pouring{background:linear-gradient(transparent 30%,#c0954a55 31%) bottom/100% 0% no-repeat;animation:enter .3s ease-out both,pour 1.2s .25s ease-out forwards}
@keyframes pour{to{background-size:100% 100%}}
/* The white flower sways a little. */
.flower{transform-origin:bottom center;animation:sway 7s ease-in-out infinite alternate}
@keyframes sway{from{rotate:-1.5deg}to{rotate:1.5deg}}
/* Paper notes settle onto the counter; a freshly written line is inked left to right. */
#passage>.note{animation-name:note-in;animation-duration:.7s}
@keyframes note-in{from{opacity:0;translate:0 10px;rotate:-2deg}to{opacity:1;translate:0 0;rotate:-.4deg}}
#passage .note p.writing{animation:ink 1.1s steps(18,end) both;animation-delay:calc(var(--scene-offset,0s) + .5s)}
@keyframes ink{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@media(prefers-reduced-motion:reduce){#passage>.note,#passage .note p.writing{animation:none}}
/* A found story: a quiet gold banner, top of the screen. */
#discovery{position:fixed;top:18px;left:50%;translate:-50% 0;z-index:25;display:grid;gap:4px;min-width:260px;max-width:90vw;padding:14px 22px;text-align:center;background:#1b2223f2;color:#ebe6d9;border:1px solid #d2b37e99;border-radius:4px;box-shadow:0 12px 40px #0008}
#discovery.show{animation:discovery 4.8s ease-in-out both}
#discovery small{font-size:10px;letter-spacing:.3em;color:#d2b37e}
#discovery strong{font-family:var(--serif);font-weight:500;font-size:18px;letter-spacing:.08em}
#discovery span{font-size:11px;color:#a8b0a9}
@keyframes discovery{0%{opacity:0;translate:-50% -12px}10%{opacity:1;translate:-50% 0}85%{opacity:1}100%{opacity:0}}
/* The journal noticed something. */
#journal-button.noted #note-count{animation:noted 1.4s ease-out}
#journal-button.noted:after{content:"+1";position:absolute;margin:-14px 0 0 -6px;font-size:10px;color:var(--gold);animation:plus-one 1.4s ease-out forwards}
#journal-button{position:relative}
@keyframes noted{0%{scale:1}25%{scale:1.6;color:#fff3cf}100%{scale:1}}
@keyframes plus-one{from{opacity:1;translate:0 0}to{opacity:0;translate:0 -12px}}
@media(prefers-reduced-motion:reduce){#discovery.show{animation:none;opacity:1}}
/* The addressee line on the master's notes. */
#passage .note .note-to{font-size:14px;margin-bottom:14px;color:var(--note-ink)}
#name-input{font:inherit;color:inherit;background:transparent;border:0;border-bottom:1px dashed #8a7a5a;width:8.5em;padding:0 2px;margin-right:2px}
#name-input::placeholder{color:var(--note-placeholder)}
#name-input:focus{outline:none;border-bottom-style:solid;border-bottom-color:var(--gold)}
/* After a tap on the text, everything still waiting appears now. */
body.instant-text #passage>p,body.instant-text #passage>div,body.instant-text .choices .choice{animation-delay:0s!important;animation-duration:.15s!important}
/* Seated guests breathe a little; whoever is speaking is a shade brighter. */
.patron:before{animation:breathe 5s ease-in-out infinite alternate}
.patron.saki:before{animation-delay:-1.7s}.patron.brother:before{animation-delay:-3.1s}.patron.driver:before{animation-delay:-.8s}
@keyframes breathe{from{translate:0 0}to{translate:0 1.5px}}
.patron{transition:filter .6s}
.patron.speaking{filter:brightness(1.35)}
.patron.speaking span{color:#f0e2c2}
/* The very end: the lamps go out, only the street light from the window remains. */
.room.closed .lamp:before{background:#5a5140;box-shadow:none;animation:none;transition:background 2s}
.room.closed .lamp:after{opacity:0;transition:opacity 2s}
.room.closed .motes,.room.closed .back-label{opacity:0;transition:opacity 2s}
/* The window follows the weather: rain (night one), drops left on the glass (two), a still moon (three). */
.room.night-2 .window{background:radial-gradient(circle at 22% 30%,#9fc0c855 0 1.5px,transparent 2.5px),radial-gradient(circle at 63% 18%,#9fc0c844 0 1.2px,transparent 2px),radial-gradient(circle at 74% 62%,#9fc0c855 0 1.8px,transparent 2.8px),radial-gradient(circle at 35% 74%,#9fc0c833 0 1.2px,transparent 2px),radial-gradient(circle at 86% 40%,#9fc0c844 0 1px,transparent 2px),linear-gradient(150deg,#1e3238,#192529)}
.room.night-3 .window{background:radial-gradient(circle at 70% 28%,#e8e2c8 0 7px,#e8e2c833 8px,transparent 22px),linear-gradient(150deg,#1b2a33,#141f26)}
.room.night-2 .window i,.room.night-3 .window i{display:none}
/* The line the player just said, above the reply. */
#passage .echo{font-family:var(--sans);font-size:13px;color:var(--muted);margin-bottom:16px}
#passage .echo span{font-size:10px;letter-spacing:.2em;color:var(--gold);margin-right:10px}
.patron.aizawa{left:76%}.patron.aizawa:before{background:#8f897a80}.patron.aizawa:after{background:#2a2e2fcc}
/* --- Generated art (assets/), used when present --- */
.room.painted{height:auto;aspect-ratio:16/9;background-size:cover;background-position:center}
.room.painted .window,.room.painted .shelves,.room.painted .lamp,.room.painted .back-label,.room.painted .counter,.room.painted .stools,.room.painted .motes{display:none}
.room-loop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;pointer-events:none}
.room .patrons{z-index:1}
.patron.has-art:before,.patron.has-art:after{display:none}
.patron-art{position:absolute;bottom:0;left:50%;translate:-50% 0;height:clamp(120px,58cqh,260px);width:auto;pointer-events:none}
.room{container-type:size}
.cutaway{position:absolute;inset:0;z-index:4;background:#0b1112;animation:enter .8s ease-out both}
.cutaway img,.cutaway video{width:100%;height:100%;object-fit:cover;display:block}
#night-card{background-size:cover;background-position:center}
/* Actual backgrounds have a foreground counter rising from 90% to 58% across the frame.
   Preserve 16:9 and occlude portraits at that edge rather than leaving a floating waist. */
.room.painted .patrons{clip-path:polygon(0 0,100% 0,100% 58%,0 90%)}
.patron.has-art{--seat:17%;left:var(--seat);bottom:calc(4% + var(--seat)*.32);width:50cqh;height:75cqh;transform:translateX(-50%)}
.patron.has-art.saki{--seat:68%}.patron.has-art.brother{--seat:42%}
.patron.has-art.driver{--seat:68%}.patron.has-art.aizawa{--seat:84%}
.patron.has-art .patron-art{height:100%;max-width:none}
.patron.has-art.speaking{filter:brightness(1.08)}
.patron.has-art span{top:0;bottom:auto;left:0;width:100%;text-shadow:0 1px 4px #000,0 0 8px #000}
.patron.has-art .patron-glass{bottom:8%;left:65%;z-index:3}
/* From the customer's seat, Mizuno is alongside us; keep the master's face outside the frame. */
.room.painted.customer-view{background-size:auto 230%;background-position:60% bottom}
.room.customer-view .patrons{display:none}
/* Always within reach while reading; modal panels carry the same mute control. */
.sound-controls{position:fixed;right:16px;bottom:max(14px,env(safe-area-inset-bottom));z-index:40;display:flex;gap:4px;padding:4px;background:var(--panel);border:1px solid var(--line);border-radius:6px;box-shadow:0 3px 18px #0003}
.sound-controls button{min-height:44px;border:0;background:none;padding:8px 12px;font-size:12px;color:var(--ink)}
.sound-controls button:first-child{border-right:1px solid var(--line);color:var(--gold)}
.panel-header .panel-sound{font-size:11px;min-height:44px;margin-left:auto;padding:8px 12px;color:var(--gold);white-space:nowrap}
.panel-header h2{min-width:0}.panel-header{gap:8px}
.sound-slider{display:grid;grid-template-columns:1fr auto;gap:12px;margin:26px 0;font-size:13px}
.sound-slider output{color:var(--muted);font-variant-numeric:tabular-nums}.sound-slider input{grid-column:1/-1;width:100%;height:32px;accent-color:var(--gold)}
.page-foot{margin-bottom:74px}#toast{bottom:82px}
.lab-credit{font-size:11px;color:var(--muted);text-align:center;margin:18px 0}.lab-credit a{color:inherit;text-decoration:none}.lab-credit a:hover{text-decoration:underline}

/* Quiet, touch-accessible routes back to the lab throughout play. */
.site-navigation{display:flex;flex-wrap:wrap;align-items:center;gap:7px;min-height:48px;padding-top:6px;font-size:11px;color:var(--muted)}
.site-navigation a{display:inline-flex;align-items:center;min-height:44px;padding:6px 3px;color:inherit;text-decoration:none}
.site-navigation a:hover{color:var(--gold);text-decoration:underline}.site-navigation [aria-current]{color:var(--ink)}
.site-navigation rt{font-size:8px;letter-spacing:0}.lab-credit a{display:inline-block;min-height:44px;padding:12px 8px}
@media(max-width:680px){.site-navigation{gap:5px;font-size:10px}}

/* Mobile reading takes priority over fitting more lines on one screen. */
@media(max-width:680px){
  #passage{font-size:18px;line-height:2}
  .speaker-row h2{font-size:16px}
  .choice{min-height:60px;padding:16px 14px}
  .choice .choice-label{font-size:16px;line-height:1.85}
  .choice small,.panel-description,.news-note,.file-message{font-size:14px}
  #passage .note .note-to{font-size:16px}
  #passage .note .note-sign,#passage .echo{font-size:15px}
  .memory,.news-item,.history-item{font-size:16px;line-height:1.9}
  .primary-button,.text-button{font-size:16px}
  #back-button,#history-button,.sound-controls button,.sound-slider{font-size:14px}
}
