/* v1.2 — calm surfaces, readable typography, clear interaction hierarchy. */
:root{--ui-font:system-ui,-apple-system,"Segoe UI","PingFang TC","Microsoft JhengHei",sans-serif;--title-font:"Noto Serif TC","Songti TC","PMingLiU",serif;--reading-size:20px;--ink:#19171c;--panel:#242127;--gold:#ebca92;--muted:#d0c8c0;--edge:#736456;font-family:var(--ui-font);color:#f5f0e8;background:#19171c}
body{font-family:var(--ui-font);line-height:1.6;-webkit-text-size-adjust:100%;text-size-adjust:100%}
button{font-family:var(--ui-font);touch-action:manipulation}h1,h2,.brand-name,.speaker,.decision-title{font-family:var(--title-font)}
.topbar{height:84px;background:#19171c;border-bottom:1px solid #635548;box-shadow:0 4px 20px #0003;padding-inline:clamp(18px,4vw,64px)}
.brand-link{gap:13px;min-width:0}.brand-mark{width:50px;height:50px;flex:0 0 50px;transform:none;border:0;border-radius:0;background:none;display:block}.brand-mark img{width:100%;height:100%;object-fit:contain;display:block}.brand-name{font-size:26px;letter-spacing:.14em;line-height:1.2;color:#f0d3a1}.brand-name small{font-size:9px;letter-spacing:.11em;color:#d4bf9f;line-height:1.5;margin-top:4px}
.nav-links button{font-size:15px;letter-spacing:.04em;color:#e4dcd2;padding:27px 12px 25px}.nav-links button.active{color:#f6dba8;border-bottom-width:3px}.nav-links button:hover{background:#ffffff08}
.btn{font-size:16px;font-weight:600;line-height:1.4;letter-spacing:.025em;min-height:48px;padding:13px 22px;color:#f7efe4;background:#363039;border:1px solid #8e7965;border-radius:7px;box-shadow:inset 0 1px #ffffff0a;transition:background .15s,border-color .15s}
.btn:hover:not(:disabled){transform:none;background:#4a3e48;border-color:#dab987}
.btn.primary{background:#edcd98;color:#2b211a;border:1px solid #f8ddb1;box-shadow:0 4px 12px #0003;font-weight:700}.btn.primary:hover:not(:disabled){background:#f7dfb6;color:#211a16;border-color:#fff0d5}
.btn.small,.small-nav .btn{font-size:15px;min-height:46px;padding:10px 18px}.btn.text-only{color:#f0d6ad;background:none}
.play-stage{min-height:calc(100svh - 134px);padding:22px clamp(16px,4vw,64px) 28px;gap:0}
.play-top{gap:16px}.play-chapter{font:500 14px/1.6 var(--ui-font);letter-spacing:.04em;color:#fff1d8;text-shadow:0 1px 5px #000}
.play-location{font:500 13px/1.5 var(--ui-font);letter-spacing:.025em;color:#f7eee1;background:#211c23ed;border:1px solid #9a8167;border-radius:5px;padding:8px 13px}
.play-mid{min-height:280px}.portrait-large{height:clamp(330px,49vh,560px);margin-bottom:-28px}.portrait-large .portrait-label{font:500 14px/1.8 var(--ui-font);background:#211b23f2;color:#f6e6ce;letter-spacing:.12em;border-color:#a98c65;border-radius:4px;bottom:35px}
.scene-ornament{display:none}
.story-panel{width:min(1120px,100%);min-width:0;min-height:230px;padding:26px 34px 22px;background:#242127;border:1px solid #a48a66;border-radius:10px;box-shadow:0 12px 40px #0007;backdrop-filter:none}
.story-panel::before{display:none}
.story-heading{margin-bottom:17px;padding-bottom:13px;border-bottom:1px solid #65564a;gap:16px}.speaker{font-size:23px;line-height:1.5;letter-spacing:.06em;color:#f4d7a7;font-weight:600}.speaker.narrator{font:600 16px/1.5 var(--ui-font);color:#ded4c8;letter-spacing:.03em}
.scene-progress{font:500 14px/1.5 var(--ui-font);color:#c8bfb7;font-variant-numeric:tabular-nums}
.dialogue-text{font-family:var(--ui-font);font-size:var(--reading-size);font-weight:400;line-height:1.9;letter-spacing:.025em;color:#f5f0e8;min-height:76px;max-width:48em;overflow-wrap:anywhere;text-shadow:none}
.continue-line{margin-top:22px;gap:18px;align-items:center}.small-nav{gap:10px}.reading-tools{display:flex;align-items:center;gap:8px;font-size:13px;color:#d4c9bc}.reading-tools button{width:42px;min-height:42px;padding:5px;background:#353038;border:1px solid #8a7662;border-radius:5px;color:#f4e7d5;font-size:16px;font-weight:600}.reading-tools button:hover{background:#4a3e48}.reading-tools button:disabled{opacity:.45;cursor:default}.reading-tools output{min-width:35px;text-align:center;font-variant-numeric:tabular-nums}
.decision-title{font-size:27px;line-height:1.5;letter-spacing:.06em;color:#f5dab0;font-weight:600}.decision-prompt{font-size:18px;line-height:1.8;letter-spacing:.015em;color:#ece4da;margin:12px 0 23px}
.decision-list{gap:14px}.choice-btn{background:#332d35;border:1px solid #917a63;border-radius:8px;padding:20px;min-height:146px;gap:9px;transition:background .15s,border-color .15s;box-shadow:inset 0 1px #ffffff08}
.choice-btn:hover{transform:none;background:#493b42;border-color:#edcd98}.choice-btn:active{background:#55434a}.choice-no{font:600 13px/1.5 var(--ui-font);color:#f0ce98;letter-spacing:.04em}.choice-label{font-size:18px;font-weight:600;line-height:1.65;letter-spacing:.015em;color:#fff4e6}.choice-detail{font-size:15px;line-height:1.75;letter-spacing:0;color:#d8cec3}
.content-page{max-width:1240px}.panel-subtitle,.home-intro{font-size:16px;color:#d9d1c8;letter-spacing:.015em;line-height:1.9}.home-intro{max-width:470px}.home h1{font-size:clamp(54px,7.2vw,100px);letter-spacing:.12em}.home-content{width:min(650px,100%)}.home-quote{color:#f7e6cb}.home-foot{font-size:13px;color:#e0d1bd}.eyebrow{font-size:12px;letter-spacing:.16em}
.character-card{border-color:#75604e;border-radius:10px;background:#242127}.character-card-content{padding:24px;gap:13px}.character-card p{font-size:16px;line-height:1.9;color:#e7ded3}.character-role{font-size:14px;color:#e1c49c}.character-info{font-size:14px;color:#c1d7cd;border-color:#675448}.character-card h3{font-weight:600}.tag{font-size:13px;color:#f0d3a7;border-color:#8a735b}
.sheet,.chapter-item{background:#242127;border-color:#75604e;border-radius:8px}.chapter-item p{font-size:14px;color:#d6cbc0;line-height:1.7}.chapter-item h3{font-size:20px}.records li{font-size:17px;line-height:1.9;color:#eee5dc;padding:16px 0}.records li b{color:#f3d4a5;font-weight:600}.records li small{font:13px/1.7 var(--ui-font);color:#c9bcae}.thread span{font-size:14px;color:#f0dfc6;background:#393039;border-color:#75604e;border-radius:5px}.empty-note{font-size:15px;color:#d9cbbc}.chapter-finish{background:#242127;border-color:#a48a66;border-radius:10px}.chapter-finish p{font-size:17px;color:#eee0d2;line-height:1.9}
.dialog{border-radius:10px;background:#242127}.dialog p{font-size:17px;color:#f0e2d4}.site-footer{font-size:12px;color:#c3b5a5;background:#19171c;border-color:#55483f}.toast{font-size:15px;background:#342a32;color:#ffebcb;border-radius:7px}
.scene-prop{border-radius:7px;overflow:hidden;border-color:#c2a077}.scene-prop figcaption,.prop-collection figcaption{font:500 13px/1.6 var(--ui-font);color:#f1ddbc;letter-spacing:.04em;background:#242127}
@media(max-width:950px){.brand-name{font-size:23px}.nav-links button{font-size:14px;padding-inline:8px}.decision-list{grid-template-columns:1fr}.choice-btn{min-height:0;padding:17px 20px}.portrait-large{height:420px}.brand-name small{font-size:8px}}
@media(max-width:650px){
 :root{--reading-size:20px}
 .topbar{height:76px;padding-inline:14px;gap:10px}.brand-link{gap:9px}.brand-mark{width:43px;height:43px;flex-basis:43px}.brand-name{font-size:22px;letter-spacing:.1em}.brand-name small{font-size:7px;letter-spacing:.06em}.nav-mobile{min-width:44px;height:44px;border-color:#9f8767;border-radius:6px}.nav-links{top:76px;background:#242127;padding:10px 16px}.nav-links button{font-size:16px;padding:14px 8px}
 .home{min-height:calc(100svh - 124px)}.home h1{font-size:clamp(44px,11.7vw,70px);letter-spacing:.08em;margin-right:0}.home-content{margin:30px 20px}.home-intro{font-size:16px}.home-foot{font-size:12px;line-height:1.8}.en-title{font-size:11px;letter-spacing:.1em}
 .play-stage{padding:14px 12px 18px;min-height:calc(100svh - 124px)}.play-top{align-items:flex-start;gap:8px}.play-chapter{font-size:12px;max-width:43%;padding-top:6px}.play-location{font-size:12px;padding:7px 9px;max-width:56%;text-align:right}.play-mid{min-height:265px}.portrait-large{height:330px;width:min(280px,75vw);margin-right:-8px;margin-bottom:-28px}.portrait-large .portrait-label{font-size:13px;bottom:35px;right:7px}.scene-prop{width:88px;bottom:15px}.scene-prop figcaption{font-size:12px}
 .story-panel{padding:20px 20px 18px;min-height:250px;border-radius:9px}.story-heading{padding-bottom:11px;margin-bottom:14px}.speaker{font-size:22px}.speaker.narrator{font-size:15px}.dialogue-text{font-size:var(--reading-size);line-height:1.9;letter-spacing:.015em;min-height:100px}.scene-progress{font-size:13px}.continue-line{flex-wrap:wrap;gap:14px;margin-top:20px}.reading-tools{gap:6px}.reading-tools button{width:40px;min-height:42px}.small-nav{margin-left:auto;gap:8px}.small-nav .btn{font-size:15px;padding:11px 16px;min-height:46px}.reading-tools-label{display:none}
 .decision-title{font-size:24px}.decision-prompt{font-size:17px;line-height:1.8;margin:11px 0 18px}.decision-list{gap:11px;max-height:none;overflow:visible}.choice-btn{padding:16px;gap:7px}.choice-label{font-size:18px}.choice-detail{font-size:15px;line-height:1.75}.choice-no{font-size:12px}
 .site-footer{font-size:11px;line-height:1.7;flex-wrap:wrap;padding:12px 16px}.character-art{height:360px}.content-page{padding-inline:18px}.chapter-item{padding:18px;align-items:flex-start}.chapter-item .tag{font-size:12px}.sheet{padding:22px}.records li{font-size:16px}.dialog{padding:24px}
}
@media(max-width:360px){.brand-name{font-size:20px}.brand-name small{font-size:6px}.story-panel{padding:18px 16px}.small-nav{width:100%}.small-nav .btn{flex:1}.home .actions{flex-direction:column;align-items:stretch}}
@media(max-height:700px) and (min-width:651px){.play-mid{min-height:230px}.portrait-large{height:300px}.story-panel{min-height:210px;padding:20px 28px}.dialogue-text{min-height:70px}}
.ending-item{background:#29242c;border-color:#806b57;border-radius:8px}.ending-item strong{color:#e5d7c9;font-size:19px}.ending-item small,.ending-item span{color:#d1c0af;font-size:14px;line-height:1.65}.ending-item.unlocked{background:#3b3038;border-color:#d3af79}.ending-item.unlocked strong{color:#f6ddb8}

/* Local adaptive soundtrack controls. */
.topbar{gap:16px}.nav-links{margin-left:auto}.sound-shell{position:relative;flex-shrink:0}.sound-toggle{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid #a38a68;border-radius:6px;background:#302932;color:#f2dbb6;font:600 14px/1.4 var(--ui-font)}.sound-toggle>span:first-child{font-size:23px;line-height:1}.sound-toggle[data-playing="true"]{background:#493e38;border-color:#edcd98}.sound-toggle:hover{background:#4a3e48}.sound-panel{position:absolute;z-index:45;top:calc(100% + 18px);right:0;width:300px;max-width:calc(100vw - 28px);padding:22px;background:#242127;border:1px solid #b69a72;border-radius:10px;box-shadow:0 16px 44px #0009;color:#f3e7d7}.sound-panel[hidden]{display:none}.sound-panel h2{font-size:22px;letter-spacing:.06em;color:#f0d1a0;margin:0 0 10px}.sound-panel p{font-size:14px;line-height:1.8;color:#e1d4c2}.sound-panel .btn{width:100%;margin:18px 0}.sound-panel label{display:flex;justify-content:space-between;font-size:15px;color:#f1dfc6}.sound-panel output{font-variant-numeric:tabular-nums}.sound-panel input{width:100%;height:44px;margin:6px 0;accent-color:#edcd98;cursor:pointer}.sound-panel .sound-note{font-size:12px;color:#c4b6a5}
@media(max-width:1100px) and (min-width:651px){.topbar{gap:10px;padding-inline:20px}.nav-links{gap:0}.nav-links button{padding-inline:6px;font-size:13px}.sound-toggle{padding-inline:9px}.sound-label{display:none}}
@media(max-width:650px){.topbar{gap:8px}.brand-link{margin-right:auto}.sound-label{display:none}.sound-toggle{width:42px;height:44px;padding:5px}.sound-panel{position:fixed;top:86px;right:14px;width:300px}.nav-mobile{flex-shrink:0}.brand-name{font-size:21px}.brand-mark{width:38px;height:38px;flex-basis:38px}}
@media(max-width:360px){.topbar{padding-inline:10px;gap:6px}.brand-link{gap:6px}.brand-mark{width:30px;height:30px;flex-basis:30px}.brand-name{font-size:19px}.brand-name small{font-size:5.5px}.sound-toggle{width:39px}.nav-mobile{min-width:40px}}
