/* Sophia stay-r8.7 · i18n + mobile/PWA + duration honesty + night perch + seal */
:root {
  /* r8.4 color lock (keep) */
  --ink: #313131;
  --ink-soft: #585858;
  --ink-faint: #aaa6a3;
  --linen: #f3eee7;
  --linen-card: #f7f2ea;
  --stone: #dfd3c3;
  --clay: #a69080;
  --clay-deep: #8a7366;
  --cta-fill: #313131;
  --cta-text: #f3eee7;
  --veil-warm: rgba(49, 49, 49, 0.35);
  --line: rgba(49, 49, 49, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  /* r8.5 Apple HIG shape/rhythm (override Aman 2px blade) */
  --radius-card: 14px;
  --radius-btn: 12px;
  --radius-chip: 10px;
  --radius-field: 10px;
  --radius: var(--radius-card);
  --pad-card: 24px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --touch: 44px;
  --shadow-card: 0 8px 28px rgba(20, 16, 12, 0.12);
  --material-blur: blur(20px) saturate(1.2);
  --material-fill: rgba(247, 242, 234, 0.82);

  --font-display: "Iwanami Mincho", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;

  /* type scale (HIG-ish) */
  --fs-eyebrow: 11px;
  --fs-caption: 13px;
  --fs-body: 16px;
  --fs-title: 22px;
  --fs-large: 28px;
  --fs-xlarge: 34px;

  /* compat aliases */
  --cream: var(--linen);
  --cream-card: var(--linen-card);
  --cream-edge: var(--stone);
  --gold: var(--clay);
  --gold-deep: var(--clay-deep);
  --muted: var(--ink-soft);
  --tea: #4a4540;
  --wood: #6b5e54;
  --dusk-top: #3a3530;
  --dusk-bot: var(--clay);
  --veil: var(--veil-warm);
  --shadow: var(--shadow-card);
  --font: var(--font-ui);
  --serif: var(--font-display);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-press: cubic-bezier(0.2, 0.9, 0.3, 1);
  --dur-press: 0.14s;
  --dur-screen: 0.55s;
  --progress: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #2a2724;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html {
  height: 100%;
  touch-action: manipulation; /* reduce double-tap zoom */
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
[hidden] { display: none !important; }

.app {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  /* charcoal letterbox on wide tablet/desktop */
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* —— Stage —— */
.stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.stage-photo {
  position: absolute;
  inset: -5%;
  background: center / cover no-repeat url("assets/forest-room.png");
  transition: opacity 1.1s var(--ease-soft), filter 1.1s var(--ease-soft);
  will-change: transform, opacity;
  animation: stageKenBurns 58s var(--ease-soft) infinite alternate;
  transform-origin: 50% 45%;
}
@keyframes stageKenBurns {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.055) translate3d(-1.1%, 0.7%, 0); }
}
.stage-day.is-fading {
  opacity: 0.28;
  filter: brightness(0.9) saturate(0.96);
}
.stage-dusk.is-xfade {
  opacity: 0.35;
  transition: opacity 0.55s var(--ease-soft);
}
.stage-dusk {
  background-image: url("assets/forest-night.png");
  opacity: 0;
  animation-delay: -18s; /* offset Ken Burns phase vs day */
}
.app[data-room="coast"] .stage-dusk,
.app[data-room="lamp"] .stage-dusk {
  filter: brightness(0.92) saturate(0.95);
}
.app[data-screen="s3"] .stage-dusk,
.app[data-screen="s4"] .stage-dusk { opacity: 1; }
.app[data-screen="s3"] .stage-day,
.app[data-screen="s4"] .stage-day { opacity: 0.35; }
/* night memory: after 收下, S1 stays dusk-warm */
.app.has-night-memory[data-screen="s1"] .stage-dusk { opacity: 0.88; }
.app.has-night-memory[data-screen="s1"] .stage-day { opacity: 0.22; }
.app.is-entering .stage-day {
  opacity: 0.92;
  /* no transform fight with Ken Burns */
}
.stage-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,10,8,0.55) 0%, rgba(12,10,8,0.25) 38%, rgba(12,10,8,0.62) 100%);
  transition: background 0.35s linear, opacity 0.35s linear;
  opacity: 1;
}
.app[data-screen="s0"] .stage-veil {
  background:
    linear-gradient(180deg, rgba(8,6,4,0.72) 0%, rgba(12,10,8,0.4) 42%, rgba(8,6,4,0.78) 100%);
}
.app[data-screen="s1"] .stage-veil,
.app.is-entering .stage-veil {
  background:
    linear-gradient(180deg, rgba(12,10,8,0.42) 0%, rgba(12,10,8,0.18) 40%, rgba(12,10,8,0.55) 100%);
}
.app[data-screen="s3"] .stage-veil {
  /* progress-driven; warm tea/wood fallback */
  background:
    linear-gradient(180deg, rgba(28,22,16,0.42) 0%, rgba(42,53,48,0.22) 42%, rgba(18,14,10,0.58) 100%);
}
.app[data-screen="s4"] .stage-veil {
  background:
    linear-gradient(180deg, rgba(28,22,16,0.55) 0%, rgba(42,53,48,0.32) 42%, rgba(18,14,10,0.7) 100%);
}
.stage-door-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(ellipse 55% 48% at 50% 58%, rgba(255, 220, 170, 0.22) 0%, transparent 70%);
  transition: opacity 0.4s linear;
  pointer-events: none;
}
.app[data-screen="s0"] .stage-door-glow { opacity: 0.45; }
.app.is-entering .stage-door-glow,
.app[data-screen="s1"] .stage-door-glow { opacity: 0.85; }
.app[data-screen="s3"] .stage-door-glow { opacity: 0.35; }
.app[data-screen="s4"] .stage-door-glow { opacity: 0.12; }
/* floating dust motes */
.stage-motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 28%, rgba(255,236,200,0.55), transparent),
    radial-gradient(1.2px 1.2px at 38% 62%, rgba(255,230,190,0.4), transparent),
    radial-gradient(1.8px 1.8px at 64% 22%, rgba(255,240,210,0.45), transparent),
    radial-gradient(1px 1px at 78% 48%, rgba(255,228,180,0.35), transparent),
    radial-gradient(1.4px 1.4px at 22% 78%, rgba(255,236,200,0.4), transparent),
    radial-gradient(1.1px 1.1px at 88% 72%, rgba(255,230,190,0.32), transparent),
    radial-gradient(1.6px 1.6px at 48% 40%, rgba(255,240,210,0.38), transparent);
  background-size: 100% 100%;
  animation: moteDrift 42s linear infinite;
  mix-blend-mode: screen;
}
@keyframes moteDrift {
  0% { transform: translate3d(0, 0, 0); opacity: 0.28; }
  50% { transform: translate3d(1.2%, -1.8%, 0); opacity: 0.4; }
  100% { transform: translate3d(0, -3.2%, 0); opacity: 0.28; }
}
.app[data-screen="s3"] .stage-motes { opacity: 0.42; }
.app.has-night-memory .stage-motes { opacity: 0.3; }

