:root {
  color-scheme: dark;
  --ink: #fff5ff;
  --muted: #efe1fa;
  --peach: #ffdcc4;
  --lavender: #ceb6fa;
  --focus: #ffe0c7;
  --ui: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #191634; }
body { font: 400 16px/1.5 var(--ui); color: var(--ink); }
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { border: 0; padding: 0; color: inherit; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .38; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}
a { color: inherit; }
.symbols, .sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}
.icon {
  width: 23px; height: 23px; display: block; fill: none; stroke: currentColor;
  stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round;
}

.experience {
  position: relative; isolation: isolate; overflow: hidden; width: 100%;
  height: 100vh; height: 100svh; min-height: 350px; touch-action: pan-x pinch-zoom;
  --px: 0; --py: 0; --night: 0; --room-x: 0px; --room-y: 0px;
  --room-scale: 1.05; --room-roll: 0deg;
}
.room, .room-light, .dust, .vignette, .stage { position: absolute; inset: 0; width: 100%; height: 100%; }
.room {
  background: #574b87 url("media/sunset-study.webp") center 55% / cover no-repeat;
  transform: translate3d(calc(var(--room-x) + var(--px) * -13px), calc(var(--room-y) + var(--py) * -9px), 0)
    rotate(var(--room-roll)) scale(var(--room-scale));
  will-change: transform;
}
.room::after {
  content: ""; position: absolute; inset: 0;
  background: url("media/moonlit-study.webp") center 55% / cover no-repeat;
  opacity: clamp(0, (var(--night) - .35) * 1.7, 1);
}
.room-light {
  pointer-events: none;
  background: radial-gradient(ellipse at 56% 55%, #6153b055 0%, transparent 65%),
    linear-gradient(130deg, #140c39a6, #36246a44 51%, #11102cbb);
  opacity: calc(.16 + var(--night) * .44);
}
.dust { z-index: 1; pointer-events: none; }
.vignette {
  z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 52%, transparent 32%, #1711321c 61%, #130e2f95 100%),
    linear-gradient(0deg, #171231bf 0%, #1d17343d 16%, transparent 46%, #1c153453 78%, #21163870 100%);
}
.stage { z-index: 3; perspective: 1120px; perspective-origin: 50% 55%; pointer-events: none; }
.chapter {
  position: absolute; inset: 0; opacity: var(--visibility, 0);
  transform: translate3d(var(--shot-x, 0), var(--shot-y, 0), var(--shot-z, 0))
    rotateY(var(--shot-turn, 0deg)) rotateZ(var(--shot-roll, 0deg));
  transform-style: preserve-3d; visibility: hidden; pointer-events: none;
}
.welcome { --visibility: 1; }
.chapter.is-current, .chapter.is-transiting { visibility: visible; }
.chapter.is-current :is(button, input, a) { pointer-events: auto; }
.scene-art {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 8px), 0);
}
h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.35vw, 4.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .055em;
  text-shadow: 0 2px 29px #241643b8, 0 1px 9px #191130b3;
}

