:root {
  --forest-deep: #061b18;
  --forest-glow: #75a99a;
  --day-sky: #24aff0;
  --paper: rgba(249, 252, 247, 0.78);
  --ink: #17373f;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --moon-white: #efffe2;
  --mint-light: #c6f5d7;
  --glass-line: rgba(225, 255, 239, 0.55);
  --workspace-shadow: 0 28px 70px rgba(29, 83, 84, 0.2), 0 8px 24px rgba(36, 80, 78, 0.12);
}

.scene-root {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, var(--forest-deep), #16717c 58%, var(--forest-glow));
}

.scene-root[data-scene-kind="workspace"] {
  background: linear-gradient(150deg, var(--day-sky), #c5f5fa 56%, #8bc98a);
}

.scene-root[data-scene-kind="custom"] {
  background: linear-gradient(150deg, #9ccfd8, #5b96a7);
}

.scene-root[data-scene-kind="custom"]::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 36, 43, 0.28), transparent 54%, rgba(6, 31, 38, 0.08));
}

.scene-layer,
.scene-base--custom,
.scene-layer img,
.forest-atmosphere,
.daylight-atmosphere,
.day-reveal,
.leaf-field,
.scene-character-parallax {
  pointer-events: none;
}

.scene-layer,
.scene-base--custom {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.scene-layer img,
.scene-base--custom {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
}

.scene-base {
  z-index: 0;
}

.scene-base[data-parallax-depth] {
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
}

.workspace-parasol {
  z-index: 2;
}

.workspace-composite {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  /* A single contained artboard: furniture and body must never use different
     cover/viewport transforms. Keep feet inside even on ultrawide displays. */
  width: min(100vw, 177.777778dvh);
  aspect-ratio: 16 / 9;
  pointer-events: none;
}

.scene-root[data-scene-kind="workspace"] > .scene-base img {
  object-position: right bottom;
}

/* Contact shadows belong to the fixed furniture plane, not the breathing layer. */
.workspace-composite::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse 11% 1.9% at 84% 83.4%, #243d386b, transparent 100%),
    radial-gradient(ellipse 7% 1.5% at 69% 83%, #243d385c, transparent 100%);
}

.workspace-furniture-back {
  z-index: 3;
}

.workspace-furniture-front {
  z-index: 5;
}

[data-parallax-depth] {
  translate: var(--parallax-x) var(--parallax-y);
  will-change: translate;
}

.scene-root[data-motion-quality="reduced"] .leaf:nth-child(n + 5),
.scene-root[data-motion-quality="minimal"] .leaf {
  display: none;
}

.scene-root[data-motion-quality="minimal"] [data-parallax-depth] {
  translate: 0 0;
}

.scene-root[data-motion-quality="minimal"] [data-motion-optional],
.scene-root[data-motion-quality="minimal"] [data-character],
.scene-root[data-motion-quality="minimal"] .character-breathe,
.scene-root[data-motion-quality="minimal"] .cat-intro-window img,
.scene-root[data-motion-state="paused"] [data-motion-optional],
.scene-root[data-motion-state="paused"] .leaf,
.scene-root[data-motion-state="paused"] .character-breathe,
.scene-root[data-motion-state="paused"] .cat-intro-window img,
.scene-root[data-motion-state="reduced"] [data-motion-optional],
.scene-root[data-motion-state="reduced"] .leaf,
.scene-root[data-motion-state="reduced"] .character-breathe,
.scene-root[data-motion-state="reduced"] .cat-intro-window img,
.scene-root[data-motion-state="paused"] [data-character],
.scene-root[data-motion-state="reduced"] [data-character] {
  animation-play-state: paused !important;
}

.forest-atmosphere,
.daylight-atmosphere {
  position: absolute;
  z-index: 6;
  inset: -5%;
  animation: scene-light-pulse 14s ease-in-out infinite;
}

.forest-atmosphere {
  background:
    radial-gradient(circle at 52% 18%, rgba(237, 255, 205, 0.18), transparent 26%),
    radial-gradient(ellipse at 50% 80%, transparent 35%, rgba(1, 23, 24, 0.2) 100%),
    linear-gradient(90deg, rgba(2, 24, 25, 0.15), transparent 30%, transparent 72%, rgba(2, 24, 25, 0.16));
  mix-blend-mode: screen;
}

.daylight-atmosphere {
  background:
    linear-gradient(116deg, rgba(255, 255, 221, 0.2) 8%, transparent 30%),
    radial-gradient(circle at 68% 15%, rgba(255, 248, 192, 0.17), transparent 28%);
  mix-blend-mode: soft-light;
}

.day-reveal {
  position: absolute;
  z-index: 6;
  inset: -18%;
  opacity: 0;
  background: radial-gradient(circle at 65% 45%, rgba(255, 255, 229, 0.95), rgba(189, 240, 248, 0.32) 34%, transparent 66%);
  transform: scale(0.35);
  transform-origin: 65% 45%;
}

body[data-entry-reveal="true"] .day-reveal {
  animation: day-reveal 800ms var(--ease-out) both;
}

/* Forest cat and restrained atmospheric leaves */

.forest-cat {
  position: absolute;
  z-index: 7;
  right: clamp(4vw, 8vw, 11vw);
  bottom: clamp(1.1rem, 3.2vh, 3rem);
  width: clamp(8.5rem, 15vw, 15rem);
  height: auto;
  padding: 0;
  color: transparent;
  background: transparent;
  border-radius: 45% 45% 35% 35%;
  filter: drop-shadow(0 20px 22px rgba(2, 26, 28, 0.24));
  animation: cat-idle 3.2s ease-in-out infinite;
}

.forest-cat img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.forest-cat:focus-visible {
  outline-color: var(--moon-white);
  outline-offset: 8px;
}

/* Desktop forest paws stay on the foreground terrace. */
@media (min-width: 721px) {
  .forest-cat {
    isolation: isolate;
    filter: none;
    translate: 0 0 !important;
    animation: none;
  }

  .forest-cat::before {
    position: absolute;
    z-index: 0;
    top: 95.9%;
    left: 27%;
    width: 47%;
    height: 2.5%;
    content: "";
    pointer-events: none;
    background: radial-gradient(ellipse, rgba(4, 22, 25, 0.5), transparent 72%);
  }

  .forest-cat[data-cat-state="intro"]::before {
    opacity: 0;
  }

  .forest-cat > img {
    position: relative;
    z-index: 1;
    transform-origin: 50% 97.222222%;
    animation: forest-cat-breathe 3.2s ease-in-out infinite;
  }

  .scene-root[data-motion-state="paused"] .forest-cat > img,
  .scene-root[data-motion-state="reduced"] .forest-cat > img,
  .scene-root[data-motion-quality="minimal"] .forest-cat > img {
    animation: none;
  }
}

@keyframes forest-cat-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.006); }
}
/* Forest foreground desktop end. */