/* rain streaks — only rain room */
.stage-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: repeating-linear-gradient(
    185deg,
    transparent 0px,
    transparent 6px,
    rgba(230, 236, 240, 0.045) 7px,
    transparent 9px,
    transparent 16px
  );
  background-size: 120% 220%;
  animation: rainFall 1.8s linear infinite;
  transition: opacity 0.6s ease;
  mix-blend-mode: soft-light;
}
.app.is-raining .stage-rain { opacity: 0.55; }
.app.is-raining[data-screen="s3"] .stage-rain { opacity: 0.7; }
@keyframes rainFall {
  0% { background-position: 0 0; }
  100% { background-position: 8% 220%; }
}

.stage-grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* —— Screens —— */
.screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 100dvh;
  padding: calc(32px + var(--safe-t)) max(20px, var(--safe-r)) calc(32px + var(--safe-b)) max(20px, var(--safe-l));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity var(--dur-screen) var(--ease-out),
    transform var(--dur-screen) var(--ease-out);
}
.screen.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 3;
}
.screen.is-exit {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  z-index: 2;
}
.screen.is-enter-from-below { transform: translateY(18px); }
.screen.is-enter-from-above { transform: translateY(-12px); }

.opaque {
  background: var(--material-fill);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-card);
  backdrop-filter: var(--material-blur);
  -webkit-backdrop-filter: var(--material-blur);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  font-family: var(--font-ui);
}
.headline {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5.5vw, var(--fs-xlarge));
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--linen);
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
  max-width: 16em;
}
.lede {
  margin: 0 0 28px;
  color: rgba(243,238,231,0.88);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  max-width: 28em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}
.hint-soft, .demo-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: rgba(243,238,231,0.72);
  letter-spacing: 0.04em;
}
.demo-note { color: var(--muted); }

