@font-face {
  font-family: Alice;
  src: url('/room103/alice-cyrillic.woff2?v=1') format('woff2');
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Alice;
  src: url('/room103/alice-latin.woff2?v=1') format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-2193;
}
:root { font-family: Alice, Georgia, serif; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: #070a18; }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #fff4bd; outline-offset: 6px; }
#scene {
  position: fixed; inset: 0; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 47% 46%, #293050, #050817 65%);
}
#space, .world, .landscape, #pollen, .finale { position: absolute; inset: 0; width: 100%; height: 100%; }
#space { display: block; pointer-events: none; }
.definitions { position: absolute; pointer-events: none; }
.world { transform-origin: center; }
.landscape {
  background: #5fcaf0 url('/room103/courtyard.webp?v=2') center 34% / cover no-repeat;
}
.world.mask-ready .landscape { clip-path: url(#outside); }
.portal {
  --rim: clamp(7px, 1.1vh, 13px);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(47vw, 24.8vh); aspect-ratio: 768 / 1783;
  perspective: 1100px;
}
.ground {
  position: absolute; left: -47%; bottom: -5%; width: 213%; height: 12%;
  border-radius: 50%; transform: rotate(-4deg);
  background: radial-gradient(ellipse, #3f4c1abb, #6c6b2f66 39%, transparent 71%);
  pointer-events: none;
}
.threshold {
  position: absolute; bottom: -2.4%; left: -8%; width: 116%; height: 3.8%;
  border-radius: 45% 37% 8% 9% / 65% 55% 18% 19%;
  border: 2px solid #52364b; background: linear-gradient(176deg,#ffe5a3 50%,#bc805b 52%);
  box-shadow: 1px 2px 0 #41502f; pointer-events: none;
}
.frame {
  position: absolute; inset: calc(-1 * var(--rim)); bottom: -2px;
  border: var(--rim) solid #9e5542;
  border-left-color: #df9567; border-top-color: #ffd99c; border-bottom-width: 2px;
  outline: clamp(2px, .28vh, 4px) solid #392638;
  box-shadow: inset 0 0 0 2px #3a2534, 4px 3px 0 #693947;
  pointer-events: none;
}
.frame::before {
  content: ''; position: absolute; left: calc(-1.7 * var(--rim)); right: calc(-1.7 * var(--rim));
  top: calc(-1.5 * var(--rim)); height: var(--rim); border: 2px solid #392638;
  background: linear-gradient(to bottom,#ffe3a5 47%,#d6875e 48%);
}
.leaf {
  appearance: none; position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0;
  background: transparent; transform-origin: left center;
}
.leaf img, .leaf-back {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  user-select: none; pointer-events: none;
}
.leaf-back {
  visibility: hidden; background: #923c39; border: 3px solid #301d2b;
  box-shadow: inset 3px 2px #d37058, inset -5px -2px #612c38;
}
.leaf-back::before {
  content: ''; position: absolute; inset: 8% 10%; border: 3px solid #59242c;
  box-shadow: inset 3px 4px #802e32, 2px 2px #ce6b54;
}
.leaf-back::after {
  content: ''; position: absolute; top: 60%; right: 8%; width: 12%; aspect-ratio: 1;
  border: 2px solid #422533; border-radius: 50%; background: #e4a74e; box-shadow: 2px 3px #683443;
}
@media (hover: hover) {
  .leaf:not(:disabled):hover img { filter: brightness(1.075); }
  .invite:hover { background-color: #ffe38a; }
}
.invite, .home {
  color: #fff7d8; border: 1px solid #efe0a5; border-radius: 99px;
  background: #214437ed; text-decoration: none;
  box-shadow: 0 2px 7px #23372345, inset 0 0 0 3px #ffffff12;
}
.invite {
  position: absolute; left: 50%; top: calc(100% + clamp(16px, 3.5vh, 38px));
  transform: translateX(-50%); padding: 10px 23px; white-space: nowrap;
  font: 750 clamp(16px, 2vh, 21px)/1.15 system-ui, sans-serif; color: #382339;
  background: #ffe9a7; border: 2px solid #392638; box-shadow: 2px 3px 0 #392638;
}
#pollen { pointer-events: none; overflow: hidden; }
#pollen i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff9ce;
  box-shadow: 0 0 5px 1px #fff4b6a6; animation: drift 6s ease-in-out infinite alternate;
}
@keyframes drift {
  from { opacity: .12; transform: translate(0, 2vh); }
  to { opacity: .8; transform: translate(2vw, -2vh); }
}
[data-phase="entering"] .world { will-change: transform; }
[data-phase="entering"] .leaf {
  transform: rotateY(-108deg); transition: transform 2.4s cubic-bezier(.34,0,.18,1);
}
/* Switch faces as the leaf crosses 90 degrees. A flat rotating button also works on WebKit. */
[data-phase="entering"] .leaf-back {
  animation: show-back 2.4s steps(1, end) both;
}
@keyframes show-back {
  0% { visibility: hidden; }
  53.4%, 100% { visibility: visible; }
}
[data-phase="entering"] :is(.invite, #pollen) { opacity: 0; transition: opacity .35s; pointer-events: none; }
.playback {
  display: grid; place-items: center; position: absolute;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 46px; height: 46px; padding: 0; border: 1px solid #eedbb58c; color: #fff4da;
  background: #0d1026bf; border-radius: 50%;
}
#notice {
  position: absolute; right: max(20px, env(safe-area-inset-right));
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 56px); max-width: min(22rem, 85vw);
  padding: .6em .9em; color: #fff8df; background: #141629ed; border-radius: 12px;
}
#notice:empty { display: none; }
.finale {
  display: grid; place-items: center; padding: max(22px, env(safe-area-inset-top)) 24px;
  background: #030407; color: #fff4dc; text-align: center;
}
.ending { width: min(100%, 780px); }
.ornament { color: #e5c888; font-size: 34px; }
.ornament::before, .ornament::after {
  content: ''; display: inline-block; width: 48px; height: 1px;
  margin: 0 12px .32em; background: linear-gradient(to right, transparent, #bd995c);
}
.ornament::after { transform: rotate(180deg); }
h1 { margin: 25px 0 34px; font-size: clamp(32px, 5.4vw, 73px); line-height: 1.1; font-weight: 400; text-wrap: balance; }
h1 span { display: block; font-size: .62em; line-height: 1.32; margin-top: .55em; }
h1:focus { outline: none; }
.home { display: inline-flex; align-items: center; gap: 16px; padding: 12px 24px; background: #211e1b; font-size: 18px; }
.home:hover { background: #373026; }
noscript { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; color: #fff; background: #203729; padding: 14px; }
@media (max-aspect-ratio: 3/4) {
  .landscape { background-position: 48% center; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .invite { padding: 6px 18px; }
  .ornament { font-size: 21px; }
  h1 { margin: 9px 0 16px; font-size: clamp(28px, 8vh, 42px); }
}
@media (prefers-reduced-motion: reduce) {
  #pollen { display: none; }
  .leaf, [data-phase="entering"] .leaf { transition-duration: .15s; }
  [data-phase="entering"] .leaf-back { animation-duration: .15s; }
}