.cat-intro-window {
  --cat-intro-frame: 0;

  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
}

.cat-intro-window img {
  width: 600%;
  max-width: none;
  transform: translate3d(calc(var(--cat-intro-frame) * -16.6666667%), 0, 0);
  transform-origin: left center;
}

[data-cat-state="intro"] .cat-intro-window img {
  animation: cat-intro-frames 2400ms steps(6, jump-none) both;
}

.leaf-field {
  position: absolute;
  z-index: 6;
  inset: -12% -5%;
  overflow: hidden;
}

.leaf {
  position: absolute;
  top: -8%;
  width: 12px;
  height: 22px;
  opacity: 0;
  background: linear-gradient(145deg, #d8eca4, #77ad82 65%, #487d70);
  border-radius: 90% 10% 90% 10%;
  box-shadow: 0 0 10px rgba(221, 247, 173, 0.28);
  animation-name: leaf-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.leaf-1 { left: 7%; animation-duration: 12s; animation-delay: -3s; }
.leaf-2 { left: 19%; animation-duration: 15s; animation-delay: -9s; transform: scale(0.72); }
.leaf-3 { left: 33%; animation-duration: 18s; animation-delay: -14s; transform: scale(1.2); }
.leaf-4 { left: 46%; animation-duration: 14s; animation-delay: -5s; }
.leaf-5 { left: 59%; animation-duration: 17s; animation-delay: -11s; transform: scale(0.8); }
.leaf-6 { left: 71%; animation-duration: 13s; animation-delay: -8s; transform: scale(1.08); }
.leaf-7 { left: 84%; animation-duration: 16s; animation-delay: -2s; transform: scale(0.68); }
.leaf-8 { left: 94%; animation-duration: 18s; animation-delay: -16s; }

/* Anonymous welcome and progressive login fallback */

.login-stage {
  position: relative;
  z-index: 10;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(2rem, 7vh, 5rem) 1.5rem;
  /* Keep the soft heading scrim inside the viewport without clipping vertically. */
  overflow-x: clip;
  pointer-events: none;
}

.login-composition {
  width: min(54rem, 100%);
  text-align: center;
  pointer-events: auto;
}

.login-heading {
  position: relative;
  isolation: isolate;
  margin: 0 auto 1.3rem;
  color: #effff6;
  text-shadow: 0 3px 22px rgba(0, 30, 34, 0.42);
  animation: content-arrive 680ms var(--ease-out) both;
}

.login-heading::before {
  position: absolute;
  z-index: -1;
  inset: -2rem -2.5rem;
  content: "";
  pointer-events: none;
  background: rgba(4, 31, 34, 0.78);
  border-radius: 24px;
  filter: blur(16px);
}

.brand-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  color: #e9ffd1;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.34em;
}

.brand-monogram::before,
.brand-monogram::after {
  width: 3.2rem;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(230, 255, 203, 0.85));
}