/* —— Apple HIG press · charcoal fill / hairline secondary —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  position: relative;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur-press) var(--ease-press),
    opacity var(--dur-press) var(--ease-press),
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.btn::after { display: none; }
.btn > * { position: relative; z-index: 1; }
.btn:hover { opacity: 0.94; }
.btn-press:active,
.btn:active {
  transform: scale(0.97);
  opacity: 0.92;
}
.btn-primary,
.btn-frost {
  /* 磨砂玻璃 · 请进/入住/收下统一 */
  background: rgba(49, 49, 49, 0.42);
  color: var(--linen);
  border: 1px solid rgba(247, 242, 234, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover,
.btn-frost:hover {
  background: rgba(49, 49, 49, 0.55);
  border-color: rgba(247, 242, 234, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.18);
  opacity: 1;
}
.btn-primary:active,
.btn-frost:active {
  background: rgba(49, 49, 49, 0.5);
  transform: scale(0.97);
  opacity: 0.95;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn-primary,
  .btn-frost {
    background: rgba(49, 49, 49, 0.78);
  }
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: none;
  font-weight: 500;
}
.btn-secondary:hover {
  background: rgba(49, 49, 49, 0.04);
}

.btn-secondary:active {
  transform: scale(0.97);
  opacity: 0.92;
}
.btn-block { width: 100%; margin-top: 16px; }
.btn-breathe {
  animation: ctaBreath 4.2s var(--ease-soft) infinite;
}
@keyframes ctaBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}
.linkish {
  color: rgba(243,238,231,0.88);
  font-size: var(--fs-caption);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 10px;
  min-height: var(--touch);
  min-width: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--dur-press) var(--ease-press), transform var(--dur-press) var(--ease-press), color 0.15s ease;
}
.linkish:hover { opacity: 0.85; }
.linkish:active { transform: scale(0.97); opacity: 0.92; }
.screen-s1 .linkish,
.opaque .linkish,
.wall .linkish { color: var(--clay-deep); }

/* —— S0 —— */
.door-frame {
  text-align: center;
  max-width: 420px;
  position: relative;
  z-index: 2;
  padding-bottom: 8px;
  margin-bottom: 96px;
}
.door-frame .eyebrow,
.door-frame .headline,
.door-frame .lede,
.door-frame .btn,
.door-frame .hint-soft {
  animation: doorReveal 0.9s var(--ease-out) both;
}
.door-frame .eyebrow { animation-delay: 0.05s; }
.door-frame .headline { animation-delay: 0.14s; }
.door-frame .lede { animation-delay: 0.24s; }
.door-frame .btn { animation-delay: 0.34s; }
.door-frame .hint-soft { animation-delay: 0.44s; }
@keyframes doorReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— IP perch · transparent cutouts on sill/ledge · NO white/round sticker —— */
.presence-bird {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  /* tight contact shadow — no white halo sticker */
  filter: drop-shadow(0 2px 3px rgba(12, 10, 8, 0.45));
  opacity: 0.99;
  will-change: transform, opacity;
  z-index: 1;
  transition: filter 0.8s var(--ease-soft), opacity 0.8s var(--ease-soft);
}
/* Night / dusk: deepen cutout so it isn't a bright white sticker */
.app[data-screen="s3"] .presence-bird,
.app[data-screen="s4"] .presence-bird,
.app.has-night-memory[data-screen="s1"] .presence-bird {
  filter:
    brightness(0.62) contrast(1.12) saturate(0.78)
    drop-shadow(0 2px 4px rgba(8, 6, 4, 0.55));
  opacity: 0.94;
}
.app[data-screen="s3"] .presence-s3-host::before,
.app[data-screen="s4"] .presence-s4-host::before,
.app.has-night-memory[data-screen="s1"] .presence-s1-host::before {
  background: radial-gradient(ellipse at center, rgba(8, 6, 4, 0.55) 0%, rgba(8, 6, 4, 0) 72%);
  height: 12px;
}
.presence-bird::after { display: none !important; content: none !important; }

.presence-s0-host,
.presence-s1-host,
.presence-s3-host,
.presence-s4-host {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  background: transparent;
  border: none;
  box-shadow: none;
}
/* dark ellipse under feet — grounds bird on sill, never a cream disc */
.presence-s0-host::before,
.presence-s1-host::before,
.presence-s3-host::before,
.presence-s4-host::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 2px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(12, 10, 8, 0.42) 0%, rgba(12, 10, 8, 0) 72%);
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
}

