:root {
  color-scheme: light;
  --bg:#fff8ec; --surface:#fff; --surface-2:#fff3e0; --ink:#5a4636; --muted:#8f7864;
  --line:#f0e2d0; --accent:#ff9a4d; --shadow:0 4px 0 #5a463612;
  font-family:"PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  color:var(--ink); background:var(--bg); -webkit-text-size-adjust:100%;
}
* {box-sizing:border-box}
body {margin:0; font-size:15px; line-height:1.6}
button,a { -webkit-tap-highlight-color:transparent }
button {font:inherit; color:inherit; cursor:pointer}
a {color:#a95a27; text-decoration:none}
button:focus-visible,a:focus-visible {outline:3px solid #3789a6; outline-offset:3px}
#app {max-width:480px; min-height:100vh; min-height:100dvh; margin:auto; padding-bottom:100px}
#screen {outline:none; min-width:0}
.hud {display:flex; align-items:center; justify-content:space-between; gap:8px; padding:14px 16px 12px; padding-top:max(14px,env(safe-area-inset-top)); background:var(--bg)}
.brand {font-size:19px; font-weight:900; color:var(--ink); letter-spacing:.5px}
.chip {font-size:11px; padding:4px 10px; background:white; border-radius:99px; box-shadow:var(--shadow); white-space:nowrap}
.pad {padding:0 max(16px,env(safe-area-inset-left)) 0 max(16px,env(safe-area-inset-right))}
.scene {position:relative; aspect-ratio:400/310; isolation:isolate; overflow:hidden}
.sky {position:absolute; inset:0; background:linear-gradient(#8fd3f4,#c9ecff 42%,#fff3d6 90%); transition:background 1s}
.sky[data-phase=dawn] {background:linear-gradient(#baabde,#ffd4bc 65%,#fff3d6)}
.sky[data-phase=dusk] {background:linear-gradient(#8d8cb9,#ffc4b7 58%,#ffe3c2)}
.sky[data-phase=night] {background:linear-gradient(#1b2350,#3c4279 70%,#6a5a88)}
.sun {position:absolute; left:75%; top:10%; width:33px; height:33px; background:#fff4b0; border-radius:50%; box-shadow:0 0 0 9px #fff4b034}
.sky[data-phase=night] .sun {background:#fdf6d8; width:26px; height:26px; box-shadow:0 0 18px #fff4b080}
.cloud {position:absolute; left:8%; top:18%; width:66px; height:16px; background:#fff; border-radius:99px; opacity:.8; animation:drift 14s ease-in-out infinite alternate}
.cloud:before,.cloud:after {content:""; position:absolute; border-radius:50%; background:inherit; width:28px; height:25px; top:-12px; left:10px}
.cloud:after {left:32px; top:-6px; width:22px; height:20px}
.cloud.second {left:58%; top:30%; transform:scale(.7); animation-delay:-7s}
.sky[data-phase=night] .cloud {opacity:.15}
.bay {position:absolute; inset:0; width:100%; height:100%; display:block}
.bay text {font-family:inherit; fill:var(--ink); font-weight:800}
.scene-tags {position:absolute; inset:auto 12px 8px; display:flex; justify-content:space-between; gap:8px; font-size:11px; pointer-events:none}
.scene-tags span {background:#ffffffe8; padding:3px 9px; border-radius:99px; max-width:65%; overflow-wrap:anywhere}
.map-target {fill:transparent; stroke:transparent; cursor:pointer}
.map-target:focus {stroke:#a95a27; stroke-width:2; outline:none}
.scene-actions {display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.scene-actions .btn {flex:1}
.rabbit-row {display:flex; gap:9px; align-items:flex-end; margin-top:14px}
.rabbit-portrait {width:56px; flex:none}
.bubble {position:relative; flex:1; min-width:0; background:#fff; border-radius:18px; padding:12px 14px; box-shadow:var(--shadow)}
.bubble small {display:block; color:#b6546c; font-weight:800; font-size:12px}
.bubble p {margin:3px 0; font-size:14px}
.panel {background:var(--surface); border-radius:20px; padding:15px; box-shadow:var(--shadow); margin:15px 0}
.panel h2 {font-size:16px; margin:0 0 8px}
.panel p {margin:6px 0}
.muted {color:var(--muted); font-size:13px}
.btn {display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 15px; border:0; border-radius:14px; font-weight:800; background:var(--surface-2); box-shadow:var(--shadow); font-size:14px}
.btn.primary {background:linear-gradient(#ffb36b,#ff9a4d); color:#603914; box-shadow:0 4px 0 #d97a2c}
.nav {position:fixed; z-index:20; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; display:flex; gap:6px; padding:12px 16px max(12px,env(safe-area-inset-bottom)); background:linear-gradient(#fff8ec00,#fff8ec 20%)}
.nav {flex-wrap:nowrap}
.nav a, .nav span {flex:1 1 0; min-width:0; white-space:nowrap; text-align:center; padding:12px 0; border-radius:18px; background:#fff; box-shadow:0 5px 20px #5a463618; font-size:13px; font-weight:800; color:var(--muted)}
.nav span[aria-disabled] {opacity:.45}
.nav a[aria-current] {color:#a95a27; background:#fff1d7}
.toast {position:fixed; z-index:100; left:50%; transform:translateX(-50%); bottom:90px; max-width:calc(100% - 32px); background:var(--ink); color:var(--bg); padding:10px 16px; border-radius:18px; font-size:14px}
.walker {animation:amble 9s ease-in-out infinite alternate}
.walker.parrot {animation-duration:12s; animation-delay:-4s}
@keyframes drift {to {translate:18px 0}}
@keyframes amble {0%,15% {translate:0 0} 80%,100% {translate:36px 15px}}
@media (prefers-reduced-motion:reduce) {*,*:before,*:after {animation:none!important; transition:none!important}}
@media (max-width:360px) {.brand {font-size:17px}.chip {font-size:10px}.scene-tags {font-size:10px}}
