.world-page{margin:0;background:#18372a}
.world{position:relative;isolation:isolate;height:100svh;height:100dvh;overflow:hidden;background:#17382a url('/assets/realm-heaven.webp') center/cover;color:#fff6df}
.garden-view{display:block;position:absolute;inset:0;width:100%;height:100%;touch-action:none;outline:none}
.garden-view:focus-visible{outline:2px solid #e4c37d;outline-offset:-2px}
.world-top{pointer-events:none;position:absolute;inset:0 0 auto;display:flex;align-items:start;justify-content:space-between;gap:.6rem;padding:.9rem max(.9rem,env(safe-area-inset-right)) 2.6rem max(.9rem,env(safe-area-inset-left));background:linear-gradient(#10281dc4,transparent)}
.world-heading{display:flex;align-items:center;gap:.64rem}
.world-heading h1{font-size:clamp(1.1rem,3.1vw,2.1rem);letter-spacing:0;margin:0;text-shadow:0 2px 12px #0a1d14}
.world-heading i{color:#f3cf82}
.world-heading p{margin:.16rem 0 0;font-size:clamp(.69rem,1.6vw,.9rem);text-shadow:0 2px 9px #0a1d14}
.world-monogram{display:grid;place-content:center;white-space:pre;background:#113329ba;width:2.65rem;height:2.65rem;border:1px solid #d4b575;border-radius:50%;font: .8rem Georgia,serif}
.world-menu{pointer-events:auto;display:flex;justify-content:flex-end;gap:.34rem;flex-wrap:wrap}
.world button{border-radius:2rem}
.world-menu :is(button,a),#world-action{font-size:.78rem;min-height:2.35rem;padding:.36rem .67rem;border:1px solid #ebd297a3;background:#09281fe6;color:#fff6df}
.world-menu :is(button,a):hover,#world-action:hover{background:#37613f}
.world-map{position:absolute;right:.95rem;bottom:1rem;background:#102d24dc;border:1px solid #d4b57580;border-radius:.7rem;padding:.35rem;pointer-events:none;display:grid;justify-items:center;width:7.8rem;font-size:.7rem}
.world-map canvas{width:100%;height:auto;border-radius:.45rem}
.world-caption{pointer-events:none;position:absolute;inset:auto 8.9rem 2.25rem;text-align:center;text-shadow:0 2px 6px #0a1f16}
.world-caption p{margin:.22rem auto;font-size:.88rem;color:#fff1c7}
.world-caption p:empty{display:none}
#world-action{pointer-events:auto;font-size:.98rem;background:#f9edce;color:#193c2e;min-height:2.65rem}
.walk-controls{position:absolute;bottom:.3rem;left:50%;transform:translateX(-50%);font-size:.76rem;color:#fff3d5;text-shadow:0 2px 6px #031910;text-align:center;white-space:nowrap;pointer-events:none}
.touch-help,.walk-stick{display:none}
.world-paper{border:1px solid #c3a35b;border-radius:1rem;background:#f9f7ef;color:#153e2e;padding:clamp(.85rem,3vw,2rem);max-height:90svh;width:min(92vw,39rem);overflow:auto;box-shadow:0 1rem 5rem #041a14cc}
.world-paper::backdrop{background:#071e18c5;backdrop-filter:blur(4px)}
.world-paper>form[method=dialog]{display:flex;justify-content:flex-end;margin:0 0 .45rem}
.world-paper h2{font-size:clamp(1.8rem,7vw,3.15rem)}
.world-paper figure{margin:.5rem 0 1rem}
.world-paper figure img{display:block;width:100%;max-height:48svh;object-fit:contain;background:#e9e3d2;border:clamp(.35rem,2vw,.85rem) solid #ede5ce;outline:1px solid #c3a35b}
.world-paper figcaption,#book-credit{font-family:Georgia,serif;margin:.7rem 0;font-style:italic}
.book-controls{display:flex;gap:.5rem}
.walk-fallback{position:absolute;bottom:1rem;padding:1rem;background:#11382c}
.world.portal-flash::after{content:"";position:absolute;z-index:3;inset:0;pointer-events:none;background:#fff4c5;animation:portal-flash .47s ease-out both}
@keyframes portal-flash{from{opacity:.75}to{opacity:0}}
@media(pointer:coarse){
  .walk-controls{display:none}.touch-help{display:block;white-space:normal;max-width:34vw}
  .walk-stick{display:block;position:absolute;left:.85rem;bottom:max(1rem,env(safe-area-inset-bottom));width:5rem;height:5rem;border:1px solid #f5df9a9e;border-radius:50%;background:#0a251c94;touch-action:none}
  .walk-stick span{display:block;position:absolute;inset:1.35rem;border:1px solid #f5df9ad9;border-radius:50%;background:#e7d1a2b0;pointer-events:none}
}
@media(max-width:650px){.world-map{right:.5rem;bottom:.7rem;width:4.8rem}.world-caption{inset:auto 5.4rem 4rem}.world-top{padding:.62rem .55rem 2rem}.world-heading{gap:.3rem}.world-monogram{display:none}.world-menu :is(button,a){min-height:2rem;padding:.25rem .45rem;font-size:.68rem}}

.garden-welcome {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  color: #fff9e9;
  pointer-events: none;
  background: #193a30;
  animation: welcome-safety-dismiss 10s both;
}
.garden-welcome::before, .garden-welcome::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
}
.garden-welcome::before {
  background: linear-gradient(180deg,#132d29a6,#183b2db8 58%,#102e25e8),
    url('/assets/realm-heaven.webp') center 55% / cover no-repeat;
}
.garden-welcome::after {
  inset: 48% -15% -8%;
  background: radial-gradient(ellipse at 45% 60%,#f9e9b83d,transparent 63%);
  animation: mist-drift 9s ease-in-out infinite alternate;
}
.garden-welcome-inner {
  display: grid;
  justify-items: center;
  width: min(100% - 2rem, 52rem);
  padding: 1.5rem 1rem;
  text-shadow: 0 2px 24px #172f26;
}
.welcome-seal {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: .17rem;
  width: 4.15rem;
  height: 4.15rem;
  border: 1px solid #efd394;
  border-radius: 50%;
  background: #163e34a8;
  color: #ffe4a4;
  font: 1.15rem Georgia, serif;
  box-shadow: 0 0 0 .28rem #f1d39129;
}
.welcome-names { margin-top: 1.7rem; }
.welcome-names span {
  display: block;
  color: #ffe8af;
  font-size: clamp(.7rem, 2.2vw, .9rem);
  letter-spacing: .21em;
  text-transform: uppercase;
}
.welcome-names strong {
  display: block;
  margin-top: .5rem;
  font: 400 clamp(2.5rem, 8.2vw, 6.7rem) / 1.06 Georgia, serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.welcome-names i { color: #ffe0a0; }
.welcome-rule {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 1.15rem 0;
  color: #f1d28e;
}
.welcome-rule::before, .welcome-rule::after {
  content: "";
  width: 2.8rem;
  height: 1px;
  background: #f1d28ebf;
}
.garden-welcome time { font: 1.05rem Georgia, serif; }
.welcome-loading {
  margin: .8rem 0 0;
  color: #fff0ce;
  font-size: .85rem;
  animation: welcome-pulse 1.45s ease-in-out infinite alternate;
}
@keyframes welcome-pulse { from { opacity: .7; } to { opacity: 1; } }
@keyframes welcome-safety-dismiss { 0%, 94% { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
.garden-welcome.welcome-interactive { animation: none; pointer-events: auto; }
.garden-welcome.welcome-leaving { animation: welcome-fade .45s ease-out both; pointer-events: none; }
.welcome-invitation {
  max-width: 27rem;
  margin: 1.35rem 0 .85rem;
  color: #fff6da;
  font: italic clamp(1.1rem, 3.4vw, 1.65rem) / 1.25 Georgia, serif;
}
.welcome-enter {
  min-height: 3rem;
  padding: .6rem 1.65rem;
  border: 1px solid #ffe5a6;
  border-radius: 3rem;
  background: linear-gradient(135deg, #fdf2ce, #d9b568);
  color: #18352a;
  box-shadow: 0 0 1.5rem #f3cc7566;
  font: 1.05rem Georgia, serif;
}
.welcome-enter:hover:not(:disabled) { background: #fff4cd; }
.welcome-enter:disabled { opacity: .62; }
@keyframes welcome-fade { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .garden-welcome::after, .welcome-loading { animation: none; }
  .garden-welcome.welcome-leaving { animation-duration: 1ms; }
}
.world-top { padding-top:max(.62rem, env(safe-area-inset-top)); }
.world-map { bottom:max(.7rem, env(safe-area-inset-bottom)); right:max(.5rem, env(safe-area-inset-right)); }
.walk-controls { bottom:max(.3rem, env(safe-area-inset-bottom)); }
.walk-stick { left:max(.85rem, env(safe-area-inset-left)); }
.world-paper { max-height:90dvh; }

.world-menu #skip-walk {
  background: #f8edce;
  color: #193c2e;
  border-color: #eac987;
}
.world-menu #skip-walk:hover { background: #fff7e1; }
.world-menu :is(button,a) { min-height: 2.75rem; }
.world .guide-compass {
  position: absolute;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .65rem;
  max-width: calc(100% - 2rem);
  padding: .36rem .92rem .36rem .4rem;
  border: 1px solid #ebd297a3;
  border-radius: 3rem;
  background: #112e24eb;
  color: #fff6df;
  pointer-events: none;
}
.guide-compass small, .guide-compass strong { display: block; }
.guide-compass small { color: #ead7a8; font-size: .69rem; }
.guide-compass strong { font-size: .88rem; }
.guide-bearing {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #18372a;
  background: #f3d590;
  font-size: 1.35rem;
  line-height: 1;
}
.garden-guide h3 { font-size: 1.12rem; margin: 1.1rem 0 .65rem; }
.guide-stops, .guide-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: .5rem;
}
.guide-settings { border-top: 1px solid #d6c7a7; padding-top: 1rem; margin: 1rem 0; }
.guide-stops button[aria-pressed="true"] { color: #17382a; background: #f1d99e; }
.guide-help { font-size: .9rem; }
.guide-touch { display: none; }
#clear-trail { margin-top: .55rem; }
#book-position { color: #385a48; font-size: .85rem; }
#world-book figure { touch-action: pan-y; }
.garden-static :is(.garden-view,.world-map,.walk-stick,.walk-controls,.world-caption,.guide-compass) { display: none; }
.garden-unavailable {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(90vw, 31rem);
  max-height: calc(100% - 7rem);
  overflow: auto;
  padding: clamp(1rem, 5vw, 2rem);
  border: 1px solid #d6ba81;
  border-radius: 1rem;
  background: #f9f4e6;
  color: #17382a;
  text-align: center;
  box-shadow: 0 1.25rem 4rem #0b211cb8;
}
.garden-unavailable h2 { font-size: clamp(1.65rem, 6vw, 2.65rem); }
.garden-unavailable div { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
#fallback-album { background: transparent; color: #17382a; }
@media (pointer: coarse) {
  .guide-touch { display: inline; }
  .guide-keyboard { display: none; }
}
@media (max-width: 420px) {
  .world-top { align-items: stretch; flex-direction: column; }
  .world-menu { justify-content: flex-start; }
  .world-menu :is(button,a) { font-size: .78rem; }
  .world .guide-compass { top: 6.5rem; }
  .garden-static .world-menu #skip-walk { display: none; }
}
@media (max-height: 430px) and (orientation: landscape) {
  .world .guide-compass { top: 3.8rem; }
  .garden-unavailable { top: 57%; max-height: calc(100% - 5rem); }
}
.gate-help { margin: .15rem 0 .45rem; color: #385a48; font-size: .9rem; line-height: 1.5; }
.code-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.code-actions button { font-size: .88rem; }
.welcome-direct {
  margin-top: .3rem;
  padding-inline: 1rem;
  background: transparent;
  color: #fff6db;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: .24em;
}
.welcome-direct:hover { background: #102e25aa; }
#flower-keepsake {
  display: table;
  margin: .45rem auto;
  padding: .32rem .68rem;
  border: 1px solid #ddc686a0;
  border-radius: 3rem;
  background: #112e24ef;
  color: #fff3d6;
  font-size: .79rem;
}
[data-motion="paused"] .garden-welcome::after,
[data-motion="paused"] .welcome-loading { animation: none; }
[data-motion="paused"] .garden-welcome.welcome-leaving { animation-duration: 1ms; }

.garden-welcome.intro-playing,
.garden-welcome.intro-finished { background: transparent; }
.garden-welcome.intro-playing::before,
.garden-welcome.intro-finished::before {
  background: linear-gradient(180deg, #102c2450, transparent 30%, transparent 51%, #09221cdd);
}
.garden-welcome.intro-playing::after,
.garden-welcome.intro-finished::after { opacity: .45; }
.garden-welcome:is(.intro-playing,.intro-finished) {
  align-items: end;
}
.garden-welcome:is(.intro-playing,.intro-finished) .garden-welcome-inner {
  padding: .8rem 1rem max(1rem, env(safe-area-inset-bottom));
}
.garden-welcome:is(.intro-playing,.intro-finished) :is(.welcome-seal,.welcome-rule) { display: none; }
.garden-welcome:is(.intro-playing,.intro-finished) .welcome-names { margin: 0 0 .35rem; }
.garden-welcome:is(.intro-playing,.intro-finished) .welcome-names strong { font-size: clamp(2rem, 7vw, 4rem); }
.garden-welcome:is(.intro-playing,.intro-finished) .welcome-invitation { margin: .45rem 0 .65rem; }
.welcome-skip {
  min-height: 2.75rem;
  color: #fff5db;
  background: #102d25;
  border: 1px solid #f3d59099;
  border-radius: 3rem;
  margin-top: .4rem;
}
.guide-extras { display: flex; flex-wrap: wrap; gap: .45rem; }
@media (max-height: 480px) and (orientation: landscape) {
  .garden-welcome:is(.intro-playing,.intro-finished) .garden-welcome-inner {
    width: min(45vw, 24rem);
    justify-self: start;
  }
}
.welcome-intro-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.welcome-sound {
  min-height: 2.75rem;
  color: #fff5db;
  background: #102d25;
  border: 1px solid #f3d59099;
  border-radius: 3rem;
  margin-top: .4rem;
}
@media (max-height: 360px) and (orientation: landscape) {
  .garden-welcome { overflow-y: auto; }
  .garden-welcome:is(.intro-playing,.intro-finished) .welcome-names strong { font-size: 1.65rem; }
  .garden-welcome:is(.intro-playing,.intro-finished) .welcome-invitation { display: none; }
}
.welcome-auto-entry { margin: .15rem 0; color: #fff3d6; font-size: .85rem; }
#journal-counts { font-weight: 650; color: #245842; }
#journal-hint { font-size: .9rem; }
#journal-entries { display: grid; gap: .7rem; }
#journal-entries article { padding: .75rem 1rem; border: 1px solid #cbb984; border-radius: .55rem; background: #f5edd8; }
#journal-entries article p { white-space: pre-wrap; overflow-wrap: anywhere; }
#journal-entries article h3 { margin: .3rem 0; }