/* S0 · 前景石台边缘：右下真栖位 */
.presence-s0-host {
  right: max(16px, 4.5vw);
  bottom: max(18px, 3.6vh);
  width: clamp(124px, 34vw, 168px);
}
.presence-s0 {
  animation: birdHostRestSide 5.5s var(--ease-soft) infinite;
}

/* S1 · 卡片下方景台，不叠在亚麻卡上 */
.presence-s1-host {
  right: max(10px, 2.5vw);
  bottom: max(18px, 2.8vh);
  width: clamp(100px, 28vw, 132px);
  z-index: 6;
}
.screen-s1 .desk-layout {
  padding-bottom: 132px; /* leave stage sill for bird below cards */
}
.presence-s1 {
  opacity: 0;
  transform: translateY(12px) scale(0.92);
}
.screen-s1.is-active .presence-s1 {
  animation: birdPerchIn 1.1s 0.35s var(--ease-out) both, birdIdle 6s 1.5s var(--ease-soft) infinite;
}
.presence-s1.is-hop {
  animation: birdHop 0.55s var(--ease-out) both !important;
}

/* S3 · 环外窗台：语录从栖位出，环心无鸟 */
.presence-s3-host {
  right: max(6px, 1.5vw);
  bottom: max(20px, 3.2vh);
  width: clamp(108px, 30vw, 140px);
}
.screen-s3 .during {
  margin-bottom: 88px; /* keep card clear of perch */
}
.presence-s3 {
  opacity: 0.99;
}
.screen-s3.is-active .presence-s3 {
  animation: birdPerchIn 1s 0.2s var(--ease-out) both, birdIdle 7s 1.3s var(--ease-soft) infinite;
}

/* —— S3 tit whisper from perch —— */
.tit-whisper {
  margin: 0;
  max-width: min(168px, 44vw);
  padding: 8px 12px 9px;
  border-radius: 12px 12px 4px 12px;
  background: rgba(247, 242, 234, 0.88);
  color: var(--ink);
  font-size: var(--fs-caption);
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-weight: 400;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(20, 16, 12, 0.1);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  position: relative;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  text-align: left;
  pointer-events: none;
  z-index: 6;
}
.tit-whisper::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: rgba(247, 242, 234, 0.88);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
  border-radius: 0 0 2px 0;
  box-shadow: none;
}
.tit-whisper.is-on {
  opacity: 1;
  transform: translateY(0);
}

/* S4 · 送行窗台栖 · 卡片外石台 */
.presence-s4-host {
  right: max(8px, 2vw);
  bottom: max(18px, 3vh);
  width: clamp(108px, 30vw, 136px);
}
.screen-s4 .farewell {
  margin-bottom: 84px;
}
.presence-s4 {
  opacity: 0;
}
.screen-s4.is-active .presence-s4 {
  animation: birdPerchIn 1.05s 0.25s var(--ease-out) both, birdIdle 6.5s 1.4s var(--ease-soft) infinite;
}

@keyframes birdHostRestSide {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-3px) rotate(-0.8deg); }
  70% { transform: translateY(-1px) rotate(0.5deg); }
}
@keyframes birdHostRest {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  40% { transform: translateX(-50%) translateY(-3px) rotate(-0.8deg); }
  70% { transform: translateX(-50%) translateY(-1px) rotate(0.5deg); }
}
@keyframes birdPerchIn {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 0.98; transform: translateY(0) scale(1); }
}
@keyframes birdIdle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-2px) rotate(-0.6deg); }
  65% { transform: translateY(-1px) rotate(0.4deg); }
}
@keyframes birdHop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-12px) scale(1.03); }
  70% { transform: translateY(-2px) scale(0.98); }
  100% { transform: translateY(0) scale(1); opacity: 0.98; }
}

@media (max-width: 420px) {
  .tit-whisper {
    max-width: min(148px, 42vw);
    font-size: 12px;
    padding: 7px 10px 8px;
  }
  .presence-s0-host { width: clamp(112px, 36vw, 148px); bottom: max(14px, 2.8vh); }
  .presence-s1-host { width: clamp(96px, 30vw, 124px); bottom: max(14px, 2.4vh); }
  .presence-s3-host { width: clamp(104px, 32vw, 132px); bottom: max(14px, 2.4vh); right: max(4px, 1vw); }
  .presence-s4-host { width: clamp(104px, 32vw, 130px); bottom: max(14px, 2.4vh); }
  .screen-s1 .desk-layout { padding-bottom: 140px; }
  .screen-s3 .during { margin-bottom: 100px; }
  .screen-s4 .farewell { margin-bottom: 96px; }
}

