:root {
  color-scheme: light; --ink: #294b3d; --being-scale: 1.5;
  font-family: "Segoe UI", Arial, sans-serif; font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { color: var(--ink); background: #e2edde; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
.welcome { position: fixed; inset: 0; overflow: auto; background: radial-gradient(ellipse at 50% 35%, #f7f7e4, #e0ebdb 65%, #cedeD2); padding: max(30px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
.welcome-card { width: min(100%, 380px); margin: auto; text-align: center; }
.welcome-brand { margin: 0; font-size: 17px; letter-spacing: 5px; font-weight: 600; }
.welcome-brand span { color: #84a07c; }
.welcome-symbol { display: grid; place-items: center; width: 90px; height: 90px; margin: 32px auto 24px; border: 1px solid #8aaa7540; border-radius: 50%; box-shadow: 0 0 0 12px #c4d7b518, 0 0 0 26px #c4d7b510; }
.welcome-symbol span { width: 14px; height: 14px; border-radius: 50%; background: #80a77b; box-shadow: 0 0 25px #8cad6b55; }
.welcome-eyebrow { color: #788c72; font-size: 8px; letter-spacing: 1.8px; margin: 0 0 13px; }
.welcome h1 { font: 400 clamp(30px, 8vw, 38px)/1.15 Georgia, serif; letter-spacing: -.9px; margin: 0 0 16px; color: #345744; }
.welcome-description { max-width: 290px; margin: 0 auto 25px; color: #658069; font-size: 13px; line-height: 1.7; }
.launch-note { font-size: 11px; line-height: 1.7; color: #6d8267; margin: 0 auto 17px; max-width: 280px; }
.install-being { width: 100%; min-height: 50px; padding: 13px 20px; border: 1px solid #496e51; border-radius: 18px; background: #4e7556; color: #f7faef; cursor: pointer; box-shadow: 0 7px 20px #486e421a; font-size: 14px; }
.install-being:disabled { opacity: .6; cursor: wait; }
.already-installed { border: 0; background: transparent; color: #698063; text-decoration: underline; text-underline-offset: 3px; font-size: 11px; padding: 14px; cursor: pointer; }
.continue-browser { border: 1px solid #86a17955; border-radius: 16px; width: 100%; min-height: 48px; padding: 12px; background: #f6f8ec88; color: #4c6d52; font-size: 12px; cursor: pointer; }
.continue-browser span { margin-left: 7px; }
.launch-status { margin: 3px 0 12px; font-size: 11px; line-height: 1.6; color: #557558; }
.launch-status:empty { display: none; }
.welcome-footnote { font-size: 9px; color: #83967c; margin: 26px 0 0; }
.install-help { margin: 5px 0 18px; padding: 14px 16px; border: 1px solid #8ba17a40; border-radius: 16px; background: #f8faefb3; text-align: left; }
.install-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.install-help h2 { font-size: 12px; font-weight: 600; margin: 0; }
.install-help-heading button { flex: 0 0 34px; height: 34px; border: 0; border-radius: 50%; font-size: 22px; color: #658264; background: #e4eddb; cursor: pointer; }
.install-help ol { padding-left: 18px; margin: 12px 0 0; font-size: 11px; line-height: 1.7; color: #5f785d; }
.install-help li + li { margin-top: 7px; }
.welcome button:focus-visible { outline: 2px solid #315e3e; outline-offset: 3px; }
@media (max-height: 690px) { .welcome { padding-top: 22px; } .welcome-symbol { width: 52px; height: 52px; margin: 23px auto; } .welcome-description { margin-bottom: 17px; } }
.app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.habitat {
  position: absolute; inset: 0; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 47% 42%, #f1f4da 0, #e6edda 40%, #d2e5d8 100%);
}
.habitat-top {
  position: absolute; z-index: 4; pointer-events: none;
  top: calc(10px + env(safe-area-inset-top, 0px)); left: max(18px, env(safe-area-inset-left, 0px)); right: max(18px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px;
}
.identity { display: flex; align-items: baseline; gap: 10px; }
.wordmark { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 3px; }
.wordmark > span { color: #80a18b; }
.age { font-size: 8px; letter-spacing: 1px; color: #6b856f; white-space: nowrap; }
.stage-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 1px 0 6px; min-height: 16px; font-size: 12px; color: #58765f; }
.status-dot, .mood-dot { width: 4px; height: 4px; flex: 0 0 4px; background: #729b7a; border-radius: 50%; }
.feelings { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.feeling { display: flex; align-items: center; gap: 6px; color: #61775c; font-size: 10px; }
.energy-track { width: 32px; height: 4px; background: #7b9c6a26; border-radius: 3px; overflow: hidden; }
.energy-track > span { display: block; width: 42%; height: 100%; background: #9eab68; border-radius: 3px; transition: width 1s, background 1s; }
.audio-controls { display: flex; gap: 4px; pointer-events: auto; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffffff60; border-radius: 50%; background: #f5f8ec80; color: #6d8468; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button[aria-pressed=true] { background: #cbdfc3; color: #355f40; border-color: #89ab7d60; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.play-area { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; color: inherit; cursor: default; touch-action: none; user-select: none; }
.play-area:focus-visible { outline: 2px solid #6d9379; outline-offset: -6px; }
.creature-position { position: absolute; z-index: 3; left: 0; top: 0; width: calc(160px * var(--being-scale)); height: calc(160px * var(--being-scale)); margin: calc(-80px * var(--being-scale)); pointer-events: none; will-change: transform; }
.creature { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 5px #466b3622); }
.creature-position[data-emotion="Sad"] .creature { opacity: .87; }
.food-layer { position: absolute; inset: 0; pointer-events: none; }
.energy-drop, .energy-cursor { position: absolute; width: 24px; height: 24px; margin: -12px; border-radius: 46% 54% 50% 50%; background: radial-gradient(circle at 32% 25%, #fffde7, var(--drop-color) 48%, var(--drop-color)); box-shadow: 0 0 16px 5px color-mix(in srgb, var(--drop-color) 32%, transparent), inset -2px -3px 5px #173b2225; pointer-events: none; }
.energy-drop { z-index: 2; animation: food-glow 3s ease-in-out infinite; }
.energy-drop.is-eaten { animation: none; }
.energy-cursor { display: none; z-index: 5; width: 20px; height: 20px; margin: -10px; opacity: .85; }
.energy-cursor.visible { display: block; }
.play-area.over-being { cursor: grab; }
.play-area.carrying { cursor: grabbing; }
.creature-position.is-carried .creature { filter: drop-shadow(0 12px 9px #365b3933); }
.creature-position.is-carried .creature-shadow { transform: translateY(14px) scale(.72); opacity: .5; }
.hold-ring { display: none; position: absolute; width: 120px; height: 120px; margin: -60px; pointer-events: none; z-index: 4; transform: rotate(-90deg); filter: drop-shadow(0 1px 3px #f5fae8e6); }
.hold-ring circle { fill: none; stroke-width: 2; }
.hold-track { stroke: #73957455; }
.hold-progress { stroke: #426d49; stroke-linecap: round; stroke-dasharray: 157.08; stroke-dashoffset: 157.08; }
.hold-ring.active { display: block; }
.hold-ring.active .hold-progress { animation: hold-fill 1.2s linear forwards; }
[hidden] { display: none !important; }
.wheel-backdrop { position: absolute; inset: 0; z-index: 6; background: #304f3610; }
.action-wheel { position: absolute; width: 224px; height: 224px; margin: -112px; z-index: 7; border-radius: 50%; background: #f3f7e9ed; border: 1px solid #ffffffbd; box-shadow: 0 16px 60px #264b3425; backdrop-filter: blur(16px); }
.wheel-title { position: absolute; top: -25px; left: -20px; right: -20px; text-align: center; font-size: 9px; letter-spacing: 1.6px; color: #49644e; }
.wheel-items { position: absolute; inset: 0; }
.wheel-option { border: 0; padding: 0; background: none; cursor: pointer; color: #48664d; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 48px; min-height: 48px; }
.energy-option { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); }
.mini-energy { width: 31px; height: 31px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fffce5, #dfce79 55%, #bbaa59); box-shadow: 0 0 20px #d7cc7a70; }
.camera-option { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); }
.mini-camera { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #537657; background: #d8e6cd; }
.mini-camera svg { width: 22px; height: 22px; }
.camera-screen { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; padding: 0 5px 5px; border: 1px solid #f7fbeee0; border-radius: 18px; background: #f0f5e5; box-shadow: 0 14px 40px #42673b24, 0 0 45px #f8ffd940; }
.camera-screen::after { content: ''; position: absolute; left: 35%; right: 35%; bottom: -8px; height: 7px; border-radius: 0 0 8px 8px; background: #9db39380; }
.camera-toolbar { display: flex; align-items: center; justify-content: space-between; height: 38px; flex: 0 0 38px; padding-left: 9px; gap: 4px; }
.camera-title { display: flex; align-items: center; gap: 5px; color: #688462; font-size: 8px; letter-spacing: 1px; white-space: nowrap; }
.camera-screen[data-compact=true] .camera-title { display: none; }
.camera-screen[data-compact=true] .camera-toolbar { justify-content: flex-end; padding-left: 0; }
.camera-live-dot { width: 4px; height: 4px; border-radius: 50%; background: #a9b5a0; }
.camera-screen[data-status=live] .camera-live-dot { background: #759f68; box-shadow: 0 0 5px #7bb86e60; }
.camera-controls { display: flex; gap: 2px; }
.camera-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: #577455; background: transparent; cursor: pointer; }
.camera-button:hover { background: #dce8d4; }
.camera-button:disabled { opacity: .4; cursor: wait; }
.camera-button svg { width: 19px; height: 19px; }
.camera-picture { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 12px; background: radial-gradient(ellipse at 40% 30%, #c2d4b8, #91ac94); }
.camera-picture video { width: 100%; height: 100%; display: block; object-fit: cover; }
.camera-picture video.mirrored { transform: scaleX(-1); }
.camera-invitation { position: absolute; left: 8px; right: 8px; bottom: 7px; margin: 0; padding: 6px; border-radius: 8px; background: #eff6e5db; color: #46654b; text-align: center; font-size: 10px; pointer-events: none; }
.camera-screen:not([data-status=live]) .camera-invitation { display: none; }
.camera-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: #d7e5d1; text-align: center; }
.camera-message p { margin: 0; max-width: 230px; font-size: 12px; line-height: 1.5; color: #547154; }
.camera-retry { border: 1px solid #6d8c6640; border-radius: 16px; padding: 7px 13px; color: #4f734d; background: #f1f6e8; font-size: 11px; cursor: pointer; }
.color-option { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px; transform: rotate(var(--angle)) translateX(77px) rotate(calc(-1 * var(--angle))); gap: 4px; }
.color-option > span { width: 29px; height: 29px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffffe8, var(--drop-color) 58%); border: 1px solid #ffffffc0; box-shadow: 0 3px 8px #38583a19; }
.color-option small { font-size: 9px; }
.wheel-option:hover > span { box-shadow: 0 0 0 4px #7e9d6424; }
.wheel-close { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 43px; height: 43px; border: 1px solid #69856726; border-radius: 50%; background: #e2eadb9e; color: #74906e; font-size: 22px; cursor: pointer; }
.cancel-placement { min-height: 40px; border: 0; border-radius: 20px; background: #e2e9d8; color: #54714f; font-size: 11px; padding: 0 13px; cursor: pointer; }
.creature-shadow { position: absolute; left: 26%; top: 72%; width: 48%; height: 16%; background: #52753e24; filter: blur(10px); border-radius: 50%; }
.orbit { position: absolute; width: min(80vw, 730px); aspect-ratio: 1; left: 50%; top: 43%; transform: translate(-50%, -50%); border: 1px solid #90ad7810; border-radius: 50%; z-index: -1; pointer-events: none; }
.orbit-two { width: min(130vw, 1100px); border-color: #90ad780b; }
.dust { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffffe8; opacity: .45; pointer-events: none; animation: drift 12s ease-in-out infinite; }
.dust-one { left: 22%; top: 30%; }
.dust-two { right: 24%; top: 20%; width: 3px; height: 3px; animation-delay: -4s; }
.dust-three { right: 16%; top: 61%; animation-delay: -8s; }
.ripple, .destination { position: absolute; pointer-events: none; border-radius: 50%; }
.ripple { width: 22px; height: 22px; margin: -11px; border: 1px solid #7a9e72; opacity: 0; }
.ripple.active { animation: ripple 1.3s ease-out; }
.destination { width: 7px; height: 7px; margin: -3.5px; background: #71986b; box-shadow: 0 0 0 6px #71986b0d; opacity: 0; transition: opacity 1.3s; }
.destination.active { opacity: .4; }
.placement-bar { position: absolute; z-index: 5; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 5px 6px 5px 14px; border-radius: 28px; background: #f5f8eced; box-shadow: 0 5px 25px #38574412; font-size: 11px; color: #54724e; }
.placement-bar::before { content: ''; flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--drop-color); }
#placement-label { min-width: 0; }
.sound-waves { display: none; }
[aria-pressed=true] .sound-waves { display: block; }
[aria-pressed=true] .sound-mute { display: none; }
button:focus-visible, input:focus-visible { outline: 2px solid #52765b; outline-offset: 4px; }
.action-wheel button:focus { outline: none; }
.action-wheel.keyboard-focus .wheel-option:focus > span { outline: 2px solid #52765b; outline-offset: 4px; border-radius: 50%; }
.action-wheel.keyboard-focus .wheel-close:focus { outline: 2px solid #52765b; outline-offset: 4px; }
@keyframes ripple { from { transform: scale(.5); opacity: .55; } to { transform: scale(4); opacity: 0; } }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: .3; } 50% { transform: translate(8px, -19px); opacity: .65; } }
@keyframes hold-fill { to { stroke-dashoffset: 0; } }
@keyframes food-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.13); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ripple.active { display: none; }
}

