@font-face{font-family:HomeSerif;src:local("Songti SC"),local("STSong"),local("Noto Serif CJK SC");font-display:swap}
:root{color-scheme:dark;--ink:#091e2a;--cream:#f2e6cd;--gold:#e8c37f;--muted:#acbabd;--line:#e8c37f33;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--cream);min-height:100svh}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid #f5dca6;outline-offset:5px}button:disabled{cursor:wait;opacity:.6}button[hidden],[hidden]{display:none!important}button{color:inherit}a{color:inherit;text-decoration:none}.ambient{position:fixed;inset:0;background:radial-gradient(ellipse at 46% 30%,#20434d66,transparent 55%),radial-gradient(ellipse at 40% 110%,#44676c35,transparent 55%);pointer-events:none}.topbar{position:relative;z-index:4;max-width:1600px;margin:auto;padding:26px 46px;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;gap:12px;align-items:center;font-family:HomeSerif,serif;letter-spacing:2px;font-size:17px}.brand-moon{width:19px;height:19px;background:var(--gold);border-radius:50%;box-shadow:0 0 18px #edcc8555}.top-actions{display:flex;align-items:center;gap:16px}.quiet-button,.icon-button{background:none;border:0;color:var(--muted);font-size:14px;min-height:44px}.quiet-button span{margin-right:6px;font-size:20px}.icon-button{width:36px;border:1px solid #acbabd44;border-radius:50%;height:36px;min-height:36px}.layout{position:relative;max-width:1420px;margin:0 auto;display:grid;grid-template-columns:1fr minmax(340px,540px) 1fr;gap:48px;align-items:center;padding:0 48px 20px}.side{align-self:center}.eyebrow{font-size:12px;letter-spacing:3px;color:var(--gold)}.intro-side h1{font-family:HomeSerif,serif;font-weight:400;font-size:clamp(35px,3.4vw,52px);line-height:1.55;letter-spacing:5px;margin:25px 0 20px}.title-dot{color:var(--gold)}.gold-rule{width:32px;height:1px;background:var(--gold);margin:30px 0}.intro-side p{color:var(--muted);font-family:HomeSerif,serif;font-size:18px;line-height:2.1;letter-spacing:2px}.side-foot{display:block;font-size:12px;color:#8d9fa5;letter-spacing:2px;margin-top:62px}.game{width:100%;max-width:540px;margin:auto}.scene{position:relative;width:100%;aspect-ratio:1000/1440;max-height:calc(100svh - 155px);min-height:560px;overflow:hidden;border-radius:180px 180px 5px 5px;background:#102936;box-shadow:0 25px 100px #0004;border:1px solid #70939720;isolation:isolate}.scene-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;opacity:.88;transition:opacity 1s,filter 2s}.scene-shade{position:absolute;inset:0;background:linear-gradient(180deg,#071b2833 0%,transparent 46%,#071b2810 72%,#071b28ed 100%)}#canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.game-caption{display:flex;gap:20px;justify-content:center;align-items:center;font-size:12px;letter-spacing:2px;color:#a6b5b8;padding:20px 0}.caption-star{color:#c4a66d;font-size:17px}.journey-side{padding-left:10px}.journey{list-style:none;padding:0;margin:38px 0 0}.journey li{position:relative;display:flex;gap:22px;padding-bottom:45px;opacity:.42;transition:opacity .5s}.journey li:not(:last-child):before{position:absolute;content:"";height:39px;width:1px;background:var(--line);left:15px;top:43px}.journey li.active,.journey li.done{opacity:1}.journey-no{border:1px solid var(--line);border-radius:50%;width:33px;height:33px;display:grid;place-items:center;color:var(--gold);font-family:HomeSerif,serif;font-size:14px}.journey li.active .journey-no{box-shadow:0 0 25px #e8c37f12;background:#e8c37f0b}.journey strong{display:block;font:20px HomeSerif,serif;letter-spacing:4px;margin-bottom:9px}.journey small{font-size:12px;letter-spacing:1px;color:var(--muted)}.journey-note{font:14px/2 HomeSerif,serif;color:#8d9fa5;letter-spacing:2px;margin-top:18px}.welcome{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:12% 24px 22px;background:linear-gradient(#071b2820,#071b2810 50%,#071b28b0);z-index:3}.welcome-moon{width:83px;height:83px;flex-shrink:0;border-radius:50%;background:radial-gradient(circle at 36% 33%,#fff5d4,#f3d793 73%,#d5b672);box-shadow:0 0 65px 22px #f4d99016,0 0 110px 50px #e5c6860c;margin-bottom:31px}.welcome>.eyebrow{font-size:11px;letter-spacing:4px}.welcome h2{font:400 clamp(29px,2.8vw,39px)/1.7 HomeSerif,serif;letter-spacing:5px;margin:20px 0 14px;text-shadow:0 3px 20px #000}.welcome>p{font:15px/1.9 HomeSerif,serif;color:#c4ccc8;letter-spacing:2px;margin:0 0 18px}.memory-choices{display:flex;gap:9px;margin:auto 0 20px}.memory-choices button{border:1px solid #bac9cc36;background:#0a202a88;border-radius:30px;font-size:13px;color:#afbebf;padding:9px 12px;min-height:40px}.memory-choices button.selected{border-color:#e8c37f99;color:var(--gold);background:#c5a46712}.primary,.secondary{min-height:49px;border-radius:4px;padding:13px 24px;font-size:15px;letter-spacing:1px;transition:background .2s,transform .2s}.primary{background:var(--gold);border:1px solid var(--gold);color:#263435;box-shadow:0 4px 22px #070f2022}.primary:hover{background:#f3d799;transform:translateY(-1px)}.primary span{margin-left:18px}.welcome>.primary{width:min(100%,292px)}.tiny{font-size:12px!important;line-height:1.7!important;color:#93a6ac!important;letter-spacing:.5px!important}.welcome>.tiny{margin-top:14px;margin-bottom:0}.chapter-label{position:absolute;top:8%;left:24px;right:24px;text-align:center;pointer-events:none;z-index:2}.chapter-label>span{font-size:12px;color:var(--gold);letter-spacing:3px}.chapter-label h2{font:400 26px/1.7 HomeSerif,serif;letter-spacing:3px;margin:13px 0 4px}.chapter-label p{font-size:13px;color:#c0ccce;letter-spacing:1px;margin:0}.moon{position:absolute;z-index:4;transform:translate(-50%,-50%);width:12%;aspect-ratio:1;border:0;border-radius:50%;background:transparent;padding:0;touch-action:none;user-select:none;cursor:grab}.moon:active{cursor:grabbing}.moon-surface{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 36% 30%,#fff4d1 0,#f2d391 64%,#bda77b 100%);box-shadow:0 0 50px 15px #f3d28c22,0 0 100px 40px #f3d28c0b}.moon-surface:after{content:"";position:absolute;inset:20% 14% 10% 35%;border-radius:50%;background:radial-gradient(ellipse at 48% 48%,#a18e6b22,transparent 70%)}.moon-ring{position:absolute;inset:-14px;border:1px dashed #e8c37f55;border-radius:50%;animation:moon-breathe 3s infinite}.text-button{background:none;border:0;color:var(--gold);font-size:13px;padding:9px 0;min-height:40px}.memory-panel{position:absolute;left:24px;right:24px;bottom:35px;background:#0b2532e8;border:1px solid var(--line);padding:25px 20px;text-align:center;border-radius:6px;z-index:6;backdrop-filter:blur(14px);animation:fade-up .8s both}.memory-panel>p{font:20px/1.9 HomeSerif,serif;letter-spacing:1px;margin:15px 0 21px;white-space:pre-line}.memory-panel .primary{font-size:14px}.secondary{background:transparent;border:1px solid var(--line);color:var(--cream)}dialog{background:#112d3a;color:var(--cream);border:1px solid #e8c37f40;border-radius:10px;padding:35px 28px 28px;max-width:440px;width:calc(100% - 36px);max-height:calc(100svh - 50px);overflow:auto;box-shadow:0 25px 100px #0008}dialog::backdrop{background:#030f1dcc;backdrop-filter:blur(7px)}dialog>.icon-button{position:absolute;right:12px;top:12px}dialog h2{font:400 28px/1.6 HomeSerif,serif;letter-spacing:2px;margin:19px 0}dialog p{color:#b9c8ca;font-size:15px;line-height:1.9}dialog strong{color:var(--gold);font-weight:400}dialog>.primary{width:100%;margin-top:10px}form label,#manual-copy label{font-size:13px;color:#c6d1d1;display:block;margin:15px 0 9px}form label span{color:#7f989f}input,textarea{width:100%;background:#071e2b66;border:1px solid #d5c19738;border-radius:5px;padding:12px;color:var(--cream);font-size:16px;line-height:1.5;outline-color:var(--gold);resize:vertical}input::placeholder,textarea::placeholder{color:#829aa2;font-size:14px}form>.primary{width:100%;margin-top:24px}.toast{position:fixed;left:50%;bottom:30px;transform:translate(-50%,15px);z-index:100;background:#f3e3bf;color:#173441;padding:14px 22px;border-radius:5px;font-size:14px;text-align:center;width:max-content;max-width:90vw;opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}.share-actions{display:flex;flex-direction:column;gap:12px}#card-preview{width:100%;margin-top:18px;border-radius:6px}.final-card{position:absolute;inset:0;z-index:3;padding:11% 26px 25px;display:flex;flex-direction:column;align-items:center;text-align:center;background:linear-gradient(#091e2a33,transparent 45%,#091e2ae6)}.final-card .welcome-moon{width:65px;height:65px;margin-bottom:24px}.final-card h2{font:400 28px/1.7 HomeSerif,serif;letter-spacing:3px;margin:16px 0 10px}.final-card .letter-message{font:18px/1.9 HomeSerif,serif;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 6px;max-height:180px;overflow:auto;color:#e6dfcb;max-width:100%}.letter-sender{font-size:13px;color:var(--gold);letter-spacing:1px}.final-card .final-bottom{margin-top:auto;display:flex;flex-direction:column;gap:11px;width:min(100%,300px)}.final-card .text-button{font-size:12px;color:#a9bbbd}.lamp-status{font-size:13px;letter-spacing:2px;color:var(--gold);margin:20px 0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.scene.completed .scene-art{opacity:1}.scene.completed .scene-shade{background:linear-gradient(#071b2800,#071b2810 70%,#071b28dc)}@keyframes moon-breathe{50%{opacity:.35;transform:scale(1.07)}}@keyframes fade-up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}@media(min-width:1450px){.layout{gap:75px}.scene{max-height:850px}.topbar{padding-bottom:38px}}@media(max-width:1100px){.layout{gap:28px;padding:0 30px 20px;grid-template-columns:1fr minmax(350px,480px) 145px}.intro-side h1{font-size:35px}.intro-side p{font-size:16px}.journey-side{padding:0}.journey li{gap:12px}.side-foot{font-size:11px;letter-spacing:0}}@media(max-width:900px){.layout{display:block;padding:0 24px 10px}.side{display:none}.game{max-width:470px}.scene{max-height:none;min-height:0}.topbar{padding:18px 24px;max-width:750px}.welcome h2{font-size:36px}}@media(max-width:520px){.topbar{padding:calc(10px + env(safe-area-inset-top)) 21px 8px;height:calc(64px + env(safe-area-inset-top))}.brand{font-size:15px;letter-spacing:1px}.brand-moon{width:15px;height:15px}.top-actions{gap:12px}.quiet-button{font-size:12px}.icon-button{width:30px;height:30px;min-height:30px}.layout{padding:0}.game{max-width:none}.scene{border:0;border-radius:95px 95px 0 0;min-height:570px;height:calc(100svh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:850px;aspect-ratio:auto;box-shadow:none}.game-caption{height:46px;padding:12px 5px;font-size:11px;letter-spacing:1px}.welcome{padding-top:10%;padding-bottom:18px}.welcome-moon{width:69px;height:69px;margin-bottom:23px}.welcome h2{font-size:32px;margin-top:18px;margin-bottom:13px}.welcome>p{font-size:14px}.welcome>.eyebrow{font-size:10px;letter-spacing:3px}.memory-choices{margin-bottom:16px;gap:8px}.chapter-label{top:7%}.chapter-label h2{font-size:24px}.chapter-label p{font-size:12px}.memory-panel{left:20px;right:20px;bottom:28px}.memory-panel>p{font-size:19px}.final-card{padding-top:10%}.final-card h2{font-size:25px}.final-card .letter-message{font-size:17px}.toast{bottom:20px}}@media(max-height:720px) and (max-width:520px){.welcome h2{font-size:28px;margin-top:10px}.welcome-moon{width:58px;height:58px;margin-bottom:20px}.welcome>p{margin-bottom:10px}.memory-choices{margin-top:25px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Direct manipulation of the moon-shadow world. */
.challenge-entry{width:min(100%,292px);margin-top:10px;min-height:44px;border:1px solid #e8c37f55;border-radius:4px;background:#102a36cc;color:#e8c37f;font-size:13px;padding:10px 8px}.challenge-entry span{font-size:11px;margin-left:12px;color:#afbdb9}.welcome>.tiny{margin-top:9px}.bridge-pick{min-height:44px}.bridge-mode #canvas{cursor:grab}.bridge-mode #canvas.dragging-world{cursor:grabbing}.bridge-mode .chapter-label{top:7%}.bridge-mode .chapter-label h2{font-size:24px}.bridge-mode .chapter-label p{line-height:1.65;max-width:300px;margin:auto}.level-list{display:flex;flex-direction:column;gap:8px}.level-choice{display:grid;grid-template-columns:28px 1fr;gap:3px 10px;text-align:left;padding:12px 14px;background:#183a46;border:1px solid #bed1c629;border-radius:6px;min-height:52px;font-size:13px}.level-choice>span:first-child{grid-row:span 2;align-self:center;color:#e8c37f;font-size:17px}.level-choice small{font-size:10px;color:#a6bcb9}.level-choice:nth-child(n+7){border-color:#e8c37f66;background:#63593726}.journey{margin-top:26px}.journey li{padding-bottom:31px}.journey li:not(:last-child):before{height:25px}.journey-note{margin-top:4px}

@media(max-width:520px){.topbar{padding-left:16px;padding-right:16px}.top-actions{gap:9px}.brand{font-size:14px;gap:8px}.bridge-mode .chapter-label h2{font-size:22px}.bridge-mode .chapter-label p{max-width:270px;font-size:11px}.welcome .memory-choices{margin-top:auto}.welcome-moon{margin-bottom:18px}.welcome h2{margin-top:12px}.challenge-entry{margin-top:8px}.welcome>.tiny{font-size:11px!important}}
@media(max-width:360px){.top-actions{gap:5px}.brand{font-size:13px}.bridge-mode .chapter-label h2{font-size:20px}.bridge-mode .chapter-label p{max-width:238px}.welcome h2{font-size:28px}.memory-choices button{font-size:12px}}
@media(max-height:720px) and (max-width:520px){.welcome-moon{width:52px;height:52px;margin-bottom:12px}.welcome h2{font-size:27px;margin-top:8px;line-height:1.55}.welcome>p{font-size:13px}.welcome .memory-choices{margin-top:auto;margin-bottom:12px}.welcome>.primary{min-height:44px;padding:10px}.challenge-entry{min-height:40px}.bridge-mode .chapter-label{top:5%}.bridge-mode .chapter-label h2{margin-top:8px}}
@media(min-width:521px) and (max-height:800px){.welcome{padding-top:24px;padding-bottom:12px}.welcome-moon{width:52px;height:52px;margin-bottom:13px}.welcome h2{font-size:28px;line-height:1.45;margin:12px 0 8px}.welcome>p{font-size:14px;line-height:1.8;margin-bottom:10px}.welcome .memory-choices{margin-bottom:12px}.welcome>.primary{min-height:46px;padding:10px 20px}.welcome>.challenge-entry{margin-top:8px;min-height:42px}.welcome>.tiny{margin-top:8px;margin-bottom:0;font-size:11px!important}}

/* One quiet guide shared by all ten levels. */
.level-footer{position:absolute;bottom:22px;left:30px;right:30px;z-index:5}
.guide-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;color:#9caeb2;font-size:12px;line-height:1.6;letter-spacing:.2px}
#alignment-text{min-width:0}
.guide-hint{flex:0 0 auto;min-width:44px;min-height:44px;padding:0 4px;border:0;background:transparent;font-size:12px;color:#b3aa91;letter-spacing:1px}
.guide-hint:hover,.guide-hint[aria-pressed="true"]{color:#d0c3a4}
.alignment-track{height:1px;background:#a9bfc318;overflow:hidden}
.alignment-track span{display:block;width:0;height:100%;background:#c0b28c80;transition:width .2s ease}
@media(max-width:520px){.level-footer{left:24px;right:24px;bottom:18px}.guide-row{font-size:11px;gap:8px;letter-spacing:0}.guide-hint{font-size:11px}}
@media(max-width:360px){.level-footer{left:20px;right:20px}}

/* The room shares the canvas coordinates so window light stays registered. */
.bridge-mode .scene-art{object-fit:fill;opacity:1}
.bridge-mode .scene-shade{background:linear-gradient(180deg,#091e2a10,transparent 35%,transparent 78%,#091e2a55)}
.bridge-mode .chapter-label{top:7%}

/* A closer view gives the staircase more room, especially on larger screens. */
@media(min-width:901px){.layout:has(.bridge-mode){grid-template-columns:1fr minmax(380px,620px) 1fr;gap:32px}.game:has(.bridge-mode){max-width:620px}.scene.bridge-mode{min-height:660px;max-height:850px}}