/* —— S1 —— */
.screen-s1 {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: calc(18px + var(--safe-t));
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(920px, 100%);
  margin: 0 auto 18px;
  color: var(--linen);
}
.brand {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.16em;
  font-weight: 400;
}
.desk-layout {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  align-items: start;
}
.desk-card, .sill-panel {
  padding: var(--pad-card);
}
.screen-s1.is-active .desk-card {
  animation: cardSettle 0.7s 0.08s var(--ease-out) both;
}
.screen-s1.is-active .sill-panel {
  animation: cardSettle 0.7s 0.18s var(--ease-out) both;
}
@keyframes cardSettle {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.desk-card .eyebrow { color: var(--ink-soft); }
.desk-block {
  margin-top: 4px;
  padding-top: 4px;
}
.desk-block-rooms {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(40,32,22,0.08);
}
.field-label {
  display: block;
  margin: 12px 0 8px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 14px;
  border-radius: var(--radius-field);
  border: 1px solid var(--line);
  background: rgba(243, 238, 231, 0.72);
  color: var(--ink);
  font-size: 16px; /* ≥16px: prevent iOS focus zoom */
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.field:focus { border-color: var(--ink); box-shadow: none; background: var(--linen); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 14px;
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.7);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: var(--fs-caption);
  letter-spacing: 0.04em;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur-press) var(--ease-press),
    opacity var(--dur-press) var(--ease-press),
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.chip:hover { background: var(--linen-card); }
.chip:active { transform: scale(0.97); opacity: 0.92; }
.chip.is-on {
  background: var(--cta-fill);
  color: var(--cta-text);
  border-color: var(--cta-fill);
  font-weight: 600;
  box-shadow: none;
}
.chip.is-on:active { transform: scale(0.97); opacity: 0.92; }

.room-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 2px;
}
.room-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px 8px;
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.7);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) var(--ease-press), opacity var(--dur-press) var(--ease-press), background 0.18s ease, border-color 0.18s ease;
}
.room-pick:hover { background: var(--linen-card); }
.room-pick:active { transform: scale(0.97); opacity: 0.92; }
.room-pick.is-on {
  background: var(--linen-card);
  border-color: var(--clay);
  box-shadow: none;
  color: var(--ink);
}
.room-pick.is-on:active { transform: scale(0.97); opacity: 0.92; }
.room-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1.15 / 1;
  border-radius: 8px;
  background: center / cover no-repeat var(--stone);
  border: 1px solid var(--line);
}
.room-name {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
}
@media (max-width: 420px) {
  .room-picks { gap: 6px; }
  .room-name { font-size: 11px; letter-spacing: 0.04em; }
}

.today-stay {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--clay-deep);
  letter-spacing: 0.06em;
}

