:root {
  --ivory: #f2eadb;
  --ivory-soft: rgba(242, 234, 219, 0.72);
  --ivory-faint: rgba(242, 234, 219, 0.44);
  --sand: #d9bf98;
  --amber: #e8bc7d;
  --night-blue: #a9c5d5;
  --ink: #12150f;
  --glass: rgba(15, 22, 17, 0.24);
  --glass-strong: rgba(13, 19, 15, 0.42);
  --hairline: rgba(240, 232, 216, 0.2);
  --hairline-soft: rgba(240, 232, 216, 0.11);
  --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Baskerville", "Baskerville Old Face", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #0a0f0b;
  color: var(--ivory);
}

body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 1px solid rgba(244, 219, 177, 0.9);
  outline-offset: 4px;
}

::selection {
  background: rgba(211, 174, 118, 0.35);
  color: #fff9ef;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  isolation: isolate;
  background: #0a0f0b;
}

#scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  z-index: 0;
}

body.is-dragging #scene {
  cursor: grabbing;
}

.atmosphere-edge {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 88% 82% at 54% 44%, transparent 42%, rgba(4, 8, 5, 0.2) 78%, rgba(3, 6, 4, 0.5) 100%),
    linear-gradient(to top, rgba(4, 8, 5, 0.52) 0%, rgba(4, 8, 5, 0.1) 22%, transparent 38%),
    linear-gradient(to bottom, rgba(4, 7, 5, 0.22), transparent 18%);
}

.film-bars {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.film-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 3.2vh;
  background: linear-gradient(to bottom, rgba(4, 7, 5, 0.72), transparent);
  transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.film-bar--top {
  top: 0;
}

.film-bar--bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(4, 7, 5, 0.7), transparent);
}

body.cinematic .film-bar {
  height: 5.5vh;
}

.ui-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0s linear 0s;
}

.ui-layer button {
  pointer-events: auto;
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 3.2vw, 46px) clamp(24px, 4.2vw, 66px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.9s ease 0.1s, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

body.is-ready .topbar {
  opacity: 1;
  transform: translateY(0);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand::before {
  content: "";
  position: absolute;
  inset: -15px -25px -15px -19px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 28% 50%, rgba(4, 8, 5, 0.55), rgba(4, 8, 5, 0.2) 52%, transparent 72%);
  filter: blur(9px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: rgba(245, 237, 223, 0.92);
  transition: color 0.4s ease, transform 0.6s ease;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand:hover .brand-mark {
  color: var(--amber);
  transform: translateY(-1px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(248, 241, 229, 0.94);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.brand-copy small {
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.36em;
  color: rgba(241, 231, 212, 0.45);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mood-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  color: rgba(244, 236, 222, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  cursor: pointer;
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease;
}

.mood-pill:hover {
  border-color: rgba(235, 205, 158, 0.44);
  background: var(--glass-strong);
  color: var(--ivory);
}

.weather-icon {
  position: relative;
  width: 15px;
  height: 15px;
  display: block;
}

.weather-icon svg {
  position: absolute;
  inset: 0;
  width: 15px;
  height: 15px;
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.icon-moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.65);
}

body.night .icon-sun {
  opacity: 0;
  transform: rotate(40deg) scale(0.7);
}

body.night .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.mood-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.round-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--glass);
  color: rgba(244, 236, 222, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  cursor: pointer;
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}

.round-button:hover {
  border-color: rgba(235, 205, 158, 0.44);
  background: var(--glass-strong);
  color: var(--ivory);
  transform: translateY(-1px);
}

.round-button > svg {
  width: 15px;
  height: 15px;
}

.sound-bars {
  height: 14px;
  width: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2.2px;
  color: currentColor;
}

.sound-bars i {
  display: block;
  width: 1.5px;
  border-radius: 2px;
  background: currentColor;
  height: 5px;
  opacity: 0.55;
  transform-origin: center;
  transition: height 0.4s ease, opacity 0.4s ease, background 0.4s ease;
}

.sound-bars i:nth-child(2) {
  height: 11px;
}

.sound-bars i:nth-child(3) {
  height: 7px;
}

body.sound-on .sound-bars i {
  opacity: 0.95;
  animation: sound-wave 1.3s ease-in-out infinite;
}

body.sound-on .sound-bars i:nth-child(2) {
  animation-delay: -0.35s;
}

body.sound-on .sound-bars i:nth-child(3) {
  animation-delay: -0.72s;
}

body.sound-on .sound-button,
body.sound-on .button-quiet {
  color: var(--amber);
}

@keyframes sound-wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.12); }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: absolute;
  left: clamp(26px, 4.5vw, 74px);
  bottom: clamp(112px, 14vh, 162px);
  width: min(560px, 49vw);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.2s ease 0.34s, transform 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.34s;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -95px -130px -90px -125px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 66% 72% at 35% 58%, rgba(4, 8, 5, 0.62), rgba(4, 8, 5, 0.28) 48%, transparent 72%),
    linear-gradient(to top, rgba(4, 8, 5, 0.28), transparent 58%);
  filter: blur(6px);
}

