:root{--ink:#eceddf;--muted:#b4c3b6;--gold:#d8c39a;--line:#d8e8d12b;--serif:'Songti SC','Noto Serif SC','STSong',serif;--sans:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif}*{box-sizing:border-box}body{margin:0;background:#142725;color:var(--ink);font-family:var(--sans);font-size:14px}button,input{font:inherit}button{color:inherit;cursor:pointer;border:0;background:none}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible{outline:2px solid var(--gold);outline-offset:5px}button{transition:background .25s,color .25s,transform .25s}button:hover:not(:disabled){color:#fff}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}.scenery{position:fixed;inset:0;overflow:hidden;z-index:-1;background:radial-gradient(ellipse at 85% 25%,#8c8163,#25413c 50%,#0b252b)}.art{position:absolute;inset:0;background-image:url('assets/classroom-cold.png');background-size:cover;background-position:center top;transform:scale(1.025);transition:filter 2s,transform 10s}.shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(6,25,25,.9),rgba(9,30,29,.7) 29%,rgba(10,27,27,.12) 63%),linear-gradient(0deg,#091d25a8,transparent 45%,#071d264a)}.grain{position:absolute;inset:0;opacity:.12;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.5' filter='url(%23n)'/%3E%3C/svg%3E");pointer-events:none}.rain{position:absolute;inset:-100%;opacity:.17;transform:rotate(14deg);background:repeating-linear-gradient(90deg,transparent 0,transparent 73px,#d9ecde77 74px,transparent 75px),repeating-linear-gradient(90deg,transparent 0,transparent 173px,#cfe4e455 174px,transparent 175px);mask-image:repeating-linear-gradient(0deg,transparent 0,#000 2px,#000 30px,transparent 80px);animation:rainfall 1.2s linear infinite;pointer-events:none}@keyframes rainfall{from{translate:0 -80px}to{translate:0 80px}}.topbar{height:92px;display:flex;align-items:center;justify-content:space-between;padding:0 5%;position:relative;z-index:3}.brand{padding:0;letter-spacing:3px;font-family:var(--serif);display:flex;align-items:center;gap:13px;font-size:17px}.brand-icon{font-size:26px;color:var(--gold)}.brand small{font-family:var(--sans);font-size:9px;letter-spacing:2px;border-left:1px solid #ffffff40;padding-left:18px;color:#c8d4cb}.top-actions{display:flex;gap:28px}.top-actions button{font-size:18px;padding:10px 0}.top-actions span{font-size:11px;letter-spacing:2px;padding-left:6px;color:#d6dfd5}.screen{min-height:calc(100svh - 92px)}.title-screen{padding:5vh 9% 84px;position:relative}.eyebrow{display:flex;align-items:center;gap:12px;color:var(--gold);font-size:10px;letter-spacing:4px;font-weight:400}.eyebrow>span{height:1px;width:30px;background:var(--gold)}h1{font-family:var(--serif);font-weight:400;font-size:clamp(60px,7.4vw,112px);line-height:1.23;margin:32px 0 26px;letter-spacing:12px;text-shadow:0 4px 24px #001c2377}h1>span{display:block;padding-left:1.04em}h1 i{display:block;font:italic 18px Georgia,serif;letter-spacing:3px;margin:20px 0 0 4px;color:#d7d9c8}.intro{font-family:var(--serif);font-size:15px;color:#c2cec4;line-height:2.2;letter-spacing:3px;margin:0 0 29px}.title-menu{width:286px}.primary{border:1px solid #e0d7b377;background:#eee4c9;color:#233b34;padding:17px 23px;text-align:left;display:flex;justify-content:space-between;align-items:center;width:100%;font-size:14px;letter-spacing:3px;box-shadow:0 5px 24px #0002}.primary:hover:not(:disabled){background:#fff3d7;color:#173a2d}.primary span{font-size:22px;font-weight:200;line-height:12px}.menu-link{display:flex;align-items:center;justify-content:space-between;width:100%;padding:15px 5px;color:#c7d2c7;letter-spacing:2px;font-size:12px}.menu-link span{font-size:12px;color:var(--gold);letter-spacing:1px}.title-meta{font-size:10px;color:#9eafa7;display:flex;gap:12px;margin-top:28px;letter-spacing:1px}.title-meta b{font-weight:400}.character-note{position:absolute;right:8%;bottom:21%;text-align:left;display:flex;flex-direction:column;gap:10px;text-shadow:0 2px 8px #000;max-width:270px}.note-line{width:44px;height:1px;background:#e5dcc4;margin-bottom:2px}.character-note small{font-size:10px;letter-spacing:3px;color:#d8dbcd}.character-note strong{font-family:var(--serif);font-size:30px;font-weight:400;letter-spacing:8px}.character-note>span:last-child{font-size:10px;letter-spacing:1px;color:#d6dbcf}.title-footer{position:absolute;bottom:30px;left:5.5%;right:5.5%;display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.6px;color:#aebdb4}.tiny-wave{margin-left:9px;color:var(--gold)}.game-screen{position:relative;padding:22px 5% 24px;display:flex;flex-direction:column;justify-content:space-between}.chapter-strip{display:flex;align-items:center;gap:16px;letter-spacing:3px}.chapter-strip>span:first-child{font-size:9px;color:var(--gold)}.chapter-strip>span:last-child{font-size:12px}.strip-line{width:36px;height:1px;background:#c9d8cb55}.affinity-pill{position:absolute;top:14px;right:5%;display:flex;gap:12px;align-items:center;background:#132b2a99;border:1px solid #ffffff22;border-radius:40px;padding:12px 20px;color:#d9deca;font-size:10px;letter-spacing:2px}.affinity-pill>span:first-child{font-size:17px;color:#e3c6b0}.affinity-track{width:50px;height:2px;background:#ffffff2a}.affinity-track i{display:block;height:2px;background:var(--gold);width:0;transition:width 1s}.scene-label{font-size:10px;letter-spacing:4px;position:absolute;top:85px;left:5%;color:#bccbbd}.dialogue-area{margin-top:23vh}.dialogue-panel{padding:28px 38px 18px;background:linear-gradient(110deg,#0b2426f5,#182e2ceb);border:1px solid #c5d2bd50;box-shadow:0 12px 70px #06171566;backdrop-filter:blur(18px);position:relative;max-width:1150px;margin:auto;min-height:218px}.dialogue-panel:before{content:'';position:absolute;left:-1px;top:28px;width:3px;height:28px;background:var(--gold)}.speaker-row{display:flex;gap:14px;align-items:center}.speaker-dash{width:22px;height:1px;background:var(--gold)}.speaker-row strong{font-family:var(--serif);font-size:19px;font-weight:400;letter-spacing:4px;color:#e9d5b1}.speaker-row small{margin-left:auto;font-size:8px;letter-spacing:3px;color:#7e9b92}.dialogue-content{display:block;width:100%;text-align:left;position:relative;min-height:100px;padding:20px 26px 20px 0;font-family:var(--serif);font-size:18px;line-height:1.9;letter-spacing:1.1px}.dialogue-content:disabled{opacity:1;cursor:default}#nextIndicator{position:absolute;right:0;bottom:24px;color:var(--gold);font-size:17px;animation:blink 2s infinite}@keyframes blink{50%{opacity:.25}}.dialogue-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #dce4ca1a;padding-top:14px;gap:10px}.dialogue-bottom>span{font-size:9px;color:#809b91;letter-spacing:1px}.dialogue-bottom nav{display:flex;gap:25px}.dialogue-bottom button{padding:5px 0;font-size:10px;letter-spacing:2px;color:#becbbd}.dialogue-bottom button[aria-pressed=true]{color:var(--gold);text-decoration:underline;text-underline-offset:5px}.choices{display:flex;flex-direction:column;gap:11px;width:min(520px,90%);margin:0 auto 24px}.choice{background:#112e2ef0;border:1px solid #c0d3bf70;backdrop-filter:blur(15px);padding:17px 23px;display:flex;gap:20px;text-align:left;line-height:1.6;font-family:var(--serif);font-size:16px;animation:arrive .4s both;box-shadow:0 5px 20px #0003}.choice:hover{background:#345347;border-color:var(--gold)}.choice>span:first-child{color:var(--gold);font:10px var(--sans);padding-top:5px;letter-spacing:1px}.choice>span:last-child{margin-left:auto;color:var(--gold)}@keyframes arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}body[data-scene=night] .art{filter:brightness(.75) saturate(.75)}body[data-scene=dawn] .art{filter:sepia(.2) brightness(1.12);transform:scale(1.06)}body[data-scene=dawn] .rain{opacity:0}body[data-scene=shop] .art{filter:sepia(.12)}.ending-screen{display:grid;place-items:center;padding:20px 20px 50px}.ending-card{padding:36px 55px;width:min(620px,100%);text-align:center;background:#112b2bef;backdrop-filter:blur(25px);border:1px solid #c5c9ab40;box-shadow:0 15px 80px #0003;animation:arrive 1.1s}.ending-card .eyebrow{justify-content:center}.ending-symbol{display:block;font-size:50px;color:var(--gold);margin:15px 0}.ending-card h2{font:36px var(--serif);letter-spacing:6px;margin:0 0 18px}.ending-subtitle{font:italic 13px var(--serif);letter-spacing:2px;color:var(--gold)}.divider{width:40px;height:1px;background:#c8ceb777;margin:26px auto}#endingText{font:15px/2 var(--serif);letter-spacing:1px;white-space:pre-line;text-align:left}.ending-stats{font-size:10px;letter-spacing:2px;color:#a3b5a6;margin:24px 0}.ending-card .primary,.ending-card .menu-link{max-width:280px;margin:auto}dialog{color:var(--ink);background:#15312f;border:1px solid #a5b39c66;padding:30px;width:min(620px,calc(100% - 28px));max-height:85svh;box-shadow:0 30px 100px #0007}dialog::backdrop{background:#061d24bb;backdrop-filter:blur(9px)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:22px;border-bottom:1px solid var(--line);margin-bottom:23px}.modal-head .eyebrow{font-size:8px;letter-spacing:3px}.modal-head h2{font:25px var(--serif);font-weight:400;letter-spacing:3px;margin:12px 0 0}.close{font-size:26px;color:var(--muted);padding:0 4px}.setting{display:flex;justify-content:space-between;align-items:center;margin:25px 0;font-size:13px;gap:15px}.setting select{background:#23443c;color:var(--ink);border:1px solid var(--line);padding:8px;font:inherit}.fineprint{font-size:11px;line-height:1.9;color:#a9bbae}.modal-action{padding:14px;border:1px solid var(--line);width:100%;margin-top:10px;letter-spacing:2px;text-align:left}.modal-action:hover{background:#29483c}.save-slot{display:flex;flex-direction:column;gap:9px}.save-slot small{font-size:10px;color:var(--muted);letter-spacing:1px}.log-entry{border-bottom:1px solid var(--line);padding:14px 0}.log-entry strong{font:13px var(--serif);color:var(--gold);letter-spacing:2px}.log-entry p{font:14px/1.9 var(--serif);color:#d1dcd0;margin-bottom:0}.ending-item{display:flex;gap:20px;padding:20px 0;border-bottom:1px solid var(--line)}.ending-item>span{font:28px Georgia;color:#a8b89f}.ending-item h3{font:19px var(--serif);letter-spacing:3px;margin:0 0 8px}.ending-item p{font-size:11px;line-height:1.7;color:var(--muted);margin:0}.character-profile{display:grid;grid-template-columns:140px 1fr;gap:25px}.character-profile img{width:140px;height:240px;object-fit:cover;object-position:50% 17%;filter:saturate(.7);border:1px solid #ffffff22}.character-profile h3{font:28px var(--serif);letter-spacing:4px;margin:8px 0 16px}.character-profile p{font-size:12px;line-height:1.9;color:#bccdbd}.profile-quote{color:var(--gold)!important;font-family:var(--serif);margin-top:20px}#toast{position:fixed;left:50%;top:100px;transform:translate(-50%,-10px);background:#e7dec8;color:#203e32;padding:13px 24px;font-size:12px;letter-spacing:1px;box-shadow:0 6px 40px #0005;opacity:0;transition:opacity .3s,transform .3s;pointer-events:none;z-index:10;max-width:90vw}#toast.visible{opacity:1;transform:translate(-50%,0)}.credit{font:11px/1.9 var(--sans);color:var(--muted)}@media(min-width:1500px){.title-screen{padding-top:8vh}.title-menu{margin-top:35px}.character-note{bottom:25%}}@media(max-height:800px) and (min-width:761px){.topbar{height:74px}.screen{min-height:calc(100svh - 74px)}.title-screen{padding-top:2vh}h1{font-size:76px;margin:23px 0 20px}h1 i{margin-top:12px}.intro{margin-bottom:21px}.title-meta{margin-top:15px}.character-note{bottom:25%}}@media(max-width:760px){.topbar{height:72px;padding:0 6%}.brand{font-size:15px;gap:8px}.brand small{display:none}.top-actions{gap:18px}.top-actions span{display:none}.screen{min-height:calc(100svh - 72px)}.art{background-position:80% top}.shade{background:linear-gradient(90deg,#092623d9,#0b242452 90%),linear-gradient(0deg,#0b2528f5,transparent 80%)}.title-screen{padding:5vh 8% 90px}.eyebrow{font-size:9px;letter-spacing:2px}h1{font-size:72px;letter-spacing:9px;margin:30px 0 25px}h1 i{font-size:14px;letter-spacing:2px}.intro{font-size:13px}.title-menu{width:270px}.character-note{right:7%;bottom:125px;max-width:100px}.character-note strong{font-size:21px;letter-spacing:3px}.character-note>span:last-child{display:none}.title-meta{font-size:9px;gap:8px;flex-wrap:wrap;max-width:270px}.title-footer{left:8%;right:8%;bottom:25px;font-size:8px;letter-spacing:.5px}.title-footer>span:last-child{display:none}.game-screen{padding:20px 4%}.chapter-strip{gap:10px;letter-spacing:1px}.chapter-strip>span:last-child{font-size:11px}.strip-line{width:15px}.affinity-pill{top:55px;padding:8px 13px;font-size:9px;right:5%}.affinity-track{width:30px}.scene-label{top:67px;font-size:8px;letter-spacing:2px}.dialogue-area{margin-top:22vh}.dialogue-panel{padding:20px 22px 13px;min-height:230px}.dialogue-content{font-size:16px;min-height:120px;line-height:1.85;letter-spacing:.6px}.dialogue-bottom{flex-direction:column;align-items:stretch;gap:11px}.dialogue-bottom nav{justify-content:space-between;gap:15px}.dialogue-bottom>span{font-size:8px}.speaker-row small{font-size:7px;letter-spacing:1px}.choices{width:96%;gap:8px;margin-bottom:15px}.choice{padding:13px 17px;font-size:14px;gap:12px}.ending-card{padding:30px 25px}.ending-card h2{font-size:29px}.ending-card #endingText{font-size:14px}dialog{padding:24px}.character-profile{grid-template-columns:100px 1fr;gap:18px}.character-profile img{width:100px;height:190px}.character-profile h3{font-size:24px}.character-profile p{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.rain{display:none}}
/* Keep the character's face clear at narrow desktop and mobile sizes. */
.affinity-pill{top:120px;left:5%;right:auto}
@media(max-width:760px){.art{background-position:80% top}.affinity-pill{top:100px;left:5%;right:auto}}
/* Campus edition — sunlight, paper, and young green leaves. */
:root{--ink:#294838;--muted:#65796d;--gold:#67815a;--line:#5c7a6133}
body{background:#edf3e6;color:var(--ink)}
.scenery{background:#e9efde}
.shade{background:linear-gradient(90deg,#f4f7e8f2,#f1f5e5d9 25%,#eff5df77 45%,transparent 68%),linear-gradient(0deg,#e8efdfb3,transparent 46%)}
.rain{inset:0;transform:none;opacity:.4;mask-image:none;background:radial-gradient(circle at 12% 35%,#fff 1px,transparent 3px),radial-gradient(circle at 42% 60%,#fff 1px,transparent 4px),radial-gradient(circle at 68% 22%,#fff 1px,transparent 4px),radial-gradient(circle at 21% 80%,#fff 2px,transparent 4px);animation:sunlight 12s ease-in-out infinite}
@keyframes sunlight{0%,100%{translate:0 0;opacity:.2}50%{translate:12px -14px;opacity:.7}}
.grain{opacity:.06}.brand small{color:#5c7766;border-color:#44644944}.top-actions span{color:#385641}
button:hover:not(:disabled){color:#6a8d4c}.eyebrow{color:#668057}h1{text-shadow:0 2px 25px #fff7;color:#2e4e37}h1 i{color:#64815a}
.intro{color:#567258}.primary{background:#456a4c;color:#faf9e9;border-color:#456a4c;box-shadow:0 6px 25px #27472520}.primary:hover:not(:disabled){background:#38593c;color:#fff}
.menu-link{color:#54705a}.title-meta{color:#6a7d65}.character-note{text-shadow:0 1px 9px #fff9;background:#f6f4dfb3;backdrop-filter:blur(8px);padding:18px 23px;border-left:2px solid #718c5d;border-radius:0 16px 16px 0}.character-note small,.character-note>span:last-child{color:#54704c}.note-line{background:#73895f}.title-footer{color:#58705c}.affinity-pill{background:#f6f6e7df;color:#506b4c;border-color:#88a16e55;box-shadow:0 3px 15px #35573212}.affinity-pill>span:first-child{color:#b67b70}.affinity-track{background:#8caa7e44}.chapter-strip>span:first-child{color:#5d7d51}.chapter-strip{color:#345f3c}.strip-line{background:#5d7d5166}.scene-label{color:#627b60}
.dialogue-panel{background:linear-gradient(110deg,#faf9ecf5,#eef3e5f0);border-color:#71936577;box-shadow:0 12px 55px #34553624;border-radius:4px 22px 4px 4px}.speaker-row strong{color:#466b46}.speaker-row small{color:#86977a}.dialogue-bottom{border-color:#507a4d22}.dialogue-bottom>span{color:#778b6c}.dialogue-bottom button{color:#5f7c55}.dialogue-content:hover:not(:disabled){color:#294838}.choice{background:#fcfbeaee;color:#3e6145;border-color:#88a07488;box-shadow:0 5px 20px #2345221a;border-radius:3px 14px 3px 3px}.choice:hover{background:#dcebcf;border-color:#6b8d57;color:#27452d}
.ending-card{background:#f7f6e7ed;border-color:#8fa17a66;box-shadow:0 15px 80px #354b3a26}.ending-subtitle{color:#788158}.ending-stats{color:#6d8562}.divider{background:#6a865655}
dialog{color:var(--ink);background:#f7f7e9;border-color:#94a48377;box-shadow:0 30px 100px #2f482f33}dialog::backdrop{background:#38513866}.setting select{background:#e8efdc;color:#38523e}.fineprint,.credit{color:#6e8063}.modal-action:hover{background:#e4edd8}.log-entry p{color:#52694c}.ending-item>span{color:#9aa887}.character-profile p{color:#63765c}.character-profile img{filter:saturate(.85)}#toast{background:#436b49;color:#f9f9e9}
body[data-scene=classroom] .art{filter:none}body[data-scene=campus] .art{filter:saturate(1.08) brightness(1.04);transform:scale(1.06)}body[data-scene=sunset] .art{filter:sepia(.18) saturate(1.1);transform:scale(1.04)}body[data-scene=festival] .art{filter:brightness(.65) sepia(.12) saturate(.9)}body[data-scene=festival] .chapter-strip,body[data-scene=festival] .scene-label{color:#435b42}
@media(max-width:760px){.shade{background:linear-gradient(90deg,#eff5e1d9,#eff3de66 65%,#f4f5df33),linear-gradient(0deg,#eef3dded,transparent 85%)}.character-note{padding:12px 15px;right:6%;bottom:109px;max-width:125px}.character-note strong{font-size:22px}.title-meta{max-width:235px}.dialogue-panel{border-radius:3px 16px 3px 3px}}
body[data-scene=sunset] .art,body[data-scene=festival] .art{filter:none}
@media(max-width:760px){.character-note{bottom:70px}}

/* Scene-directed character poses: two art layers crossfade once the next image loads. */
.art{opacity:0;transition:opacity .55s ease,filter 1s,transform 8s}.art.visible{opacity:1}.art-back{z-index:0}.shade,.rain,.grain{z-index:1}
.pose-label{font:10px var(--sans);letter-spacing:1px;color:#7d8c70;border-left:1px solid #80926b44;padding-left:14px}
body[data-pose=tease] .art.visible{transform:scale(1.055) translateX(-.4%)}
body[data-pose=shy] .art.visible{transform:scale(1.025) translateY(.3%)}
body[data-pose=soft] .art.visible{transform:scale(1.045)}
@media(max-width:760px){.pose-label{font-size:9px;letter-spacing:0;padding-left:8px}.speaker-row{gap:8px}.speaker-row small{display:none}.character-note>span:last-child{display:none}.character-note{max-width:130px}}
@media(prefers-reduced-motion:reduce){.art{transition:none!important;transform:none!important}}