.sill-panel { min-height: 0; }
.sill-panel:has(#sill-empty:not(.is-hide)) {
  padding-top: 18px;
  padding-bottom: 16px;
}
.sill-panel:has(#sill-list li) { min-height: 140px; }
.sill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sill-list li {
  padding: 12px 14px;
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.72);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}
.sill-list li .ring-mini {
  width: 28px;
  height: 28px;
}
.sill-list li .ring-mini circle.track {
  fill: none;
  stroke: var(--stone);
  stroke-width: 3;
}
.sill-list li .ring-mini circle.prog {
  fill: none;
  stroke: var(--clay);
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.sill-list .body { min-width: 0; }
.sill-list li.is-new {
  animation: sillIn 0.65s var(--ease-out) both;
  border-color: var(--clay);
  box-shadow: none;
}
@keyframes sillIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sill-list .t { font-weight: 400; margin: 0 0 4px; font-family: var(--font-display); }
.sill-list .m { margin: 0; font-size: 12px; color: var(--muted); }
.sill-empty { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.sill-empty.is-hide { display: none; }

@media (max-width: 760px) {
  .desk-layout { grid-template-columns: 1fr; }
  .door-frame { margin-bottom: 120px; padding-bottom: 8px; }
}

/* —— S2 —— */
.pass-wrap {
  width: min(400px, 100%);
  text-align: center;
}
.pass-wrap > .eyebrow {
  color: rgba(243,238,231,0.88);
  margin-bottom: 14px;
}
.screen-s2.is-active .pass {
  animation: passLift 0.6s var(--ease-out) both;
}
@keyframes passLift {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pass {
  padding: 28px 24px 24px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.pass.is-settling {
  animation: passSettle 0.55s var(--ease-out) both;
}
@keyframes passSettle {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}
.pass-seal {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 500;
}
.pass-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}
.pass-meta { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.pass-cue { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); font-weight: 600; transition: color 0.25s ease; }
.pass-slider {
  position: relative;
  height: 50px;
  border-radius: var(--radius-btn);
  background: var(--stone);
  border: 1px solid var(--line);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  box-shadow: none;
}
.pass-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--clay);
  transition: none;
}
.pass-knob {
  position: absolute;
  z-index: 2;
  left: 3px;
  top: 3px;
  height: 42px;
  min-width: 42%;
  max-width: calc(100% - 6px);
  padding: 0 16px;
  border-radius: 10px;
  background: var(--cta-fill);
  color: var(--cta-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: none;
  white-space: nowrap;
  will-change: transform;
}
.pass.is-dragging .pass-knob {
  box-shadow: none;
  filter: brightness(1.06);
}
.ghost-back { margin-top: 18px; color: rgba(243,238,231,0.82) !important; }
.pass.is-revealed .pass-knob { left: calc(100% - 4px); transform: translateX(-100%); }
.pass.is-revealed .pass-track-fill { width: 100%; }
.pass.is-revealed .pass-cue { color: var(--clay-deep); }

/* —— S3 stay ring —— */
.during {
  width: min(420px, 100%);
  padding: var(--pad-card) 22px 26px;
  text-align: center;
}
.screen-s3.is-active .during {
  animation: cardSettle 0.65s var(--ease-out) both;
}
.during-task {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.stay-ring-wrap {
  position: relative;
  width: min(240px, 72vw);
  aspect-ratio: 1;
  margin: 0 auto 6px;
}
.stay-ring {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
  filter: none; /* no gold glow — Aman quiet */
}
.stay-ring-track {
  fill: none;
  stroke: var(--stone);
  stroke-width: 6;
}
.stay-ring-prog {
  fill: none;
  stroke: var(--clay); /* solid terracotta, not gold gradient */
  stroke-width: 6.5;
  stroke-linecap: round;
  stroke-dasharray: 515.22;
  stroke-dashoffset: 515.22;
  transition: none;
}
.stay-ring-halo {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(166,144,128,0.12) 0%, transparent 70%);
  opacity: 0.4;
  transition: opacity 0.2s linear;
}
.stay-ring-core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  padding: 18%;
}
.stay-ring-status {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stay-ring-clock {
  margin: 0;
  font-size: clamp(28px, 8vw, var(--fs-xlarge));
  font-weight: 400;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.1;
}
.stay-ring-phrase {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  font-weight: 400;
}
.during .demo-note { margin-top: 10px; }

.btn-hold {
  position: relative;
  margin-top: 18px;
  width: 100%;
  min-height: var(--touch);
  border-radius: var(--radius-btn);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) var(--ease-press), opacity var(--dur-press) var(--ease-press), background 0.2s ease;
  letter-spacing: 0.08em;
  font-weight: 500;
  font-size: 15px;
}
.btn-hold:active {
  transform: scale(0.97);
  opacity: 0.92;
}
.btn-hold.is-holding {
  transform: scale(0.97);
  opacity: 0.92;
  background: rgba(49, 49, 49, 0.04);
  box-shadow: none;
}
.hold-label {
  position: relative;
  z-index: 3;
  font-weight: 400;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hold-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(166, 144, 128, 0.28);
  z-index: 1;
  transition: none;
}
.hold-ring-svg {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translateY(-50%) rotate(-90deg);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.btn-hold.is-holding .hold-ring-svg { opacity: 1; }
.hold-ring-track {
  fill: none;
  stroke: rgba(40,32,22,0.15);
  stroke-width: 3.5;
}
.hold-ring-prog {
  fill: none;
  stroke: var(--clay-deep);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 125.6;
  transition: none;
}

/* —— S4 —— */
.farewell {
  width: min(400px, 100%);
  padding: var(--pad-card) 22px 20px;
  text-align: center;
}
.screen-s4.is-active .farewell {
  animation: cardSettle 0.6s var(--ease-out) both;
}
.farewell-line {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.farewell-ring-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
}
.farewell-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  display: block;
}
.farewell-ring-track {
  fill: none;
  stroke: var(--stone);
  stroke-width: 5;
}
.farewell-ring-prog {
  fill: none;
  stroke: var(--clay);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 301.59;
  stroke-dashoffset: 301.59;
}
.farewell.is-sealed .farewell-ring-prog {
  animation: ringFillDone 0.95s var(--ease-out) forwards;
}
.farewell.is-trace .farewell-ring-prog {
  transition: stroke-dashoffset 1.05s var(--ease-out);
}
@keyframes ringFillDone {
  from { stroke-dashoffset: 301.59; }
  to { stroke-dashoffset: 0; }
}
.farewell-seal-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--clay-deep);
  opacity: 0;
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.farewell.is-complete .farewell-seal-label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.farewell.is-sealed .farewell-seal-label {
  animation: sealLabelGlow 1.1s var(--ease-out) 0.35s both;
}
.farewell-ring-seal {
  fill: none;
  stroke: var(--clay);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  stroke-dashoffset: 40;
  opacity: 0;
  transform-origin: 60px 60px;
}

