:root{color:#244c48;--line:#c4ded6;background:#d4e9e0;font-family:'Microsoft YaHei','PingFang SC',sans-serif}
body{background:linear-gradient(#e9f8f12b,#d2eee11a),url('assets/qijiu-onsen-background.webp') center/cover no-repeat fixed}
.site-header{background:#f5fff3e8;border-bottom:1px solid #ffffffb0;box-shadow:0 3px 22px #173d3d13;padding-left:clamp(16px,4vw,72px);padding-right:clamp(16px,4vw,72px);backdrop-filter:blur(18px);min-height:66px}
.brand{color:#1e625a;letter-spacing:2px}.brand-character{width:39px;height:42px}.brand img{width:39px;height:42px}.icon-button{background:#e0f1e8;border-color:#b5d7cb;color:#27645c}
.sidebar{max-width:790px;margin:24px auto;background:#f8fff0eb;border:1px solid #ffffff;border-radius:28px;box-shadow:0 18px 80px #153e3b25;backdrop-filter:blur(16px);padding:30px 36px;scrollbar-width:thin}
h1{font-size:clamp(23px,3vw,32px);letter-spacing:1px;color:#245c52;font-weight:800}.chapter-label{color:#548d78;font-size:11px;letter-spacing:3px}.qijiu-intro{font-size:12px;line-height:1.8;color:#698879;margin:8px auto 16px}
.cast-strip{display:flex;gap:12px;justify-content:center;margin:0 auto 20px}.cast-strip span{display:flex;flex-direction:column;align-items:center;gap:4px;width:68px;font-size:11px;color:#56736b}.cast-strip span:before{content:'';display:block;width:58px;height:48px;background-image:url('assets/qijiu-onsen-cast.webp');background-size:400% 300%;background-position:calc(var(--actor)*100%/3) 0;background-repeat:no-repeat}
.chapter-jumps{background:transparent;gap:9px;margin-bottom:22px}.chapter-jumps button{border-radius:30px;background:#e6f4e9;color:#43765f;border:1px solid #cbe1cc;min-height:37px;font-size:12px}.chapter-jumps button:hover{background:#cae8d8}
.journey-header{color:#7b9587;font-size:11px}.chapter-heading h2{font-size:18px}.chapter-heading h2 span{font-size:10px}.chapter-heading b{color:#8c9f89}
.level-card{background:linear-gradient(150deg,#ffffffed,#eaf7e4e0);border:1px solid #c9dfc7;border-radius:18px;box-shadow:0 4px 0 #b2caaa44;min-height:103px}.level-card:hover{background:#e0f3d7;transform:translateY(-2px)}.level-card.active{border:2px solid #4c9b7c;background:#def2d7}.level-number{font:700 26px Georgia,serif}.level-copy strong{color:#426552}.level-best{color:#bda060}.level-status{color:#639d82}
.primary-button{background:linear-gradient(135deg,#378d76,#246a60);border:1px solid #206b58;border-radius:16px;box-shadow:0 5px 0 #184c4828;color:white;font-weight:700;letter-spacing:1px}.primary-button:hover{filter:brightness(1.08)}#continue{margin-top:22px}
.game-frame{background:transparent;max-width:580px;margin:10px auto 12px;border:1px solid #ffffffbb;border-radius:24px;overflow:hidden;box-shadow:0 14px 80px #163e453b;backdrop-filter:blur(14px)}
.game-hud{background:#f8fff0ee;max-width:none;padding:13px 24px}.hud-label{color:#709480}.hud-label b{color:#337b69}.water-track{height:7px;background:#d9e9de}#water-fill{background:linear-gradient(90deg,#63bdc9,#459fba)}.stage-area{background:#e9f5e7b8}.stage-wrap{border-radius:12px;box-shadow:0 3px 28px #37625612}.game-toolbar{background:#f8fff0ee;padding:9px 12px;gap:12px}.tool-button,.assist summary{background:#dfeddf;color:#47725d;border-radius:13px}.assist-menu{background:#f6fff2;border-color:#b8d2ba}.toast{background:#245f56eb}
.result-backdrop{background:#b8ddd09e}.result-card{background:#fafff3;border:2px solid #b7d9c2;box-shadow:0 15px 50px #244a4340;border-radius:28px}.result-card h2{color:#2e7a66;font-weight:800}.result-card p{color:#6c8977}.result-reaction canvas{display:block;width:100%;height:100%;object-fit:contain;touch-action:auto}.text-button{color:#5e8871}.coming-screen{background:#f5fff0eb}.coming-portrait{background:url('assets/qijiu-onsen-cast.webp') 66.66% 50%/400% 300%;height:160px}.coming-portrait img{visibility:hidden}
.qijiu-finale{width:min(440px,90vw);padding:22px;border:1px solid #bfdcc8;border-radius:24px;text-align:center;color:#356859;background:#f6fff0}.qijiu-finale::backdrop{background:#153f406b;backdrop-filter:blur(6px)}.qijiu-finale img{width:100%;border-radius:15px}.qijiu-finale p{font-size:13px;line-height:1.8}.qijiu-finale button{width:100%}
@media(max-width:700px){body{background-position:48% center}.sidebar{margin:12px;max-width:none;padding:22px 18px;border-radius:23px;background:#f8fff1f2}.site-header{min-height:58px}.game-frame{margin:0;border:0;border-radius:0;max-width:none}.game-hud{padding:9px 18px}.chapter-heading h2{font-size:16px}.game-toolbar{padding:6px 10px}.brand{font-size:17px}.cast-strip{margin-bottom:14px}.level-card{min-height:96px}.qijiu-intro{max-width:300px}}
@media(max-height:650px){.game-frame{margin-top:0;margin-bottom:0}.site-header{min-height:50px}.game-hud{padding-top:6px;padding-bottom:6px}.game-toolbar{padding-top:4px;padding-bottom:4px}}

.brand-character{background:url("assets/qijiu-onsen-cast.webp") 0 0/400% 300% no-repeat}

/* Linear play: one start action, with the rules alongside the live board. */
.layout{gap:22px;padding:16px 22px;align-items:stretch}
.start-screen{width:100%;min-height:0;display:grid;place-items:center;overflow:auto}
.start-card{width:min(100%,470px);padding:40px 32px;border:1px solid #fff;border-radius:30px;background:#f8fff1ed;box-shadow:0 16px 70px #24564c24;text-align:center}
.start-card h1{font-size:34px;margin:16px 0}.start-card p{font-size:14px;color:#648675;line-height:1.8;margin-bottom:24px}.start-card #continue{width:100%;margin-top:24px}
body[data-screen="game"] .game-frame{width:100%;max-width:520px;flex:1 1 420px;margin:0;backdrop-filter:none;background:#e8f4e7}
body[data-screen="game"] .layout{justify-content:center}
.stage-area{background:#e8f4e7}.stage-wrap,#game{filter:none;image-rendering:auto;opacity:1}
.rules-panel{width:260px;flex:0 0 260px;align-self:center;max-height:100%;overflow:auto;padding:26px 24px;border:1px solid #fff;border-radius:24px;background:#f8fff1f2;box-shadow:0 12px 45px #24564c20;color:#355d4a}
.rules-panel h2{font-size:23px;font-weight:800;margin:8px 0 20px}.rules-panel ol{padding-left:22px;margin:0;display:grid;gap:17px;font-size:13px}.rules-panel li::marker{color:#4b9577;font-weight:bold}.rules-panel li strong{display:block;margin-bottom:5px}.rules-panel li span{display:block;font-size:12px;line-height:1.7;color:#698674}.rule-mission{margin-top:22px;padding:16px;background:#e5f1df;border:1px solid #ccdfc6;border-radius:15px}.rule-mission>span{display:block;font-size:11px;color:#72956f;margin-bottom:8px}.rule-mission strong{font-size:13px}.rule-mission p{font-size:12px;line-height:1.8;margin:8px 0 0;color:#5e7c5c}.rule-footnote{font-size:11px;line-height:1.8;color:#7b9480;margin:16px 0 0}
.mechanic-dialog{width:min(430px,calc(100vw - 36px));max-height:calc(100dvh - 40px);overflow:auto;padding:28px;border:1px solid #b8d6bf;border-radius:25px;background:#fafff1;color:#355e4a;box-shadow:0 20px 80px #173c4140}.mechanic-dialog::backdrop{background:#193e4166;backdrop-filter:blur(4px)}.mechanic-dialog h2{font-size:23px;font-weight:800;line-height:1.4;margin:10px 0 18px}.mechanic-dialog section{margin:14px 0}.mechanic-dialog section strong{font-size:14px}.mechanic-dialog p{font-size:13px;line-height:1.8;color:#698171;margin:6px 0}.mechanic-dialog #mechanic-level-tip{padding:12px;margin:16px 0;background:#e8f2e0;border-radius:12px}.mechanic-dialog .primary-button{width:100%;margin-top:6px}
@media(min-width:621px) and (max-width:1000px){.layout{gap:12px;padding:12px}.rules-panel{width:200px;flex-basis:200px;padding:20px 16px}.rules-panel ol{gap:12px}.rules-panel h2{margin-bottom:14px}}
@media(max-width:620px){.layout{padding:8px;gap:8px;flex-direction:column}.start-screen{flex:1}.start-card{padding:30px 22px}.start-card h1{font-size:29px}body[data-screen="game"] .game-frame{flex:1 1 0;min-height:0;border-radius:18px}.rules-panel{width:100%;flex:0 0 auto;align-self:stretch;max-height:175px;padding:12px 16px;border-radius:17px}.rules-panel>.chapter-label,.rule-footnote{display:none}.rules-panel h2{font-size:15px;margin:0 0 8px}.rules-panel ol{grid-template-columns:1fr 1fr;gap:7px 20px;font-size:11px;padding-left:17px}.rules-panel li strong{margin-bottom:2px}.rules-panel li span{font-size:10px;line-height:1.5}.rule-mission{padding:8px 10px;margin-top:10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.rule-mission>span{margin:0;font-size:10px}.rule-mission strong{font-size:11px}.rule-mission p{font-size:10px;margin:0;flex:1;min-width:130px}.game-hud{padding:7px 14px}.game-toolbar{padding:4px 8px;gap:7px}.game-toolbar .tool-button,.assist summary{min-height:38px;padding:7px 12px;font-size:12px}.coming-screen{border-radius:20px}}

/* The home screen is a full composition, separate from the playable board. */
body[data-screen="home"]{background:radial-gradient(ellipse at 50% 18%,#fffcdf 0,#e5f6df 40%,#b9e4d6 76%,#8bcec5 100%)}
body[data-screen="home"] .site-header{background:#f5fff0b8;border-bottom:1px solid #7fbaa633;box-shadow:none;backdrop-filter:none;min-height:62px}
body[data-screen="home"] .layout{padding:0;gap:0}
.volume-control{margin-left:auto;display:flex;align-items:center;gap:9px;font-size:11px;color:#548070}
.volume-control input{width:90px;accent-color:#2f8a74;cursor:pointer}.site-header #sound{margin-left:8px}
.start-screen{position:relative;isolation:isolate;width:100%;height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;place-items:center;padding:clamp(16px,2.2vh,28px) 24px 20px;overflow:hidden}
.start-screen:before{content:'';position:absolute;inset:30% -10% -18%;z-index:-2;border-radius:50% 50% 0 0;background:radial-gradient(ellipse at 50% 60%,#91d6ca5e,transparent 58%),repeating-radial-gradient(ellipse at 50% 65%,transparent 0 80px,#78c7ba22 82px 84px,transparent 87px 145px);transform:rotate(-3deg)}
.start-screen:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(circle at 8% 22%,#fff9 0 13px,transparent 15px),radial-gradient(circle at 89% 48%,#fff7 0 23px,transparent 25px),radial-gradient(circle at 16% 73%,#fff8 0 9px,transparent 11px),radial-gradient(circle at 81% 13%,#fff8 0 11px,transparent 13px)}
.home-title{text-align:center;position:relative;z-index:2;align-self:start}.home-eyebrow{display:inline-block;padding:8px 18px;border:1px solid #92bda96b;border-radius:30px;color:#50816b;background:#ffffed8a;font-size:12px;letter-spacing:5px}
.home-title h1{font-family:'Microsoft YaHei','PingFang SC',sans-serif;font-weight:900;font-size:clamp(54px,6.6vw,108px);letter-spacing:7px;line-height:1.15;color:#246b54;margin:14px 0 12px;text-shadow:0 3px 0 #fffde8,0 7px 0 #aad6ac,0 13px 28px #3d7b6730}.home-title h1 span{color:#318c79}.home-title p{color:#64846a;font-size:clamp(12px,1.2vw,17px);letter-spacing:3px;margin:10px 0 0}
.home-hero{position:relative;align-self:stretch;width:min(1050px,84vw);height:100%;min-height:0;display:grid;place-items:center;z-index:1;margin:0 auto}
.home-hero img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;object-position:center 58%;filter:drop-shadow(0 18px 14px #386f5428)}
.hero-ground{position:absolute;bottom:8%;left:10%;width:80%;height:11%;border-radius:50%;background:radial-gradient(ellipse,#3b947536,transparent 68%);z-index:-1}
.home-actions{position:relative;z-index:2;text-align:center;margin-top:0;align-self:end;width:100%}
.home-actions #continue{display:flex;align-items:center;justify-content:center;gap:36px;width:min(430px,85vw);min-height:84px;margin:0 auto;padding:18px 34px;border:2px solid #ffffd9;border-radius:26px;background:linear-gradient(145deg,#4ba887,#20725d);box-shadow:0 7px 0 #185d49,0 12px 0 #a3d3a7,0 18px 30px #2b73572b;color:#fffde3;font-size:30px;font-weight:800;letter-spacing:5px;transition:transform .15s,filter .15s}
.home-actions #continue:hover{transform:translateY(-3px);filter:brightness(1.07)}.home-actions #continue:active{transform:translateY(4px);box-shadow:0 3px 0 #185d49,0 8px 0 #a3d3a7}.start-arrow{font-size:28px;line-height:1;letter-spacing:0}.home-actions p{font-size:12px;letter-spacing:4px;color:#4e8370;margin:24px 0 0}
@media(min-width:1400px){.home-hero{width:min(1180px,80vw)}}
@media(max-width:700px){body[data-screen="home"] .site-header{min-height:54px}.volume-control{gap:5px}.volume-control input{width:65px}.start-screen{padding:18px 14px 22px}.home-eyebrow{font-size:10px;letter-spacing:3px}.home-title h1{font-size:clamp(40px,8vw,62px);letter-spacing:2px;margin-top:17px}.home-title p{font-size:11px;letter-spacing:1px}.home-hero{width:100%;max-width:620px}.home-actions #continue{min-height:72px;width:min(360px,85vw);font-size:26px;border-radius:22px;gap:20px}.home-actions p{font-size:10px;letter-spacing:2px;margin-top:20px}}
@media(max-height:650px) and (min-width:701px){body[data-screen="home"] .site-header{min-height:48px}.start-screen{padding:10px 20px 14px}.home-title h1{font-size:62px;margin:8px 0}.home-eyebrow{font-size:10px;padding:5px 14px}.home-title p{font-size:12px;margin-top:4px}.home-actions #continue{min-height:62px;font-size:25px;padding:10px 28px}.home-actions p{margin-top:18px;font-size:10px}.home-hero{width:min(760px,70vw)}}

body[data-screen="game"] .game-frame{border:2px solid #faffdd;border-radius:26px;box-shadow:0 10px 0 #427d612b,0 22px 65px #204c3933}
body[data-screen="game"] .game-hud{background:linear-gradient(120deg,#faffeb,#e6f5e8);border-bottom:1px solid #b7d5bb;padding:15px 22px 13px}.game-hud .hud-label{font-size:13px;font-weight:700;color:#39765f}.game-hud .hud-label b{font-size:15px;color:#286f5b}.water-track{height:10px;box-shadow:inset 0 1px 3px #3d796620;background:#cce3cf}#water-fill{background:linear-gradient(90deg,#57b6b1,#4daed2);box-shadow:inset 0 2px 0 #c7f6ed99}#soap-marks{height:10px}#soap-marks i{height:10px;border:1px solid #b9cfae;background:#e0ead5}#soap-marks i.collected{background:#edd37e;border-color:#d5b359;box-shadow:inset 0 2px 0 #fff5c8}
.game-toolbar{border-top:1px solid #bed9be;background:#f3fbe9}.game-toolbar .tool-button,.assist summary{border:1px solid #b6d1ac;border-radius:14px;background:linear-gradient(#eff8e4,#dcecd4);box-shadow:0 3px 0 #a2c5a052;color:#366b52;font-weight:700}.game-toolbar .tool-button:hover,.assist summary:hover{background:#d4e9c8}.result-card{border:2px solid #9bc69e;box-shadow:0 7px 0 #a6c8a154,0 15px 50px #244a4333}.result-card .primary-button{min-height:52px;font-size:17px}.rules-panel{border:2px solid #f8ffe5;box-shadow:0 7px 0 #77ac7e30,0 12px 45px #24564c20}
@media(max-width:620px){body[data-screen="game"] .game-frame{border-radius:18px}body[data-screen="game"] .game-hud{padding:8px 14px}.game-hud .hud-label{font-size:11px}.game-hud .hud-label b{font-size:12px}.water-track{height:7px}}
