/* The garden fills the view. Only the way home, the menu and one action stay on screen. */
#world { touch-action:none; cursor:grab; outline-offset:-4px; }
#world[data-dragging="true"] { cursor:grabbing; }
.vignette { background:linear-gradient(to bottom,#08162370,transparent 19%,transparent 78%,#07171e7d); }
.topbar {
  pointer-events:none; padding:calc(14px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));
  gap:16px; align-items:center;
}
.topbar h1 { margin:0; font:inherit; }
.garden-brand-context { display:flex; align-items:center; gap:8px; }
.garden-service-name { padding-inline-start:8px; border-inline-start:1px solid #e8ddcf70; color:#e3ddcf; font:500 13px/1.35 system-ui,sans-serif; white-space:nowrap; text-shadow:0 1px 5px #10232c; }
.topbar a,.topbar button { pointer-events:auto; }
.brand { min-height:44px; gap:9px; font:600 18px/1.2 Batang,serif; letter-spacing:.015em; color:white; text-shadow:0 1px 8px #06141c; }
.seal { font-size:10px; padding:3px 4px; background:#15232499; }
.menu-toggle {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 16px;
  background:#10252cde; border:1px solid #ffffff48; border-radius:28px; color:#fff; font-size:13px;
}
.menu-toggle svg { width:17px; height:17px; }
.garden-actions {
  position:fixed; z-index:5; inset:auto 12px calc(20px + env(safe-area-inset-bottom)); display:grid; justify-items:center; gap:10px; pointer-events:none;
}
.garden-actions button { pointer-events:auto; }
#play-arrival { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0 15px; border:1px solid #ffffff50; border-radius:24px; background:#10252ce8; color:white; font-size:13px; }
#play-arrival:not([hidden]) + #walk-hint { display:none; }
#primary-action {
  display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:48px; padding:0 25px;
  color:#152b30; background:#fff; border:1px solid #fff9; border-radius:99px; box-shadow:0 4px 18px #071c2440;
}
#primary-action span { font-size:19px; color:#896135; } #primary-action b { font-size:15px; }
#primary-action:active,.menu-toggle:active { transform:scale(.97); }
#walk-hint { margin:0; padding:5px 11px; border-radius:20px; color:white; background:#10252bd6; font-size:12px; line-height:1.5; transition:opacity .25s; }
body[data-explored] #walk-hint,body.no-gl #walk-hint { opacity:0; }
#step-marker {
  position:fixed; z-index:2; left:0; top:0; pointer-events:none; inline-size:25px; block-size:12px; margin:-6px 0 0 -12.5px;
  border-radius:50%; border:2px solid #fff2c4; box-shadow:0 0 6px #dcb26b, inset 0 0 4px #e1c690;
}
body:not([data-mode="hub"]):not([data-mode="walking"]) :is(.garden-actions,#step-marker,.topbar),
body[data-mode="walking"] #primary-action { visibility:hidden; pointer-events:none; }
body:has(#garden-menu[open]) .garden-actions { visibility:hidden; }
.fallback { bottom:calc(84px + env(safe-area-inset-bottom)); max-width:360px; margin:0 auto; }
#notice { bottom:calc(86px + env(safe-area-inset-bottom)); pointer-events:none; }
#garden-menu {
  width:min(100%,390px); inset:auto 0 0; margin:0 auto; max-height:calc(100dvh - 20px - env(safe-area-inset-top));
  border:1px solid #dde2e6; border-radius:24px 24px 0 0; padding:22px 20px calc(20px + env(safe-area-inset-bottom));
  background:#fff; color:#172738; color-scheme:light; overscroll-behavior:contain;
}
#garden-menu::backdrop { background:#06151d66; backdrop-filter:blur(2px); }
#garden-menu h2 { margin:1px 46px 18px 0; font-family:inherit; font-size:20px; font-weight:700; line-height:1.45; }
#garden-menu .close { color:#44515e; width:44px; height:44px; top:12px; right:12px; border-radius:50%; }
.garden-places { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.garden-places button { min-height:44px; border-radius:11px; background:#f1f4f5; color:#203a3e; font-size:14px; font-weight:650; }
.garden-places button:first-child { background:#203d40; color:white; }
.garden-menu-list { display:grid; padding:12px 0; }
.garden-menu-list button,#garden-settings summary,.settings-rows > button {
  min-height:44px; padding:10px 4px; display:flex; align-items:center; justify-content:space-between; text-align:start; gap:12px;
  font-family:inherit; font-size:14px; font-weight:500; line-height:1.5; background:none; color:#283a49; cursor:pointer;
}
.garden-menu-list button::after { content:''; width:7px; height:7px; margin-right:3px; border:solid #77838d; border-width:1.5px 1.5px 0 0; transform:rotate(45deg); }
#garden-settings { border-top:1px solid #dde3e7; }
#garden-settings summary { list-style:none; } #garden-settings summary::-webkit-details-marker { display:none; }
#garden-settings summary::after { content:'⌄'; color:#65737b; } #garden-settings[open] summary::after { transform:rotate(180deg); }
.settings-rows { padding:0 8px; }
.settings-rows > button { width:100%; }
#arrival-choice { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:4px; font-size:14px; }
#arrival-policy { min-height:40px; max-width:70%; border:1px solid #cbd4d9; border-radius:8px; background:#fff; color:#223a45; font:inherit; }
.settings-rows > button::after { content:'꺼짐'; font-size:12px; color:#67747c; }
.settings-rows > button[aria-pressed="true"]::after { content:'켜짐'; color:#28584d; font-weight:700; }
.settings-rows p { margin:8px 0 0; color:#566570; font-size:12px; line-height:1.65; }
#menu-music .garden-music { position:static; margin:2px 0; width:100%; max-width:none; color:#263941; background:#f4f6f7; box-shadow:none; border:0; justify-content:space-between; }
#menu-music .garden-music-toggle { color:#203a3e; }
.garden-menu-list button:hover,.settings-rows > button:hover,#garden-menu .close:hover { background:#f5f7f8; }
#sky-controls { position:fixed; z-index:6; inset:auto 16px calc(22px + env(safe-area-inset-bottom)); text-align:center; pointer-events:none; }
#sky-controls div { display:flex; justify-content:center; gap:10px; pointer-events:auto; }
#sky-controls button { min-height:46px; padding:10px 20px; background:#17343ae8; color:white; border:1px solid #ffffff52; border-radius:24px; font-size:14px; }
#sky-controls small { display:block; font-size:10px; color:#d9e2dd; margin-top:9px; text-shadow:0 1px 4px #04151b; }
.flight-ui { inset:auto 0 8%; } .flight-ui p { font-size:19px; }
.moon { top:max(9%,calc(env(safe-area-inset-top) + 12px));right:28%; }
#entry-still {
  position:fixed; inset:0; z-index:1; width:100%; height:100dvh; object-fit:cover;
  pointer-events:none; background:#0b222c; transition:opacity .24s ease;
}
.scene-ready #entry-still { opacity:0; visibility:hidden; transition:opacity .24s ease, visibility 0s linear .24s; }
.no-gl #entry-still { z-index:0; opacity:1; visibility:visible; }
.garden-loading { position:fixed; z-index:4; top:42%; left:50%; transform:translate(-50%,-50%); width:min(310px,calc(100% - 40px)); padding:24px 18px; text-align:center; border:1px solid #e9d6b13d; border-radius:20px; background:#0b222ce8; color:#f4e6cb; pointer-events:none; }
.garden-loading p { margin:14px 0 0; font-size:14px; line-height:1.6; }
#garden-loading-help { margin-top:6px; font-size:12px; color:#d3ddd5; }
.loading-lantern { display:block; position:relative; width:28px; height:36px; margin:0 auto; border:2px solid #dab77e; border-radius:38% 38% 25% 25%; background:#eac487; box-shadow:0 0 20px #eac48755; transform-origin:50% -8px; animation:loading-light 1.8s ease-in-out infinite; }
.loading-lantern::after { content:''; position:absolute; width:2px; height:9px; background:#dab77e; top:100%; left:calc(50% - 1px); }
@keyframes loading-light { 0%,100% { opacity:.65; transform:rotate(-7deg); } 50% { opacity:1; transform:rotate(7deg); } }
.garden-loading[data-state=error] .loading-lantern { animation:none; }
#service-link a[aria-busy=true]::after, #home[aria-busy=true]::after { content:""; display:inline-block; width:13px; height:13px; margin-inline-start:8px; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; animation:garden-link-turn .8s linear infinite; }
@keyframes garden-link-turn { to { transform:rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { #service-link a[aria-busy=true]::after, #home[aria-busy=true]::after { animation:none; } }
#garden-retry { display:inline-flex; min-height:44px; align-items:center; margin-top:12px; padding:6px 16px; border:1px solid #e9d6b178; border-radius:24px; color:#f4e6cb; font-size:13px; pointer-events:auto; }
body:has(.noscript) .garden-loading { display:none; }
@media(prefers-reduced-motion:reduce) { .loading-lantern { animation:none; } }
.garden-ending { position:fixed; z-index:6; inset:auto 16px calc(24px + env(safe-area-inset-bottom)); display:flex; justify-content:center; gap:9px; pointer-events:none; }
.garden-ending button { pointer-events:auto; min-height:46px; padding:10px 18px; border:1px solid #ffffff42; border-radius:24px; background:#152a38e6; color:white; font-size:14px; }
#ending-card { background:#fff; color:#233648; font-weight:650; }
#panel.wish-card-sheet { color-scheme:light; background:#fff; color:#182332; border:1px solid #dce2e9; width:min(100%,440px); padding:23px 24px calc(21px + env(safe-area-inset-bottom)); }
.wish-card-sheet .sheet-handle { background:#d8dfe7; } .wish-card-sheet .close { color:#526171; }
.wish-card-sheet .kicker { color:#9e4548; }
.wish-card-sheet h2 { color:#1c293a; font:700 24px/1.45 Batang,serif; margin:8px 32px 16px 0; }
#panel.wish-card-sheet .wish-quote { background:#f7f8fa; border:1px solid #e1e5eb; color:#25384a!important; line-height:1.7; margin:0 0 12px; }
.wish-card-sheet .card-feedback { color:#526171; font-size:12px; }
#wish-card-preview { display:block; width:auto; height:min(42dvh,440px); max-width:100%; aspect-ratio:9/16; object-fit:contain; margin:0 auto 16px; border-radius:12px; background:#081321; }
#wish-card-preview[hidden] { display:none; }
.wish-card-sheet .optin { color:#334354; }
#panel.wish-card-sheet .fine { color:#526171!important; font-size:13px!important; }
.wish-card-sheet .primary { background:#973e42; color:#fff; box-shadow:none; }
.wish-card-sheet .secondary { background:#f7f8fa; color:#334354; border:1px solid #dce2e9; }
.card-feedback:empty { display:none; }
#wish-petals { position:fixed; z-index:3; inset:0; overflow:hidden; pointer-events:none; contain:strict; }
#wish-petals i { position:absolute; left:var(--x); top:-5%; width:var(--s); height:calc(var(--s)*.68); border-radius:85% 16% 72% 26%; background:linear-gradient(145deg,#fff2f4 12%,#f4bdce 70%,#de98b0); animation:petal-drift var(--t) linear var(--d) infinite; }
#wish-petals i:nth-child(even) { background:linear-gradient(145deg,#fff1f1,#f6c6d3 70%,#df9eb1); }
@keyframes petal-drift {
  0% { transform:translate3d(0,-3vh,0) rotate(10deg); opacity:0; }
  15% { opacity:.82; }
  48% { transform:translate3d(var(--wind),46vh,0) rotate(105deg) scaleY(.63); }
  83% { opacity:.62; }
  100% { transform:translate3d(calc(var(--wind)*1.65),107vh,0) rotate(225deg); opacity:0; }
}
#paper-lift { position:fixed; left:calc(50% - 35px); top:57%; z-index:3; width:70px; height:88px; pointer-events:none; }
#paper-lift i { display:block; position:absolute; inset:0; background:repeating-linear-gradient(90deg,transparent 0 14px,#9b64278a 15px,transparent 16px),radial-gradient(ellipse at 50% 76%,#fff9be 5%,#ffc474 57%,#d98c55); border-radius:33% 33% 24% 24%; border-block:4px solid #c78851; box-shadow:0 0 28px #ffb25670; }
#paper-lift i::after { content:''; position:absolute; left:46%; top:100%; width:8px; height:17px; background:#e7c39c; }
body[data-paper-flight] :is(.quiet-lantern,#fallback) { visibility:hidden; }
@media(prefers-reduced-motion:reduce) { #wish-petals { display:none; } }
@media(min-width:700px) {
  .topbar { padding:24px 30px 0; } .garden-actions { bottom:30px; }
  #garden-menu { inset:78px 30px auto auto; margin:0; border-radius:20px; max-height:calc(100dvh - 98px); }
}
@media(pointer:coarse) { #wish-input { font-size:16px; } #panel { overscroll-behavior:contain; } }

/* A short dissolve replaces camera travel when the system requests less motion. */
@media(prefers-reduced-motion:reduce) { .gentle-entry.scene-ready #entry-still { transition:opacity 1.2s ease, visibility 0s linear 1.2s !important; } }