.brand-monogram::after {
  background: linear-gradient(90deg, rgba(230, 255, 203, 0.85), transparent);
}

.login-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.3vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.18;
}

.login-heading > p {
  margin: 0.8rem 0 0;
  color: rgba(233, 250, 239, 0.95);
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 1.6vw, 1.16rem);
  letter-spacing: 0.14em;
}

.welcome-panel,
.login-panel {
  position: relative;
  width: min(31rem, 100%);
  margin-inline: auto;
  overflow: hidden;
  color: #f3fff8;
  background:
    radial-gradient(circle at 82% 0, rgba(196, 244, 211, 0.19), transparent 34%),
    linear-gradient(155deg, rgba(36, 108, 104, 0.90), rgba(10, 59, 63, 0.90));
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow: 0 30px 75px rgba(0, 28, 32, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

.welcome-panel::before,
.login-panel::before {
  position: absolute;
  top: -45%;
  left: 8%;
  width: 45%;
  height: 120%;
  content: "";
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(12deg);
}

.welcome-panel {
  padding: 1.15rem;
}

html:not(.portal-enhanced) [data-welcome-panel] {
  display: none;
}

html.portal-enhanced [data-login-state="fallback"][data-login-error="false"] [data-welcome-panel] {
  display: block;
}

html.portal-enhanced [data-login-state="fallback"][data-login-error="false"] [data-login-panel] {
  display: none;
}

.welcome-panel p {
  margin: 0 0 0.9rem;
  color: #effdf4;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.enter-space {
  color: #153f3e;
  background: linear-gradient(135deg, rgba(240, 255, 226, 0.92), rgba(177, 231, 205, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(4, 40, 41, 0.18), inset 0 1px 0 #fff;
}

.login-panel {
  padding: clamp(1.35rem, 3vh, 1.9rem) clamp(1.2rem, 3.2vw, 2.15rem) 1.25rem;
  text-align: left;
  animation: card-expand 580ms var(--ease-out) both;
}

.login-panel-heading {
  text-align: center;
}

.login-ornament {
  display: block;
  width: 2.2rem;
  height: 1px;
  margin: 0 auto 0.7rem;
  background: linear-gradient(90deg, transparent, #e2ffd6, transparent);
  box-shadow: 0 0 10px rgba(219, 255, 211, 0.72);
}

.login-panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.login-panel-heading p {
  margin: 0.4rem 0 0;
  color: #effdf4;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.login-form {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.2rem;
}

.field-group {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  align-items: center;
  gap: 0.75rem;
}

.field-group > label {
  color: #effdf5;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-align: right;
}

.input-shell {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 0.8rem;
  color: rgba(233, 252, 243, 0.72);
  background: rgba(12, 67, 70, 0.5);
  border: 1px solid rgba(205, 244, 224, 0.45);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-shell:focus-within {
  background: rgba(15, 73, 74, 0.68);
  border-color: rgba(204, 255, 216, 0.94);
  box-shadow: 0 0 0 2px rgba(161, 237, 197, 0.14), 0 0 26px rgba(174, 244, 202, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.input-shell > svg {
  width: 1.2rem;
  height: 1.2rem;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 3.1rem;
  padding: 0 0.2rem;
  color: #f6fff9;
  caret-color: #dcffd5;
  background: transparent;
  border: 0;
  outline: 0;
}

.password-shell {
  grid-template-columns: 2rem 1fr 44px;
  padding-right: 0.25rem;
}

.password-toggle {
  display: grid;
  place-items: center;
  color: rgba(226, 248, 234, 0.74);
  background: transparent;
  border-radius: 10px;
}

.password-toggle:hover {
  color: #fff;
  background: rgba(224, 255, 228, 0.1);
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.login-submit {
  margin-top: 0.2rem;
  color: #173f3d;
  background: linear-gradient(135deg, rgba(239, 255, 222, 0.93), rgba(172, 226, 199, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 13px 28px rgba(3, 36, 38, 0.2), inset 0 1px 0 #fff;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0.95rem auto 0;
  padding: 0.3rem 0.68rem;
  color: #f7fff9;
  background: rgba(4, 38, 40, 0.72);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.privacy-note svg {
  width: 0.9rem;
  height: 0.9rem;
}

[data-login-state="welcome"] .login-heading {
  margin-bottom: 1rem;
}

[data-login-state="expanded"] .login-panel,
[data-login-state="fallback"] .login-panel {
  opacity: 1;
}

/* Workspace */

.scene-character-parallax {
  position: absolute;
  z-index: 4;
  top: 11.8056%;
  left: 57.0313%;
  width: 36.3281%;
}

.character-chair-anchor,
.character-motion-root,
.character-breathe,
.character-frame-host,
.character-frame-host img {
  width: 100%;
}

.character-motion-root {
  transform-origin: 50% 100%;
  animation: character-sway 6.8s ease-in-out infinite;
}

.character-breathe {
  transform-origin: 50% 100%;
  animation: character-breathe 4.6s ease-in-out infinite;
}

.character-chair-anchor {
  position: relative;
}

.character-contact-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  stroke: none;
}

.character-chair-anchor:has([data-character][hidden]) .character-contact-shadow {
  display: none;
}

.character-frame-host {
  position: relative;
  /* All frames are 1400 x 1800. Never derive geometry from frame visibility. */
  aspect-ratio: 7 / 9;
}

.character-frame-host img {
  position: absolute;
  inset: 0;
  display: block;
  height: auto;
  user-select: none;
}

/* One complementary cut at the right shoulder/sleeve, not a whole-body swap.
   The static base owns the head, torso, legs and shoes throughout the gesture. */
[data-character-frame="idle-open"] {
  clip-path: polygon(0 0, 100% 0, 100% 14%, 68.5% 14%, 68% 27%, 70.5% 34%, 69.7% 40.5%, 79.8% 48.5%, 82% 61%, 100% 61%, 100% 100%, 0 100%);
}

.character-rest-arm,
[data-character-frame="response-open"] {
  clip-path: polygon(68.5% 14%, 100% 14%, 100% 61%, 82% 61%, 79.8% 48.5%, 69.7% 40.5%, 70.5% 34%, 68% 27%);
}

[data-character-state="response-open"] .character-rest-arm {
  display: none;
}

[data-character-frame="idle-closed"] {
  /* Soft eye patches avoid changing hair, skin outside the eyes or clothing. */
  mask-image:
    radial-gradient(ellipse 3.8% 2.2% at 45.2% 14.7%, #000 65%, transparent 100%),
    radial-gradient(ellipse 3.8% 2.2% at 50.5% 11.5%, #000 65%, transparent 100%);
  mask-repeat: no-repeat;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: max(1.15rem, env(safe-area-inset-top));
  right: clamp(1.1rem, 3vw, 2.8rem);
  left: clamp(1.1rem, 3vw, 2.8rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.wordmark,
.topbar-actions {
  pointer-events: auto;
}

.wordmark {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 0.75rem;
  padding: 0.38rem 0.85rem 0.38rem 0.42rem;
  color: #fff;
  background: rgba(13, 47, 49, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(20, 52, 47, 0.17);
  backdrop-filter: blur(16px) saturate(125%);
}

.wordmark-seal {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: #25585a;
  background: linear-gradient(145deg, #fbffe8, #cbead5);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 #fff;
}

.wordmark-copy {
  display: grid;
  line-height: 1.1;
}

.wordmark-copy strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.wordmark-copy small {
  margin-top: 0.22rem;
  color: rgba(232, 250, 240, 0.7);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.topbar-actions form {
  margin: 0;
}

.quiet-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  color: #fff;
  background: rgba(10, 43, 47, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(11, 45, 43, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(16px) saturate(120%);
  transition: transform 180ms var(--ease-out), background 180ms ease;
}

.quiet-action:hover {
  background: rgba(14, 58, 60, 0.92);
  transform: translateY(-2px);
}

.quiet-action svg {
  width: 1.05rem;
  height: 1.05rem;
}

.workspace {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6.5rem clamp(1.25rem, 5vw, 5rem) 2rem;
  pointer-events: none;
}

.workspace-panel {
  width: min(30rem, 43vw);
  padding: clamp(1.35rem, 2.6vw, 2.25rem);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.9), transparent 38%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: var(--workspace-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  pointer-events: auto;
  backdrop-filter: blur(22px) saturate(112%);
  animation: content-arrive 680ms var(--ease-out) both;
}


@keyframes character-sway {
  0%, 100% { transform: skewX(-0.035deg); }
  50% { transform: skewX(0.035deg); }
}

@keyframes character-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.0004); }
}

@keyframes cat-idle {
  0%, 100% { transform: translateY(0) rotate(-0.25deg); }
  50% { transform: translateY(-3px) rotate(0.25deg); }
}

@keyframes cat-intro-frames {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-83.333333%, 0, 0); }
}

@keyframes scene-light-pulse {
  0%, 100% { filter: brightness(0.96); opacity: 0.84; }
  50% { filter: brightness(1.04); opacity: 1; }
}

@keyframes leaf-drift {
  0% { opacity: 0; translate: -2vw -5vh; rotate: 0deg; }
  12% { opacity: 0.72; }
  65% { opacity: 0.54; }
  100% { opacity: 0; translate: 11vw 122vh; rotate: 520deg; }
}

@keyframes day-reveal {
  0% { opacity: 0.9; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes content-arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-expand {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .workspace-composite {
    width: min(100vw, 56.25dvh);
    aspect-ratio: 9 / 16;
  }

  .workspace-composite::before {
    background:
      radial-gradient(ellipse 18% 1.3% at 74% 88%, #243d386b, transparent 100%);
  }
  .scene-root[data-scene-kind="custom"]::after {
    background: linear-gradient(0deg, rgba(4, 31, 36, 0.42), transparent 54%);
  }

  [data-parallax-depth] {
    translate: 0 0;
  }

  .forest-cat {
    top: 26vh;
    right: 4vw;
    bottom: auto;
    width: clamp(6.4rem, 27vw, 8.5rem);
    animation-name: cat-idle-mobile;
  }

  .leaf-field {
    opacity: 0.55;
  }

  .login-stage {
    align-items: end;
    padding: max(1.4rem, env(safe-area-inset-top)) 1rem max(1.15rem, env(safe-area-inset-bottom));
  }

  .login-composition {
    width: min(31rem, 100%);
  }

  .login-heading {
    margin-bottom: 0.9rem;
  }

  .login-heading h1 {
    font-size: clamp(1.75rem, 8vw, 2.45rem);
    letter-spacing: 0.05em;
  }

  .login-heading > p {
    margin-top: 0.45rem;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
  }

  .brand-monogram {
    margin-bottom: 0.45rem;
  }

  .login-panel {
    padding: 1.15rem 1rem 0.95rem;
    border-radius: 19px;
  }

  .login-panel-heading p {
    display: none;
  }

  .login-form {
    gap: 0.72rem;
    margin-top: 0.9rem;
  }

  .field-group {
    grid-template-columns: 1fr;
    gap: 0.32rem;
  }

  .field-group > label {
    padding-left: 0.2rem;
    font-size: 0.78rem;
    text-align: left;
  }

  .input-shell {
    min-height: 3rem;
  }

  .input-shell input {
    height: 2.9rem;
  }

  .privacy-note {
    margin-top: 0.7rem;
  }

  .scene-character-parallax {
    top: 44.375%;
    left: 24.0741%;
    width: 72.2222%;
  }

  .character-motion-root {
    animation-name: character-sway-mobile;
  }

  .topbar {
    top: max(0.7rem, env(safe-area-inset-top));
    right: 0.7rem;
    left: 0.7rem;
  }

  .wordmark {
    min-height: 44px;
    padding: 0.25rem 0.6rem 0.25rem 0.28rem;
  }

  .wordmark-seal {
    width: 34px;
    height: 34px;
  }

  .wordmark-copy small {
    display: none;
  }

  .quiet-action {
    width: 44px;
    padding: 0;
  }

  .quiet-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .workspace {
    align-items: flex-end;
    padding: 5.1rem 0.8rem max(0.8rem, env(safe-area-inset-bottom));
  }

  .workspace-panel {
    width: 100%;
    padding: 1rem;
    background: rgba(249, 252, 247, 0.82);
    border-radius: 20px;
    backdrop-filter: blur(18px) saturate(112%);
  }

}

@keyframes character-sway-mobile {
  0%, 100% { transform: skewX(-0.035deg); }
  50% { transform: skewX(0.035deg); }
}

@keyframes cat-idle-mobile {
  0%, 100% { transform: translateY(0) rotate(-0.12deg); }
  50% { transform: translateY(-1.5px) rotate(0.12deg); }
}

@media (prefers-reduced-motion: reduce) {
  [data-motion-optional],
  [data-character],
  .character-breathe,
  [data-cat],
  .forest-cat > img,
  .cat-intro-window img,
  .leaf,
  .login-heading,
  .login-panel,
  .workspace-panel,
  body[data-entry-reveal="true"] [data-day-reveal] {
    animation: none !important;
  }

  .character-motion-root,
  .character-breathe,
  .forest-cat {
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }

  [data-character-frame],
  [data-cat-frame],
  .destination,
  .login-panel,
  .welcome-panel {
    transition-duration: 120ms !important;
  }
}
