:root{color-scheme:dark;--paper:#f3eddd;--gold:#e7c998;--edge:rgba(235,215,177,.28);--serif:Georgia,"Songti SC","STSong","SimSun",serif}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#17202b;color:var(--paper);font-family:"Microsoft YaHei UI",sans-serif}
#world,.veil{position:fixed;inset:0;width:100%;height:100%;display:block}
#world{touch-action:none;outline:none;cursor:grab}#world:active{cursor:grabbing}
.veil{pointer-events:none;background:linear-gradient(180deg,#08121670,transparent 15%,transparent 74%,#050c155b)}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;background:none;border:0}
button:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
i{display:inline-flex}i svg{width:100%;height:100%}
header,.hud,footer{position:fixed;left:clamp(20px,3.5vw,65px);right:clamp(20px,3.5vw,65px);display:flex;justify-content:space-between;pointer-events:none}
header{top:clamp(16px,3.3vh,44px);align-items:center}
.brand{display:flex;gap:14px;align-items:center;text-shadow:0 2px 8px #090f16}
.brand b,.brand div span{display:block}.brand b{font:500 clamp(16px,1.52vw,25px) var(--serif);letter-spacing:.23em}.brand div span{font:11px var(--serif);letter-spacing:.26em;color:var(--gold);margin-top:5px}
.sigil,.loadsig{font:italic 27px var(--serif);height:45px;width:37px;display:grid;place-content:center;border:1px solid var(--gold);border-radius:48% 48% 48% 48%/34% 34% 65% 65%;position:relative;color:var(--gold)}.sigil:before,.loadsig:before{content:"✧";position:absolute;top:-11px;left:50%;transform:translateX(-50%);font:12px serif}
nav,.switch{display:flex;gap:8px;align-items:center}header button,#restore,.switch button{pointer-events:auto;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--edge);border-radius:50%;background:#101822a6;backdrop-filter:blur(8px)}
header i,#restore i{width:17px;height:17px}header button:hover,#restore:hover,.switch button:hover{color:var(--gold);border-color:var(--gold)}
.hud{bottom:clamp(58px,8vh,100px);align-items:flex-end}
.place{display:flex;align-items:center;gap:10px;font:12px Georgia,serif;letter-spacing:.24em;color:var(--gold);text-shadow:0 1px 5px #10151c}
.line{width:29px;height:1px;background:var(--gold)}
.view h1{font:500 clamp(34px,3.7vw,64px)/1.2 var(--serif);letter-spacing:.12em;margin:9px 0 16px;text-shadow:0 2px 14px #0a1420}
.switch{font:13px Georgia,serif;letter-spacing:.1em;gap:12px}.switch button{font:23px Georgia,serif;width:32px;height:32px}.switch em{font-style:normal;color:#b0a58e;padding:0 3px}
.weather{pointer-events:auto;width:336px;padding:12px 16px 10px;background:linear-gradient(117deg,#17232ded,#111820e8);border:1px solid var(--edge);border-radius:13px;box-shadow:0 6px 25px #030b1229;backdrop-filter:blur(16px)}
.time-head,.choice-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.time-head label,.control-label{color:#c2bdad;font-size:11px;letter-spacing:.1em}.time-head label{display:flex;align-items:center;gap:9px;white-space:nowrap}
#clock{font:18px Georgia,serif;font-variant-numeric:tabular-nums;color:var(--paper);letter-spacing:.04em}
.moments,.seasons,.modes{display:flex;align-items:center}.moments{gap:1px}.moments button{font-size:11px;padding:5px 6px;color:#c7c8c4}.moments button[aria-pressed=true]{color:var(--gold)}
#hour{display:block;appearance:none;width:100%;margin:1px 0 5px;height:20px;background:transparent;cursor:pointer;touch-action:pan-y}
#hour::-webkit-slider-runnable-track{height:4px;border-radius:3px;background:linear-gradient(to right,#384766,#bd947c var(--dawn,22%),#e7c989 51%,#bd8067 var(--dusk,80%),#45526a)}
#hour::-moz-range-track{height:4px;border-radius:3px;background:linear-gradient(to right,#384766,#bd947c var(--dawn,22%),#e7c989 51%,#bd8067 var(--dusk,80%),#45526a)}
#hour::-webkit-slider-thumb{appearance:none;border:2px solid #fff1cc;border-radius:50%;width:13px;height:13px;margin-top:-4.5px;background:#bd9560;box-shadow:0 0 0 3px #161d27}
#hour::-moz-range-thumb{border:2px solid #fff1cc;border-radius:50%;width:10px;height:10px;background:#bd9560}
.choice-row{border-top:1px solid #e9d4b01e;min-height:31px}.control-label{flex:0 0 34px}
.seasons,.modes{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:3px}
.modes{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}.modes button[hidden]{display:none}.modes button{padding-inline:1px;white-space:nowrap}
@media(max-width:370px){.modes:has([data-mode=snow]:not([hidden])) button{flex-direction:column;gap:1px}}
.seasons button,.modes button{min-height:26px;display:flex;align-items:center;justify-content:center;gap:4px;font-size:12px;color:#d1d2cc;border-radius:4px}
.modes i{width:14px;height:14px}.seasons button[aria-pressed=true],.modes button[aria-pressed=true]{background:#e4c79720;color:#f2d495}
.weather button:hover{background:#e5d3ac16;color:#ffe7b9}
footer{align-items:center;bottom:max(15px,2.4vh);padding-top:9px;border-top:1px solid #c6bca54a;color:#ece5d6;font-size:11px;letter-spacing:.08em}
footer button{pointer-events:auto;font-size:11px;display:flex;gap:7px;align-items:center}footer i{width:14px;height:14px}footer button[aria-pressed=true]{color:var(--gold)}
.tour-actions{display:flex;align-items:center;gap:14px}#sail{border:1px solid #e4c48c8a;border-radius:20px;padding:6px 12px;color:#ffe3ab;background:#202222c9}#sail:hover{background:#493c2c}
@media(max-width:390px){.tour-actions{gap:4px}#sail{padding:5px 7px}}
#restore{position:fixed;right:16px;top:16px;display:none}.immersive header,.immersive .veil,.immersive .hud,.immersive footer{display:none}.immersive #restore{display:grid}
#loading{position:fixed;inset:0;background:#152023;color:var(--gold);display:grid;align-content:center;justify-items:center;font:14px var(--serif);letter-spacing:.13em}#loading[hidden]{display:none}.loadsig{margin-bottom:10px}
header #startShow{display:flex;gap:7px;width:auto;padding:0 14px;border-radius:22px;background:#e8d2a9;color:#28241e;border:1px solid #f9e7c7;font-size:12px;font-weight:600}
#startShow span{font-size:10px}header #startShow:hover{background:#f8e6c7;color:#181612}
#showShade,#showTitle,#showControls{display:none;position:fixed}#showShade,#showTitle{pointer-events:none}
.showing header,.showing .hud,.showing footer,.showing .veil,.showing #restore{display:none}
.showing #showShade{display:block;inset:0;background:#05080d}
.showing #showTitle{display:block;left:8%;bottom:17%;color:#fff0cd;text-shadow:0 2px 20px #1b1619;font:italic clamp(45px,6.8vw,106px) Georgia,serif;letter-spacing:.035em}
.showing #showControls{display:flex;align-items:center;gap:13px;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(620px,calc(100% - 32px));padding:9px 14px;border:1px solid #e3d7b64a;border-radius:12px;background:#111a24e6;transition:opacity .38s;color:#f1e9d9;font-size:12px}
#showControls.quiet:not(:hover):not(:has(:focus-visible)){opacity:0}
#showControls button{white-space:nowrap;padding:7px 4px}#showChapter{color:#ebcf9e;white-space:nowrap}#showSeek{accent-color:#e5c897;flex:1;min-width:34px}#showClock{white-space:nowrap;font-variant-numeric:tabular-nums}
#showError:not(:empty){position:fixed;top:72px;right:24px;max-width:330px;padding:12px;background:#18222a;color:var(--paper)}
@media(max-width:520px){header #startShow{padding:0 9px;font-size:11px}.showing #showControls{gap:5px;padding:7px 8px;font-size:11px}#showChapter{display:none}}
@media(max-width:630px){
 header,.hud,footer{left:16px;right:16px}header{top:max(16px,env(safe-area-inset-top))}
 .brand{gap:10px}.sigil{width:28px;height:35px;font-size:22px}.brand b{font-size:15px}.brand div span{font-size:9px}nav{gap:5px}header button{width:34px;height:34px}
 .hud{bottom:max(48px,calc(env(safe-area-inset-bottom) + 44px));flex-direction:column;align-items:stretch;gap:9px}
 .view{display:grid;grid-template-columns:1fr auto;align-items:end;column-gap:10px}.place{grid-column:1;letter-spacing:.18em;font-size:9px}.view h1{grid-column:1;font-size:29px;margin:3px 0 0}.switch{grid-column:2;grid-row:1/3;align-self:center}
 .weather{width:100%;padding:8px 12px 6px}.choice-row{min-height:35px}.choice-row button{min-height:32px}.moments button{min-height:30px}#hour{height:23px;margin:0}
 footer{bottom:max(10px,env(safe-area-inset-bottom));padding-top:6px;font-size:10px;letter-spacing:0}
}
@media(max-height:480px) and (min-width:631px){.hud{bottom:39px}header{top:9px}.view h1{font-size:28px;margin:5px 0}.weather{padding-block:5px}.choice-row{min-height:27px}footer{bottom:6px;padding-top:3px}}

header #startFireworks{display:flex;gap:6px;width:auto;padding:0 14px;border-radius:22px;background:linear-gradient(115deg,#242b45,#452f46);border-color:#c8ad8f;color:#ffdfad;font-size:12px;white-space:nowrap}
#startFireworks span{font:21px Georgia,serif}
@media(max-width:630px){header nav{gap:4px}header #startFireworks{padding:0 8px;font-size:11px}header .brand div{display:none}}
@media(max-width:380px){header{left:8px;right:8px}header .sigil{width:27px}header nav button{height:32px;width:32px}}
.conjuring header,.conjuring footer,.conjuring .hud,.conjuring #restore,.conjuring .veil{display:none}
#startRitual{pointer-events:auto;color:#ffe2a3;white-space:nowrap}
#ritual{position:fixed;inset:0;pointer-events:none}
.ritual-card{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 26px);padding:13px 22px;border:1px solid #c5ab795e;border-radius:12px;background:#0a1322e8;box-shadow:0 8px 32px #07122170;text-align:center;pointer-events:auto}
.ritual-card b{font:19px var(--serif);letter-spacing:.13em}.ritual-card p{margin:7px 0;color:#e0dacb;font-size:13px}.ritual-card span{margin-left:13px;font:16px Georgia;color:#edc67a}.ritual-actions button{font-size:12px;color:#eed3a3;padding:6px 10px}
.rune-target{position:absolute;left:0;top:0;width:48px;height:48px;margin:-24px;pointer-events:auto;touch-action:none;user-select:none;color:#f5e6ba;border-radius:50%;background:radial-gradient(#294257cf,transparent 70%);font:22px Georgia;text-shadow:0 0 9px #ffcb77}
.rune-target:before,.rune-target:after{content:"";position:absolute;inset:7px;border:1px solid #c8ddf0a6;border-radius:50%}.rune-target:after{inset:2px;transform:scale(var(--reach,1));border-color:#b9defc}.rune-target.ready{background:radial-gradient(#b17e27f5,#7155249c 56%,transparent 70%);color:#fff1b8;box-shadow:0 0 22px #ffd77a96}.rune-target.ready:after{border:2px solid #ffe1a1}
@media(max-width:560px){footer #hint{display:none}footer .tour-actions{width:100%;justify-content:space-between}}
