:root {
  color-scheme: dark;
  --ink: #080d21;
  --text: #e9e8ed;
  --muted: #999eaf;
  --faint: #686f87;
  --line: rgba(207, 215, 235, .13);
  --glass: rgba(13, 20, 40, .68);
  --accent: #d9ccb1;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 14px; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid #d9ccb1; outline-offset: 4px; }
button { -webkit-tap-highlight-color: transparent; }
.access-gate { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left)); overflow-y: auto; background: radial-gradient(ellipse at 50% 18%, rgba(45,55,94,.34), transparent 48%), rgba(4,8,20,.82); backdrop-filter: blur(14px); }
.access-gate[hidden] { display: none; }
.access-card { width: min(390px, 100%); padding: 38px 34px 28px; border: 1px solid rgba(208,214,229,.14); border-radius: 24px; background: linear-gradient(155deg, rgba(25,32,56,.97), rgba(8,14,30,.98)); box-shadow: 0 34px 100px rgba(0,0,0,.45); text-align: center; }
.access-orbit { display: block; color: #d6c5a6; font-size: 27px; filter: drop-shadow(0 0 12px rgba(214,197,166,.35)); }
.access-eyebrow { margin: 17px 0 7px; color: #68738c; font-size: 8px; letter-spacing: .32em; }
.access-card h1 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: .24em; }
.access-copy { color: #8f98ab; font-family: var(--serif); font-size: 12px; line-height: 1.9; margin: 14px auto 25px; max-width: 300px; }
.access-body { text-align: left; }
.access-form { display: flex; flex-direction: column; gap: 13px; }
.access-field { display: flex; flex-direction: column; gap: 7px; color: #7f899f; font-size: 10px; letter-spacing: .1em; }
.access-field input { width: 100%; height: 45px; border: 1px solid rgba(207,215,235,.13); border-radius: 10px; background: rgba(3,8,20,.34); color: #e1dfe4; padding: 0 14px; outline: 0; letter-spacing: .04em; }
.access-field input:focus { border-color: rgba(217,204,177,.42); }
.access-form .primary-btn { margin-top: 3px; }
.access-secondary { border: 0; background: transparent; color: #78839a; padding: 5px 0; cursor: pointer; font-size: 10px; letter-spacing: .1em; }
.access-secondary:hover { color: #c6c3bf; }
.access-error { color: #c89d9f; font-size: 10px; line-height: 1.7; min-height: 17px; margin: 0; text-align: center; }
.access-loading { display: flex; align-items: center; justify-content: center; gap: 9px; color: #9ba4b7; font-family: var(--serif); font-size: 12px; min-height: 92px; }
.access-loading::before { content: "✧"; color: #d2c1a2; animation: accessPulse 1.8s ease-in-out infinite; }
.access-footnote { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid rgba(207,215,235,.08); color: #566179; font-size: 9px; letter-spacing: .12em; }
@keyframes accessPulse { 50% { opacity: .35; transform: scale(.86); } }
body.app-booting .topbar,
body.app-booting main,
body.app-booting .dock { opacity: .34; }
body.online-mode .view-toggle { display: none; }
body.owner-view [data-panel="visit"] { display: none; }
.owner-session-btn { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid rgba(205,211,227,.1); border-radius: 10px; background: transparent; color: #778197; cursor: pointer; font-size: 10px; letter-spacing: .1em; }
.owner-session-btn:hover { color: #c8c5c0; border-color: rgba(205,211,227,.22); }
.owner-network { display: flex; gap: 8px; align-items: center; color: #69758b; font-size: 9px; margin-bottom: 18px; }
.owner-network i { width: 5px; height: 5px; border-radius: 50%; background: #9bad9e; box-shadow: 0 0 8px rgba(155,173,158,.6); }
.relationship-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.relationship-picker .choice { min-height: 36px; padding: 0 13px; }
.invite-panel { margin: 8px 0 26px; padding: 17px; border: 1px solid rgba(205,211,227,.09); border-radius: 14px; background: rgba(255,255,255,.012); }
.invite-panel h3 { margin: 0 0 10px; color: #aab0be; font-family: var(--serif); font-size: 14px; font-weight: 400; letter-spacing: .08em; }
.invite-panel p { margin: 0 0 13px; color: #68748a; font-size: 10px; line-height: 1.8; }
.invite-inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.invite-inline input { min-width: 0; height: 40px; border: 1px solid rgba(205,211,227,.12); border-radius: 9px; background: rgba(3,8,20,.3); color: #d7d5da; padding: 0 12px; }
.invite-inline button { border: 1px solid rgba(217,204,177,.3); border-radius: 9px; background: rgba(217,204,177,.08); color: #d8ccb5; padding: 0 13px; cursor: pointer; }
.invite-result { margin-top: 13px; padding: 12px; border-radius: 10px; background: rgba(4,9,22,.28); }
.invite-result code { display: block; color: #9da7ba; font-size: 9px; line-height: 1.7; word-break: break-all; margin-bottom: 9px; }
.invite-result button { border: 1px solid rgba(205,211,227,.14); border-radius: 8px; background: transparent; color: #b9bdc7; padding: 7px 10px; cursor: pointer; font-size: 9px; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.sky-wash { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 22%, rgba(81,87,130,.1), transparent 45%), linear-gradient(180deg, rgba(4,8,23,.08), rgba(14,20,42,.08) 48%, #0b1228 82%); }
.topbar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; min-height: 108px; padding: calc(30px + env(safe-area-inset-top)) calc(42px + env(safe-area-inset-right)) 30px calc(42px + env(safe-area-inset-left)); display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(217,204,177,.4); border-radius: 50%; color: var(--accent); font-family: var(--serif); font-size: 19px; position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(217,204,177,.12); border-radius: 50%; }
.brand strong { display: block; font-family: var(--serif); letter-spacing: .24em; font-weight: 500; font-size: 17px; }
.brand small { display: block; font-size: 7px; letter-spacing: .22em; color: #7f879d; margin-top: 6px; }
.top-actions { display: flex; gap: 14px; align-items: center; }
.privacy-pill { border: 1px solid var(--line); border-radius: 99px; padding: 9px 14px; color: #9da5b7; font-size: 11px; letter-spacing: .08em; background: rgba(10,16,34,.2); backdrop-filter: blur(8px); }
.privacy-pill i { display: inline-block; width: 5px; height: 5px; background: #a9b9ab; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 9px #a9b9ab; }
.icon-btn { width: 36px; height: 36px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; opacity: .65; transition: opacity .2s; }
.icon-btn:hover { opacity: 1; }
.icon-btn svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.muted .sound-waves { display: none; }
.icon-btn.muted::after { content: ""; position: absolute; width: 20px; height: 1px; background: currentColor; transform: rotate(-45deg); }
.moon-wrap { position: fixed; z-index: 2; width: 160px; height: 160px; top: 15%; right: 17%; pointer-events: none; }
#moon { width: 100%; height: 100%; filter: drop-shadow(0 0 12px rgba(225,225,204,.25)); }
.moon-halo { position: absolute; inset: -75%; border-radius: 50%; background: radial-gradient(circle, rgba(219,221,204,.11), rgba(165,180,207,.035) 36%, transparent 68%); }
.horizon-glow { position: fixed; z-index: 2; left: 0; right: 0; top: 56%; height: 1px; background: linear-gradient(90deg, transparent, rgba(155,167,199,.12), rgba(211,211,196,.25), rgba(155,167,199,.12), transparent); box-shadow: 0 -10px 80px 15px rgba(107,116,161,.07); }
.lake { position: fixed; z-index: 2; left: 0; right: 0; top: 56%; bottom: 0; overflow: hidden; background: linear-gradient(180deg, rgba(24,32,60,.08), rgba(8,15,34,.6)); pointer-events: none; }
.lake::before { content: ""; position: absolute; inset: 0; opacity: .28; background: repeating-linear-gradient(178deg, transparent 0 12px, rgba(159,176,200,.11) 13px, transparent 14px 22px); animation: waterShift 14s linear infinite; }
.lake::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 100%, rgba(88,99,135,.14), transparent 60%); }
.moon-reflection { position: absolute; top: 0; right: 15%; width: 18%; height: 80%; opacity: .38; background: repeating-linear-gradient(180deg, rgba(222,219,194,.3) 0 1px, transparent 2px 12px); mask-image: radial-gradient(ellipse at top, #000, transparent 70%); filter: blur(2px); animation: reflection 8s ease-in-out infinite alternate; }
.ripple { position: absolute; border: 1px solid rgba(181,188,207,.12); border-radius: 50%; left: 50%; top: 72%; transform: translate(-50%,-50%); animation: ripple 9s ease-out infinite; }
.r2 { animation-delay: -3s; }.r3 { animation-delay: -6s; }
@keyframes ripple { from { width: 150px; height: 20px; opacity: 0; } 15% { opacity: .7; } to { width: 800px; height: 110px; opacity: 0; } }
@keyframes waterShift { to { transform: translateY(22px); } }
@keyframes reflection { to { transform: scaleX(.7) translateX(10px); opacity: .25; } }
.lunar-info { position: fixed; z-index: 5; top: 22%; left: 6.5%; display: flex; flex-direction: column; gap: 8px; color: #858da4; }
.tiny-label { font-size: 10px; letter-spacing: .4em; color: #69728a; }
.lunar-info strong { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: .22em; color: #c8c9d1; margin: 4px 0; }
#lunarDate { font-size: 11px; letter-spacing: .14em; }
.time-line { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-family: ui-monospace, monospace; font-size: 10px; letter-spacing: .12em; color: #687189; }
.time-line i { width: 24px; height: 1px; background: #505a73; }
.world { position: fixed; z-index: 7; width: min(660px, 52vw); height: min(520px, 52vh); left: 52%; top: 52%; transform: translate(-50%,-36%); }
.girl-scene { width: 100%; height: 100%; overflow: visible; }
.girl-breathe { transform-origin: 355px 390px; animation: girlBreathe 5s ease-in-out infinite; }
@keyframes girlBreathe { 50% { transform: translateY(-2px) scale(1.005); } }
.cat-tail { transform-origin: 475px 390px; animation: tail 4s ease-in-out infinite; }
@keyframes tail { 50% { transform: rotate(7deg); } }
.prop { transition: opacity .5s ease; }
.girl-hitbox { position: absolute; width: 35%; height: 58%; left: 33%; top: 22%; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.speech { position: fixed; z-index: 10; left: 52%; top: 24%; transform: translateX(-10%); width: max-content; max-width: 360px; display: flex; align-items: flex-start; gap: 10px; padding: 13px 19px; background: rgba(19,26,47,.45); border: 1px solid rgba(199,205,218,.11); border-radius: 4px 18px 18px 18px; backdrop-filter: blur(12px); opacity: .82; transition: opacity .5s, transform .5s; }
.speech p { font-family: var(--serif); color: #c3c4ce; font-size: 12px; line-height: 1.8; letter-spacing: .08em; margin: 0; }
.speech-star { color: #cbbb99; line-height: 1.6; }
.speech.quiet { opacity: 0; transform: translateX(-10%) translateY(8px); pointer-events: none; }
.visitor-note { position: fixed; z-index: 8; right: 6%; bottom: 23%; color: #78839a; font-family: var(--serif); font-size: 11px; letter-spacing: .12em; opacity: 0; transition: opacity 1s; }
.visitor-note span { margin-right: 8px; color: #cbbd9e; }
.visitor-note.show { opacity: 1; }
.dock { position: fixed; z-index: 20; bottom: calc(28px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 7px 10px; border: 1px solid rgba(199,205,224,.13); border-radius: 16px; background: rgba(11,17,35,.65); box-shadow: 0 12px 45px rgba(0,0,0,.2); backdrop-filter: blur(20px); }
.owner-tools { display: contents; }
.dock-btn { position: relative; min-width: 78px; height: 56px; padding: 7px 13px; border: 0; border-radius: 10px; background: transparent; color: #939bad; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: color .25s, background .25s; }
.dock-btn:hover { color: #e1ded8; background: rgba(214,218,231,.055); }
.dock-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.dock-btn span { font-size: 10px; letter-spacing: .08em; white-space: nowrap; }
.dock-divider { height: 24px; width: 1px; background: var(--line); margin: 0 4px; }
.record-dot { position: absolute; right: 18px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: #d8c7a5; opacity: 0; }
.record-dot.show { opacity: 1; box-shadow: 0 0 8px #d8c7a5; }
.drawer-scrim { position: fixed; z-index: 29; inset: 0; background: rgba(3,7,18,.32); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 30; right: calc(16px + env(safe-area-inset-right)); top: calc(16px + env(safe-area-inset-top)); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right))); border: 1px solid rgba(205,211,227,.14); border-radius: 22px; background: linear-gradient(155deg, rgba(24,31,54,.97), rgba(10,16,33,.98)); box-shadow: -20px 0 80px rgba(0,0,0,.28); transform: translateX(calc(100% + 32px)); transition: transform .45s cubic-bezier(.2,.7,.2,1); overflow: hidden; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 28px 28px 20px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid rgba(205,211,227,.08); }
.drawer-eyebrow { color: #7d869c; font-size: 9px; letter-spacing: .28em; }
.drawer-head h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: .12em; margin: 7px 0 0; }
.close-btn { border: 1px solid var(--line); background: transparent; color: #a2a9ba; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 23px; line-height: 1; font-weight: 200; }
.drawer-body { padding: 24px 28px 32px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #394157 transparent; }
.section-label { display: flex; justify-content: space-between; align-items: center; color: #9da5b6; font-size: 11px; letter-spacing: .12em; margin: 0 0 13px; }
.section-label small { color: #646e85; font-size: 9px; letter-spacing: .06em; }
.section-block { margin-bottom: 27px; }
.choice { min-height: 43px; border: 1px solid rgba(205,211,227,.1); border-radius: 10px; background: rgba(255,255,255,.018); color: #959eb1; cursor: pointer; transition: all .2s; font-size: 12px; }
.choice:hover { border-color: rgba(217,204,177,.3); color: #ddd8cd; }
.choice.selected { color: #e7dcc7; border-color: rgba(217,204,177,.48); background: rgba(217,204,177,.075); box-shadow: inset 0 0 18px rgba(217,204,177,.035); }
.action-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-choice { text-align: left; padding: 0 12px; display: flex; gap: 9px; align-items: center; }
.action-choice .action-icon { font-family: var(--serif); font-size: 16px; color: #79849c; }
.action-choice.selected .action-icon { color: #d9ccb1; }
.duration-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.primary-btn { border: 1px solid rgba(218,204,176,.45); background: #d5c9b2; color: #252839; width: 100%; height: 47px; border-radius: 11px; cursor: pointer; letter-spacing: .14em; font-size: 12px; transition: background .2s, transform .2s; }
.primary-btn:hover { background: #e5dbc7; transform: translateY(-1px); }
.words-intro { font-family: var(--serif); color: #9ba3b5; line-height: 2; font-size: 13px; margin: 0 0 23px; }
.words-input { resize: none; width: 100%; min-height: 138px; padding: 17px; background: rgba(4,9,22,.3); border: 1px solid rgba(205,211,227,.14); border-radius: 12px; color: #d5d4da; line-height: 2; font-family: var(--serif); font-size: 14px; }
.words-input::placeholder { color: #59647b; }
.char-count { text-align: right; color: #646e84; font-size: 10px; margin: 7px 2px 20px; }
.suggestions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 23px; }
.suggestion { border: 0; border-bottom: 1px solid rgba(205,211,227,.07); text-align: left; background: transparent; color: #7f899f; padding: 11px 2px; cursor: pointer; font-family: var(--serif); font-size: 12px; line-height: 1.7; }
.suggestion:hover { color: #c5c5cc; }
.visit-intro { text-align: center; margin: 4px 0 27px; }
.visit-intro .mini-moon { font-size: 26px; color: #d8cbae; font-family: var(--serif); }
.visit-intro h3 { font-family: var(--serif); font-size: 18px; letter-spacing: .12em; font-weight: 400; margin: 10px 0; }
.visit-intro p { color: #79849a; font-size: 11px; line-height: 1.8; }
.visit-unavailable {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px 18px;
  border: 1px solid rgba(205,211,227,.08);
  border-radius: 15px;
  background: rgba(255,255,255,.012);
}
.visit-unavailable p {
  margin: 0;
  color: #b8bdc8;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
}
.interaction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.interaction-btn { min-height: 103px; border: 1px solid rgba(205,211,227,.1); background: rgba(255,255,255,.015); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #a7aebd; cursor: pointer; transition: all .25s; }
.interaction-btn:hover { background: rgba(217,204,177,.055); border-color: rgba(217,204,177,.3); color: #e0d7c8; transform: translateY(-2px); }
.interaction-btn:disabled,
.interaction-btn.completed { cursor: default; opacity: .62; transform: none; }
.interaction-btn.completed { color: #c9c3b6; border-color: rgba(217,204,177,.2); background: rgba(217,204,177,.045); }
.interaction-btn .interaction-symbol { font-family: var(--serif); font-size: 25px; font-weight: 300; color: #c7baa2; height: 30px; }
.interaction-btn span:last-child { font-size: 11px; letter-spacing: .08em; }
.visit-footnote { text-align: center; color: #59647a; font-size: 10px; line-height: 1.8; margin-top: 23px; }
.memory-lock { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 7px 10px; color: #7d879c; font-size: 9px; margin-bottom: 22px; }
.memory-list { list-style: none; margin: 0; padding: 0; }
.memory-item { position: relative; padding: 0 0 25px 25px; border-left: 1px solid rgba(205,211,227,.1); margin-left: 5px; }
.memory-item::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #6f788e; border: 2px solid #171e35; }
.memory-item:first-child::before { background: #d2c3a5; box-shadow: 0 0 10px rgba(210,195,165,.4); }
.memory-item strong { display: block; color: #c6c7ce; font-family: var(--serif); font-size: 13px; font-weight: 400; letter-spacing: .06em; margin-bottom: 7px; }
.memory-item p { margin: 0 0 7px; color: #7d879b; font-size: 11px; line-height: 1.8; }
.memory-item time { display: block; color: #515e76; font-size: 9px; margin-bottom: 7px; }
.memory-item p:last-child { margin-bottom: 0; color: #a5aab6; font-family: var(--serif); letter-spacing: .04em; }
.memory-delete { position: absolute; right: 0; top: 0; width: 27px; height: 27px; border: 1px solid rgba(205,211,227,.08); border-radius: 50%; background: transparent; color: #626d83; cursor: pointer; font-size: 15px; line-height: 1; }
.memory-delete:hover { color: #b99da0; border-color: rgba(185,157,160,.25); }
.session-panel { margin-top: 17px; padding-top: 16px; border-top: 1px solid rgba(205,211,227,.07); }
.session-panel p { margin: 0 0 10px; color: #657188; font-size: 9px; line-height: 1.7; }
.session-panel .owner-session-btn { margin-top: 0; }
.empty-memory { text-align: center; color: #657087; padding: 45px 10px; line-height: 2.2; font-family: var(--serif); font-size: 12px; }
.empty-memory span { display: block; color: #a99f8d; font-size: 25px; margin-bottom: 12px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translate(-50%,12px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 9px; background: rgba(23,30,50,.88); border: 1px solid rgba(217,204,177,.17); border-radius: 99px; padding: 11px 19px; backdrop-filter: blur(16px); transition: opacity .35s, transform .35s; max-width: calc(100vw - 30px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast span { color: #d1c09d; }.toast p { margin: 0; color: #c7c7ce; font-family: var(--serif); font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.interaction-visual { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); pointer-events: none; font-family: var(--serif); font-size: 48px; color: #dfcfb3; text-shadow: 0 0 20px rgba(223,207,179,.5); opacity: 0; }
.interaction-visual.play { animation: interactionFloat 2.4s ease-out; }
.stateful-result-stage {
  position: absolute; inset: 0; z-index: 4; display: none; pointer-events: none;
  opacity: 0; transition: opacity .22s ease;
  mask-image: radial-gradient(ellipse at 50% 61%,#000 48%,transparent 84%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 61%,#000 48%,transparent 84%);
}
.stateful-result-stage.active { display: block; }
body.character-scene-active .stateful-result-stage.active { opacity: 1; }
.stateful-result-image,
.stateful-result-video {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: contain; pointer-events: none;
}
.stateful-result-image { opacity: 0; transition: opacity .22s ease; }
.stateful-result-image.ready { opacity: 1; }
.stateful-result-stage.transitioning .stateful-result-image { opacity: 0; }
.stateful-result-video { z-index: 1; opacity: 0; transition: opacity .22s ease; mix-blend-mode: lighten; }
.stateful-result-video.ready { opacity: 1; }
@keyframes interactionFloat { 0% { opacity: 0; transform: translate(-50%,-20%) scale(.8); } 20% { opacity: .9; } 75% { opacity: .7; } 100% { opacity: 0; transform: translate(-50%,-130%) scale(1.05); } }
.shooting-star { position: fixed; z-index: 6; width: 160px; height: 1px; top: 20%; left: -200px; opacity: 0; transform: rotate(-20deg); background: linear-gradient(90deg, transparent, #dddacb); filter: drop-shadow(0 0 5px #dddacb); pointer-events: none; }
.shooting-star.fly { animation: shooting 2.2s ease-in-out; }
@keyframes shooting { 0% { left: 15%; top: 15%; opacity: 0; } 15% { opacity: .8; } 100% { left: 85%; top: 42%; opacity: 0; } }
body.visitor-view .owner-tools { display: none; }
body.visitor-view .dock-divider:first-of-type { display: none; }
body.slow-time #sky, body.slow-time .lake::before, body.slow-time .girl-breathe, body.slow-time .cat-tail { animation-play-state: paused; }
body.mood-lonely .girl-breathe { animation-duration: 7s; }
body.action-rest .girl-breathe { transform: translate(-26px,70px) rotate(-70deg); transform-origin: 355px 320px; animation: none; }
body.action-rest #cat { transform: translate(-130px,5px) scale(.85); }
body.action-daze #girl { transform: translateY(20px); }
body.action-daze .girl-breathe { animation-duration: 7s; }
body.action-daze .head-back { transform: rotate(-2deg) translateY(4px); }
body.action-read #girl, body.action-writing #girl, body.action-computer #girl { transform: translateY(17px); }
@media (max-width: 900px) {
  .topbar { padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 24px calc(24px + env(safe-area-inset-left)); }
  .lunar-info { left: 5%; top: 19%; }
  .world { width: 65vw; left: 58%; }
  .speech { left: 55%; top: 21%; max-width: 310px; }
  .moon-wrap { right: 10%; width: 130px; height: 130px; }
}
@media (max-width: 640px) {
  .topbar { padding: calc(19px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) 19px calc(18px + env(safe-area-inset-left)); min-height: 78px; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; }
  .brand strong { font-size: 15px; }.brand small { font-size: 6px; }
  .privacy-pill { display: none; }
  .moon-wrap { width: 92px; height: 92px; right: 8%; top: 14%; }
  .lunar-info { left: 20px; top: 14%; gap: 5px; }
  .lunar-info strong { font-size: 20px; }.tiny-label { font-size: 8px; }
  #lunarDate { font-size: 9px; }.time-line { margin-top: 5px; }

  .world { width: 118vw; height: 52vh; left: 50%; top: 46%; transform: translate(-50%,-33%); }
  .speech { left: 50%; top: 25%; transform: translateX(-50%); max-width: calc(100vw - 48px); width: max-content; padding: 10px 14px; }
  .speech p { font-size: 10px; }.speech.quiet { transform: translateX(-50%) translateY(8px); }
  .horizon-glow, .lake { top: 48%; }
  .dock { bottom: calc(14px + env(safe-area-inset-bottom)); padding: 5px; width: calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); justify-content: space-around; border-radius: 14px; }
  .dock-btn { min-width: 0; flex: 1; padding: 5px 6px; height: 52px; }
  .dock-btn svg { width: 17px; height: 17px; }.dock-btn span { font-size: 9px; }
  .dock-divider { margin: 0; }.view-toggle { max-width: 66px; }
  body.visitor-view .dock-btn { max-width: none; }
  .drawer { top: auto; left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 85vh; border-radius: 22px; transform: translateY(calc(100% + 16px)); }
  .drawer.open { transform: translateY(0); }
  .drawer-head { padding: 21px 22px 16px; }.drawer-head h2 { font-size: 21px; }
  .drawer-body { padding: 20px 22px 26px; }
  .visitor-note { display: none; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); padding: 10px 14px; }.toast p { font-size: 10px; white-space: normal; }
  .moon-reflection { right: 3%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
/* 背影人物：不依赖表情，用头部倾向、肩背和呼吸节奏传达情绪。 */
.head-back { transform-origin: 355px 260px; transition: transform 1.2s ease; }
.back-hair, .hair-rim, .hair-strands { transition: opacity .6s ease; }
.star-hairpin { filter: drop-shadow(0 0 4px rgba(216,200,166,.32)); }
.mood-happy .head-back { transform: rotate(-2deg) translateY(-1px); }
.mood-happy .star-hairpin { opacity: 1; }
.mood-missing .head-back { transform: rotate(4deg) translate(2px,1px); }
.mood-lonely .head-back { transform: rotate(-3deg) translateY(3px); }
.mood-lonely .sleeves { transform: scaleX(.94); transform-origin: 355px 300px; }
.mood-daze .head-back { transform: rotate(-2deg); }
.mood-thinking .head-back { transform: rotate(5deg) translateY(4px); }
.mood-explore .head-back { transform: rotate(-3deg) translateY(-3px); }
.mood-rest .girl-breathe { animation-duration: 7s; }
.mood-walk .head-back { transform: translateY(-2px); }
