/* A quiet prologue, followed by the same live world seen through a glass lens. */
html[data-entry="waiting"], html[data-entry="entering"] { background: #fff8ed; }
.entrance {
  --entrance-x: 0;
  --entrance-y: 0;
  --glass-light-x: 50%;
  --glass-light-y: 35%;
  position: fixed;
  inset: 0;
  z-index: 180;
  color: #315d4b;
  overflow: hidden;
  isolation: isolate;
  outline: none;
  height: 100svh;
  min-height: 440px;
}
.entrance-curtain { position: absolute; inset: 0; background: #fff8ed; z-index: -2; transition: opacity .8s; }
.entrance.has-world.is-ready .entrance-curtain { opacity: 0; }
.entrance-top, .entrance-foot { position: absolute; left: 4.5%; right: 4.5%; display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: 1.8px; color: #607563; }
.entrance-top { top: max(30px, env(safe-area-inset-top)); }
.entrance-top svg { position: absolute; left: calc(50% - 10px); }
.entrance-foot { bottom: max(27px, env(safe-area-inset-bottom)); font-size: 8px; letter-spacing: 1.5px; }
.entrance-brand { position: absolute; top: 42%; left: 50%; width: min(94%, 780px); text-align: center; transform: translate(calc(-50% + var(--entrance-x) * -7px), calc(-50% + var(--entrance-y) * -5px)); }
.entrance-overline { font-size: 8px; letter-spacing: 3.6px; display: block; margin-bottom: 17px; }
.entrance-brand h1 { font-family: var(--serif); font-size: clamp(76px, 9.4vw, 142px); font-weight: 400; line-height: .95; letter-spacing: -.065em; margin: 0; color: #244f3f; text-shadow: 0 2px 30px #fff8edbb; }
.entrance-brand em { font-weight: 400; }
.entrance-subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 28px); margin: 18px 0 0; color: #3c6554; }
.entrance-description { margin: 14px 0 0; font-size: 11px; letter-spacing: 3px; color: #415e4c; }
.entrance-actions { position: absolute; top: 72%; left: 50%; width: 300px; transform: translateX(-50%); text-align: center; }
.entrance-status { height: 24px; font-size: 10px; letter-spacing: 1.1px; margin-bottom: 12px; color: #647565; display: flex; align-items: center; justify-content: center; gap: 7px; }
.entrance-status-mark { display: inline-block; font-size: 16px; }
.entrance:not(.is-ready) .entrance-status-mark { animation: entrance-orbit 3s linear infinite; }
.liquid-glass {
  isolation: isolate;
  position: relative;
  border: 1px solid #91a78e9e;
  border-radius: 999px;
  background: radial-gradient(ellipse at var(--glass-light-x, 50%) var(--glass-light-y, 30%), #ffffffb0, #ffffff18 65%), linear-gradient(145deg, #ffffff66, #b8dcc557 45%, #c9b6e439 80%, #e9cf9a55);
  backdrop-filter: blur(12px) saturate(1.45);
  -webkit-backdrop-filter: blur(12px) saturate(1.45);
  box-shadow: inset 0 2px 2px #ffffffd9, inset 0 -3px 7px #69826829, 0 8px 24px #37554110, 0 1px 2px #52674619;
}
.liquid-glass::before { content: ""; position: absolute; inset: 3px; border: 1px solid #ffffff73; border-radius: inherit; z-index: -1; pointer-events: none; }
.liquid-glass::after { content: ""; position: absolute; inset: 1px 11% auto; height: 45%; background: linear-gradient(#fff9, #fff0); border-radius: 50%; filter: blur(3px); z-index: -1; pointer-events: none; }
.entrance-sound { width: 236px; min-height: 57px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 10px 21px; color: #2c5844; transition: transform .6s cubic-bezier(.16,1,.3,1), box-shadow .4s, opacity .3s; }
.entrance-sound > span:nth-child(2) { display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; letter-spacing: 2.4px; }
.entrance-sound small { font-size: 7px; letter-spacing: 1.5px; margin-top: 1px; opacity: .65; }
.entrance-button-arrow { margin-left: 10px; font-size: 17px; }
.entrance-sound:hover:not(:disabled) { transform: translateY(-3px) scale(1.015); box-shadow: inset 0 2px 2px #fff, inset 0 -3px 8px #7ba58239, 0 10px 32px #5e907329; }
.entrance-sound:active:not(:disabled) { transform: translateY(0) scale(.985); }
.entrance button:focus-visible { outline: 2px solid #486e57; outline-offset: 5px; }
.entrance button:disabled { cursor: wait; opacity: .45; }
.entrance-silent { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px auto 0; padding: 4px 12px; font-size: 11px; letter-spacing: 1.8px; border: 0; background: transparent; color: #526b58; text-decoration: underline; text-decoration-color: #8c9e8870; text-underline-offset: 5px; }
.entrance-silent:hover:not(:disabled) { color: #244f3f; text-decoration-color: currentColor; }
.entrance-sound-note { font-size: 9px; letter-spacing: 1.1px; color: #657461; margin: 3px 0 0; }
.entrance-fallback-orb { position: absolute; width: 290px; height: 290px; left: 50%; top: 42%; transform: translate(calc(-50% + var(--entrance-x) * 12px), calc(-50% + var(--entrance-y) * 9px)); border-radius: 49% 51% 48% 52%; border: 1px solid #c9d0b558; background: radial-gradient(ellipse at var(--glass-light-x) var(--glass-light-y), #fffdf6, #b8dcc51c 40%, #c9b6e425 68%, #e9cf9a45); box-shadow: inset 5px 8px 15px #fff, inset -9px -12px 20px #b7caad30, 0 22px 55px #8a9b7c12; z-index: -1; }
.entrance-skip { position: absolute; right: 4%; bottom: 30px; border: 1px solid #879b7e50; border-radius: 30px; padding: 9px 16px; background: #fff8edbd; backdrop-filter: blur(8px); font-size: 11px; color: #315d4b; }
.entrance-entering .entrance-brand { animation: entrance-brand-out .9s cubic-bezier(.7,0,.2,1) both; }
.entrance-entering .entrance-brand h1 { animation: entrance-brand-spectrum .9s ease both; }
.entrance-entering .entrance-actions, .entrance-entering .entrance-top, .entrance-entering .entrance-foot { animation: entrance-ink-out .5s ease both; pointer-events: none; }
.entrance-entering .entrance-curtain { opacity: 0; transition-duration: 1.3s; }
.entrance-entering .entrance-fallback-orb { animation: entrance-orb-out 2.8s cubic-bezier(.65,0,.15,1) both; }
html[data-entry="waiting"] .site-shell .site-header,
html[data-entry="waiting"] .site-shell .ambient-controls,
html[data-entry="waiting"] .site-shell .world-reading-light,
html[data-entry="waiting"] .site-shell .world-title,
html[data-entry="waiting"] .site-shell .world-letter,
html[data-entry="waiting"] .site-shell .world-coordinate,
html[data-entry="waiting"] .site-shell .world-controls,
html[data-entry="waiting"] .site-shell .hero-bottom,
html[data-entry="waiting"] .site-shell .world-story,
html[data-entry="waiting"] .site-shell .skip-intro,
html[data-entry="waiting"] .site-shell .site-footer,
html[data-entry="waiting"] .site-shell .cursor-aura { opacity: 0; visibility: hidden; animation-play-state: paused; }
html[data-entry="waiting"] .site-header { background: #fff8ed; }
html[data-entry="waiting"] .site-shell { background: #fff8ed; }
/* The scene membrane leads. Type, paper and glass settle in its wake. */
.entrance-optics { position: absolute; pointer-events: none; overflow: hidden; }
.entrance-letter { display: inline-block; transform-origin: 50% 85%; }
html[data-entry="entering"] .world-title { animation: none; }
html[data-entry="entering"] .hero-title { filter: url('#entrance-refraction'); }
html[data-entry="entering"] .entrance-letter {
  animation: entrance-letter-in 1.22s calc(1.04s + var(--letter) * .032s) cubic-bezier(.16,1,.3,1) both;
}
html[data-entry="entering"] .site-header {
  transform-origin: 50% 0;
  animation: entrance-header-in 1.3s 1.1s cubic-bezier(.16,1,.3,1) both;
}
html[data-entry="entering"] .hero-actions { animation: entrance-object-in 1.08s 1.35s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .love-clock { animation: entrance-object-in 1.12s 1.5s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .world-letter { animation: entrance-letterbox-in 1.12s 1.57s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .hero-bottom,
html[data-entry="entering"] .ambient-controls { animation: entrance-object-in .8s 1.85s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .world-reading-light { animation: entrance-surface-in 1.1s 1.05s both; }
html[data-entry="entering"] main:not(.route-home) .page-heading,
html[data-entry="entering"] .login-paper,
html[data-entry="entering"] .private-garden { animation: entrance-object-in 1.4s 1.05s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .login-story,
html[data-entry="entering"] main:not(.route-home) .scene-panel { animation: entrance-object-in 1.55s .8s cubic-bezier(.16,1,.3,1) both; }
html[data-entry="entering"] .site-footer { animation: entrance-surface-in .75s 1.9s both; }
html[data-entry="entering"] .skip-intro { visibility: hidden; }
.entrance-edge-light {
  position: fixed; inset: 0; z-index: 47; pointer-events: none;
  background: radial-gradient(ellipse at 0 20%,#ffab8e45,transparent 40%),radial-gradient(ellipse at 100% 85%,#c5eaf74a,transparent 42%);
  box-shadow: inset 0 0 70px #ffe6c72b;
  mix-blend-mode: screen; animation: entrance-edge-wake 2.8s ease both;
}
/* Selected controls share the entrance's glass edge and translucent highlights. */
.site-header { background: #faf8f0ce; backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); box-shadow: inset 0 1px #ffffffb0, 0 4px 24px #315d4b04; }
.viewpoint-tabs, .ambient-controls { background: linear-gradient(135deg, #fffdf3cc, #dce8d4a6 60%, #f1e5eca6); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: inset 0 1px 2px #fff, inset 0 -1px 4px #8c9e7d22, 0 7px 30px #314b3710; }
html[data-night="true"] .site-header { background: #172f2bd9; box-shadow: inset 0 1px #e7f4d713; }
html[data-night="true"] .viewpoint-tabs, html[data-night="true"] .ambient-controls { background: linear-gradient(135deg, #1f3d35e0, #334443cc); box-shadow: inset 0 1px #e7f4d724, 0 8px 26px #03151120; }
@keyframes entrance-brand-out {
  0% { opacity:1; filter:blur(0); }
  25% { opacity:1; transform:translate(-50%,-50%) scale(.96,.91); }
  100% { opacity:0; filter:blur(10px); transform:translate(-50%,-67%) scale(1.14,.8); }
}
@keyframes entrance-brand-spectrum {
  0%,100% { text-shadow:0 0 transparent; }
  45% { text-shadow:6px 0 1px #e1887880,-4px 0 1px #96cbdc80; }
}
@keyframes entrance-ink-out { to { opacity: 0; filter: blur(3px); } }
@keyframes entrance-surface-in { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: blur(0); } }
@keyframes entrance-letter-in {
  0% { opacity:0; transform:perspective(700px) translate3d(14px,62px,-55px) rotateX(-42deg) skewX(-9deg) scale(.91,1.25); filter:blur(4px); }
  55% { opacity:1; }
  100% { opacity:1; transform:none; filter:blur(0); }
}
@keyframes entrance-object-in {
  0% { opacity:0; transform:perspective(850px) translate3d(0,32px,-60px) rotateX(12deg) skewX(-3deg) scale(.94,1.08); filter:url('#entrance-refraction') blur(4px); }
  55% { opacity:1; }
  100% { opacity:1; transform:none; filter:none; }
}
@keyframes entrance-header-in {
  0% { opacity:0; transform:perspective(900px) translateY(-22px) rotateX(-22deg) scaleX(1.025); filter:url('#entrance-refraction') blur(4px); }
  100% { opacity:1; transform:none; filter:none; }
}
@keyframes entrance-letterbox-in {
  0% { opacity:0; transform:perspective(800px) translate3d(35px,30px,-80px) rotateY(-18deg) rotateZ(5deg); filter:url('#entrance-refraction') blur(5px); }
  65% { opacity:1; }
  100% { opacity:1; transform:none; filter:none; }
}
@keyframes entrance-edge-wake { 0%,22% { opacity:0; } 48% { opacity:.7; } 100% { opacity:0; } }
@keyframes entrance-orb-out {
  0% { transform:translate(-50%,-50%) scale(1); opacity:1; }
  14% { transform:translate(-50%,-50%) scale(.93); opacity:1; }
  72%,100% { transform:translate(-50%,-50%) scale(8); opacity:0; }
}
@keyframes entrance-orbit { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .entrance-top { top: max(23px, env(safe-area-inset-top)); font-size: 7px; letter-spacing: 1px; }
  .entrance-top > span:last-child { display: none; }
  .entrance-top svg { left: auto; right: 0; }
  .entrance-brand h1 { font-size: clamp(76px, 19vw, 110px); }
  .entrance-overline { font-size: 7px; letter-spacing: 2px; margin-bottom: 18px; }
  .entrance-description { font-size: 10px; letter-spacing: 2px; }
  .entrance-subtitle { margin-top: 15px; }
  .entrance-actions { top: auto; bottom: max(76px, calc(env(safe-area-inset-bottom) + 50px)); }
  .entrance-status { font-size: 9px; margin-bottom: 10px; }
  .entrance-foot { font-size: 6px; letter-spacing: 1px; bottom: 23px; }
  .entrance-fallback-orb { width: 230px; height: 230px; }
}
@media (max-height: 650px) {
  .entrance-brand { top: 34%; }
  .entrance-brand h1 { font-size: 76px; }
  .entrance-description { display: none; }
  .entrance-actions { top: auto; bottom: 43px; }
  .entrance-status { margin-bottom: 6px; }
  .entrance-top, .entrance-foot { font-size: 6px; }
  .entrance-sound { min-height: 48px; }
  .entrance-sound-note { display: none; }
  .entrance-silent { margin-top: 4px; }
}
@media (max-height: 440px) {
  .entrance { min-height: 0; }
  .entrance-brand { left: 28%; top: 47%; width: 48%; }
  .entrance-brand h1 { font-size: clamp(48px, 8vw, 76px); }
  .entrance-overline { font-size: 6px; letter-spacing: 1.2px; margin-bottom: 10px; }
  .entrance-subtitle { font-size: 18px; margin-top: 12px; }
  .entrance-actions { left: 75%; top: 36%; bottom: auto; width: 46%; }
  .entrance-sound { width: min(220px, 90%); }
  .entrance-status { font-size: 8px; letter-spacing: 0; }
  .entrance-foot { bottom: 14px; }
}
html[data-quiet="true"] .entrance *, html[data-quiet="true"][data-entry="entering"] .site-shell * { animation-duration: .15s !important; animation-delay: 0s !important; transition-duration: .15s !important; }
html[data-quiet="true"] .entrance-edge-light { display:none; }
html[data-quiet="true"][data-entry="entering"] .site-shell * { filter:none !important; transform:none !important; }
@media (prefers-reduced-motion: reduce) {
  .entrance *, html[data-entry="entering"] .site-shell * { animation-duration: .15s !important; animation-delay: 0s !important; transition-duration: .15s !important; }
  .entrance-edge-light { display:none; }
  html[data-entry="entering"] .site-shell * { filter:none !important; transform:none !important; }
}

/* Shared liquid response, transparent and non-interactive over every scene. */
.fluid-backdrop { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 46; contain: strict; }
.fluid-backdrop[data-layer="entry"] { z-index: 181; }
.entrance-brand { user-select: none; }
.entrance-brand h1 { font-size: clamp(76px, 8.4vw, 126px); }
.entrance-actions { top: auto; bottom: 9%; }
.entrance-status { font-size: 8px; letter-spacing: 2.5px; }
.entrance-sound { min-height: 49px; width: 218px; }
@media(max-width:760px){.entrance-brand h1{font-size:clamp(68px,20vw,96px)}.entrance-actions{bottom:10%}}
@media(max-height:440px){.entrance-brand h1{font-size:60px}.entrance-actions{top:35%;bottom:auto}}