.wordmark {
  position: absolute; left: 50%; top: clamp(48px, 9.4%, 120px); z-index: 3;
  text-align: center; width: max-content; max-width: 95%;
  transform: translate3d(calc(-50% + var(--px) * -5px), calc(var(--py) * -4px), 18px);
  color: #fff6ed; text-shadow: 0 4px 26px #23154d91, 0 1px 10px #2a214f7c;
}
.wordmark-seal { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 5px; }
.wordmark-seal .icon { width: 32px; height: 32px; color: var(--peach); filter: drop-shadow(0 0 8px #ffdac5ad); }
.wordmark-seal span { width: clamp(28px, 5vw, 78px); height: 1px; background: linear-gradient(90deg, transparent, #ffe1d4bf); }
.wordmark-seal span:last-child { transform: scaleX(-1); }
.wordmark h1 {
  font: 400 clamp(4.2rem, 9.7vw, 10.8rem)/.9 var(--serif);
  letter-spacing: -.05em; white-space: nowrap;
}
.wordmark h1 em { font-weight: 400; margin-left: .035em; }
.wordmark p { font-size: clamp(.83rem, 1.1vw, 1.05rem); margin-top: 18px; padding-left: .43em; letter-spacing: .43em; }

.pet-place {
  --dx: 0%; --dy: 0%; --size: 1; --tint: 0deg; --z: 0px; --drift: 0s;
  --w: min(34vw, 48vh, 540px); --x: 50%; --y: 77%;
  position: absolute; left: calc(var(--x) + var(--dx)); top: calc(var(--y) + var(--dy)); width: var(--w);
  transform: translate3d(-50%, -100%, var(--z)) scale(var(--size));
  transform-origin: bottom center;
}
.pet {
  position: relative; isolation: isolate; display: block; width: 100%;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  animation: breathe 4.6s ease-in-out infinite; animation-delay: var(--drift);
  transform-origin: 50% 93%;
}
.pet:active, .pet-place.is-dragging .pet { cursor: grabbing; }
.pet-image {
  width: 100%; height: auto; display: block; position: relative;
  filter: hue-rotate(var(--tint)) drop-shadow(0 12px 12px #21173d50);
  transition: filter 270ms, transform 260ms cubic-bezier(.18,.75,.26,1.5);
  transform-origin: 50% 92%;
}
.pet:is(:hover, :focus-visible) .pet-image {
  transform: scale(1.027) rotate(-1.3deg);
  filter: hue-rotate(var(--tint)) drop-shadow(0 0 11px #ffd1ed75) drop-shadow(0 12px 12px #21173d55);
}
.pet-shadow {
  position: absolute; z-index: -1; inset: auto 6% -3% 6%; height: 12%;
  background: radial-gradient(ellipse, #20172c9c, transparent 69%); filter: blur(5px);
}
.pet-reflection {
  position: absolute; left: 0; top: 100%; width: 100%; height: auto;
  pointer-events: none; z-index: -2; transform-origin: center top;
  transform: scaleY(-.31); opacity: .21; filter: hue-rotate(var(--tint)) blur(2px);
  mask-image: linear-gradient(to top, #000, transparent 66%);
}
.pet-place.is-dragging { z-index: 10; }
.pet-place.is-dragging .pet { animation-play-state: paused; }
.pet-place.is-dragging .pet-image { transform: scale(1.045) rotate(4deg); }
.pet.is-reacting .pet-image { animation: pet-hop 690ms cubic-bezier(.22,.7,.34,1); }
.pet.is-reacting .pet-shadow { animation: shadow-hop 690ms ease; }
.pet.is-talking .pet-image { animation: talking 680ms ease-in-out infinite; }
.pet-spark {
  position: absolute; left: 55%; top: 16%; color: #ffe4bf;
  filter: drop-shadow(0 0 9px #fff0bb); pointer-events: none;
  animation: pet-spark 820ms cubic-bezier(.14,.56,.21,1) both;
}
.pet-spark .icon { width: 25px; height: 25px; fill: currentColor; stroke-width: 0; }
.pet-welcome-a { --x: 29.3%; --y: 77%; --w: min(34vw, 49vh, 565px); --z: 14px; --drift: -.5s; }
.pet-welcome-c { --x: 50%; --y: 84.5%; --w: min(22vw, 35vh, 340px); --z: 33px; --drift: -3.4s; }
.pet-welcome-b { --x: 73.1%; --y: 75.3%; --w: min(29vw, 42vh, 468px); --z: 9px; --drift: -2s; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.007, 1.015); }
}
@keyframes pet-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  14% { transform: translateY(2%) scale(1.055, .95); }
  43% { transform: translateY(-11%) rotate(-3deg) scale(.97, 1.05); }
  72% { transform: translateY(0) scale(1.04, .97); }
}
@keyframes shadow-hop { 46% { opacity: .3; transform: scale(.74); } }
@keyframes talking {
  0%, 100% { transform: rotate(-.5deg) scale(1); }
  50% { transform: translateY(-2px) rotate(.7deg) scale(1.018, .994); }
}
@keyframes pet-spark {
  from { opacity: 0; transform: translate(-10px, 4px) scale(.24); }
  26% { opacity: 1; }
  to { opacity: 0; transform: translate(37px, -64px) scale(.58); }
}

.orbit {
  pointer-events: none; position: absolute; border-radius: 50%;
  border: 1px solid #f7dafe77;
  transform: translate(-50%, -50%) rotate(var(--tilt, -10deg)) translateZ(var(--depth, 0px));
  box-shadow: inset 0 0 12px #c5a4ff39, 0 0 15px #c9a7ff63;
}
.orbit-back, .orbit-front, .orbit-fine { left: 50%; top: 70%; width: min(79vw, 1470px); height: 24%; --tilt: -7deg; }
.orbit-back { border-color: #ffdec097; clip-path: inset(0 0 45%); }
.orbit-front {
  --depth: 30px; mask-image: linear-gradient(transparent 36%, #000 74%);
  border-color: transparent transparent #ffdbb0e8 #ffd1ad4f;
  border-width: 1.5px;
  box-shadow: 0 5px 28px -9px #f6bfffd9, inset 0 -12px 27px -23px #fff1daee;
}
.orbit-fine {
  --tilt: 7deg; --depth: 44px; width: min(82vw, 1460px); top: 69%; height: 22%;
  opacity: .67; border-color: transparent #e2ccff91 #e2ccffbf transparent;
}
.star {
  position: absolute; width: var(--star-size, 17px); height: var(--star-size, 17px);
  color: #ffe7c9; filter: drop-shadow(0 0 8px #ffdcaf);
  animation: glimmer 3s ease-in-out infinite alternate; pointer-events: none;
}
.star svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.star-a { left: 16.2%; top: 65%; }
.star-b { left: 82.5%; top: 49%; animation-delay: -1.6s; }
.star-c { left: 60.8%; top: 77.5%; --star-size: 12px; animation-delay: -.5s; }
@keyframes glimmer { to { opacity: .36; transform: scale(.68); } }

.portal {
  position: absolute; width: clamp(70px, 7.15vw, 120px); height: clamp(70px, 7.15vw, 120px);
  top: 44%; left: 50%; border-radius: 48% 52% 51% 49%;
  transform: translate3d(calc(-50% + var(--px) * 17px), calc(-50% + var(--py) * 11px), 32px);
  display: flex; align-items: center; justify-content: center;
}
.portal-inner {
  width: 87%; height: 87%; display: flex; align-items: center; justify-content: center; border-radius: inherit;
  background: radial-gradient(circle at 37% 34%, #fff1e683, #e4caff44 45%, #bca5ff55 75%, #f7d2ff63);
  border: 1px solid #fff1edb8; box-shadow: inset 0 0 19px #fff4ff51, 0 0 31px #ebc1ffb5, 0 6px 35px #38215944;
  animation: portal-hover 5.3s ease-in-out infinite;
  transition: background-color 180ms, box-shadow 240ms;
  backdrop-filter: blur(5px);
}
.portal .icon { width: 40%; height: 40%; color: #fff0dc; fill: #ffe6cc8a; filter: drop-shadow(0 0 9px #fff0cf); }
.portal:hover .portal-inner { background-color: #f6d5e96e; box-shadow: inset 0 0 32px #fff4ff71, 0 0 46px #ebc1ffdb; }
@keyframes portal-hover { 50% { transform: translateY(-9px) rotate(10deg); } }

.scene-index {
  position: absolute; z-index: 8; right: max(20px, 2.4vw, env(safe-area-inset-right)); top: 50%;
  transform: translateY(-50%); display: grid; justify-items: end;
}
.scene-mark {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  color: #f7dfffd6; border-radius: 50%;
}
.scene-mark .icon { width: 9px; height: 9px; fill: currentColor; stroke: none; transition: transform 240ms, color 240ms; }
.scene-mark[aria-current] .icon { transform: scale(1.75); color: #ffe2ba; filter: drop-shadow(0 0 7px #ffd5a5); }
.scene-mark span {
  position: absolute; right: 39px; font-size: .82rem; white-space: nowrap; opacity: 0;
  transform: translateX(4px); transition: transform 180ms, opacity 180ms;
  background: #2a2149ed; border-radius: 18px; padding: 3px 9px; pointer-events: none;
}
.scene-mark:is(:hover, :focus-visible) span { opacity: 1; transform: none; }
.scroll-cue {
  position: absolute; z-index: 8; left: 50%; bottom: max(20px, 3.05vh, env(safe-area-inset-bottom));
  padding: 5px 19px; min-height: 44px; transform: translateX(-50%);
  display: grid; place-items: center; gap: 2px; font-size: .8rem; letter-spacing: .16em;
  border-radius: 32px; text-shadow: 0 1px 6px #130d2b, 0 1px 14px #130d2b;
}
.scroll-cue .icon { width: 19px; height: 19px; animation: beckon 2.1s ease-in-out infinite; }
.scroll-cue:hover { color: var(--peach); }
@keyframes beckon { 50% { transform: translateY(4px); } }

.orbit-chat { left: 29%; top: 77%; width: 43%; height: 11%; opacity: .66; }
.pet-chat { --x: 29%; --y: 83%; --w: min(43vw, 61vh, 650px); --z: 20px; --drift: -1s; }
.chat-content {
  position: absolute; left: 52%; top: 20%; z-index: 2; width: min(36vw, 550px);
  transform: translate3d(calc(var(--px) * 16px), calc(var(--py) * 11px), 32px);
}
.chat-content h2 { margin: 0 0 clamp(18px, 3vh, 34px) 8px; }
.chat-glass {
  position: relative; isolation: isolate; padding: clamp(15px, 2vw, 26px);
  border: 1px solid #f5e0ff9e; border-radius: 40px 46px 40px 16px;
  background: linear-gradient(144deg, #62517d98, #322751c9);
  box-shadow: inset 0 0 24px #f5cbff25, 0 16px 48px #27144961, 0 0 32px #d9b4ff48;
  backdrop-filter: blur(16px);
}
.chat-glass::after {
  content: ""; position: absolute; z-index: -1; left: -24px; bottom: 42px;
  width: 25px; height: 27px; border-radius: 0 0 0 7px;
  background: linear-gradient(142deg, #ba9bd4a3, #5b4780d1 71%);
  clip-path: polygon(100% 0, 100% 79%, 0 100%);
}
.demo-label { color: var(--muted); font-size: .79rem; letter-spacing: .07em; margin: 1px 4px 12px; }
.demo-label span { display: inline-block; margin: 0 8px 2px 0; background: var(--peach); width: 5px; height: 5px; transform: rotate(45deg); box-shadow: 0 0 7px var(--peach); }
.chat-log {
  position: relative; overflow: hidden; height: clamp(184px, 31vh, 300px);
  mask-image: linear-gradient(transparent, #0005 14%, #000 42%);
}
.chat-track {
  position: absolute; inset: auto 2px 4px; display: flex; flex-direction: column; gap: 11px;
}
.message {
  width: fit-content; max-width: 88%; color: #fff8ff;
  padding: 10px 15px; border-radius: 19px 19px 19px 6px; background: #d9c2fa38;
  font-size: .94rem; overflow-wrap: anywhere; opacity: var(--message-opacity, 1);
  transition: opacity 700ms ease; animation: message-arrive 650ms ease-out;
}
.message.mine { align-self: flex-end; border-radius: 19px 19px 6px 19px; background: #b389bf52; }
@keyframes message-arrive { from { opacity: 0; } }
.icon-control {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%; transition: background-color 200ms, color 200ms, transform 220ms;
}
.icon-control:hover:not(:disabled) { background: #ebceff23; color: var(--peach); transform: translateY(-2px); }
.icon-control:active:not(:disabled) { transform: scale(.91); }

.pet-voice { --x: 70%; --y: 83%; --w: min(42vw, 54vh, 590px); --z: 19px; --drift: -1.25s; }
.orbit-voice { left: 69.5%; top: 78%; width: min(55vw, 960px); height: 16%; --tilt: -12deg; }
.voice-content { position: absolute; z-index: 2; top: 30%; left: 12.7%; width: min(38vw, 520px); transform: translate3d(calc(var(--px) * 13px), calc(var(--py) * 10px), 23px); }
.wave {
  position: relative; isolation: isolate; display: grid; place-items: center;
  width: 100%; min-height: 100px; height: clamp(100px, 16vh, 150px); border-radius: 50%;
  margin: 15px 0 3px; color: #f4d8ff;
}
.wave::before, .wave::after {
  content: ""; position: absolute; inset: 2% -3%; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse, #ba93fa72, #846fca35 53%, transparent 68%);
  transform: rotate(-5deg); transition: opacity 270ms;
}
.wave::after { opacity: .48; inset: 9% -1%; border: 1px solid #ead4ff6b; border-left-color: transparent; border-right-color: transparent; transform: rotate(5deg); background: none; }
.wave:hover::before, .wave[aria-pressed="true"]::before { opacity: .9; filter: drop-shadow(0 0 20px #dab4ffe0); }
.wave-bars { display: flex; width: 82%; height: 70%; gap: clamp(3px, .55vw, 9px); align-items: center; justify-content: center; filter: drop-shadow(0 0 10px #e8b7ffba); }
.wave-bars i {
  display: block; width: clamp(2px, .35vw, 5px); min-width: 2px; height: var(--bar-height);
  border-radius: 20px; background: linear-gradient(#fff3ff, #dbb2ff);
  animation: waveform 2.9s ease-in-out infinite; animation-delay: var(--bar-delay);
}
.wave[aria-pressed="true"] i { animation-duration: .52s; animation-delay: var(--live-delay); }
@keyframes waveform { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
#voice-status { color: var(--muted); min-height: 1.5em; font-size: .91rem; text-align: center; }
.sound-ring {
  position: absolute; left: 70%; top: 62%; width: min(33vw, 470px); aspect-ratio: 1;
  border: 1px solid #eed3ffa6; border-radius: 50%; transform: translate(-50%, -50%) scale(.8);
  opacity: 0; pointer-events: none;
}
.voice.is-speaking .sound-ring { animation: sound-out 1.9s ease-out infinite; }
.voice .ring-two { animation-delay: -.95s !important; }
@keyframes sound-out { 19% { opacity: .8; } to { opacity: 0; transform: translate(-50%, -50%) scale(1.51); } }

.companions-title {
  position: absolute; top: 15%; left: 50%; text-align: center; width: max-content;
  transform: translate3d(calc(-50% + var(--px) * -7px), calc(var(--py) * -5px), 22px);
}
#pet-count { display: block; margin-top: 10px; color: var(--muted); text-shadow: 0 2px 8px #211638; }
.pet-field { position: absolute; inset: 0; transform-style: preserve-3d; }
.desktop-slot { position: absolute; top: 0; left: 0; }
.desktop-slot.is-selected { z-index: 1; }
.desktop-slot.is-dragging { z-index: 2; }
.desktop-pet {
  position: absolute; touch-action: none; cursor: grab; user-select: none;
  border-radius: 12px;
}
.desktop-slot.is-dragging .desktop-pet { cursor: grabbing; }
.desktop-pet canvas {
  width: 100%; height: 100%; display: block; pointer-events: none;
  filter: drop-shadow(0 6px 8px #20122e84);
}
.desktop-slot.is-selected canvas {
  filter: drop-shadow(0 6px 8px #20122e84) drop-shadow(0 0 6px #ffe2c457);
}
.desktop-bubble {
  position: absolute; z-index: 2; left: 0; transform: translate(-50%, -100%);
  width: max-content; max-width: min(19rem, 65vw); padding: 8px 13px;
  border: 1px solid #ebd1fc69; border-radius: 15px; background: #332543ed;
  color: var(--ink); font-size: .88rem; overflow-wrap: anywhere; pointer-events: none;
}
.desktop-bubble::after {
  position: absolute; content: ""; left: calc(50% - 5px); bottom: -5px;
  width: 9px; height: 9px; transform: rotate(45deg); border: solid #ebd1fc69; border-width: 0 1px 1px 0;
  background: #332543;
}
.desktop-menu {
  position: absolute; z-index: 9; width: min(166px, calc(100% - 16px)); padding: 5px;
  max-height: calc(100% - 16px); overflow: auto; touch-action: pan-y;
  border: 1px solid #f4d8ff6b; border-radius: 17px;
  background: #34264bf2; box-shadow: 0 8px 29px #211637ad;
  backdrop-filter: blur(13px);
}
.desktop-menu button {
  display: flex; min-height: 44px; width: 100%; align-items: center; gap: 9px;
  padding: 0 11px; border-radius: 12px; text-align: left; font-size: .91rem;
}
.desktop-menu button::before {
  content: ""; display: block; width: 6px; height: 6px; transform: rotate(45deg);
  border: 1px solid #dcc7f689; border-radius: 1px;
}
.desktop-menu button[aria-checked="true"]::before { background: var(--peach); border-color: var(--peach); }
.desktop-menu button:is(:hover, :focus-visible):not(:disabled) { background: #f7daff23; }
.desktop-menu button:focus-visible { outline-offset: -2px; }
.desktop-menu [data-pet-voice] { margin-top: 3px; border-top: 1px solid #e6cefa33; }
.orbit-gather { left: 50%; top: 65%; width: 78%; height: 35%; --tilt: -6deg; opacity: .78; }
.orbit-gather-small { left: 50%; top: 63%; width: 55%; height: 27%; --tilt: 10deg; opacity: .59; }
.pet-controls {
  position: absolute; z-index: 5; left: 50%; bottom: 13%;
  transform: translate3d(-50%, 0, 28px); display: flex; align-items: center; gap: 5px;
  padding: 1px 10px; border: 1px solid #f4d8ff69; border-radius: 36px;
  background: linear-gradient(125deg, #513c739e, #33274dbd);
  box-shadow: inset 0 0 16px #e9c5fb2f, 0 8px 28px #26204565; backdrop-filter: blur(13px);
}
.control-separator { width: 1px; height: 18px; background: #f6d8fa48; margin-inline: 4px; }
.size-control { display: flex; gap: 8px; align-items: center; padding-left: 4px; font-size: .85rem; white-space: nowrap; }
.size-control input { accent-color: #ffe0c5; width: clamp(52px, 9vw, 115px); min-height: 44px; cursor: ew-resize; margin: 0; }

.focus-content {
  position: absolute; z-index: 3; top: 14%; left: 24%; width: min(32vw, 340px); text-align: center;
  transform: translate3d(calc(var(--px) * 14px), calc(var(--py) * 10px), 27px);
}
.pet-focus { --x: 69%; --y: 76%; --w: min(31vw, 40vh, 460px); --z: 6px; --drift: -3s; }
.pool-of-light {
  position: absolute; inset: 31% 8% 8% 47%; opacity: .76; transform: rotate(-10deg);
  background: radial-gradient(ellipse, #ffc59c66 0%, #efb3cb38 34%, transparent 68%);
}
.orbit-focus { left: 68%; top: 77%; width: 39%; height: 12%; --tilt: -8deg; opacity: .44; }
.clock {
  position: relative; display: grid; place-items: center; width: min(100%, 32vh, 320px);
  aspect-ratio: 1; margin: clamp(13px, 3vh, 35px) auto 9px; border-radius: 50%;
  background: radial-gradient(circle, #83649d50, #35254f6b 67%, #e5beff46 69%, transparent 71%);
  box-shadow: 0 0 68px -12px #c9a1fa78;
}
.clock-rim { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; transform: rotate(-90deg); }
.clock-track { stroke: #ead7ff4d; stroke-width: 1; }
.clock-ticks { stroke: #f9e0ff70; stroke-width: 1.85; stroke-dasharray: 1 10.415; }
.clock-progress {
  stroke: #ffe0bd; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 100;
  stroke-dashoffset: var(--elapsed, 0); filter: drop-shadow(0 0 5px #ffdcaebf);
  transition: stroke-dashoffset 450ms linear;
}
.clock-face { position: relative; z-index: 1; }
#timer-phase { font-size: clamp(.75rem, 1vw, .92rem); letter-spacing: .2em; color: var(--muted); }
.clock-digits {
  position: relative; font-family: var(--serif); font-size: clamp(2.5rem, min(7vw, 9vh), 5.65rem);
  font-variant-numeric: tabular-nums; line-height: 1.12; letter-spacing: -.052em; text-shadow: 0 0 20px #ffd3d085;
}
#timer-display { display: inline-block; position: relative; white-space: nowrap; }
.timer-glyph { position: relative; display: inline-block; width: .46em; text-align: center; }
.timer-glyph.is-punctuation { width: .225em; }
.timer-baseline { display: inline-block; vertical-align: baseline; width: 0; height: 0; }
.digit-particles {
  position: absolute; left: -48px; top: -48px; width: calc(100% + 96px); height: calc(100% + 96px);
  pointer-events: none;
}
.clock-actions { display: flex; justify-content: center; margin-top: 5px; }
.clock-actions .icon { width: 19px; height: 19px; }
.clock-settings { display: flex; justify-content: center; gap: 10px; }
.clock-settings label { display: flex; align-items: center; gap: 4px; font-size: .83rem; white-space: nowrap; color: var(--muted); }
.clock-settings input {
  width: 41px; height: 44px; border: 0; border-bottom: 1px solid #f3d5ff91; text-align: center;
  background: #2f214b7d; color: var(--ink); border-radius: 11px 11px 5px 5px; padding: 1px 2px;
  appearance: textfield;
}
.clock-settings input::-webkit-inner-spin-button, .clock-settings input::-webkit-outer-spin-button { appearance: none; }
.clock-settings input:disabled { opacity: .65; }
.release { position: absolute; right: max(9%, 69px); bottom: 12%; z-index: 3; }
.release-link {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  text-decoration: underline #fae0ff72; text-underline-offset: 6px; text-shadow: 0 2px 8px #140e25;
}
.release-link .icon { width: 17px; height: 17px; }
.release-link:hover { color: var(--peach); }
.release-status:not(:empty) {
  position: absolute; right: 0; bottom: calc(100% + 4px); width: max-content;
  padding: 7px 12px; border-radius: 12px; background: #312449f0;
  color: var(--ink); font-size: .88rem; box-shadow: 0 4px 19px #1a13365e;
}

@media (min-aspect-ratio: 2/1) {
  .wordmark { top: 7%; }
  .wordmark h1 { font-size: min(9.7vw, 17vh); }
  .wordmark p { margin-top: 9px; }
  .pet-welcome-a { --x: 33%; }
  .pet-welcome-b { --x: 67%; }
}
@media (max-width: 750px) {
  .room, .room::after { background-position: 51% 54%; }
  .wordmark { top: 12.2%; }
  .wordmark h1 { font-size: clamp(3.5rem, 13.8vw, 6.4rem); }
  .wordmark p { margin-top: 15px; }
  .scene-index { right: max(4px, env(safe-area-inset-right)); }
  .scene-mark { width: 42px; }
  .scroll-cue { bottom: max(13px, env(safe-area-inset-bottom)); }
  .pet-welcome-a { --x: 28%; --y: 73.2%; --w: min(53vw, 42vh); }
  .pet-welcome-b { --x: 74%; --y: 72%; --w: min(43vw, 34vh); }
  .orbit-back, .orbit-front, .orbit-fine { width: 94%; height: 17%; top: 68%; }
  .portal { top: 41%; }
  .pet-welcome-c { --y: 84%; --w: min(43vw, 28vh); --z: 22px; }
  .pet-chat { --x: 32%; --y: 81%; --w: min(53vw, 38vh); }
  .chat-content { left: 13%; top: 14%; width: 73%; }
  .chat-content h2 { margin: 0 0 13px 4px; }
  .chat-glass { border-radius: 24px 29px 26px 12px; }
  .chat-glass::after { left: 23px; bottom: -13px; width: 23px; height: 14px; clip-path: polygon(10% 0, 100% 0, 0 100%); }
  .chat-log { height: clamp(155px, 25vh, 225px); }
  .pet-voice { --x: 64%; --y: 83%; --w: min(63vw, 39vh); }
  .orbit-voice { left: 61%; width: 79%; height: 11%; }
  .voice-content { left: 10%; top: 19%; width: 72%; }
  .wave { margin-top: 5px; height: 100px; }
  .sound-ring { left: 63%; top: 66%; width: 63vw; }
  .companions-title { top: 14%; }
  .orbit-gather { width: 88%; height: 27%; }
  .orbit-gather-small { width: 77%; height: 22%; }
  .pet-controls { bottom: 14%; }
  .focus-content { left: 11%; top: 12%; width: min(53%, 290px); }
  .pet-focus { --x: 70%; --y: 77%; --w: min(53vw, 37vh); }
  .clock { width: 100%; }
  .clock-digits { font-size: clamp(2.2rem, 9vw, 4rem); }
  .release { right: 9%; bottom: 11%; font-size: .85rem; }
}
@media (max-height: 590px) and (min-width: 751px) {
  .chat-content { top: 10%; }
  .voice-content { top: 22%; }
  .focus-content { top: 8%; }
  .companions-title { top: 9%; }
  .pet-controls { bottom: 11%; }
}
@media (max-height: 660px) and (max-width: 750px) {
  .pet-chat { --x: 26%; --y: 83%; --w: min(43vw, 35vh); }
  .chat-content { top: 9%; }
  .voice-content { top: 12%; }
  .clock { width: min(100%, 34vh); }
  .pet-focus { --x: 70%; --y: 75%; }
}
@media (max-height: 470px) {
  .wordmark { top: 5%; }
  .wordmark-seal .icon { width: 23px; height: 23px; }
  .wordmark h1 { font-size: min(15.5vh, 12vw); }
  .wordmark p { margin-top: 6px; }
  .scene-mark { height: 35px; }
  .scroll-cue { bottom: 4px; }
  .chat-content { left: 51%; top: 8%; width: min(37vw, 500px); }
  .chat-content h2 { margin-bottom: 10px; }
  .chat-glass { padding: 9px 13px; }
  .chat-log { height: clamp(94px, 33vh, 155px); }
  .voice-content { left: 11%; top: 14%; width: 42%; }
  .wave { min-height: 65px; height: 65px; }
  .focus-content { top: 7%; left: 15%; width: 43%; }
  .clock { width: 43vh; margin-top: 7px; }
  .clock-digits { font-size: 2.25rem; }
  .clock-settings input { height: 38px; }
  .pet-focus { --x: 70%; --w: min(27vw, 46vh); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .pet.is-reacting .pet-image { filter: drop-shadow(0 0 22px #ffedc8d9); }
  .pet.is-talking .pet-image { filter: drop-shadow(0 0 14px #f7c3fc); }
  .dust { display: none; }
}