body.is-ready .hero {
  opacity: 1;
  transform: translateY(0);
}

body.is-near .hero {
  bottom: clamp(96px, 12vh, 132px);
  width: auto;
}

body.is-near .hero-kicker,
body.is-near .hero h1,
body.is-near .lede {
  display: none;
}

body.is-near .hero-actions {
  margin-top: 0;
}

body.is-near .hero::before {
  inset: -32px -48px;
  background: radial-gradient(ellipse at 35% 50%, rgba(4, 8, 5, 0.5), rgba(4, 8, 5, 0.16) 57%, transparent 74%);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.31em;
  color: rgba(240, 230, 211, 0.62);
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.kicker-line {
  display: block;
  width: 37px;
  height: 1px;
  background: linear-gradient(to right, rgba(235, 206, 161, 0.7), rgba(235, 206, 161, 0.12));
}

.hero h1 {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 3.9vw, 4.08rem);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: 0.035em;
  color: rgba(248, 241, 228, 0.97);
  text-shadow: 0 4px 34px rgba(2, 6, 3, 0.5), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero h1 span {
  color: #efd3a6;
  text-shadow: 0 4px 32px rgba(26, 18, 7, 0.35);
}

.lede {
  margin: 24px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 2.05;
  letter-spacing: 0.14em;
  color: rgba(240, 232, 218, 0.7);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 31px;
}

.button-primary {
  height: 49px;
  display: inline-flex;
  align-items: center;
  gap: 19px;
  padding: 0 25px;
  border: 1px solid rgba(255, 248, 231, 0.5);
  border-radius: 999px;
  background: rgba(242, 233, 218, 0.94);
  color: #25271f;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  cursor: pointer;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
  transition: background 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.button-primary svg {
  width: 17px;
  height: 17px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.button-primary:hover {
  background: #fff8ea;
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.button-primary:hover svg {
  transform: translateX(3px);
}

.button-primary:active {
  transform: translateY(0);
}

.button-quiet {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: rgba(243, 234, 219, 0.72);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.13em;
  cursor: pointer;
  transition: color 0.4s ease;
}

.button-quiet .sound-bars {
  height: 13px;
  width: 14px;
}

.button-quiet:hover {
  color: var(--ivory);
}

.listen-label {
  position: relative;
}

.listen-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: rgba(239, 213, 172, 0.4);
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.button-quiet:hover .listen-label::after {
  transform: scaleX(1);
}

/* ---------------------------------------------------------------- lower metadata */
.scene-meta {
  position: absolute;
  right: clamp(24px, 4.2vw, 66px);
  bottom: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.23em;
  color: rgba(239, 230, 214, 0.44);
  opacity: 0;
  transition: opacity 1.1s ease 0.8s;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

body.is-ready .scene-meta {
  opacity: 1;
}

.scene-meta b {
  margin: 0 5px;
  font-weight: 400;
  opacity: 0.5;
}

.meta-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(240, 221, 187, 0.6);
}

.meta-time i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(232, 188, 125, 0.8);
  display: block;
}

.bottom-bar {
  position: absolute;
  left: clamp(26px, 4.2vw, 66px);
  right: clamp(26px, 4.2vw, 66px);
  bottom: clamp(19px, 3.2vh, 34px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: rgba(238, 229, 213, 0.5);
  opacity: 0;
  transition: opacity 1.1s ease 0.9s;
}

body.is-ready .bottom-bar {
  opacity: 1;
}

.drag-hint {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(239, 231, 216, 0.5);
  white-space: nowrap;
}

.drag-hint svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
  margin-right: 2px;
}

.drag-hint i {
  font-style: normal;
  opacity: 0.35;
}

.reset-button {
  grid-column: 3;
  justify-self: end;
  padding: 7px 0 7px 16px;
  border: 0;
  background: transparent;
  color: rgba(239, 230, 214, 0.46);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: color 0.35s ease;
}

.reset-button:hover {
  color: rgba(246, 236, 219, 0.8);
}

/* ---------------------------------------------------------------- cinematic mode */
.exit-cinema {
  position: absolute;
  top: clamp(20px, 3.2vw, 42px);
  right: clamp(22px, 4vw, 58px);
  z-index: 32;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--hairline-soft);
  border-radius: 999px;
  background: rgba(10, 16, 12, 0.2);
  color: rgba(242, 234, 219, 0.5);
  font-size: 9px;
  letter-spacing: 0.13em;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s, color 0.3s ease;
}

.exit-cinema kbd {
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(242, 234, 219, 0.32);
  border: 1px solid rgba(242, 234, 219, 0.13);
  border-radius: 3px;
  padding: 2px 4px;
}

.exit-cinema:hover {
  color: var(--ivory);
}

body.cinematic .ui-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

body.cinematic .exit-cinema {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.7s ease 0.55s, visibility 0s linear 0s, color 0.3s ease;
}

body.cinematic .atmosphere-edge {
  background:
    radial-gradient(ellipse 88% 82% at 54% 44%, transparent 48%, rgba(4, 8, 5, 0.16) 82%, rgba(3, 6, 4, 0.4) 100%),
    linear-gradient(to top, rgba(4, 8, 5, 0.32) 0%, transparent 22%);
}

/* ---------------------------------------------------------------- intro */
.intro {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(73, 83, 59, 0.24), transparent 70%),
    radial-gradient(ellipse 100% 70% at 50% 105%, rgba(54, 48, 30, 0.3), transparent 65%),
    linear-gradient(160deg, #141b14 0%, #0b110d 52%, #070b08 100%);
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 1.4s;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  opacity: 0.22;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.intro-glow {
  position: absolute;
  width: 54vw;
  height: 54vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 168, 108, 0.09), transparent 67%);
  filter: blur(15px);
  animation: intro-breathe 7s ease-in-out infinite;
}

.intro-center {
  position: relative;
  width: min(82vw, 450px);
  text-align: center;
  transform: translateY(-1.5vh);
}

.intro-mark {
  width: 55px;
  height: 55px;
  margin: 0 auto 28px;
  color: rgba(210, 209, 184, 0.7);
  opacity: 0;
  animation: intro-rise 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.intro-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.intro-kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: rgba(236, 226, 206, 0.33);
  opacity: 0;
  animation: intro-rise 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.intro h2 {
  margin: 19px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(246, 238, 223, 0.92);
  opacity: 0;
  animation: intro-rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.intro-sub {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(235, 226, 210, 0.36);
  opacity: 0;
  animation: intro-rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.56s forwards;
}

.intro-progress {
  width: min(100%, 268px);
  margin: 58px auto 0;
  opacity: 0;
  animation: intro-fade 1.4s ease 0.8s forwards;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: rgba(235, 226, 208, 0.1);
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(to right, rgba(179, 171, 147, 0.25), rgba(234, 208, 166, 0.9));
  box-shadow: 0 0 10px rgba(229, 195, 138, 0.5);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(236, 227, 211, 0.31);
}

.progress-number {
  font-family: var(--display);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: rgba(238, 215, 176, 0.44);
}

.intro-foot {
  position: absolute;
  bottom: clamp(24px, 4vh, 42px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.24em;
  color: rgba(237, 228, 211, 0.23);
  opacity: 0;
  animation: intro-fade 1.6s ease 1.1s forwards;
}

.intro-foot-dot {
  opacity: 0.45;
}

.intro-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(7, 11, 8, 0.94);
  text-align: center;
  color: rgba(240, 231, 214, 0.7);
  z-index: 2;
}

.intro-error[hidden] {
  display: none;
}

.intro-error p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.12em;
}

.intro-error span {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(240, 231, 214, 0.4);
}

body.is-ready .intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes intro-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes intro-breathe {
  0%, 100% { opacity: 0.65; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: clamp(72px, 10vh, 102px);
  z-index: 40;
  transform: translate(-50%, 7px);
  padding: 10px 16px;
  border: 1px solid var(--hairline-soft);
  border-radius: 999px;
  background: rgba(9, 14, 11, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: rgba(244, 235, 219, 0.7);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0b100c;
  color: #e9dfcd;
  font-family: var(--sans);
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .scene-meta {
    display: none;
  }

  .hero {
    width: min(560px, 66vw);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 18px 18px 0;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .brand-copy strong {
    font-size: 13px;
    letter-spacing: 0.14em;
  }

  .brand-copy small {
    display: none;
  }

  .top-actions {
    gap: 7px;
  }

  .mood-pill {
    height: 35px;
    gap: 7px;
    padding: 0 12px;
  }

  .mood-label {
    font-size: 9px;
  }

  .round-button {
    width: 35px;
    height: 35px;
  }

  .hero {
    left: 20px;
    right: 20px;
    bottom: 84px;
    width: auto;
  }

  .hero-kicker {
    gap: 11px;
    font-size: 8px;
    letter-spacing: 0.24em;
  }

  .kicker-line {
    width: 27px;
  }

  .hero h1 {
    margin-top: 17px;
    font-size: clamp(2.15rem, 9.8vw, 3.05rem);
    line-height: 1.32;
    letter-spacing: 0.03em;
  }

  .lede {
    margin-top: 16px;
    font-size: 11.5px;
    line-height: 1.9;
    letter-spacing: 0.1em;
  }

  .desktop-break {
    display: none;
  }

  .hero-actions {
    gap: 14px;
    margin-top: 22px;
  }

  .button-primary {
    height: 44px;
    padding: 0 19px;
    gap: 13px;
    font-size: 10.5px;
  }

  .button-quiet {
    height: 42px;
    font-size: 10px;
  }

  .bottom-bar {
    left: 20px;
    right: 20px;
    bottom: max(14px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
  }

  .drag-hint {
    display: none;
  }

  .reset-button {
    grid-column: 1;
    justify-self: center;
    padding: 8px 12px;
    font-size: 8px;
    color: rgba(239, 230, 214, 0.32);
  }

  .exit-cinema {
    top: 18px;
    right: 18px;
  }

  .intro-center {
    width: min(84vw, 380px);
  }

  .intro-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 23px;
  }

  .intro h2 {
    font-size: 1.55rem;
  }

  .intro-progress {
    margin-top: 46px;
  }

  .intro-foot {
    gap: 8px;
    font-size: 6px;
    letter-spacing: 0.16em;
  }

  .toast {
    bottom: 72px;
    max-width: calc(100vw - 40px);
    white-space: normal;
    text-align: center;
  }
}

@media (max-height: 680px) {
  .hero {
    bottom: 82px;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 3.8vw, 3rem);
    line-height: 1.24;
  }

  .lede {
    margin-top: 14px;
    line-height: 1.75;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .button-primary {
    height: 43px;
  }

  .kicker-line {
    width: 26px;
  }

  .bottom-bar {
    bottom: 15px;
  }

  .scene-meta {
    bottom: 80px;
  }
}

@media (max-width: 420px) {
  .mood-pill {
    padding: 0 10px;
  }

  .mood-label {
    display: none;
  }

  .mood-pill {
    width: 35px;
    justify-content: center;
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(2rem, 9.4vw, 2.65rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
