@font-face{font-family:GameBrush;src:url("/art/title.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:GameSong;src:url("/art/song.woff2") format("woff2");font-weight:500;font-display:swap}
:root{
  color-scheme:dark;--page:#111b24;--surface:#192631;--ink:#f2e9d8;--soft:#c2c3bd;
  --line:#3a4547;--gold:#e3c08b;--accent:#dca781;--plate:#0d1720;--button:#d99270;
  --serif:GameSong,"Songti SC",STSong,"Noto Serif SC",SimSun,serif;
  --sans:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-family:var(--sans);color:var(--ink);background:var(--page)
}
:root[data-tone=day]{
  color-scheme:light;--page:#f4efe4;--surface:#e8e1d3;--ink:#282e30;--soft:#515957;
  --line:#c9c2b2;--gold:#745426;--accent:#97472c;--plate:#e4ddcb;--button:#a8492d
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:1.5rem}
body,h1,h2,h3,p,figure{margin:0}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button,a,input{touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.58}
:where(button,a,input):focus-visible{outline:3px solid #efac6f;outline-offset:4px}
button,.secondary{min-height:44px;color:var(--ink);background:transparent;border:1px solid var(--line);border-radius:3px;padding:.55rem 1rem}
img{display:block;max-width:100%}
h2,h3{font-family:var(--serif);font-weight:500}
p{line-height:1.8}
[hidden]{display:none!important}
.mast{background:#101a24;color:#f8eddd;border-bottom:1px solid #b39d752f}
.mast-inner,.hero-inner,.chapter-section,.practice-section,.progress,footer{width:min(1240px,100%);margin-inline:auto;padding-inline:clamp(20px,5.6vw,82px)}
.mast-inner{height:66px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.brand{display:inline-flex;gap:.63rem;align-items:center;font:1.42rem/1 GameBrush,var(--serif);letter-spacing:.04em;white-space:nowrap}
.crest{display:grid;place-items:center;width:1.6rem;height:1.7rem;border:1px solid #eb9c75;background:#883b32;color:#fff3d6;font-size:1.35rem;transform:rotate(-3deg)}
.mast nav{display:flex;align-items:center;gap:clamp(15px,2.6vw,40px);font-size:.86rem;color:#ddd7cb}
.mast nav a{display:flex;align-items:center;min-height:44px}
.mast nav button{border-color:#9f8c6d88;color:#eee2c9;min-height:36px;padding:.4rem .87rem}
.mast nav :where(a,button):hover{color:#ffe5ad}
.hero{position:relative;isolation:isolate;overflow:hidden;background:#101d29;color:#fff1d7;border-bottom:1px solid #ad92614d}
.key-art,.key-art img,.hero::after{position:absolute;inset:0;width:100%;height:100%}
.key-art{z-index:-3}
.key-art img{object-fit:cover;object-position:64% 53%}
.hero::after{content:"";z-index:-2;pointer-events:none;background:linear-gradient(90deg,#0b1521df 0%,#101925a6 27%,#0c182244 53%,transparent 72%),linear-gradient(0deg,#0a131ddd 0%,transparent 29%,transparent 88%,#10192333 100%)}
.hero-inner{position:relative;display:flex;align-items:center;min-height:clamp(490px,72svh,710px);padding-block:72px 92px}
.hero-copy{position:relative;max-width:650px}
.genre,.eyebrow{font:500 .84rem/1.5 var(--serif);letter-spacing:.17em}
.genre{display:flex;align-items:center;gap:.8em;color:#f0d6ae}
.divider{display:inline-block;width:23px;border-top:1px solid #d6ae7f}
.hero h1{font:400 clamp(5.6rem,9.3vw,9rem)/1.12 GameBrush,var(--serif);letter-spacing:.02em;margin:.13em 0 .09em -.045em;text-wrap:nowrap;color:#fff3d8;text-shadow:0 3px 23px #07111e80}
.hook{font:500 clamp(1.3rem,2.3vw,2rem)/1.6 var(--serif);letter-spacing:.09em;color:#ffe9c8}
.pitch{margin-top:.58rem;max-width:28em;color:#e4e0d5;font-size:clamp(.94rem,1.25vw,1.04rem);text-wrap:pretty}
.primary{display:inline-flex;align-items:center;gap:2.2rem;justify-content:center;min-height:52px;min-width:184px;margin:1.75rem 0 .65rem;padding:.6rem 1.5rem;background:#d99470;color:#221c19;border:1px solid #e5ab84;border-radius:2px;font:500 1.12rem/1.4 var(--serif);letter-spacing:.12em;transition:background .18s ease,transform .18s ease}
.primary::after{content:"→";font:400 1.35rem var(--sans);letter-spacing:0}
.primary:hover{background:#f0b187;transform:translateY(-2px)}
.minor{font-size:.81rem;color:var(--soft);line-height:1.7}
.hero .minor{color:#d8d6cc}
.hero-scene{position:absolute;right:clamp(20px,5.6vw,82px);bottom:28px;display:flex;align-items:center;gap:.8rem;padding:6px 12px 6px 6px;background:#0d1823dc;border:1px solid #c1ab7f70;color:#e4d3ac;transition:border-color .18s}
.hero-scene:hover{border-color:#efcd8c}
.hero-scene img{width:116px;height:54px;object-fit:cover;object-position:50% 33%;background:#141527}
.hero-scene span{font:.72rem/1.5 var(--sans)}
.hero-scene b{display:block;font:500 .95rem/1.6 var(--serif);color:#fff0d2}
.hero-scene .down{font-size:1rem}
.chapter-section,.practice-section,.progress{padding-block:clamp(3rem,6vw,6rem)}
.chapter-section{display:grid;grid-template-columns:1fr 1.15fr;gap:clamp(30px,6vw,85px);align-items:center}
.eyebrow{color:var(--accent);margin-bottom:1rem}
h2{font-size:clamp(2.2rem,4.5vw,4rem);line-height:1.26;letter-spacing:.025em;text-wrap:balance}
.chapter-intro>p:not(.eyebrow),.reading>p:last-child,.progress p{color:var(--soft);max-width:36em;font-size:.99rem;line-height:1.95;margin-top:1.25rem;text-wrap:pretty}
.scene-tabs{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:1.6rem}
.scene-tabs button{font-size:.85rem;padding:.45rem .72rem;border-color:transparent;border-bottom:1px solid var(--line);border-radius:0;color:var(--soft)}
.scene-tabs button[aria-selected=true]{color:var(--gold);border-bottom:2px solid var(--gold)}
.scene-view{border:1px solid var(--line);background:var(--plate);min-width:0}
.scene-frame{display:grid;place-items:center;overflow:hidden;background:#11121f}
.scene-frame img{width:100%;height:clamp(280px,27vw,370px);object-fit:cover;object-position:50% 40%}
.scene-frame[data-scene=practice] img{object-position:50% 51%}
.scene-frame[data-scene=cultivator] img{object-position:50% 17%}
.scene-view figcaption{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1rem}
.scene-view figcaption p,.scene-view figcaption a{font-size:.83rem;line-height:1.65}
.scene-view figcaption p{color:var(--soft)}
.scene-view figcaption a{color:var(--gold);flex:none;text-decoration:underline;text-underline-offset:4px}
.practice-section,.progress{border-top:1px solid var(--line);display:grid;grid-template-columns:1.4fr 1fr;gap:clamp(24px,6vw,80px);align-items:center}
.practice-section h2,.progress h2{font-size:clamp(1.9rem,3.4vw,3.2rem)}
.practice-pair{display:flex;justify-content:space-evenly;text-align:center;border-block:1px solid var(--line);padding-block:1.25rem}
.practice-pair>div{flex:1}.practice-pair>div+div{border-left:1px solid var(--line)}
.practice-pair h3{font:400 clamp(2.2rem,3.2vw,3.3rem)/1.3 GameBrush,var(--serif);color:var(--gold)}
.practice-pair p{font-size:.81rem;letter-spacing:.15em;color:var(--soft)}
.secondary{justify-self:end;white-space:nowrap;border-color:var(--gold);color:var(--gold);padding:.65rem 1.1rem}
footer{padding-block:1.2rem 2rem;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:.5rem 1rem;flex-wrap:wrap;color:var(--soft);font-size:.78rem}
dialog{width:min(530px,calc(100% - 24px));max-height:88svh;overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:5px;padding:clamp(1.15rem,3vw,1.65rem)}
dialog::backdrop{background:#071019bb}
.dialog-top,.dialog-controls{display:flex;align-items:center;justify-content:space-between;gap:.7rem}
.dialog-top h2{font-size:1.55rem}#cloud-status{margin:1rem 0;color:var(--gold);min-height:1.65em}
form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem .55rem;align-items:end;margin:.85rem 0}
form label{grid-column:1/-1;font-weight:600}
input{width:100%;min-height:44px;padding:.6rem .7rem;border:1px solid var(--line);border-radius:3px;color:var(--ink);background:var(--page)}
.edition{background:var(--page);border-left:2px solid var(--gold);padding:.8rem 1rem;margin:.65rem 0}
.edition p{color:var(--soft);font-size:.9rem}
.edition button,#cloud-actions button{margin-top:.5rem}
#cloud-actions button,form button{background:var(--ink);color:var(--page)}
.dialog-controls{margin-top:1.25rem;padding-top:.75rem;border-top:1px solid var(--line);justify-content:flex-end}
@media(max-width:680px){
  .mast-inner{height:54px}.brand{font-size:1.13rem;gap:.4rem}.crest{width:1.32rem;height:1.45rem;font-size:1.13rem}
  .mast nav{gap:11px;font-size:.76rem}.mast nav button{padding:.28rem .55rem}
  .hero-inner{min-height:clamp(538px,77svh,620px);display:grid;align-content:end;gap:1.05rem;padding-top:122px;padding-bottom:23px}
  .key-art img{object-position:50% 20%}
  .hero::after{background:linear-gradient(0deg,#0a1724 0%,#101c29e8 19%,#102032a8 45%,#111f2b20 70%,transparent 100%),linear-gradient(90deg,#0b162546,transparent 75%)}
  .hero h1{font-size:clamp(3.85rem,16vw,6rem);margin:.13em 0 .06em}
  .genre{font-size:.77rem;letter-spacing:.09em}.hook{font-size:clamp(1.17rem,5vw,1.5rem);letter-spacing:.05em}
  .pitch{max-width:28em;font-size:.91rem;line-height:1.68;margin-top:.38rem}
  .primary{margin:.95rem 0 .4rem;min-width:167px;min-height:47px;font-size:1.03rem}
  .hero-scene{position:static;justify-self:start;padding:4px 10px 4px 4px;gap:.65rem}
  .hero-scene img{width:112px;height:44px}.hero-scene b{font-size:.85rem}.hero-scene span{font-size:.66rem}
  .chapter-section,.practice-section,.progress{grid-template-columns:1fr;gap:1.55rem;padding-block:2.75rem}
  .chapter-intro h2 br{display:none}
  .eyebrow{margin-bottom:.65rem}
  .scene-tabs{margin-top:1rem}.scene-view figcaption{padding:.68rem .76rem}.scene-frame img{height:clamp(205px,57vw,295px)}
  .secondary{justify-self:start}
}
@media(max-width:350px){.mast nav{gap:7px}.mast-inner{padding-inline:12px}.hero-inner{padding-inline:16px}.genre{font-size:.7rem}.scene-tabs{gap:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