.stay-card {
  text-align: left;
  padding: 18px 18px 16px;
  border-radius: 12px;
  background: rgba(243, 238, 231, 0.78);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  animation: cardIn 0.75s var(--ease-out) both;
  color: var(--ink);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(20, 16, 12, 0.06);
}

.farewell-ring-prog {
  transition: stroke-dashoffset 1.1s var(--ease-out);
}
.farewell.is-complete .farewell-ring-seal {
  opacity: 0.85;
  animation: ringSealSpin 1.4s var(--ease-out) both;
}
.farewell.is-sealed .farewell-ring-wrap::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(166,144,128,0.4);
  animation: sealPulse 1.45s var(--ease-out) 0.2s both;
  pointer-events: none;
}
.farewell.is-sealed .farewell-ring-prog {
  stroke-width: 6.5;
  filter: drop-shadow(0 0 6px rgba(166,144,128,0.45));
}
.farewell.is-sealed .farewell-ring-wrap {
  animation: sealWrapPop 0.7s var(--ease-out) both;
}
@keyframes ringSealSpin {
  from { stroke-dashoffset: 40; opacity: 0; transform: rotate(-28deg) scale(0.96); }
  to { stroke-dashoffset: 0; opacity: 0.95; transform: rotate(0deg) scale(1); }
}
@keyframes sealPulse {
  0% { box-shadow: 0 0 0 0 rgba(166,144,128,0.5); opacity: 0.95; }
  40% { box-shadow: 0 0 18px 10px rgba(166,144,128,0.28); opacity: 0.7; }
  100% { box-shadow: 0 0 28px 16px rgba(166,144,128,0); opacity: 0; }
}
@keyframes sealWrapPop {
  0% { transform: scale(0.94); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes sealLabelGlow {
  0% { opacity: 0.55; letter-spacing: 0.18em; }
  45% { opacity: 1; letter-spacing: 0.32em; text-shadow: 0 0 12px rgba(166,144,128,0.45); }
  100% { opacity: 1; letter-spacing: 0.28em; text-shadow: none; }
}
.farewell.is-trace .farewell-seal-label { letter-spacing: 0.12em; }

.stay-card.is-flying {
  animation: cardFly 0.7s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(-18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardFly {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  55% { opacity: 0.85; transform: translate(28%, -42%) scale(0.72) rotate(-4deg); }
  100% { opacity: 0; transform: translate(48%, -78%) scale(0.45) rotate(-8deg); }
}
.stay-card-kicker {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
}
.stay-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
}
.stay-card-meta { margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.stay-card-demo {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}
.farewell .hint-soft { color: var(--muted); }
.farewell .hint-soft.is-pulse {
  animation: hintPulse 0.8s var(--ease-out);
}
@keyframes hintPulse {
  0% { opacity: 0.4; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
.farewell .linkish { margin-top: 10px; display: inline-block; }

/* —— Soft wall · place memory —— */
.wall-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 8, 6, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(16px + var(--safe-b));
  animation: scrimIn 0.28s var(--ease-out) both;
}
@keyframes scrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wall {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88dvh, 720px);
  overflow: auto;
  padding: 28px 22px 22px;
  border-radius: 16px;
  animation: wallUp 0.4s var(--ease-out) both;
}
@keyframes wallUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.wall-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: var(--touch);
  height: var(--touch);
  border-radius: 12px;
  background: rgba(243, 238, 231, 0.85);
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform var(--dur-press) var(--ease-press), opacity var(--dur-press) var(--ease-press), background 0.15s ease;
}
.wall-close:hover { background: var(--stone); }
.wall-close:active { transform: scale(0.97); opacity: 0.92; }
.wall-lede {
  color: var(--ink-soft);
  text-shadow: none;
  margin-bottom: 18px;
  line-height: 1.75;
}
.memory-hints {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.memory-hint {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.72);
  border: 1px solid var(--line);
}
.memory-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
}
.memory-hint p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.letter-aside {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.letter-demo {
  padding: 12px;
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.72);
  border: 1px dashed var(--line);
  margin-bottom: 14px;
}
.letter-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.letter-slot {
  text-align: left;
  padding: 11px 14px;
  min-height: var(--touch);
  border-radius: var(--radius-chip);
  background: rgba(243, 238, 231, 0.72);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: transform var(--dur-press) var(--ease-press), opacity var(--dur-press) var(--ease-press), background 0.15s ease, color 0.15s ease;
}
.letter-slot:hover { background: var(--linen); }
.letter-slot:active { transform: scale(0.97); opacity: 0.92; }
.letter-slot.is-on {
  background: var(--cta-fill);
  color: var(--cta-text);
  border-color: var(--cta-fill);
}
.price-ref, .legal-links {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.legal-links a {
  color: var(--clay-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 8px;
  -webkit-tap-highlight-color: transparent;
}
/* r8.6 tablet landscape: hide perch if cramped */
@media (orientation: landscape) and (min-width: 700px) and (max-height: 560px) {
  .screen { padding-top: calc(16px + var(--safe-t)); padding-bottom: calc(16px + var(--safe-b)); }
  .door-frame { margin-bottom: 48px; }
  .presence-s0-host, .presence-s1-host, .presence-s3-host, .presence-s4-host { display: none; }
  .screen-s1 .desk-layout { padding-bottom: 24px; }
}


.sound-toggle {
  position: fixed;
  left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  background: rgba(248,243,234,0.14);
  color: rgba(243,238,231,0.78);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(248,243,234,0.18);
  transition: transform var(--dur-press) var(--ease-press), opacity var(--dur-press) var(--ease-press), background 0.15s ease;
}
.sound-toggle:active { transform: scale(0.97); opacity: 0.92; }
.sound-toggle[aria-pressed="true"] {
  background: rgba(248,243,234,0.28);
  color: #f8f3ea;
}
.sound-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }

@media (min-width: 761px) {
  .wall-scrim { align-items: center; }
  .wall { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-photo {
    animation: none !important;
    inset: 0;
    transform: none !important;
  }
  .stage-motes, .stage-rain { animation: none !important; opacity: 0 !important; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-breathe { animation: none; }
  .presence-bird { animation: none !important; opacity: 0.92; }
  .presence-s0 { transform: none !important; }
  .presence-s1, .presence-s3, .presence-s4 { transform: none !important; }
  .tit-whisper {
    transition: opacity 0.25s ease !important;
    transform: none !important;
  }
  .tit-whisper[hidden] { transform: none !important; }
  .screen {
    transition: opacity 0.2s ease;
    transform: none !important;
  }
  .stay-card.is-flying {
    animation: none;
    opacity: 0;
  }
  .farewell.is-complete .farewell-ring-prog {
    stroke-dashoffset: 0;
    animation: none;
  }
  .farewell.is-complete .farewell-seal-label { opacity: 1; }
  .farewell.is-complete .farewell-ring-seal { animation: none; opacity: 0.85; stroke-dashoffset: 0; }
}

.wall-slim {
  max-width: min(400px, 100%);
  padding-bottom: 22px;
}
.wall-lines {
  display: grid;
  gap: 12px;
  margin: 8px 0 18px;
}
.wall-lines p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.wall-lines .price-ref {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.letter-fold {
  margin: 4px 0 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.letter-fold summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--clay-deep);
  list-style: none;
  padding: 6px 0;
}
.letter-fold summary::-webkit-details-marker { display: none; }
.letter-fold[open] summary { margin-bottom: 10px; }
.letter-fold .letter-slots { margin-bottom: 10px; }
.has-night-memory .sill-list li:first-child {
  border-color: var(--clay);
  box-shadow: none;
}


/* r8.7 language toggle */
.lang-toggle {
  position: absolute;
  top: calc(10px + var(--safe-t));
  right: max(12px, var(--safe-r));
  z-index: 20;
  min-height: 36px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(247, 242, 234, 0.22);
  border: 1px solid rgba(243, 238, 231, 0.35);
  color: var(--linen);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s var(--ease-press), opacity 0.14s ease, background 0.18s ease;
}
.lang-toggle:active { transform: scale(0.96); opacity: 0.9; }
.app[data-screen="s1"] .lang-toggle,
.app[data-screen="s2"] .lang-toggle {
  color: var(--linen);
}
.wall-scrim:not([hidden]) ~ .lang-toggle { pointer-events: none; opacity: 0.35; }
