/* =========================================================
   StarSing Kids — V1.0 dual-surface interactive prototype
   Handcrafted design system. No external fonts or CDNs.
   ========================================================= */

:root {
  --ink: #25312d;
  --ink-strong: #17231f;
  --ink-soft: #5a6861;
  --ink-faint: #84918a;
  --cream: #fff9ed;
  --cream-deep: #faefdc;
  --paper: #fffdf8;
  --paper-warm: #fff6e8;
  --line: #eadcc8;
  --line-strong: #d8c5ab;
  --coral: #ff765f;
  --coral-deep: #e65243;
  --coral-soft: #ffe1da;
  --sun: #ffc951;
  --sun-deep: #d9930f;
  --sun-soft: #fff0bd;
  --mint: #3eb9a2;
  --mint-deep: #178c78;
  --mint-soft: #dff8f1;
  --sky: #6eb4e4;
  --sky-soft: #e5f3fd;
  --lilac: #9a87dc;
  --lilac-soft: #f1ecff;
  --rose: #f28ca7;
  --rose-soft: #ffeaf1;
  --night: #242b51;
  --night-soft: #e8e9ff;
  --success: #2e9a73;
  --danger: #c94c4c;
  --font: "Avenir Next Rounded", "SF Pro Rounded", "Segoe UI Variable Display", "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 8px 24px -14px rgba(76, 55, 29, 0.32);
  --shadow-md: 0 20px 50px -30px rgba(76, 55, 29, 0.38);
  --shadow-lg: 0 34px 80px -40px rgba(65, 45, 23, 0.46);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 220, 123, 0.35), transparent 27rem),
    radial-gradient(circle at 91% 9%, rgba(99, 208, 186, 0.2), transparent 30rem),
    radial-gradient(circle at 76% 83%, rgba(188, 163, 245, 0.17), transparent 32rem),
    linear-gradient(145deg, #fffaf0 0%, #fff9ee 42%, #fbf7ed 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: radial-gradient(rgba(99, 76, 42, 0.15) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  opacity: 0.26;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3, h4, strong {
  letter-spacing: -0.025em;
}

::selection {
  background: var(--sun);
  color: var(--ink-strong);
}

:focus-visible {
  outline: 3px solid rgba(62, 185, 162, 0.7);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.5;
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.ambient-one {
  width: 280px;
  height: 280px;
  top: 18%;
  left: -160px;
  background: rgba(255, 201, 81, 0.26);
}

.ambient-two {
  width: 340px;
  height: 340px;
  right: -210px;
  top: 48%;
  background: rgba(62, 185, 162, 0.18);
  animation-delay: -5s;
}

.ambient-three {
  width: 220px;
  height: 220px;
  left: 42%;
  bottom: -170px;
  background: rgba(154, 135, 220, 0.16);
  animation-delay: -9s;
}

.app {
  min-height: 100vh;
  isolation: isolate;
}

.app[data-surface="minitube"] body::before {
  opacity: 0.15;
}

.topbar,
.owner-toolbar,
.main-shell {
  width: min(1500px, calc(100% - 28px));
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Owner header ---------- */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(225, 208, 182, 0.82);
  border-radius: 25px;
  background: rgba(255, 252, 245, 0.87);
  box-shadow: 0 18px 55px -36px rgba(76, 55, 29, 0.5);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 220px;
  padding: 3px 4px;
  border-radius: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 17px;
  background: linear-gradient(155deg, #fff4ce, #ffe39a);
  border: 1px solid #f2d788;
  box-shadow: inset 0 -4px 8px rgba(206, 154, 30, 0.12), 0 8px 18px -10px rgba(172, 120, 22, 0.4);
}

.brand-mark svg {
  width: 35px;
  height: 35px;
  filter: drop-shadow(0 2px 1px rgba(149, 92, 17, 0.18));
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 13px;
}

.brand-mark-small svg {
  width: 27px;
  height: 27px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 850;
  color: var(--ink-strong);
  letter-spacing: -0.04em;
}

.brand-copy span {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--ink-faint);
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.surface-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: #f5ecdc;
  border: 1px solid #e9dbc4;
}

.surface-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 14px;
  color: var(--ink-soft);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), transform 0.22s var(--ease);
}

.surface-tab:hover {
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.52);
}

.surface-tab.is-active {
  background: var(--paper);
  color: var(--ink-strong);
  box-shadow: 0 7px 18px -12px rgba(83, 58, 26, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.surface-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 11px;
  font-size: 17px;
  background: var(--paper-warm);
}

.surface-tab.is-active .surface-icon {
  background: var(--sun-soft);
}

.surface-label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.surface-label small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.guest-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 155px;
  padding: 7px 10px;
  border: 1px solid #eadfcd;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.guest-badge:hover {
  background: white;
  border-color: var(--line-strong);
}

.guest-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--sun-deep);
  box-shadow: 0 0 0 4px rgba(255, 201, 81, 0.22);
}

.guest-badge.is-bound .guest-dot {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(62, 185, 162, 0.18);
}

.guest-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.guest-copy strong {
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.guest-copy small {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-faint);
  letter-spacing: -0.02em;
}

.wallet-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff6d8, #ffefbd);
  border: 1px solid #f2d98d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wallet-icon {
  font-size: 16px;
}

.wallet-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.wallet-copy small {
  font-size: 8.5px;
  font-weight: 700;
  color: #8c6a1f;
}

.wallet-copy strong {
  font-size: 12.5px;
  font-weight: 900;
  color: #67490e;
  white-space: nowrap;
}

.wallet-note {
  padding-left: 8px;
  border-left: 1px solid rgba(163, 121, 26, 0.22);
  font-size: 8.5px;
  font-weight: 700;
  color: #967121;
  line-height: 1.2;
  max-width: 46px;
}

.currency-switch {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: #f2eadc;
  border: 1px solid #e8dbc7;
}

.currency-switch button {
  padding: 5px 8px;
  border-radius: 9px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 800;
  transition: all 0.18s var(--ease);
}

.currency-switch button.is-active {
  background: var(--paper);
  color: var(--ink-strong);
  box-shadow: 0 4px 10px -7px rgba(72, 49, 18, 0.4);
}

.owner-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff9ed;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.owner-toggle:hover {
  background: #31423b;
  transform: translateY(-1px);
}

.owner-chevron {
  font-size: 13px;
  opacity: 0.7;
  transition: transform 0.25s var(--ease);
}

.owner-toggle[aria-expanded="true"] .owner-chevron {
  transform: rotate(180deg);
}

.owner-toolbar {
  position: relative;
  z-index: 45;
  scroll-margin-top: 150px;
  margin-top: 10px;
  padding: 19px 20px;
  color: #f7f2e7;
  border: 1px solid #30453d;
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% 10%, rgba(255, 201, 81, 0.12), transparent 23rem),
    linear-gradient(150deg, #1f2e29, #263933);
  box-shadow: var(--shadow-md);
  animation: toolbarDrop 0.36s var(--ease);
}

.owner-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.owner-toolbar-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.owner-toolbar-heading h2 {
  margin-top: 4px;
  color: #fffdf6;
  font-size: 18px;
  font-weight: 800;
}

.eyebrow-dark {
  color: #d9b85b !important;
}

.owner-state-line {
  max-width: 48%;
  color: #a9bcb4;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.55;
  text-align: right;
}

.owner-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.owner-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.owner-action:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
}

.owner-action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.1);
}

.owner-action span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.owner-action strong {
  color: #fffdf6;
  font-size: 11px;
  font-weight: 800;
}

.owner-action small {
  margin-top: 3px;
  color: #9fb1a9;
  font-size: 9px;
}

.owner-action-sun .owner-action-icon {
  background: rgba(255, 201, 81, 0.18);
}

.owner-action-rose .owner-action-icon {
  background: rgba(255, 118, 95, 0.16);
}

.owner-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.owner-note span {
  font-size: 12px;
}

.owner-note p {
  color: #91a49c;
  font-size: 9.5px;
}

/* ---------- Main / shared ---------- */

.main-shell {
  padding: 26px 0 58px;
}

.surface-view {
  animation: viewIn 0.5s var(--ease);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint-deep);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 118, 95, 0.13);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #fffdf6;
  background: linear-gradient(145deg, #ff816b, var(--coral));
  border-color: #f56853;
  box-shadow: 0 13px 25px -16px rgba(230, 82, 67, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-primary:hover {
  background: linear-gradient(145deg, #ff907d, #fb6e58);
  box-shadow: 0 17px 30px -16px rgba(230, 82, 67, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button-sun {
  color: #513b0d;
  background: linear-gradient(145deg, #ffe17d, var(--sun));
  border-color: #eab338;
  box-shadow: 0 13px 24px -17px rgba(175, 112, 6, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.button-mint {
  color: #fff;
  background: linear-gradient(145deg, #51cbb5, var(--mint));
  border-color: #28a089;
  box-shadow: 0 13px 25px -17px rgba(23, 140, 120, 0.66), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.button-dark {
  color: #fff9ed;
  background: var(--ink);
  border-color: var(--ink);
}

.button-quiet,
.button-ghost {
  color: var(--ink-soft);
  background: rgba(255, 253, 247, 0.78);
  border-color: var(--line);
}

.button-quiet:hover,
.button-ghost:hover {
  color: var(--ink-strong);
  border-color: var(--line-strong);
  background: var(--paper);
}

.button-outline {
  color: var(--coral-deep);
  background: transparent;
  border-color: rgba(230, 82, 67, 0.35);
}

.button-large {
  min-height: 52px;
  padding: 13px 21px;
  border-radius: 17px;
  font-size: 14px;
}

.button-block {
  width: 100%;
}

.button[disabled] {
  transform: none;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  font-size: 14px;
}

.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(62, 185, 162, 0.13);
  animation: livePulse 2s ease-in-out infinite;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 35px 2px 18px;
}

.section-heading h2 {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 850;
  line-height: 1.12;
}

.section-heading-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Studio hero ---------- */

.studio-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 32px;
  min-height: 480px;
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid rgba(227, 210, 183, 0.9);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 230, 157, 0.57), transparent 32rem),
    radial-gradient(circle at 100% 100%, rgba(201, 241, 232, 0.62), transparent 31rem),
    linear-gradient(140deg, #fffaf0 0%, #fff6e4 50%, #f4fbf4 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.studio-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: 28%;
  bottom: -220px;
  border: 1px dashed rgba(91, 134, 110, 0.18);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 760px;
}

.hero-copy h1 {
  margin-top: 16px;
  color: var(--ink-strong);
  font-size: clamp(39px, 5vw, 70px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-highlight {
  position: relative;
  display: inline-block;
  color: var(--coral-deep);
  z-index: 1;
}

.hero-highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -2%;
  right: -3%;
  bottom: 3px;
  height: 17px;
  border-radius: 60% 50% 45% 55%;
  background: rgba(255, 201, 81, 0.46);
  transform: rotate(-1deg);
}

.hero-lede {
  max-width: 640px;
  margin-top: 19px;
  color: var(--ink-soft);
  font-size: clamp(13px, 1.12vw, 16px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid rgba(205, 186, 157, 0.35);
}

.trust-strip span {
  position: relative;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
}

.trust-strip span + span::before {
  content: "·";
  position: absolute;
  left: -10px;
  color: var(--line-strong);
}

.trust-strip b {
  color: var(--ink);
  font-weight: 850;
}

.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border-radius: 50% 48% 46% 52% / 48% 48% 52% 52%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 252, 239, 0.95) 0 22%, rgba(255, 235, 177, 0.62) 55%, transparent 70%),
    conic-gradient(from 35deg at 50% 50%, rgba(255, 210, 99, 0.2), rgba(122, 210, 189, 0.3), rgba(178, 163, 230, 0.22), rgba(255, 159, 128, 0.2), rgba(255, 210, 99, 0.2));
  transform: rotate(1deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1.5px dashed rgba(92, 119, 100, 0.25);
  animation: slowSpin 34s linear infinite;
}

.hero-rig {
  position: relative;
  z-index: 3;
  width: min(88%, 380px);
  filter: drop-shadow(0 30px 30px rgba(88, 59, 19, 0.14));
  animation: heroBob 5.2s ease-in-out infinite;
}

.hero-rig .rig-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-nameplate {
  position: absolute;
  z-index: 5;
  left: 8%;
  bottom: 9%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px 9px 9px;
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.93);
  border: 1px solid rgba(229, 209, 179, 0.8);
  box-shadow: 0 16px 30px -23px rgba(72, 49, 18, 0.65);
  backdrop-filter: blur(10px);
  transform: rotate(-2deg);
}

.hero-nameplate-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--sun-soft);
  font-size: 15px;
}

.hero-nameplate span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero-nameplate small {
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 700;
}

.hero-nameplate strong {
  color: var(--coral-deep);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-sticker {
  position: absolute;
  z-index: 6;
  padding: 9px 10px;
  border: 1.5px solid rgba(59, 66, 57, 0.22);
  background: rgba(255, 251, 238, 0.9);
  color: #506a5d;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 0.09em;
  text-align: center;
  box-shadow: 0 10px 22px -17px rgba(61, 44, 22, 0.55);
}

.hero-sticker b {
  color: var(--coral-deep);
  font-size: 10px;
}

.hero-sticker-top {
  right: 8%;
  top: 9%;
  transform: rotate(6deg);
  border-radius: 4px;
}

.hero-sticker-bottom {
  right: 3%;
  bottom: 22%;
  transform: rotate(-8deg);
  border-radius: 50%;
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  background: var(--sun);
  color: #65470d;
}

.hero-sticker-bottom b {
  color: #6a3a11;
}

.hero-orbit {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  border: 1px solid rgba(67, 137, 117, 0.2);
}

.orbit-one {
  inset: 5%;
}

.orbit-two {
  inset: 25%;
  border-style: dashed;
}

.hero-note {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--coral);
  font-size: 17px;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  animation: noteFloat 4s ease-in-out infinite;
}

.hero-note-one {
  left: 4%;
  top: 20%;
}

.hero-note-two {
  right: 10%;
  top: 37%;
  color: var(--mint-deep);
  animation-delay: -1.4s;
}

.hero-note-three {
  left: 15%;
  bottom: 18%;
  color: var(--lilac);
  animation-delay: -2.6s;
}

/* ---------- Subnavigation / panels ---------- */

.studio-subnav {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 4px;
  margin: 20px 0 8px;
  padding: 6px;
  border: 1px solid rgba(225, 208, 182, 0.82);
  border-radius: 21px;
  background: rgba(255, 252, 245, 0.78);
  box-shadow: 0 14px 35px -34px rgba(76, 55, 29, 0.55);
  backdrop-filter: blur(16px);
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-subnav::-webkit-scrollbar {
  display: none;
}

.subnav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  padding: 9px 14px;
  border-radius: 15px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.subnav-tab:hover {
  color: var(--ink-strong);
  background: rgba(247, 238, 223, 0.68);
}

.subnav-tab.is-active {
  color: var(--ink-strong);
  background: var(--paper);
  box-shadow: 0 8px 20px -17px rgba(74, 50, 16, 0.65), inset 0 0 0 1px rgba(235, 221, 201, 0.9);
}

.subnav-tab small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subnav-tab.is-active small {
  color: var(--coral-deep);
}

.studio-panels {
  position: relative;
}

.studio-panel {
  animation: panelIn 0.42s var(--ease);
}

/* ---------- Library launch spotlight ---------- */

.library-spotlight {
  margin: 14px 0 0;
}

.launch-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 19px 22px;
  border: 1px solid #eedaa9;
  border-radius: 23px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.45), transparent 20rem),
    linear-gradient(120deg, #fff4d0, #ffefd9 55%, #e8f8f2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.launch-banner::after {
  content: "♫";
  position: absolute;
  right: 22%;
  top: -24px;
  color: rgba(214, 153, 36, 0.12);
  font-size: 110px;
  font-weight: 900;
  transform: rotate(12deg);
}

.launch-banner-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.launch-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #f0dba8;
  font-size: 24px;
  box-shadow: 0 10px 23px -17px rgba(122, 83, 15, 0.4);
}

.launch-banner h3 {
  color: #58420f;
  font-size: 15px;
  font-weight: 850;
}

.launch-banner p {
  margin-top: 3px;
  color: #8d753e;
  font-size: 10.5px;
}

.launch-banner-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.launch-badge {
  padding: 6px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.62);
  color: #8b6b28;
  font-size: 8.5px;
  font-weight: 850;
  border: 1px solid rgba(224, 192, 125, 0.6);
}

/* ---------- Filters ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 247, 0.66);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 750;
  transition: all 0.2s var(--ease);
}

.filter-pill:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  transform: translateY(-1px);
}

.filter-pill.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffaf0;
  box-shadow: 0 8px 18px -14px rgba(30, 48, 41, 0.65);
}

.filter-pill small {
  opacity: 0.65;
  font-size: 8px;
}

/* ---------- Song cards ---------- */

.song-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.song-card {
  --song-main: #ffb06d;
  --song-accent: #ff785f;
  --song-wash: #fff4df;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(226, 208, 180, 0.95);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 16px 35px -34px rgba(78, 53, 17, 0.44);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.song-card:hover {
  transform: translateY(-5px);
  border-color: #dbc6a4;
  box-shadow: 0 30px 50px -40px rgba(78, 53, 17, 0.52);
}

.song-cover {
  position: relative;
  min-height: 178px;
  padding: 15px;
  background:
    radial-gradient(circle at 74% 27%, rgba(255, 255, 255, 0.72), transparent 35%),
    linear-gradient(135deg, var(--song-wash), var(--song-main));
  overflow: hidden;
}

.song-cover::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -70px;
  bottom: -99px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.song-cover::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  left: -53px;
  top: -54px;
  border: 1.5px dashed rgba(44, 60, 48, 0.19);
  border-radius: 50%;
}

.song-cover-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(255, 252, 242, 0.8);
  color: #66521e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.035em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.song-cover-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--song-accent);
}

.song-cover-emoji {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 48%;
  display: block;
  font-size: clamp(63px, 6.4vw, 86px);
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-4deg);
  filter: drop-shadow(0 12px 12px rgba(93, 60, 14, 0.16));
  transition: transform 0.4s var(--ease-bounce);
}

.song-card:hover .song-cover-emoji {
  transform: translate(-50%, -54%) rotate(2deg) scale(1.04);
}

.song-cover-title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  color: rgba(42, 52, 41, 0.68);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.song-cover-ring {
  position: absolute;
  z-index: 0;
  right: 16%;
  top: 22%;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}

.song-cover-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(43, 62, 48, 0.19);
  border-radius: 50%;
}

.cover-preview {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  padding: 5px 9px;
  border-radius: 10px;
  color: #2b4036;
  background: rgba(255, 253, 246, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.cover-preview:hover {
  background: #fffdf8;
  transform: scale(1.03);
}

.cover-preview .mini-play-icon {
  font-size: 8px;
}

.song-cover-wave {
  position: absolute;
  z-index: 2;
  left: 17px;
  bottom: 15px;
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}

.song-card.is-playing .song-cover-wave {
  display: flex;
}

.song-cover-wave i {
  display: block;
  width: 3px;
  height: var(--h, 12px);
  min-height: 4px;
  border-radius: 99px;
  background: rgba(44, 68, 56, 0.66);
  transform-origin: bottom;
  animation: coverWave 0.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * -0.08s);
}

.song-card.is-playing .cover-preview {
  right: 12px;
}

.song-card.is-playing .cover-preview span:last-child {
  font-size: 0;
}

.song-card.is-playing .cover-preview span:last-child::after {
  content: "停止";
  font-size: 9px;
}

.song-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 16px;
}

.song-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scene-badge,
.bpm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.scene-badge {
  color: var(--mint-deep);
  background: var(--mint-soft);
}

.bpm-badge {
  color: #78653a;
  background: #faf1e0;
  font-family: var(--mono);
  font-size: 8px;
}

.song-body h3 {
  margin-top: 10px;
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.song-zh {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 650;
}

.song-benefit {
  margin-top: 10px;
  min-height: 37px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.tpr-block {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fbf6eb;
  border: 1px solid #f0e6d6;
}

.tpr-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tpr-label span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.tpr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tpr-tags span {
  padding: 3px 6px;
  border-radius: 6px;
  background: white;
  border: 1px solid #ede1ce;
  color: #687064;
  font-size: 8.5px;
  font-weight: 650;
}

.song-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed #e9ddc9;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7.5px;
}

.song-meta-row span:last-child {
  color: #a4895e;
}

.song-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.song-actions .button {
  flex: 1;
  min-height: 45px;
  padding: 8px 10px;
  text-align: center;
  white-space: normal;
  font-size: 10.5px;
  line-height: 1.35;
}

.song-actions .button-express {
  color: #fffdf7;
  background: linear-gradient(135deg, #4bc6af, #2ba790);
  border-color: #289782;
  box-shadow: 0 12px 24px -17px rgba(23, 140, 120, 0.7);
}

.song-actions .button-express:hover {
  background: linear-gradient(135deg, #5dd3bd, #30b49c);
}

.express-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 7px;
  color: #70a99b;
  font-size: 8px;
  font-weight: 650;
}

/* ---------- Fake door / demand cards ---------- */

.fake-door-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 2px 17px;
}

.fake-door-heading h2 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: clamp(23px, 2.1vw, 30px);
  font-weight: 850;
}

.fake-door-heading p {
  max-width: 660px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}

.fake-door-heading p strong {
  color: var(--coral-deep);
  font-weight: 850;
}

.vote-mission {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 252, 245, 0.7);
  white-space: nowrap;
}

.vote-mission-icon {
  font-size: 19px;
}

.vote-mission div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.vote-mission small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.vote-mission strong {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

.fake-door-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fake-door-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px;
  border: 1px dashed #d7c9b5;
  border-radius: 19px;
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.88), rgba(250, 243, 231, 0.65));
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease);
}

.fake-door-card:hover {
  transform: translateY(-3px);
  border-color: #b8d8ca;
  background: var(--paper);
}

.fake-door-card.is-voted {
  border-style: solid;
  border-color: #b9ddce;
  background: linear-gradient(145deg, #fbfffd, #f0fbf6);
}

.fake-door-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fake-door-emoji {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: #fff5e2;
  border: 1px solid #f0e0c3;
  font-size: 22px;
}

.fake-door-tag {
  padding: 4px 6px;
  border-radius: 6px;
  color: #8b7753;
  background: #f7efdf;
  font-size: 7.5px;
  font-weight: 800;
  white-space: nowrap;
}

.fake-door-card h3 {
  margin-top: 10px;
  color: var(--ink-strong);
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.2;
}

.fake-door-zh {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.fake-door-blurb {
  margin-top: 7px;
  min-height: 31px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.vote-progress {
  margin-top: 10px;
}

.vote-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7.5px;
}

.vote-progress-meta strong {
  color: #5a755f;
  font-size: 8px;
}

.vote-track {
  height: 6px;
  margin-top: 5px;
  border-radius: 99px;
  background: #efe6d7;
  overflow: hidden;
}

.vote-track span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd05d, #f4ab38);
  transition: width 0.5s var(--ease);
}

.fake-door-card.is-voted .vote-track span {
  background: linear-gradient(90deg, #62cdb5, #32b398);
}

.vote-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 37px;
  margin-top: 10px;
  padding: 7px 8px;
  border-radius: 11px;
  border: 1px solid #e5d6c1;
  background: white;
  color: #786441;
  font-size: 8.5px;
  font-weight: 800;
  transition: all 0.2s var(--ease);
}

.vote-button:hover:not(:disabled) {
  background: var(--sun-soft);
  border-color: #e9c66b;
  transform: translateY(-1px);
}

.fake-door-card.is-voted .vote-button {
  color: var(--mint-deep);
  border-color: #bfe3d6;
  background: var(--mint-soft);
}

.vote-alert-copy {
  margin-top: 5px;
  color: #9b8966;
  font-size: 7px;
  text-align: center;
}

/* ---------- Character tab ---------- */

.characters-head,
.privacy-head,
.gifts-head,
.digest-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 14px 0 19px;
  padding: 25px 27px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    radial-gradient(circle at 93% 10%, rgba(255, 226, 162, 0.4), transparent 17rem),
    var(--paper);
  box-shadow: var(--shadow-sm);
}

.characters-head h1,
.gifts-head h1,
.digest-head h1,
.privacy-head h1 {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.characters-head p,
.gifts-head p,
.digest-head p,
.privacy-head p {
  max-width: 650px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.character-card {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.character-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.character-visual {
  position: relative;
  padding: 15px 15px 0;
  background:
    radial-gradient(circle at 50% 62%, var(--char-bg, #fff2df) 0 20%, transparent 66%),
    linear-gradient(145deg, #fffaf0, var(--char-bg, #fff2df));
  overflow: hidden;
}

.character-visual::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px dashed rgba(87, 100, 83, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.character-rig-preview {
  position: relative;
  z-index: 1;
  width: min(76%, 310px);
  margin: 0 auto -18px;
  filter: drop-shadow(0 20px 25px rgba(65, 40, 13, 0.12));
}

.character-rig-preview .rig-svg {
  width: 100%;
  height: auto;
}

.char-style-switch {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 13px;
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 252, 245, 0.85);
  border: 1px solid rgba(228, 213, 191, 0.9);
  backdrop-filter: blur(8px);
}

.char-style-switch button {
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 800;
}

.char-style-switch button.is-active {
  color: var(--ink-strong);
  background: white;
  box-shadow: 0 4px 10px -8px rgba(54, 40, 21, 0.5);
}

.character-version-badge {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  padding: 5px 8px;
  border-radius: 99px;
  background: var(--ink);
  color: #fff9ed;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 700;
}

.character-card-body {
  padding: 18px;
}

.character-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.character-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.character-card h3 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.05;
}

.character-pronunciation {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10px;
}

.phonetic {
  margin-left: 5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.character-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.character-traits span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f8f3e9;
  border: 1px solid #efe5d6;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 650;
}

.character-notes {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f6fbf8;
  color: #628176;
  font-size: 8.5px;
  line-height: 1.5;
}

.character-card-actions {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}

.character-card-actions .button {
  flex: 1;
  min-height: 38px;
  padding: 7px 9px;
  font-size: 9.5px;
}

.add-character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 26px;
  border: 1.5px dashed #d3c5b0;
  border-radius: 25px;
  background: rgba(255, 252, 245, 0.45);
  color: var(--ink-faint);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.add-character-card:hover {
  border-color: var(--mint);
  background: #f9fffc;
  transform: translateY(-3px);
}

.add-character-plus {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 11px;
  border-radius: 19px;
  background: var(--mint-soft);
  color: var(--mint-deep);
  font-size: 25px;
  font-weight: 400;
}

.add-character-card strong {
  color: var(--ink);
  font-size: 13px;
}

.add-character-card p {
  max-width: 235px;
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.55;
  text-align: center;
}

.character-slot-note {
  margin-top: 13px;
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 9px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 40px 24px;
  border: 1.5px dashed #d7c7b0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 231, 175, 0.38), transparent 18rem),
    rgba(255, 252, 245, 0.6);
  text-align: center;
}

.empty-state-emoji {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
  border-radius: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 37px;
  box-shadow: var(--shadow-sm);
}

.empty-state h2 {
  color: var(--ink-strong);
  font-size: 26px;
  font-weight: 900;
}

.empty-state p {
  max-width: 500px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- Gift tab ---------- */

.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gift-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.gift-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0e5d6;
  background: #fbf7ef;
}

.gift-path {
  color: #8b7a5f;
  font-family: var(--mono);
  font-size: 8px;
}

.gift-status {
  padding: 4px 7px;
  border-radius: 99px;
  background: var(--mint-soft);
  color: var(--mint-deep);
  font-size: 7.5px;
  font-weight: 800;
}

.postcard {
  position: relative;
  margin: 16px;
  padding: 22px 22px 19px;
  border: 1.5px dashed #cdb99c;
  border-radius: 7px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 216, 124, 0.3), transparent 14rem),
    linear-gradient(145deg, #fffdf6, #fff5e3);
  overflow: hidden;
}

.postcard::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(202, 181, 147, 0.36);
  pointer-events: none;
}

.postcard-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 72px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px dashed #d6bc93;
  background: #fffaf0;
  transform: rotate(3deg);
  text-align: center;
  color: #9d7540;
}

.postcard-stamp .stamp-star {
  font-size: 27px;
  line-height: 1;
}

.postcard-stamp small {
  display: block;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.postcard-stamp strong {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 600;
}

.postcard-to {
  color: #997f57;
  font-size: 9px;
  font-weight: 700;
}

.postcard h3 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.postcard-from {
  margin-top: 13px;
  color: #776648;
  font-size: 9.5px;
  font-weight: 650;
}

.postcard-message {
  max-width: 82%;
  margin-top: 11px;
  color: #655741;
  font-family: "KaiTi", "STKaiti", Georgia, serif;
  font-size: 12.5px;
  line-height: 1.75;
}

.postcard-play-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid rgba(192, 170, 134, 0.35);
}

.gift-code {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.gift-code small {
  color: #9a8664;
  font-size: 7px;
  font-weight: 700;
}

.gift-code strong {
  color: var(--coral-deep);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.gift-actions {
  display: flex;
  gap: 6px;
  padding: 0 16px 16px;
}

.gift-actions .button {
  flex: 1;
  min-height: 37px;
  padding: 7px;
  font-size: 9px;
}

.gift-redeem-note {
  margin: 0 16px 16px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f8f5ed;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.5;
}

/* ---------- Digest ---------- */

.digest-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 29px;
  border: 1px solid #e9d7b4;
  border-radius: 27px;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.6), transparent 21rem),
    linear-gradient(125deg, #fff3c8, #ffecd8 52%, #e8f8f0);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.digest-hero::after {
  content: "✧";
  position: absolute;
  right: 18%;
  top: -38px;
  color: rgba(202, 126, 44, 0.11);
  font-size: 165px;
  line-height: 1;
}

.digest-hero-copy {
  position: relative;
  z-index: 1;
}

.digest-hero h2 {
  margin-top: 6px;
  color: var(--ink-strong);
  font-size: clamp(25px, 3.2vw, 39px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.05em;
}

.digest-hero h2 span {
  color: var(--coral-deep);
}

.digest-hero p {
  max-width: 630px;
  margin-top: 9px;
  color: #73643f;
  font-size: 11px;
}

.digest-number-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 16px 21px;
  border-radius: 20px;
  background: rgba(255, 253, 245, 0.68);
  border: 1px solid rgba(226, 196, 131, 0.55);
}

.digest-number-card strong {
  color: #b36a1f;
  font-size: 55px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
}

.digest-number-card span {
  color: #937039;
  font-size: 11px;
  font-weight: 750;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: var(--sun-soft);
  font-size: 17px;
}

.stat-card:nth-child(2) .stat-icon { background: var(--mint-soft); }
.stat-card:nth-child(3) .stat-icon { background: var(--lilac-soft); }
.stat-card:nth-child(4) .stat-icon { background: var(--rose-soft); }

.stat-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-copy strong {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
}

.stat-copy small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.digest-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
  margin-top: 14px;
}

.digest-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.digest-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.digest-card h3 {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 850;
}

.digest-card p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 145px;
  margin-top: 20px;
  padding: 0 3px;
  border-bottom: 1px solid #eee3d2;
}

.week-bar-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
}

.week-bar {
  position: relative;
  width: 100%;
  max-width: 31px;
  height: var(--bar, 20%);
  min-height: 6px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--sun) 0%, #ffde8a 100%);
  transform-origin: bottom;
  animation: barGrow 0.8s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.06s);
}

.week-bar-wrap:nth-child(even) .week-bar {
  background: linear-gradient(180deg, #6bceb9, #b8eee3);
}

.week-bar-wrap span {
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 700;
}

.week-bar small {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  color: #9b8361;
  font-size: 7px;
  font-weight: 800;
}

.phrase-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.phrase-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #f7fbf8;
  border: 1px solid #dfeee5;
  color: #477365;
  font-size: 9px;
  font-weight: 700;
}

.phrase-chip::before {
  content: "✓";
  color: var(--mint);
  font-weight: 900;
}

.unlock-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--sun);
  border-radius: 0 9px 9px 0;
  background: #fff9e8;
  color: #8e7440;
  font-size: 8.5px;
  line-height: 1.55;
}

.recommendation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 20px 22px;
  border: 1px solid #d9e8df;
  border-radius: 22px;
  background:
    radial-gradient(circle at 94% 10%, rgba(145, 225, 206, 0.3), transparent 17rem),
    linear-gradient(120deg, #f7fffb, #f2fbf6);
}

.rec-copy {
  display: flex;
  align-items: center;
  gap: 13px;
}

.rec-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 16px;
  background: var(--mint-soft);
  font-size: 25px;
}

.recommendation-card h3 {
  color: #2b5f51;
  font-size: 15px;
  font-weight: 850;
}

.recommendation-card p {
  margin-top: 3px;
  color: #668579;
  font-size: 9.5px;
}

/* ---------- Privacy & ledger ---------- */

.privacy-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.privacy-summary {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.privacy-summary small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.privacy-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
}

.privacy-summary .status-good {
  color: var(--success);
  font-size: 13px;
}

.privacy-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.audit-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.audit-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.audit-card h2 {
  color: var(--ink-strong);
  font-size: 17px;
  font-weight: 850;
}

.audit-card-head p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.audit-tag {
  padding: 4px 7px;
  border-radius: 6px;
  background: #f3f9f6;
  color: var(--mint-deep);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.consent-timeline {
  position: relative;
  padding-left: 17px;
}

.consent-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #dfebE5;
}

.consent-item {
  position: relative;
  padding: 0 0 15px 11px;
}

.consent-item:last-child {
  padding-bottom: 0;
}

.consent-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px #eefaf6;
}

.consent-item h4 {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 800;
}

.consent-item p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.consent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.consent-meta span {
  padding: 3px 5px;
  border-radius: 4px;
  background: #f7f4ed;
  color: #96866e;
  font-family: var(--mono);
  font-size: 6.5px;
}

.empty-audit {
  padding: 25px 15px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
  line-height: 1.6;
}

.receipt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.l0-receipt {
  padding: 12px;
  border: 1px solid #e4dccd;
  border-radius: 13px;
  background:
    linear-gradient(120deg, rgba(255, 252, 243, 0.8), rgba(247, 241, 229, 0.65));
  font-family: var(--mono);
}

.l0-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.l0-receipt-head strong {
  color: #5c523e;
  font-size: 8.5px;
}

.l0-receipt-seal {
  padding: 3px 5px;
  border-radius: 4px;
  background: #e7f7ef;
  color: #168463;
  font-size: 6.5px;
  font-weight: 800;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: #91866f;
  font-size: 6.5px;
}

.receipt-row span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deletion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.deletion-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #ecdcc8;
  border-radius: 17px;
  background: var(--paper);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.deletion-card:hover {
  transform: translateY(-2px);
  border-color: #e4b9a9;
}

.deletion-card.is-risk-high {
  background: #fff9f4;
  border-color: #f0d8c8;
}

.deletion-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.deletion-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f8f2e8;
  font-size: 16px;
}

.deletion-risk {
  padding: 3px 5px;
  border-radius: 5px;
  background: #fbf0e9;
  color: #bb684b;
  font-size: 6.5px;
  font-weight: 800;
}

.deletion-card h3 {
  margin-top: 9px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
}

.deletion-card p {
  min-height: 46px;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.55;
}

.deletion-card .button {
  min-height: 33px;
  margin-top: 10px;
  padding: 5px;
  font-size: 8.5px;
}

.deletion-request-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}

.deletion-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #eedfc4;
  border-radius: 12px;
  background: #fffbf2;
}

.deletion-request strong {
  color: var(--ink);
  font-size: 9.5px;
}

.deletion-request p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.deletion-request-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-pill {
  padding: 5px 7px;
  border-radius: 7px;
  background: #fff3d5;
  color: #956808;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.countdown-pill.is-ready {
  background: var(--mint-soft);
  color: var(--mint-deep);
}

.mini-button {
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-soft);
  font-size: 7.5px;
  font-weight: 800;
}

.mini-button:hover {
  border-color: var(--line-strong);
}

.ledger-card {
  margin-top: 14px;
  padding: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ledger-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px 15px;
}

.ledger-stats {
  display: flex;
  gap: 7px;
}

.ledger-stat {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fbf6ed;
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 700;
}

.ledger-stat b {
  color: var(--coral-deep);
  font-weight: 850;
}

.ledger-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #f0e8db;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 8px;
}

.ledger-table th {
  padding: 9px 12px;
  background: #faf6ee;
  color: #96866f;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

.ledger-table td {
  padding: 9px 12px;
  border-top: 1px solid #f4ecdf;
  color: var(--ink-soft);
  vertical-align: top;
}

.ledger-table tr:hover td {
  background: #fffcf6;
}

.ledger-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  border-radius: 4px;
  background: #f2faf7;
  color: #4d816f;
  font-size: 6.5px;
  font-weight: 800;
  white-space: nowrap;
}

.ledger-type.is-failed {
  background: #fff0ec;
  color: #c35e4b;
}

.ledger-amount {
  color: #5e4e34;
  font-family: var(--mono);
  font-size: 7.5px;
  white-space: nowrap;
}

.ledger-amount.is-credit {
  color: var(--success);
}

.ledger-ref {
  color: #a3947d;
  font-family: var(--mono);
  font-size: 6.5px;
}

/* ---------- Footer ---------- */

.studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding: 19px 4px 0;
  border-top: 1px solid rgba(218, 201, 175, 0.65);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.footer-brand small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.studio-footer > p {
  color: var(--ink-faint);
  font-size: 7.5px;
  text-align: right;
}

/* ---------- Modal primitives ---------- */

.modal-root {
  position: relative;
  z-index: 200;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(28, 35, 30, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.22s ease both;
}

.modal-backdrop.modal-right {
  justify-content: flex-end;
  padding: 0;
  background: rgba(28, 35, 30, 0.35);
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(90vh, 800px);
  border: 1px solid rgba(228, 211, 185, 0.95);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 40px 90px -34px rgba(24, 31, 27, 0.55);
  overflow: hidden;
  animation: modalPop 0.32s var(--ease-bounce) both;
}

.modal-card.modal-wide {
  width: min(760px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 23px 16px;
  border-bottom: 1px solid #f0e6d7;
  background: linear-gradient(145deg, #fffdf7, #fff7e9);
}

.modal-head h2 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.modal-head p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 16px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.modal-close:hover {
  background: white;
  transform: rotate(6deg);
}

.modal-body {
  padding: 21px 23px;
  max-height: calc(90vh - 90px);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 23px;
  border-top: 1px solid #f0e6d7;
  background: #fffbf4;
}

/* ---------- Owner toolbar modal / account ---------- */

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed #ecdfcc;
  font-size: 10px;
}

.account-row:last-of-type {
  border-bottom: none;
}

.account-row span:first-child {
  color: var(--ink-faint);
  font-weight: 650;
}

.account-row strong {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.account-token {
  padding: 7px 9px;
  border-radius: 8px;
  background: #f7f2e9;
  color: #8d7d65;
  font-family: var(--mono);
  font-size: 8px;
  word-break: break-all;
}

.account-note {
  margin-top: 13px;
  padding: 10px;
  border-radius: 10px;
  background: #f7fbf8;
  color: #678277;
  font-size: 8.5px;
  line-height: 1.6;
}

/* ---------- Parent gate ---------- */

.gate-modal {
  width: min(470px, 100%);
  border-radius: 28px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 40px 90px -34px rgba(24, 31, 27, 0.6);
  animation: gatePop 0.34s var(--ease-bounce) both;
}

.gate-top {
  position: relative;
  padding: 25px 26px 20px;
  color: #fff9ed;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 201, 81, 0.28), transparent 17rem),
    linear-gradient(145deg, #253b33, #305347);
  overflow: hidden;
}

.gate-top::after {
  content: "🔐";
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 80px;
  opacity: 0.12;
}

.gate-kicker {
  color: #c7dfd4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.gate-top h2 {
  margin-top: 7px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.gate-top p {
  max-width: 330px;
  margin-top: 5px;
  color: #a8c3b8;
  font-size: 10px;
  line-height: 1.6;
}

.gate-body {
  padding: 22px 26px 19px;
}

.gate-question {
  padding: 13px;
  border: 1px solid #ede0ca;
  border-radius: 17px;
  background: #fff9ed;
  text-align: center;
}

.gate-question small {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
}

.gate-question strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.gate-answer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}

.gate-answer input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #e5d6bf;
  border-radius: 13px;
  background: white;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.08em;
}

.gate-answer input:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(62, 185, 162, 0.12);
}

.gate-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 11px;
}

.gate-key {
  min-height: 42px;
  border: 1px solid #eadfce;
  border-radius: 11px;
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}

.gate-key:hover {
  background: #fff7e6;
}

.gate-key:active {
  transform: scale(0.96);
}

.gate-key.is-action {
  font-family: var(--font);
  font-size: 9px;
  color: var(--ink-faint);
}

.gate-error {
  min-height: 16px;
  margin-top: 7px;
  color: var(--danger);
  font-size: 8.5px;
  font-weight: 700;
  text-align: center;
}

.gate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid #f0e7d9;
}

.demo-skip {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #d7c5aa;
  text-underline-offset: 3px;
}

.demo-skip:hover {
  color: var(--coral-deep);
}

.gate-shake {
  animation: shake 0.38s ease;
}

/* ---------- Wizard ---------- */

.wizard-backdrop {
  align-items: center;
}

.wizard-shell {
  display: flex;
  flex-direction: column;
  width: min(1160px, calc(100vw - 34px));
  max-height: min(94vh, 930px);
  border: 1px solid rgba(227, 209, 180, 0.95);
  border-radius: 29px;
  background: var(--paper);
  box-shadow: 0 44px 100px -38px rgba(24, 31, 27, 0.62);
  overflow: hidden;
  animation: wizardIn 0.38s var(--ease) both;
}

.wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 21px;
  border-bottom: 1px solid #efe5d6;
  background:
    radial-gradient(circle at 90% -20%, rgba(255, 201, 81, 0.28), transparent 18rem),
    linear-gradient(135deg, #fffdf8, #fff8ec);
}

.wizard-brandline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-mini-logo {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: var(--sun-soft);
  font-size: 19px;
}

.wizard-head h2 {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.wizard-head p {
  color: var(--ink-faint);
  font-size: 9px;
}

.wizard-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-step-count {
  padding: 6px 9px;
  border-radius: 8px;
  background: #f6f0e5;
  color: #8c7b61;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0 21px;
  border-bottom: 1px solid #f1e8db;
  background: #fffdf9;
}

.wizard-progress-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 49px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 750;
}

.wizard-progress-step + .wizard-progress-step::before {
  content: "";
  position: absolute;
  left: -15px;
  width: 25px;
  height: 1px;
  background: #e9dcc9;
}

.wizard-progress-step.is-active {
  color: var(--coral-deep);
}

.wizard-progress-step.is-done {
  color: var(--mint-deep);
}

.step-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #e4d7c5;
  background: #faf5ec;
  color: #98886e;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.wizard-progress-step.is-active .step-dot {
  color: white;
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 118, 95, 0.12);
}

.wizard-progress-step.is-done .step-dot {
  color: white;
  background: var(--mint);
  border-color: var(--mint);
}

.step-label small {
  display: block;
  color: inherit;
  opacity: 0.68;
  font-size: 7px;
  font-weight: 650;
}

.wizard-body {
  flex: 1;
  padding: 23px 27px 27px;
  overflow-y: auto;
  scrollbar-color: #d9c9b1 transparent;
  scrollbar-width: thin;
}

.wizard-body::-webkit-scrollbar {
  width: 8px;
}

.wizard-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 20px;
  background-clip: content-box;
  background-color: #d9c9b1;
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 21px;
  border-top: 1px solid #efe5d6;
  background: #fffbf4;
}

.wizard-footer-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 8px;
}

.wizard-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-head {
  margin-bottom: 18px;
}

.wizard-step-head h3 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: clamp(23px, 2.6vw, 31px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.wizard-step-head p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.wizard-step-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--mint-soft);
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 800;
}

.step-grid-name {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.name-form-card,
.name-aside-card,
.trait-editor,
.character-workspace,
.checkout-side,
.checkout-main {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fffdf8;
}

.name-form-card {
  padding: 20px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.field-label small {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
}

.text-input,
.textarea-input {
  width: 100%;
  border: 1.5px solid #e8dac6;
  border-radius: 13px;
  background: #fffefa;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.text-input {
  height: 50px;
  padding: 0 14px;
}

.textarea-input {
  min-height: 95px;
  padding: 11px 13px;
  resize: vertical;
  font-weight: 500;
  line-height: 1.6;
}

.text-input::placeholder,
.textarea-input::placeholder {
  color: #b8a994;
  font-weight: 500;
}

.text-input:focus,
.textarea-input:focus {
  border-color: var(--mint);
  outline: none;
  box-shadow: 0 0 0 4px rgba(62, 185, 162, 0.1);
}

.name-input-wrap {
  position: relative;
}

.name-input-wrap .text-input {
  padding-right: 92px;
  font-size: 19px;
  font-weight: 900;
}

.name-input-live {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 6px;
  border-radius: 5px;
  background: #f4faf7;
  color: var(--mint-deep);
  font-size: 7px;
  font-weight: 750;
  pointer-events: none;
}

.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.name-chip {
  padding: 6px 9px;
  border: 1px solid #e9dcc8;
  border-radius: 8px;
  background: #fffbf4;
  color: #7a6a53;
  font-size: 9px;
  font-weight: 750;
  transition: all 0.18s var(--ease);
}

.name-chip:hover {
  background: var(--sun-soft);
  border-color: #e9c668;
  color: #705412;
}

.detection-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid #dbece4;
  background: #f5fcf8;
  min-height: 59px;
}

.detection-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 9px;
  background: white;
  font-size: 13px;
}

.detection-copy {
  flex: 1;
  min-width: 0;
}

.detection-copy strong {
  display: block;
  color: #2c6a59;
  font-size: 9.5px;
  font-weight: 850;
}

.detection-copy p {
  margin-top: 2px;
  color: #6a8c7f;
  font-size: 8px;
  line-height: 1.45;
}

.detection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.detection-tags span {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e8f6ef;
  color: #4e8a76;
  font-family: var(--mono);
  font-size: 6.5px;
}

.detection-card.is-longtail {
  border-color: #e8dcc7;
  background: #fffbf1;
}

.detection-card.is-longtail .detection-copy strong {
  color: #83602c;
}

.detection-card.is-longtail .detection-copy p {
  color: #977f5d;
}

.detection-card.is-longtail .detection-tags span {
  background: #fff2d7;
  color: #9d7631;
}

.pronunciation-label {
  margin-top: 15px;
}

.pronunciation-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
}

.pronunciation-capsule {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #e9dcc8;
  border-radius: 10px;
  background: #fffbf4;
  color: var(--ink-soft);
  text-align: left;
  transition: all 0.2s var(--ease);
}

.pronunciation-capsule:hover {
  border-color: #e4ca8f;
  background: #fff7e3;
}

.pronunciation-capsule.is-active {
  border-color: var(--mint);
  background: #edfaf5;
  box-shadow: 0 0 0 3px rgba(62, 185, 162, 0.09);
}

.pronunciation-capsule .capsule-radio {
  width: 13px;
  height: 13px;
  border: 1.5px solid #d5c6b1;
  border-radius: 50%;
  flex: 0 0 13px;
}

.pronunciation-capsule.is-active .capsule-radio {
  border: 4px solid var(--mint);
  background: white;
}

.capsule-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.capsule-copy strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.capsule-copy small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.capsule-tag {
  align-self: flex-start;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--sun-soft);
  color: #8c6a21;
  font-size: 6px;
  font-weight: 800;
  white-space: nowrap;
}

.custom-pronunciation {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eadfcd;
}

.chant-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
}

.chant-button {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 47px;
  padding: 8px 12px;
  border-radius: 13px;
  color: #59400c;
  background: linear-gradient(135deg, #ffe487, #ffd15a);
  border: 1px solid #ebbd43;
  font-size: 10.5px;
  font-weight: 850;
  box-shadow: 0 12px 22px -18px rgba(158, 105, 13, 0.75);
}

.chant-button:hover {
  background: linear-gradient(135deg, #ffeaa1, #ffd96c);
}

.chant-button .chant-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.chant-button.is-playing .chant-icon {
  animation: speakerPulse 0.6s ease-in-out infinite alternate;
}

.chant-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 23px;
  margin-left: auto;
}

.chant-wave i {
  width: 2px;
  height: 5px;
  border-radius: 99px;
  background: rgba(105, 72, 9, 0.55);
}

.chant-button.is-playing .chant-wave i {
  animation: chantWave 0.55s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * -0.06s);
}

.chant-note {
  max-width: 160px;
  color: var(--ink-faint);
  font-size: 7.5px;
  line-height: 1.45;
}

.name-aside-card {
  position: relative;
  padding: 18px;
  background:
    radial-gradient(circle at 84% 5%, rgba(255, 215, 123, 0.33), transparent 14rem),
    linear-gradient(155deg, #fff9ed, #f8fdf9);
  overflow: hidden;
}

.aside-figure {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 145px;
  margin-bottom: 11px;
}

.aside-figure .rig-svg {
  height: 165px;
  width: auto;
}

.aside-label {
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.name-aside-card h4 {
  margin-top: 6px;
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 850;
}

.name-aside-card p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.aside-benefits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.aside-benefit {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: #638274;
  font-size: 8.5px;
  line-height: 1.45;
}

.aside-benefit span:first-child {
  color: var(--mint-deep);
  font-weight: 900;
}

/* Step 2 */

.step-grid-character {
  display: grid;
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
  gap: 17px;
}

.character-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px;
  background: linear-gradient(145deg, #fffaf0, #f7fcf8);
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.workspace-head strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.workspace-head span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 6.5px;
}

.style-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: #f0e8da;
  border: 1px solid #e7dbc7;
}

.style-toggle button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 800;
}

.style-toggle button.is-active {
  background: var(--paper);
  color: var(--ink-strong);
  box-shadow: 0 4px 10px -8px rgba(51, 38, 19, 0.5);
}

.rig-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 337px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 239, 192, 0.8), transparent 55%),
    linear-gradient(155deg, #fffbf5, #f6f7eb);
  overflow: hidden;
}

.rig-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(104, 115, 91, 0.15);
  border-radius: 50%;
}

.rig-stage::after {
  content: "LIVE TRAIT PREVIEW";
  position: absolute;
  left: 12px;
  top: 11px;
  color: rgba(94, 111, 96, 0.42);
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rig-preview-inner {
  position: relative;
  z-index: 1;
  width: min(80%, 295px);
  filter: drop-shadow(0 22px 25px rgba(73, 48, 15, 0.12));
}

.rig-preview-inner .rig-svg {
  width: 100%;
  height: auto;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.workspace-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.workspace-footer span:last-child {
  color: #a2844d;
}

.trait-editor {
  min-width: 0;
  padding: 14px;
}

.photo-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: #f4eddf;
  border: 1px solid #eadcc7;
}

.photo-mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 37px;
  padding: 6px 8px;
  border-radius: 9px;
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 800;
}

.photo-mode-tab.is-active {
  background: var(--paper);
  color: var(--ink-strong);
  box-shadow: 0 5px 12px -10px rgba(49, 35, 16, 0.55);
}

.photo-mode-tab .recommend-dot {
  color: var(--mint-deep);
  font-size: 6px;
  font-weight: 800;
}

.trait-panel {
  margin-top: 13px;
}

.swatch-group {
  padding: 10px 0;
  border-bottom: 1px dashed #ede2d1;
}

.swatch-group:last-child {
  border-bottom: 0;
  padding-bottom: 3px;
}

.swatch-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.swatch-label {
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

.swatch-value {
  color: var(--ink-faint);
  font-size: 7.5px;
}

.swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.swatch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 29px;
  padding: 0 7px;
  border: 1px solid #e6d8c5;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink-soft);
  font-size: 7.5px;
  font-weight: 750;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.swatch:hover {
  border-color: #d5b984;
  transform: translateY(-1px);
}

.swatch.is-active {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 185, 162, 0.11);
}

.swatch-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(60, 47, 29, 0.12);
  background: var(--swatch, #eee);
}

.swatch-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.swatch-text {
  padding: 0 1px;
}

.swatch.is-active::after {
  content: "✓";
  position: absolute;
  right: -2px;
  top: -4px;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--mint);
  color: white;
  font-size: 6px;
  font-weight: 900;
}

.trait-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.trait-toggle {
  padding: 6px 8px;
  border: 1px solid #e6d8c5;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 750;
}

.trait-toggle.is-active {
  border-color: var(--mint);
  background: #effbf7;
  color: var(--mint-deep);
}

/* Photo upload */

.photo-panel {
  margin-top: 13px;
}

.photo-privacy-banner {
  display: flex;
  gap: 9px;
  padding: 11px;
  border: 1px solid #d8ece4;
  border-radius: 12px;
  background: #f3fcf8;
}

.photo-privacy-banner span {
  font-size: 16px;
}

.photo-privacy-banner strong {
  display: block;
  color: #356e5e;
  font-size: 9px;
  font-weight: 850;
}

.photo-privacy-banner p {
  margin-top: 2px;
  color: #6a8a7f;
  font-size: 7.5px;
  line-height: 1.45;
}

.photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 155px;
  margin-top: 11px;
  padding: 16px;
  border: 1.5px dashed #d9c9b1;
  border-radius: 15px;
  background: #fffdf8;
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.photo-dropzone:hover {
  border-color: var(--mint);
  background: #fafffc;
}

.photo-dropzone-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 15px;
  background: var(--mint-soft);
  font-size: 21px;
}

.photo-dropzone strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.photo-dropzone p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.45;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-demo-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.photo-demo-row .button {
  flex: 1;
  min-height: 34px;
  font-size: 8px;
}

.photo-processing {
  margin-top: 11px;
  padding: 12px;
  border: 1px solid #eadfcd;
  border-radius: 12px;
  background: #fffbf3;
}

.processing-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #765d37;
  font-size: 8.5px;
  font-weight: 800;
}

.processing-track {
  height: 5px;
  margin-top: 8px;
  border-radius: 99px;
  background: #eee3d2;
  overflow: hidden;
}

.processing-track span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--sun));
  transition: width 0.4s var(--ease);
}

.processing-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.processing-step {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 6px;
}

.processing-step.is-done {
  color: var(--mint-deep);
}

.processing-step.is-active {
  color: #a8781c;
}

.step-dot-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.photo-preview-memory {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 8px;
  border-radius: 10px;
  background: #f7f5ef;
}

.photo-preview-memory .memory-avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #f6ead2;
  font-size: 20px;
}

.photo-preview-memory p {
  color: #887a65;
  font-size: 7.5px;
  line-height: 1.5;
}

.photo-preview-memory strong {
  color: #6c5d47;
}

.photo-confirm-row {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.l0-receipt-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #cfe9dd;
  border-radius: 12px;
  background: #f3fcf7;
  font-family: var(--mono);
}

.l0-receipt-card .receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.l0-receipt-card strong {
  color: #226a55;
  font-size: 8.5px;
  font-weight: 800;
}

.l0-receipt-card .receipt-stamp {
  padding: 3px 5px;
  border-radius: 4px;
  background: #d8f3e7;
  color: #17775e;
  font-size: 6px;
  font-weight: 800;
}

.l0-receipt-card p {
  color: #5d8878;
  font-size: 6.5px;
  line-height: 1.65;
  word-break: break-all;
}

/* Step 3 proof */

.proof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(285px, 0.65fr);
  gap: 17px;
}

.proof-stage-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fffaf1;
}

.proof-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 256, 250, 0.9), transparent 25%),
    linear-gradient(145deg, #ffeeb0, #ffd89a 53%, #bbebdd);
  overflow: hidden;
}

.proof-stage::before {
  content: "";
  position: absolute;
  width: 74%;
  height: 63%;
  left: -14%;
  bottom: -43%;
  border-radius: 50%;
  background: rgba(116, 193, 149, 0.5);
}

.proof-stage::after {
  content: "";
  position: absolute;
  width: 82%;
  height: 77%;
  right: -30%;
  bottom: -58%;
  border-radius: 50%;
  background: rgba(248, 180, 101, 0.58);
}

.proof-sun {
  position: absolute;
  top: 10%;
  right: 13%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fff2b2;
  box-shadow: 0 0 0 18px rgba(255, 241, 168, 0.24), 0 0 50px rgba(255, 238, 155, 0.8);
}

.proof-cloud {
  position: absolute;
  width: 88px;
  height: 27px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.58);
}

.proof-cloud::before,
.proof-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.proof-cloud::before {
  width: 35px;
  height: 35px;
  left: 14px;
  bottom: 6px;
}

.proof-cloud::after {
  width: 25px;
  height: 25px;
  right: 13px;
  bottom: 6px;
}

.proof-cloud-one {
  top: 20%;
  left: 23%;
}

.proof-cloud-two {
  top: 31%;
  right: 25%;
  transform: scale(0.7);
  opacity: 0.7;
}

.proof-buddy {
  position: absolute;
  z-index: 3;
  left: 5%;
  bottom: -5%;
  width: 28%;
  transition: transform 0.3s var(--ease);
}

.proof-kid {
  position: absolute;
  z-index: 4;
  right: 9%;
  bottom: -8%;
  width: 43%;
  transition: transform 0.3s var(--ease);
}

.proof-buddy svg,
.proof-kid svg {
  width: 100%;
  height: auto;
}

.proof-kid .rig-svg {
  filter: drop-shadow(0 15px 12px rgba(93, 57, 12, 0.2));
}

.proof-stage.is-playing .proof-kid {
  animation: previewBounce 1.4s ease-in-out infinite;
}

.proof-stage.is-playing .proof-buddy {
  animation: buddySway 2.1s ease-in-out infinite;
}

.proof-stage.is-playing .proof-lyric-line {
  animation: karaokeBob 0.78s ease-in-out infinite alternate;
}

.mini-stage.is-playing .stage-lyric-card {
  animation: karaokeBob 1.08s ease-in-out infinite alternate;
}

.proof-name {
  color: #c04a34;
  font-weight: 900;
}

.proof-lyrics {
  position: absolute;
  z-index: 7;
  left: 5%;
  right: 5%;
  bottom: 12%;
  text-align: center;
  pointer-events: none;
}

.proof-lyric-line {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(255, 252, 241, 0.42);
  color: #3d513d;
  font-size: clamp(10px, 1.45vw, 16px);
  font-weight: 850;
  line-height: 1.4;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(2px);
}

.proof-lyric-line .lyric-name {
  display: inline-block;
  color: #c35c24;
  font-size: 1.25em;
  text-shadow: 0 2px 0 #fff0ad;
  animation: nameGlow 1.2s ease-in-out infinite alternate;
}

.proof-watermark {
  position: absolute;
  z-index: 8;
  top: 8%;
  left: 5%;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(38, 52, 42, 0.16);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.proof-stage-brand {
  position: absolute;
  z-index: 8;
  right: 5%;
  bottom: 4%;
  color: rgba(51, 75, 57, 0.45);
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.proof-progress {
  position: absolute;
  z-index: 8;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.proof-progress span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--coral);
  transition: width 0.16s linear;
}

.proof-sticker {
  position: absolute;
  z-index: 9;
  right: 3%;
  top: 13%;
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border-radius: 50%;
  background: rgba(255, 251, 235, 0.8);
  color: #9e5e24;
  font-size: 6.5px;
  font-weight: 850;
  text-align: center;
  line-height: 1.25;
  transform: rotate(8deg);
  border: 1px dashed rgba(135, 91, 32, 0.35);
}

.proof-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 2px 0;
}

.proof-play {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--ink);
  color: #fffaf0;
  font-size: 8px;
  font-weight: 800;
}

.proof-time {
  color: #a28e6f;
  font-family: var(--mono);
  font-size: 7.5px;
}

.proof-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 27px;
  margin-left: auto;
}

.proof-wave i {
  display: block;
  width: 2px;
  height: var(--h, 8px);
  border-radius: 99px;
  background: #d0b481;
}

.proof-stage.is-playing + .proof-controls .proof-wave i {
  animation: tinyWave 0.55s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * -0.04s);
}

.proof-info-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.proof-info-block,
.postcard-addon {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
}

.proof-info-block h4 {
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 850;
}

.proof-info-block p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.55;
}

.proof-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.proof-meta-list span {
  padding: 3px 5px;
  border-radius: 4px;
  background: #f6fcf9;
  color: #548474;
  font-size: 6.5px;
  font-weight: 700;
}

.proof-cost-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 9px;
  background: #f6fbf8;
}

.proof-cost-badge span:first-child {
  font-size: 18px;
}

.proof-cost-badge strong {
  display: block;
  color: #3e7563;
  font-size: 8.5px;
  font-weight: 850;
}

.proof-cost-badge small {
  display: block;
  margin-top: 1px;
  color: #7b988c;
  font-size: 6.8px;
}

.postcard-addon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.postcard-addon-head h4 {
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 850;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 19px;
  padding: 2px;
  border-radius: 99px;
  background: #e9dfcf;
  transition: background 0.2s var(--ease);
}

.switch::after {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(50, 39, 22, 0.18);
  transition: transform 0.2s var(--ease);
}

.switch.is-on {
  background: var(--mint);
}

.switch.is-on::after {
  transform: translateX(15px);
}

.postcard-addon p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7.5px;
  line-height: 1.45;
}

.postcard-fields {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eadfce;
}

.postcard-fields .field-label {
  margin-top: 7px;
  font-size: 8px;
}

.postcard-fields .text-input,
.postcard-fields .textarea-input {
  font-size: 9.5px;
  height: 35px;
}

.postcard-fields .textarea-input {
  height: auto;
  min-height: 67px;
}

.char-count {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 6.5px;
}

/* Step 4 checkout */

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(310px, 0.84fr);
  gap: 16px;
}

.sku-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf8;
}

.sku-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.sku-section-head h4 {
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 850;
}

.sku-section-head p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.sku-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sku-option {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 129px;
  padding: 11px;
  border: 1.5px solid #e8dac5;
  border-radius: 14px;
  background: #fffefa;
  text-align: left;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.sku-option:hover:not(:disabled) {
  border-color: #d8b878;
  transform: translateY(-2px);
}

.sku-option.is-selected {
  border-color: var(--coral);
  background: #fffaf5;
  box-shadow: 0 0 0 3px rgba(255, 118, 95, 0.1);
}

.sku-option.is-gift {
  min-height: 115px;
  grid-column: span 2;
}

.sku-option:disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.sku-option-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.sku-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--sun-soft);
  font-size: 15px;
}

.sku-tag {
  padding: 3px 5px;
  border-radius: 5px;
  background: #fff1cf;
  color: #946a1a;
  font-size: 6.5px;
  font-weight: 800;
  white-space: nowrap;
}

.sku-name {
  margin-top: 7px;
  color: var(--ink-strong);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.25;
}

.sku-desc {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7px;
  line-height: 1.4;
}

.sku-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5px;
  margin-top: auto;
  padding-top: 7px;
}

.sku-price {
  color: var(--coral-deep);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.sku-price small {
  margin-left: 2px;
  color: var(--ink-faint);
  font-size: 6.5px;
  font-weight: 650;
  letter-spacing: 0;
}

.sku-note {
  color: var(--ink-faint);
  font-size: 6.5px;
  text-align: right;
  line-height: 1.3;
}

.sku-check {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: none;
  width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-size: 7px;
  font-weight: 900;
}

.sku-option.is-selected .sku-check {
  display: grid;
}

.cogs-pill {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px dashed #dac7a9;
  border-radius: 10px;
  background: #fbf6eb;
  color: #8d7754;
  font-size: 7px;
  line-height: 1.5;
}

.cogs-pill strong {
  color: #6a583b;
  font-weight: 850;
}

.checkout-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.checkout-side h4 {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
}

.order-summary {
  padding: 11px;
  border: 1px solid #eadbc7;
  border-radius: 12px;
  background: #fffaf2;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  color: var(--ink-faint);
  font-size: 8px;
}

.summary-row strong {
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

.summary-row.is-total {
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px dashed #e7d8c3;
  color: var(--ink-soft);
  font-size: 9px;
}

.summary-row.is-total strong {
  color: var(--coral-deep);
  font-size: 20px;
  font-weight: 900;
}

.wallet-choice {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e6d9c5;
  border-radius: 9px;
  background: #fffdf8;
  text-align: left;
}

.payment-option.is-active {
  border-color: var(--mint);
  background: #f5fdf9;
  box-shadow: 0 0 0 2px rgba(62, 185, 162, 0.08);
}

.payment-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #f4f0e7;
  font-size: 12px;
}

.payment-option.is-active .payment-icon {
  background: var(--mint-soft);
}

.payment-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.25;
}

.payment-copy strong {
  color: var(--ink);
  font-size: 8.5px;
  font-weight: 800;
}

.payment-copy small {
  margin-top: 1px;
  color: var(--ink-faint);
  font-size: 6.5px;
}

.payment-radio {
  width: 11px;
  height: 11px;
  border: 1.5px solid #d7c7ae;
  border-radius: 50%;
}

.payment-option.is-active .payment-radio {
  border: 4px solid var(--mint);
  background: white;
}

.bind-card {
  padding: 10px;
  border: 1px dashed #e0d0b8;
  border-radius: 11px;
  background: #fffcf6;
}

.bind-card.is-bound {
  border-style: solid;
  border-color: #cce8dd;
  background: #f6fdf9;
}

.bind-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8b7758;
  font-size: 7.5px;
  font-weight: 700;
}

.bind-status .bound-check {
  color: var(--mint-deep);
  font-weight: 900;
}

.bind-card p {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 6.8px;
  line-height: 1.5;
}

.bind-actions {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.bind-actions .button {
  flex: 1;
  min-height: 29px;
  padding: 4px 6px;
  font-size: 7.5px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px;
  border: 1px solid #e8dccb;
  border-radius: 10px;
  background: #fffdf8;
  text-align: left;
}

.consent-box {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  border: 1.5px solid #cbb99f;
  border-radius: 4px;
  background: white;
}

.consent-box.is-checked {
  border-color: var(--mint);
  background: var(--mint);
}

.consent-box.is-checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 8px;
  font-weight: 900;
}

.consent-copy {
  color: var(--ink-faint);
  font-size: 6.8px;
  line-height: 1.55;
}

.consent-copy strong {
  color: var(--ink-soft);
  font-weight: 800;
}

.pay-button {
  min-height: 46px;
  font-size: 11px;
}

.pay-button.is-processing {
  pointer-events: none;
}

.pay-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.checkout-disclaimer {
  color: #a79a87;
  font-size: 6.5px;
  line-height: 1.5;
  text-align: center;
}

/* Wizard success */

.delivery-success {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
  min-height: 500px;
}

.success-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 248, 208, 0.95), transparent 44%),
    linear-gradient(145deg, #fff2bd, #e1f9ef 72%, #d7f4e9);
  overflow: hidden;
}

.success-visual::before,
.success-visual::after {
  content: "✦";
  position: absolute;
  color: rgba(191, 130, 31, 0.46);
  font-size: 28px;
  animation: twinkle 2.2s ease-in-out infinite;
}

.success-visual::before {
  left: 17%;
  top: 18%;
}

.success-visual::after {
  right: 15%;
  top: 27%;
  font-size: 18px;
  animation-delay: -1.1s;
}

.success-rig {
  width: min(76%, 300px);
  filter: drop-shadow(0 22px 22px rgba(81, 50, 15, 0.16));
  animation: successFloat 3.7s ease-in-out infinite;
}

.success-rig .rig-svg {
  width: 100%;
  height: auto;
}

.success-confetti {
  position: absolute;
  width: 9px;
  height: 17px;
  border-radius: 2px;
  background: var(--coral);
  transform: rotate(25deg);
  animation: confettiBob 3s ease-in-out infinite;
}

.confetti-1 { left: 25%; top: 12%; background: var(--sun); }
.confetti-2 { right: 21%; bottom: 17%; background: var(--mint); animation-delay: -1s; }
.confetti-3 { left: 15%; bottom: 28%; background: var(--lilac); animation-delay: -2s; }

.success-copy h3 {
  color: var(--ink-strong);
  font-size: clamp(29px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.success-copy h3 span {
  color: var(--coral-deep);
}

.success-copy > p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.success-delivery-card {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #e3dac0;
  border-radius: 15px;
  background: #fffdf6;
}

.success-delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed #eee3d2;
  font-size: 8px;
}

.success-delivery-row:last-child {
  border-bottom: 0;
}

.success-delivery-row span {
  color: var(--ink-faint);
}

.success-delivery-row strong {
  color: var(--ink);
  font-size: 8.5px;
  font-weight: 800;
  text-align: right;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.success-actions .button {
  min-height: 44px;
  font-size: 10px;
}

.success-footnote {
  margin-top: 13px;
  color: #9c8c76;
  font-size: 7.5px;
  line-height: 1.55;
}

/* Express drawer */

.express-sheet {
  display: flex;
  flex-direction: column;
  width: min(550px, 100vw);
  height: 100%;
  max-height: 100%;
  border-left: 1px solid rgba(226, 209, 183, 0.9);
  background: var(--paper);
  box-shadow: -30px 0 80px -40px rgba(24, 31, 27, 0.5);
  animation: drawerIn 0.38s var(--ease) both;
  overflow-y: auto;
}

.express-head {
  position: relative;
  padding: 25px 25px 19px;
  color: #fffaf0;
  background:
    radial-gradient(circle at 86% 15%, rgba(255, 201, 81, 0.26), transparent 18rem),
    linear-gradient(145deg, #203b34, #2e584b);
  overflow: hidden;
}

.express-head::after {
  content: "⚡";
  position: absolute;
  right: 17px;
  top: 32px;
  font-size: 88px;
  opacity: 0.08;
}

.express-kicker {
  color: #b9dece;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.express-head h2 {
  margin-top: 7px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.express-head p {
  max-width: 385px;
  margin-top: 5px;
  color: #a8cabb;
  font-size: 9.5px;
  line-height: 1.6;
}

.express-close {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #d4e7de;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 15px;
}

.express-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e7f6ee;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.express-timer strong {
  color: #ffe28b;
  font-size: 12px;
}

.express-body {
  flex: 1;
  padding: 19px 22px 22px;
}

.express-character-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5d9c7;
  border-radius: 16px;
  background: #fffbf3;
}

.express-avatar {
  width: 74px;
  height: 82px;
  flex: 0 0 74px;
  border-radius: 13px;
  background: #fff1cf;
  overflow: hidden;
}

.express-avatar .rig-svg {
  width: 100%;
  height: 100%;
  transform: translateY(5px) scale(1.2);
}

.express-character-copy {
  min-width: 0;
}

.express-character-copy small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.express-character-copy h3 {
  margin-top: 2px;
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 900;
}

.express-character-copy p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.express-song-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #eadfcd;
  border-radius: 14px;
  background: #fffdf8;
}

.express-song-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.express-song-emoji {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--sun-soft);
  font-size: 20px;
}

.express-song-title h4 {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
}

.express-song-title p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.express-song-meta {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.express-song-meta span {
  padding: 3px 5px;
  border-radius: 4px;
  background: #f8f3e9;
  color: #97876e;
  font-family: var(--mono);
  font-size: 6px;
}

.express-cache-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.express-cache {
  padding: 9px 8px;
  border: 1px solid #d7ebe2;
  border-radius: 10px;
  background: #f4fcf8;
}

.express-cache small {
  color: #73988a;
  font-size: 6.5px;
  font-weight: 700;
}

.express-cache strong {
  display: block;
  margin-top: 2px;
  color: #2a735f;
  font-size: 8px;
  font-weight: 850;
}

.express-cache span {
  display: block;
  margin-top: 2px;
  color: #79a191;
  font-size: 6px;
}

.express-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed #eadfce;
}

.express-price-row small {
  color: var(--ink-faint);
  font-size: 7.5px;
}

.express-price-row strong {
  display: block;
  color: var(--ink-strong);
  font-size: 10px;
}

.express-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}

.express-actions .button {
  min-height: 48px;
  font-size: 11px;
}

.express-secondary {
  min-height: 33px !important;
  font-size: 8px !important;
}

.express-progress {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid #e9dfce;
  background: #fffbf3;
}

.express-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #876f4a;
  font-size: 8.5px;
  font-weight: 750;
}

.express-step-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.express-step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.express-step-dot {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #eee5d7;
  color: #a18d71;
  font-size: 6px;
  font-weight: 900;
}

.express-step.is-done {
  color: #568070;
}

.express-step.is-done .express-step-dot {
  background: var(--mint);
  color: white;
}

.express-step.is-active {
  color: #a17527;
}

.express-step.is-active .express-step-dot {
  background: var(--sun);
  color: #6f4f0a;
}

.express-success {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cfe9de;
  border-radius: 14px;
  background: #f3fcf8;
}

.express-success h4 {
  color: #256752;
  font-size: 14px;
  font-weight: 900;
}

.express-success p {
  margin-top: 4px;
  color: #6b8e81;
  font-size: 8.5px;
  line-height: 1.55;
}

/* Generic confirm / cast / gift modal */

.confirm-visual {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  padding: 12px;
  border-radius: 13px;
  background: #fff7e8;
}

.confirm-visual-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 13px;
  background: var(--paper);
  font-size: 22px;
}

.confirm-visual strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.confirm-visual p {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.confirm-details {
  padding: 11px 13px;
  border: 1px solid #eee2d0;
  border-radius: 11px;
  background: #fffdf8;
}

.confirm-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  font-size: 8.5px;
}

.confirm-detail-row span {
  color: var(--ink-faint);
  white-space: nowrap;
}

.confirm-detail-row strong {
  color: var(--ink);
  font-weight: 750;
  text-align: right;
}

.confirm-warning {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fff2ed;
  color: #a35c49;
  font-size: 8px;
  line-height: 1.55;
}

.cast-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cast-device {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e8dccb;
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
}

.cast-device:hover {
  border-color: var(--mint);
  background: #f8fffb;
}

.cast-device-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--mint-soft);
  font-size: 17px;
}

.cast-device-copy {
  flex: 1;
}

.cast-device-copy strong {
  display: block;
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 800;
}

.cast-device-copy small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7px;
}

.cast-device .cast-status {
  color: var(--mint-deep);
  font-size: 7.5px;
  font-weight: 800;
}

.cast-note {
  margin-top: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f8f4eb;
  color: var(--ink-faint);
  font-size: 7.5px;
  line-height: 1.5;
}

.redeem-code {
  padding: 14px;
  border: 1.5px dashed #d5bd99;
  border-radius: 12px;
  background: #fffcf3;
  text-align: center;
  font-family: var(--mono);
  color: var(--coral-deep);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.redeem-note {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.6;
}

/* ---------- Generative character editor ---------- */

.editor-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 15px;
}

.editor-preview {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff8ea, #f3fbf7);
  overflow: hidden;
}

.editor-rig {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 265px;
  padding: 10px;
}

.editor-rig .rig-svg {
  width: min(100%, 220px);
  height: auto;
}

.editor-preview-note {
  padding: 9px;
  border-top: 1px solid #eee2d1;
  color: #9d8a6f;
  font-size: 7.5px;
  line-height: 1.5;
}

.editor-controls {
  min-width: 0;
}

.editor-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 9px;
  padding: 3px;
  border-radius: 10px;
  background: #f3ecdf;
}

.editor-tabs button {
  flex: 1;
  padding: 6px;
  border-radius: 7px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 800;
}

.editor-tabs button.is-active {
  color: var(--ink-strong);
  background: white;
  box-shadow: var(--shadow-sm);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
}

/* ---------- Cast / toasts ---------- */

.toast-region {
  position: fixed;
  z-index: 500;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(380px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(229, 213, 190, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 18px 42px -22px rgba(34, 43, 37, 0.48);
  backdrop-filter: blur(16px);
  animation: toastIn 0.34s var(--ease-bounce) both;
  pointer-events: none;
}

.toast.is-leaving {
  animation: toastOut 0.25s ease forwards;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  background: var(--mint-soft);
  font-size: 12px;
}

.toast-copy {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.5;
}

.toast-copy strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.toast.is-warn .toast-icon {
  background: #fff2d2;
}

.toast.is-error .toast-icon {
  background: #ffe9e4;
}

/* ---------- MiniTube / Kid-safe surface ---------- */

.app[data-surface="minitube"] {
  background:
    radial-gradient(circle at 8% 13%, rgba(255, 212, 107, 0.24), transparent 25rem),
    radial-gradient(circle at 88% 8%, rgba(80, 205, 189, 0.24), transparent 28rem),
    linear-gradient(160deg, #fff9eb, #fffaf1 50%, #f9f5ec);
}

.app[data-surface="minitube"] .owner-topbar,
.app[data-surface="minitube"] .owner-toolbar {
  display: none;
}

.app[data-surface="minitube"] .main-shell {
  width: min(1500px, calc(100% - 28px));
  padding-top: 16px;
}

.minitube-view {
  animation: viewIn 0.5s var(--ease);
}

.mini-shell {
  position: relative;
  padding: clamp(16px, 2.1vw, 28px);
  border: 1px solid rgba(229, 211, 182, 0.9);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 2% 10%, rgba(255, 228, 154, 0.42), transparent 28rem),
    radial-gradient(circle at 98% 12%, rgba(163, 231, 211, 0.33), transparent 27rem),
    linear-gradient(155deg, #fffaf0, #fffdf8 52%, #f7fcf7);
  box-shadow: var(--shadow-md);
}

.mini-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 2px 19px;
  border-bottom: 1px solid rgba(224, 207, 181, 0.6);
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 250px;
}

.mini-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--sun-soft);
  border: 1px solid #eed481;
  font-size: 23px;
  filter: drop-shadow(0 4px 6px rgba(162, 109, 19, 0.13));
}

.mini-brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.mini-brand strong {
  color: var(--ink-strong);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.mini-brand small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.mini-channel-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid #eadcc5;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.mini-channel-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--sun-soft);
  font-size: 13px;
  overflow: hidden;
}

.mini-channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-channel-chip strong {
  color: var(--coral-deep);
  font-weight: 900;
}

.kid-lock {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(209, 194, 169, 0.85);
  border-radius: 11px;
  color: #98846a;
  background: rgba(255, 253, 246, 0.6);
  font-size: 13px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.kid-lock small {
  font-size: 7.5px;
  font-weight: 750;
}

.kid-lock:hover {
  background: white;
  transform: translateY(-1px);
}

.mini-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 2px 18px;
}

.mini-eyebrow {
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.mini-hero h1 {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: clamp(30px, 3.9vw, 48px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.mini-hero p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
}

.mini-safe-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid #d7ece3;
  border-radius: 99px;
  background: #f3fcf8;
  color: #5c8877;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.mini-routine-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-routine-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 14px;
  border: 1.5px solid transparent;
  border-radius: 19px;
  background: var(--routine-bg, #fff6df);
  text-align: left;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.mini-routine-card::after {
  content: "▶";
  position: absolute;
  right: 11px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(52, 72, 58, 0.22);
  font-size: 7px;
  transition: background 0.2s var(--ease);
}

.mini-routine-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -24px rgba(76, 55, 21, 0.42);
}

.mini-routine-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), 0 17px 34px -25px rgba(76, 55, 21, 0.44);
}

.mini-routine-card:hover::after,
.mini-routine-card.is-selected::after {
  background: rgba(255, 118, 95, 0.86);
}

.mini-routine-emoji {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 24px;
  filter: drop-shadow(0 5px 6px rgba(72, 51, 19, 0.08));
}

.mini-routine-copy {
  min-width: 0;
}

.mini-routine-copy strong {
  display: block;
  color: #384435;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.mini-routine-copy span {
  display: block;
  margin-top: 2px;
  color: #7e806c;
  font-size: 7.5px;
  white-space: nowrap;
}

.mini-routine-mini-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  color: rgba(71, 87, 65, 0.6);
  font-size: 6.5px;
  font-weight: 700;
}

.mini-routine-card.is-selected .mini-routine-copy strong {
  color: var(--ink-strong);
}

.mini-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 13px;
  margin-top: 15px;
}

.mini-player-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e7dac5;
  border-radius: 24px;
  background: rgba(255, 253, 246, 0.68);
}

.mini-now-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 3px 10px;
}

.mini-now-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-routine-label {
  color: var(--coral-deep);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.mini-now-copy strong {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-track-type {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--sun-soft);
  color: #8b681b;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-track-type.is-master {
  background: #eef4ff;
  color: #5375a3;
}

.mini-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 330px;
  border-radius: 21px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.84), transparent 22%),
    linear-gradient(145deg, #ffecae, #ffd496 53%, #bcebdd);
  overflow: hidden;
  isolation: isolate;
  transition: filter 0.7s ease, background 0.7s ease, opacity 0.5s ease;
}

.mini-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 68%;
  height: 56%;
  left: -14%;
  bottom: -39%;
  border-radius: 50%;
  background: var(--stage-hill-one, rgba(112, 184, 136, 0.52));
}

.mini-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 77%;
  height: 67%;
  right: -30%;
  bottom: -51%;
  border-radius: 50%;
  background: var(--stage-hill-two, rgba(244, 171, 90, 0.54));
}

.mini-stage.is-night {
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 250, 207, 0.35), transparent 19%),
    linear-gradient(150deg, #313666, #565886 50%, #a2a2d5);
  --stage-hill-one: rgba(55, 62, 105, 0.7);
  --stage-hill-two: rgba(77, 72, 119, 0.72);
}

.stage-topbar {
  position: absolute;
  z-index: 12;
  left: 14px;
  right: 14px;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stage-scene-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(255, 252, 245, 0.65);
  color: #5a694f;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.stage-scene-pill span {
  font-size: 10px;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  color: rgba(53, 70, 51, 0.65);
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.stage-badge .stage-live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ec6a54;
  animation: livePulse 1.6s infinite;
}

.stage-sun {
  position: absolute;
  z-index: 1;
  right: 12%;
  top: 11%;
  width: clamp(43px, 7vw, 82px);
  height: clamp(43px, 7vw, 82px);
  border-radius: 50%;
  background: #fff3b5;
  box-shadow: 0 0 0 17px rgba(255, 241, 172, 0.22), 0 0 70px rgba(255, 237, 151, 0.75);
}

.mini-stage.is-night .stage-sun {
  background: #fff7cb;
  box-shadow: 0 0 0 13px rgba(255, 244, 185, 0.1), 0 0 45px rgba(255, 239, 162, 0.5);
}

.stage-moon {
  position: absolute;
  z-index: 1;
  right: 14%;
  top: 13%;
  width: clamp(37px, 6vw, 62px);
  height: clamp(37px, 6vw, 62px);
  border-radius: 50%;
  background: #fff4bc;
  box-shadow: 0 0 34px rgba(255, 239, 168, 0.5);
}

.stage-moon::after {
  content: "";
  position: absolute;
  width: 82%;
  height: 82%;
  left: 26%;
  top: -10%;
  border-radius: 50%;
  background: #4e5381;
}

.stage-cloud {
  position: absolute;
  z-index: 2;
  width: 70px;
  height: 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
  animation: cloudDrift 10s ease-in-out infinite alternate;
}

.stage-cloud::before,
.stage-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.stage-cloud::before {
  width: 31px;
  height: 31px;
  left: 9px;
  bottom: 4px;
}

.stage-cloud::after {
  width: 21px;
  height: 21px;
  right: 10px;
  bottom: 4px;
}

.stage-cloud-one {
  left: 23%;
  top: 19%;
}

.stage-cloud-two {
  right: 27%;
  top: 31%;
  opacity: 0.65;
  transform: scale(0.68);
  animation-delay: -4s;
}

.stage-deco-star {
  position: absolute;
  z-index: 2;
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  animation: twinkle 2.2s ease-in-out infinite;
}

.stage-star-one {
  right: 29%;
  top: 15%;
}

.stage-star-two {
  left: 17%;
  top: 37%;
  font-size: 11px;
  animation-delay: -0.9s;
}

.stage-star-three {
  right: 9%;
  top: 38%;
  font-size: 13px;
  animation-delay: -1.7s;
}

.stage-friend {
  position: absolute;
  z-index: 4;
  left: 4%;
  bottom: -3%;
  width: 26%;
  max-width: 206px;
  filter: drop-shadow(0 14px 12px rgba(94, 56, 16, 0.17));
  transform-origin: bottom center;
}

.stage-friend .bear-svg {
  width: 100%;
  height: auto;
}

.stage-kid {
  position: absolute;
  z-index: 5;
  right: 12%;
  bottom: -4%;
  width: 36%;
  max-width: 300px;
  transform-origin: bottom center;
  filter: drop-shadow(0 17px 16px rgba(78, 44, 9, 0.2));
}

.stage-kid .rig-svg {
  width: 100%;
  height: auto;
}

.mini-stage.is-playing[data-motion="bounce"] .stage-kid,
.mini-stage.is-playing[data-motion="dance"] .stage-kid {
  animation: kidBounce 0.75s ease-in-out infinite alternate;
}

.mini-stage.is-playing[data-motion="wave"] .stage-kid .rig-wave-hand {
  transform-origin: 74% 88%;
  transform-box: fill-box;
  animation: handWave 0.7s ease-in-out infinite alternate;
}

.mini-stage.is-playing[data-motion="stretch"] .stage-kid {
  animation: kidStretch 1.6s ease-in-out infinite alternate;
}

.mini-stage.is-playing[data-motion="spin"] .stage-kid {
  animation: kidSpin 1.8s ease-in-out infinite;
}

.mini-stage.is-playing[data-motion="float"] .stage-kid {
  animation: kidFloat 2.8s ease-in-out infinite;
}

.mini-stage.is-playing .stage-friend {
  animation: buddySway 2.4s ease-in-out infinite;
}

.mini-stage.is-playing .stage-friend .bear-wave-arm {
  transform-origin: 84% 83%;
  transform-box: fill-box;
  animation: handWave 0.8s ease-in-out infinite alternate;
}

.stage-speech {
  position: absolute;
  z-index: 8;
  left: 45%;
  top: 27%;
  max-width: 38%;
  padding: 7px 10px;
  border-radius: 12px 12px 12px 3px;
  background: rgba(255, 253, 244, 0.9);
  color: #55664f;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.45;
  box-shadow: 0 7px 16px -13px rgba(70, 51, 22, 0.45);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mini-stage.is-playing .stage-speech {
  opacity: 1;
  transform: translateY(0);
}

.stage-speech::before {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: inherit;
  transform: rotate(45deg);
}

.stage-lyrics {
  position: absolute;
  z-index: 10;
  left: 6%;
  right: 6%;
  bottom: 12%;
  text-align: center;
  pointer-events: none;
}

.stage-lyric-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 252, 242, 0.42);
  backdrop-filter: blur(3px);
}

.stage-lyric-text {
  color: #3f503e;
  font-size: clamp(10px, 1.45vw, 17px);
  font-weight: 850;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
}

.stage-lyric-text .gold-name {
  display: inline-block;
  color: #bd5a21;
  font-size: 1.2em;
  text-shadow: 0 2px 0 #ffec9f;
  animation: nameGlow 1.2s ease-in-out infinite alternate;
}

.stage-lyric-zh {
  margin-top: 1px;
  color: rgba(65, 79, 59, 0.64);
  font-size: 6.5px;
  font-weight: 650;
}

.mini-stage.is-night .stage-lyric-card {
  background: rgba(24, 29, 62, 0.31);
}

.mini-stage.is-night .stage-lyric-text {
  color: #f4f1d9;
  text-shadow: 0 1px 5px rgba(20, 21, 46, 0.3);
}

.mini-stage.is-night .stage-lyric-text .gold-name {
  color: #ffe08a;
  text-shadow: 0 1px 6px rgba(255, 201, 81, 0.45);
}

.mini-stage.is-night .stage-lyric-zh {
  color: rgba(235, 232, 211, 0.65);
}

.stage-caption {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  color: rgba(60, 75, 57, 0.68);
  font-size: 6.5px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(5px);
}

.stage-watermark {
  position: absolute;
  z-index: 10;
  right: 13px;
  bottom: 10px;
  color: rgba(61, 76, 58, 0.42);
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.stage-progress-line {
  position: absolute;
  z-index: 14;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.stage-progress-line span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--coral);
  transition: width 0.2s linear;
}

.mini-stage.is-night .stage-progress-line span {
  background: #ffdf81;
}

.stage-night-wash {
  position: absolute;
  z-index: 9;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 22, 50, 0) 0%, rgba(19, 22, 50, calc(var(--night, 0) * 0.42)) 100%);
  pointer-events: none;
  transition: background 0.4s linear;
}

.stage-car-overlay {
  position: absolute;
  z-index: 25;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 198, 85, 0.11), transparent 45%),
    linear-gradient(145deg, #1e2e2c, #142320);
  color: #fff7e4;
  text-align: center;
}

.mini-stage.is-car-mode .stage-car-overlay {
  display: flex;
}

.stage-car-overlay .car-road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18%;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255, 226, 155, 0.26) 0 22px, transparent 22px 44px);
}

.car-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: conic-gradient(from 30deg, #ffcb5d, #ff806b, #6fd5bc, #8a9ce6, #ffcb5d);
  box-shadow: 0 0 0 13px rgba(255, 255, 255, 0.05), 0 0 60px rgba(255, 196, 79, 0.13);
  animation: slowSpin 9s linear infinite;
}

.car-disc::before {
  content: "";
  position: absolute;
  inset: 29px;
  border-radius: 50%;
  background: #1b2a27;
}

.car-disc::after {
  content: "♫";
  position: absolute;
  color: #fff2c3;
  font-size: 18px;
}

.stage-car-overlay h3 {
  font-size: 17px;
  font-weight: 850;
}

.stage-car-overlay p {
  margin-top: 4px;
  color: #92aaa2;
  font-size: 8px;
}

.car-eq {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 21px;
  margin-top: 12px;
}

.car-eq span {
  width: 3px;
  height: var(--h, 12px);
  border-radius: 99px;
  background: #ffd76b;
  animation: carEq 0.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.07s);
}

.mini-stage.is-sleeping .stage-car-overlay {
  display: none;
}

.stage-sleep-overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 238, 170, 0.09), transparent 21rem),
    linear-gradient(160deg, #20264f, #2e3761 55%, #484977);
  color: #fff8dc;
  text-align: center;
  animation: fadeIn 0.8s ease both;
}

.mini-stage.is-sleeping .stage-sleep-overlay {
  display: flex;
}

.sleep-moon {
  position: relative;
  width: 83px;
  height: 83px;
  margin-bottom: 18px;
}

.sleep-moon .sleep-moon-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff0a7;
  box-shadow: 0 0 50px rgba(255, 234, 152, 0.28);
}

.sleep-moon .sleep-moon-body::after {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  left: 29%;
  top: -12%;
  border-radius: 50%;
  background: #20264f;
}

.sleep-moon .sleep-star {
  position: absolute;
  color: #ffe69d;
  font-size: 12px;
  animation: twinkle 2s ease-in-out infinite;
}

.sleep-moon .sleep-star-one { right: -14px; top: 8px; }
.sleep-moon .sleep-star-two { left: -11px; bottom: 11px; animation-delay: -0.8s; }
.sleep-moon .sleep-star-three { right: -3px; bottom: -15px; animation-delay: -1.4s; }

.stage-sleep-overlay h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.5vw, 31px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.stage-sleep-overlay p {
  margin-top: 7px;
  color: #b7b8d6;
  font-size: 8.5px;
}

.stage-sleep-overlay .sleep-hint {
  margin-top: 15px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: #9298c1;
  font-size: 6.5px;
}

.mini-timeline-wrap {
  margin-top: 8px;
  padding: 0 4px;
}

.mini-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
}

.mini-time-row span:last-child {
  color: #806f58;
  font-family: var(--font);
  font-weight: 750;
}

.mini-scrubber {
  appearance: none;
  width: 100%;
  height: 17px;
  margin: 3px 0 0;
  background: transparent;
  cursor: pointer;
}

.mini-scrubber::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--coral) var(--fill, 0%), #eadfce var(--fill, 0%));
}

.mini-scrubber::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: #eadfce;
}

.mini-scrubber::-moz-range-progress {
  height: 5px;
  border-radius: 99px;
  background: var(--coral);
}

.mini-scrubber::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 2px 6px rgba(72, 48, 18, 0.3);
}

.mini-scrubber::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--coral);
}

.mini-section-dots {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.mini-section-dot {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #efe5d5;
  overflow: hidden;
}

.mini-section-dot span {
  display: block;
  height: 100%;
  width: 0;
  background: #dfb160;
  border-radius: inherit;
}

.mini-section-dot.is-active span {
  width: 100%;
  background: var(--coral);
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 2px 3px 0;
}

.mini-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 35px;
  border: 1px solid #e7dac7;
  border-radius: 11px;
  color: var(--ink-soft);
  background: #fffdf7;
  font-size: 8px;
  font-weight: 800;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.mini-control:hover {
  border-color: #d7bf9b;
  background: #fff8ea;
  transform: translateY(-1px);
}

.mini-control-round {
  width: 35px;
  padding: 0;
  font-size: 12px;
}

.mini-play {
  min-width: 83px;
  padding: 7px 15px;
  border-color: var(--coral);
  color: white;
  background: linear-gradient(145deg, #ff856f, var(--coral));
  box-shadow: 0 10px 20px -15px rgba(230, 82, 67, 0.8);
  font-size: 13px;
}

.mini-play span {
  font-size: 8.5px;
}

.mini-play.is-playing {
  color: #61420a;
  background: linear-gradient(145deg, #ffe07d, var(--sun));
  border-color: #e6b336;
  box-shadow: 0 10px 20px -15px rgba(156, 103, 10, 0.7);
}

.mini-control-divider {
  width: 1px;
  height: 23px;
  margin: 0 2px;
  background: #e9ddca;
}

.mini-control-toggle {
  padding: 6px 8px;
}

.mini-control-toggle.is-active {
  color: var(--mint-deep);
  border-color: #a8dccd;
  background: #effbf6;
}

.mini-control-toggle.mini-car-active {
  color: #57400d;
  border-color: #e6c15c;
  background: #fff4ca;
}

.mini-control-toggle.mini-bedtime-active {
  color: #4f547e;
  border-color: #b8bade;
  background: #f0f1ff;
}

.mini-toggle-label {
  font-size: 7.5px;
}

.mini-queue-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e7dac5;
  border-radius: 23px;
  background: rgba(255, 253, 246, 0.68);
}

.mini-queue-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.mini-queue-heading h2 {
  margin-top: 2px;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.mini-queue-heading .mini-eyebrow {
  font-size: 6.5px;
}

.mini-queue-count {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--sun-soft);
  color: #8c6b1d;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.42);
  text-align: left;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.mini-queue-item:hover {
  background: white;
  border-color: #e7d9c4;
}

.mini-queue-item.is-active {
  background: #fff8e8;
  border-color: #edcf8b;
  transform: translateX(2px);
}

.queue-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: #f5ecdd;
  color: #99866a;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 800;
}

.mini-queue-item.is-active .queue-index {
  background: var(--coral);
  color: white;
}

.queue-cover {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 9px;
  background: var(--queue-bg, #fff0cc);
  font-size: 16px;
}

.queue-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.2;
}

.queue-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 8.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 6.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-badge {
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--sun-soft);
  color: #936f1c;
  font-size: 5.5px;
  font-weight: 800;
  white-space: nowrap;
}

.queue-badge.is-master {
  background: #eef4ff;
  color: #5a7ba5;
}

.queue-length {
  color: #a8977d;
  font-family: var(--mono);
  font-size: 6px;
  white-space: nowrap;
}

.mini-tip-card {
  display: flex;
  gap: 8px;
  margin-top: 13px;
  padding: 10px;
  border-radius: 11px;
  background: #fff8e8;
  border: 1px dashed #e6cea0;
}

.mini-tip-icon {
  font-size: 17px;
}

.mini-tip-card p {
  color: #917a54;
  font-size: 7.5px;
  line-height: 1.5;
}

.mini-tip-card strong {
  display: block;
  margin-bottom: 2px;
  color: #765c35;
  font-size: 8px;
  font-weight: 850;
}

.mini-parent-return {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  padding: 7px;
  border: 1px solid #ece1d1;
  border-radius: 9px;
  color: #a3927a;
  background: rgba(255, 255, 255, 0.48);
  font-size: 7.5px;
  font-weight: 700;
}

.mini-parent-return:hover {
  color: var(--ink-soft);
  background: white;
}

.mini-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 16px;
  padding: 13px 3px 0;
  border-top: 1px solid rgba(224, 207, 181, 0.55);
  color: #a39178;
  font-size: 7px;
}

/* ---------- Motion ---------- */

@keyframes ambientDrift {
  from { transform: translate3d(0, -15px, 0) scale(0.95); }
  to { transform: translate3d(18px, 28px, 0) scale(1.08); }
}

@keyframes toolbarDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wizardIn {
  from { opacity: 0; transform: scale(0.97) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes gatePop {
  from { opacity: 0; transform: scale(0.92) translateY(9px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes drawerIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

@keyframes heroBob {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-9px) rotate(0.6deg); }
}

@keyframes noteFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes coverWave {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

@keyframes barGrow {
  from { transform: scaleY(0.1); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes chantWave {
  from { height: 5px; }
  to { height: 23px; }
}

@keyframes speakerPulse {
  from { transform: scale(0.94); }
  to { transform: scale(1.08); }
}

@keyframes previewBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

@keyframes buddySway {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-4px); }
}

@keyframes nameGlow {
  from { transform: scale(1); filter: brightness(0.96); }
  to { transform: scale(1.055); filter: brightness(1.08); }
}

@keyframes tinyWave {
  from { transform: scaleY(0.35); opacity: 0.45; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes karaokeBob {
  from { transform: translateY(0) rotate(-0.35deg); }
  to { transform: translateY(-4px) rotate(0.35deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.9) rotate(0); }
  50% { opacity: 1; transform: scale(1.15) rotate(9deg); }
}

@keyframes successFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes confettiBob {
  0%, 100% { transform: translateY(0) rotate(25deg); }
  50% { transform: translateY(-9px) rotate(45deg); }
}

@keyframes cloudDrift {
  from { transform: translateX(-8px); }
  to { transform: translateX(15px); }
}

@keyframes kidBounce {
  0% { transform: translateY(0) scaleY(1) rotate(-1.5deg); }
  100% { transform: translateY(-10px) scaleY(1.018) rotate(1.5deg); }
}

@keyframes kidStretch {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.025, 1.045); }
}

@keyframes kidSpin {
  0% { transform: rotate(0) translateY(0); }
  45% { transform: rotate(7deg) translateY(-4px); }
  75% { transform: rotate(-4deg) translateY(0); }
  100% { transform: rotate(0) translateY(0); }
}

@keyframes kidFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes handWave {
  from { transform: rotate(-7deg); }
  to { transform: rotate(12deg); }
}

@keyframes carEq {
  from { transform: scaleY(0.4); opacity: 0.6; }
  to { transform: scaleY(1); opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1320px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .surface-switcher {
    order: 3;
    width: 100%;
  }

  .surface-tab {
    flex: 1;
    justify-content: center;
  }

  .topbar-tools {
    margin-left: auto;
  }

  .song-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fake-door-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .studio-hero {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.68fr);
    gap: 18px;
  }

  .hero-art {
    min-height: 340px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 5.1vw, 58px);
  }

  .song-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fake-door-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-routine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-content-grid {
    grid-template-columns: minmax(0, 1fr) 282px;
  }

  .mini-stage {
    min-height: 300px;
  }
}

@media (max-width: 980px) {
  .guest-badge {
    min-width: 0;
  }

  .guest-copy small {
    display: none;
  }

  .wallet-note {
    display: none;
  }

  .studio-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 33px;
  }

  .hero-art {
    min-height: 360px;
    max-width: 560px;
    width: 100%;
    margin: 6px auto 0;
  }

  .hero-rig {
    width: min(74%, 300px);
  }

  .owner-actions {
    grid-template-columns: 1fr;
  }

  .owner-toolbar-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .owner-state-line {
    max-width: 100%;
    text-align: left;
  }

  .character-grid,
  .gift-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .avatar-card {
    min-height: 390px;
  }

  .stat-grid,
  .privacy-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digest-grid,
  .privacy-two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .deletion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-grid-name,
  .proof-layout,
  .checkout-grid,
  .step-grid-character {
    grid-template-columns: minmax(0, 1fr);
  }

  .name-aside-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 5px 15px;
    align-items: center;
  }

  .aside-figure {
    grid-row: 1 / span 2;
    margin: 0;
    height: 145px;
  }

  .aside-benefits {
    margin-top: 8px;
  }

  .rig-stage {
    min-height: 300px;
  }

  .proof-info-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .delivery-success {
    grid-template-columns: minmax(0, 1fr);
  }

  .success-visual {
    min-height: 300px;
  }

  .success-rig {
    width: min(50%, 240px);
  }

  .mini-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mini-queue-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 13px;
  }

  .mini-queue-heading,
  .mini-queue,
  .mini-tip-card,
  .mini-parent-return {
    grid-column: 1;
  }

  .mini-tip-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 35px;
  }

  .mini-parent-return {
    grid-column: 2;
    align-self: end;
  }

  .editor-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .topbar,
  .owner-toolbar,
  .main-shell {
    width: calc(100% - 18px);
  }

  .topbar {
    top: 7px;
    gap: 8px;
    margin-top: 8px;
    padding: 9px;
    border-radius: 19px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 13px;
  }

  .brand-mark svg {
    width: 29px;
    height: 29px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy span {
    font-size: 7.8px;
  }

  .topbar-tools {
    gap: 5px;
  }

  .guest-badge {
    padding: 6px 8px;
  }

  .guest-copy strong {
    font-size: 8px;
  }

  .guest-dot {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
  }

  .wallet-pill {
    gap: 5px;
    padding: 6px 7px;
  }

  .wallet-icon {
    display: none;
  }

  .wallet-copy strong {
    font-size: 10px;
  }

  .wallet-copy small {
    font-size: 6.8px;
  }

  .currency-switch button {
    padding: 4px 5px;
    font-size: 7.5px;
  }

  .owner-toggle span:nth-child(2) {
    display: none;
  }

  .owner-toggle {
    padding: 8px;
  }

  .surface-tab {
    padding: 7px 8px;
  }

  .surface-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 14px;
  }

  .surface-label {
    font-size: 10px;
  }

  .surface-label small {
    font-size: 7px;
  }

  .main-shell {
    padding-top: 14px;
  }

  .studio-hero {
    min-height: 0;
    padding: 24px 19px;
    border-radius: 25px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 9.6vw, 49px);
    letter-spacing: -0.052em;
  }

  .hero-lede {
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.7;
  }

  .hero-actions {
    margin-top: 17px;
  }

  .hero-actions .button {
    flex: 1;
    min-height: 47px;
    padding: 10px 11px;
    font-size: 11px;
  }

  .trust-strip {
    gap: 6px 12px;
    margin-top: 18px;
    padding-top: 14px;
  }

  .trust-strip span {
    font-size: 8px;
  }

  .hero-art {
    min-height: 300px;
    border-radius: 45% 48% 46% 50% / 46% 46% 52% 52%;
  }

  .hero-rig {
    width: min(76%, 245px);
  }

  .hero-nameplate {
    left: 2%;
    bottom: 4%;
    padding: 7px 10px 7px 7px;
  }

  .hero-nameplate-icon {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .hero-nameplate strong {
    font-size: 14px;
  }

  .hero-sticker-top {
    right: 2%;
    top: 4%;
  }

  .hero-sticker-bottom {
    right: 0;
    bottom: 19%;
    width: 54px;
    height: 54px;
    font-size: 6.5px;
  }

  .hero-note {
    width: 27px;
    height: 27px;
    font-size: 13px;
  }

  .studio-subnav {
    margin-top: 11px;
    padding: 4px;
    border-radius: 17px;
  }

  .subnav-tab {
    min-height: 39px;
    padding: 8px 10px;
    font-size: 9.5px;
  }

  .subnav-tab span {
    font-size: 12px;
  }

  .subnav-tab small {
    display: none;
  }

  .launch-banner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }

  .launch-banner-actions {
    flex-wrap: wrap;
  }

  .launch-banner-actions .button {
    flex: 1;
    min-height: 38px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-top: 26px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .section-heading-meta {
    font-size: 8px;
  }

  .song-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .song-cover {
    min-height: 174px;
  }

  .song-cover-emoji {
    font-size: 75px;
  }

  .fake-door-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 33px;
  }

  .fake-door-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .fake-door-card {
    padding: 12px;
  }

  .fake-door-card h3 {
    font-size: 12px;
  }

  .fake-door-blurb {
    min-height: 40px;
  }

  .characters-head,
  .gifts-head,
  .digest-head,
  .privacy-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
    border-radius: 20px;
  }

  .characters-head .button,
  .gifts-head .button,
  .digest-head .button,
  .privacy-head .button {
    width: 100%;
  }

  .characters-head h1,
  .gifts-head h1,
  .digest-head h1,
  .privacy-head h1 {
    font-size: 27px;
  }

  .character-visual {
    padding-top: 9px;
  }

  .character-rig-preview {
    width: min(64%, 225px);
  }

  .character-card-body {
    padding: 15px;
  }

  .character-card h3 {
    font-size: 22px;
  }

  .add-character-card {
    min-height: 280px;
  }

  .gift-card {
    border-radius: 21px;
  }

  .postcard {
    margin: 12px;
    padding: 18px;
  }

  .postcard h3 {
    font-size: 24px;
  }

  .postcard-stamp {
    width: 58px;
    height: 70px;
  }

  .postcard-message {
    max-width: 78%;
    font-size: 11.5px;
  }

  .digest-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 21px;
  }

  .digest-number-card {
    justify-self: start;
  }

  .stat-grid,
  .privacy-summary-grid {
    gap: 7px;
  }

  .stat-card {
    padding: 11px;
  }

  .digest-grid {
    gap: 9px;
  }

  .digest-card {
    padding: 15px;
  }

  .recommendation-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .recommendation-card .button {
    width: 100%;
  }

  .deletion-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .deletion-card p {
    min-height: 0;
  }

  .ledger-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px 12px;
  }

  .ledger-stats {
    flex-wrap: wrap;
  }

  .studio-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .studio-footer > p {
    text-align: left;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-card {
    max-height: 94vh;
    border-radius: 22px;
  }

  .modal-head {
    padding: 17px 16px 13px;
  }

  .modal-head h2 {
    font-size: 19px;
  }

  .modal-body {
    padding: 16px;
  }

  .wizard-backdrop {
    padding: 0;
  }

  .wizard-shell {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
  }

  .wizard-head {
    padding: 12px 14px;
  }

  .wizard-head p,
  .wizard-mini-logo {
    display: none;
  }

  .wizard-head h2 {
    font-size: 14px;
  }

  .wizard-progress {
    padding: 0 12px;
  }

  .wizard-progress-step {
    min-height: 42px;
    gap: 5px;
    font-size: 8px;
  }

  .wizard-progress-step + .wizard-progress-step::before {
    left: -7px;
    width: 13px;
  }

  .step-dot {
    width: 19px;
    height: 19px;
    font-size: 7px;
  }

  .step-label small {
    display: none;
  }

  .wizard-body {
    padding: 16px 14px 21px;
  }

  .wizard-footer {
    padding: 10px 13px;
  }

  .wizard-footer-note {
    display: none;
  }

  .wizard-footer-actions {
    width: 100%;
    justify-content: space-between;
  }

  .wizard-footer-actions .button {
    flex: 1;
    min-height: 40px;
    font-size: 10px;
  }

  .wizard-step-head h3 {
    font-size: 23px;
  }

  .name-form-card,
  .name-aside-card,
  .trait-editor,
  .character-workspace,
  .checkout-side,
  .checkout-main {
    border-radius: 17px;
  }

  .name-form-card {
    padding: 15px;
  }

  .name-input-wrap .text-input {
    font-size: 17px;
  }

  .name-aside-card {
    display: block;
  }

  .aside-figure {
    height: 115px;
    margin-bottom: 7px;
  }

  .aside-figure .rig-svg {
    height: 135px;
  }

  .chant-row {
    align-items: stretch;
    flex-direction: column;
  }

  .chant-note {
    max-width: none;
  }

  .style-toggle {
    flex-direction: column;
  }

  .rig-stage {
    min-height: 255px;
  }

  .rig-preview-inner {
    width: min(65%, 235px);
  }

  .trait-editor {
    padding: 11px;
  }

  .photo-mode-tab {
    min-height: 35px;
    font-size: 7.5px;
    text-align: center;
  }

  .proof-stage {
    border-radius: 12px;
  }

  .proof-kid {
    width: 48%;
    right: 6%;
  }

  .proof-buddy {
    width: 31%;
    left: 2%;
  }

  .proof-info-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-lyric-line {
    font-size: 9px;
  }

  .proof-watermark {
    top: 5%;
    left: 4%;
  }

  .proof-sticker {
    width: 43px;
    height: 43px;
    font-size: 5px;
  }

  .sku-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sku-option.is-gift {
    grid-column: span 1;
  }

  .payment-option,
  .bind-card,
  .consent-check {
    padding: 8px;
  }

  .delivery-success {
    gap: 13px;
  }

  .success-visual {
    min-height: 275px;
  }

  .success-copy h3 {
    font-size: 31px;
  }

  .express-head {
    padding: 20px 17px 15px;
  }

  .express-head h2 {
    font-size: 23px;
  }

  .express-body {
    padding: 15px;
  }

  .express-cache-grid {
    gap: 4px;
  }

  .express-cache {
    padding: 7px 6px;
  }

  .modal-backdrop.modal-right {
    align-items: stretch;
  }

  .express-sheet {
    width: 100%;
    border-left: 0;
  }

  .gate-top {
    padding: 21px 20px 17px;
  }

  .gate-body {
    padding: 17px 20px;
  }

  .gate-question strong {
    font-size: 29px;
  }

  .gate-actions {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .gate-actions .button {
    width: 100%;
  }

  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-rig {
    min-height: 190px;
  }

  .editor-rig .rig-svg {
    width: min(68%, 175px);
  }

  .mini-shell {
    padding: 12px;
    border-radius: 26px;
  }

  .mini-header {
    gap: 8px;
    padding-bottom: 12px;
  }

  .mini-brand {
    min-width: 0;
  }

  .mini-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 18px;
  }

  .mini-brand strong {
    font-size: 14px;
  }

  .mini-brand small {
    font-size: 6.5px;
  }

  .mini-channel-chip {
    display: none;
  }

  .kid-lock {
    margin-left: auto;
  }

  .mini-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px 2px 14px;
  }

  .mini-hero h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .mini-hero p {
    font-size: 9px;
    line-height: 1.5;
  }

  .mini-safe-badge {
    font-size: 7px;
  }

  .mini-routine-grid {
    gap: 7px;
  }

  .mini-routine-card {
    min-height: 83px;
    padding: 10px;
    gap: 7px;
  }

  .mini-routine-emoji {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
    font-size: 20px;
    border-radius: 12px;
  }

  .mini-routine-copy strong {
    font-size: 9.5px;
  }

  .mini-routine-copy span {
    font-size: 6.5px;
  }

  .mini-routine-mini-count {
    font-size: 5.5px;
  }

  .mini-content-grid {
    margin-top: 9px;
  }

  .mini-player-column {
    padding: 8px;
    border-radius: 19px;
  }

  .mini-now-bar {
    padding: 3px 3px 8px;
  }

  .mini-now-copy strong {
    font-size: 12px;
  }

  .mini-stage {
    min-height: 207px;
    border-radius: 16px;
  }

  .stage-topbar {
    left: 9px;
    right: 9px;
    top: 8px;
  }

  .stage-scene-pill {
    padding: 4px 6px;
    font-size: 6px;
  }

  .stage-badge {
    padding: 4px 5px;
    font-size: 5px;
  }

  .stage-friend {
    width: 27%;
    left: 1%;
  }

  .stage-kid {
    width: 40%;
    right: 8%;
  }

  .stage-cloud {
    transform: scale(0.65);
  }

  .stage-speech {
    left: 38%;
    top: 24%;
    max-width: 44%;
    padding: 5px 7px;
    font-size: 6.5px;
  }

  .stage-caption {
    display: none;
  }

  .stage-lyrics {
    bottom: 10%;
  }

  .stage-lyric-card {
    padding: 4px 7px;
  }

  .stage-lyric-text {
    font-size: 8.5px;
  }

  .stage-lyric-zh {
    font-size: 5px;
  }

  .stage-watermark {
    font-size: 4.5px;
    right: 8px;
    bottom: 7px;
  }

  .mini-controls {
    flex-wrap: wrap;
    gap: 5px;
  }

  .mini-play {
    min-width: 68px;
    font-size: 12px;
  }

  .mini-control-toggle {
    flex: 1;
    min-width: 0;
    padding: 6px 5px;
  }

  .mini-control-divider {
    display: none;
  }

  .mini-toggle-label {
    font-size: 6.5px;
  }

  .mini-control-round {
    width: 33px;
  }

  .mini-queue-panel {
    display: block;
    padding: 12px;
    border-radius: 19px;
  }

  .mini-tip-card {
    margin-top: 10px;
  }

  .mini-parent-return {
    margin-top: 9px;
  }

  .mini-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    font-size: 6px;
  }

  .toast-region {
    right: 9px;
    bottom: 9px;
    width: calc(100vw - 18px);
  }
}

@media (max-width: 520px) {
  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .guest-copy strong {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-tools {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .currency-switch button {
    padding: 4px 4px;
    font-size: 6.8px;
  }

  .wallet-pill {
    padding: 6px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .trust-strip span:nth-child(3),
  .trust-strip span:nth-child(4) {
    display: none;
  }

  .fake-door-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fake-door-blurb {
    min-height: 0;
  }

  .week-chart {
    height: 123px;
    gap: 5px;
  }

  .privacy-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wizard-progress-step {
    justify-content: center;
  }

  .wizard-progress-step .step-label {
    display: none;
  }

  .wizard-progress-step + .wizard-progress-step::before {
    display: none;
  }

  .gate-question strong {
    font-size: 26px;
  }

  .mini-routine-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mini-routine-card {
    min-height: 70px;
  }

  .mini-routine-card::after {
    right: 13px;
  }

  .mini-routine-mini-count {
    display: inline-flex;
  }

  .stage-friend {
    display: block;
    width: 24%;
    left: 0;
    opacity: 0.9;
  }

  .stage-kid {
    width: 49%;
    right: 11%;
  }

  .stage-speech {
    left: 34%;
    top: 27%;
    max-width: 55%;
  }

  .stage-lyric-text {
    font-size: 8px;
  }

  .mini-control-toggle {
    flex: 1 1 30%;
  }
}

/* ---------- Late surface details ---------- */

.rig-svg.rig-do-wave .rig-wave-hand {
  transform-origin: 78% 88%;
  transform-box: fill-box;
  animation: handWave 1.2s ease-in-out infinite alternate;
}

.workspace-footer {
  flex-wrap: wrap;
}

.character-card.is-active {
  border-color: #b9dccc;
  box-shadow: 0 18px 42px -32px rgba(33, 110, 90, 0.5), 0 0 0 2px rgba(62, 185, 162, 0.07);
}

.stage-prop {
  position: absolute;
  z-index: 3;
  font-size: 24px;
  opacity: 0.82;
  filter: drop-shadow(0 8px 8px rgba(63, 43, 17, 0.12));
  animation: propFloat 5.4s ease-in-out infinite;
  pointer-events: none;
}

.stage-bubble-one {
  right: 27%;
  top: 22%;
  font-size: 31px;
  animation-delay: -0.8s;
}

.stage-bubble-two {
  left: 33%;
  top: 17%;
  font-size: 21px;
  animation-delay: -2.1s;
}

.stage-bubble-three {
  right: 19%;
  bottom: 24%;
  font-size: 18px;
  animation-delay: -3.4s;
}

.stage-toy-one {
  left: 29%;
  bottom: 21%;
  font-size: 25px;
}

.stage-toy-two {
  right: 24%;
  top: 24%;
  font-size: 21px;
  animation-delay: -1.8s;
}

.stage-toy-three {
  right: 31%;
  top: 14%;
  font-size: 20px;
  animation-delay: -3s;
}

.stage-flower-one {
  left: 27%;
  bottom: 12%;
  font-size: 26px;
}

.stage-flower-two {
  right: 24%;
  top: 25%;
  font-size: 20px;
  animation-delay: -2.5s;
}

.stage-cloud-star {
  left: 27%;
  top: 22%;
  font-size: 29px;
  opacity: 0.42;
}

.ledger-line {
  display: inline-block;
  padding: 1px 0;
  color: #7c6e59;
  font-family: var(--mono);
  font-size: 6.8px;
  line-height: 1.55;
  white-space: nowrap;
}

.ledger-table td:nth-child(3) {
  min-width: 220px;
}

.switch {
  flex: 0 0 34px;
  border: 0;
}

.postcard-addon-head p {
  padding-right: 8px;
}

.checkout-side .consent-check {
  color: var(--ink-soft);
}

.wizard-step-checkout .sku-grid {
  align-content: start;
}

.gift-card .postcard-play-row .button {
  flex: 0 0 auto;
}

.success-actions .button-sun {
  min-height: 44px;
}

@keyframes propFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@media (max-width: 760px) {
  .stage-prop {
    font-size: 18px;
  }

  .stage-bubble-one {
    right: 7%;
  }

  .stage-bubble-two {
    left: 29%;
    top: 23%;
  }

  .stage-bubble-three,
  .stage-toy-three,
  .stage-flower-two {
    display: none;
  }

  .stage-toy-one {
    left: 25%;
    bottom: 18%;
  }

  .stage-toy-two {
    right: 8%;
    top: 23%;
  }

  .ledger-table td:nth-child(3) {
    min-width: 190px;
  }
}

/* =========================================================
   V2.0 Commercial Studio Edition
   Family photo pod · painted covers · 2.5D ensemble stage
   ========================================================= */

.owner-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.studio-subnav {
  scroll-margin-top: 112px;
}

.owner-action-family {
  border-color: rgba(255, 209, 92, 0.26);
  background: linear-gradient(135deg, rgba(255, 201, 81, 0.16), rgba(255, 118, 95, 0.1));
}

.owner-action-family .owner-action-icon {
  background: rgba(255, 201, 81, 0.22);
}

/* ---------- Hero key art ---------- */

.studio-hero-v2 {
  grid-template-columns: minmax(0, 0.98fr) minmax(430px, 1.02fr);
  min-height: 520px;
}

.hero-art-v2 {
  min-height: 470px;
  border-radius: 32px;
  background: #f8dfaa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 24px 50px -38px rgba(67, 42, 14, 0.58);
  transform: rotate(0.3deg);
}

.hero-keyart {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.02);
  transition: transform 1.1s var(--ease);
}

.hero-art-v2:hover .hero-keyart {
  transform: scale(1.045);
}

.hero-keyart-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(22, 24, 31, 0.16), transparent 30%, transparent 60%, rgba(22, 24, 31, 0.5)),
    radial-gradient(circle at 80% 20%, rgba(255, 242, 186, 0.18), transparent 33%);
  pointer-events: none;
}

.hero-art-v2 .hero-rig {
  display: none;
}

.hero-art-v2 .hero-orbit {
  z-index: 3;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-art-v2 .orbit-one {
  inset: 3%;
}

.hero-art-v2 .orbit-two {
  inset: 18%;
}

.hero-art-v2 .hero-sticker {
  z-index: 7;
  background: rgba(255, 251, 238, 0.86);
  backdrop-filter: blur(10px);
}

.hero-art-v2 .hero-sticker-top {
  top: 17%;
  right: 4%;
}

.hero-art-v2 .hero-sticker-bottom {
  right: 4%;
  bottom: 23%;
}

.hero-cast-pills {
  position: absolute;
  z-index: 8;
  left: 4%;
  right: 4%;
  top: 4%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.hero-cast-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(31, 36, 47, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fffdf4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 7px 14px -11px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: heroPillFloat 5.2s ease-in-out infinite;
}

.pill-guoguo { animation-delay: -1.1s; }
.pill-mom { animation-delay: -2.2s; }
.pill-dad { animation-delay: -3.3s; }

.hero-live-cast {
  position: absolute;
  z-index: 8;
  left: 4%;
  bottom: 8%;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 61%;
}

.hero-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 5px;
  border-radius: 13px;
  background: rgba(255, 252, 244, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 22px -20px rgba(32, 24, 10, 0.7);
  backdrop-filter: blur(12px);
  animation: heroPillFloat 5.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.65s);
}

.hero-live-chip img {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-live-glyph {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--sun-soft);
  font-size: 14px;
}

.hero-live-chip > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.hero-live-chip strong {
  color: #332c24;
  font-size: 8.5px;
  font-weight: 900;
  white-space: nowrap;
}

.hero-live-chip small {
  margin-top: 2px;
  color: #8f795d;
  font-size: 6.5px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-art-v2 .hero-nameplate {
  left: auto;
  right: 4%;
  bottom: 8%;
  z-index: 8;
  transform: rotate(1.2deg);
}

.hero-art-v2 .hero-note {
  z-index: 7;
}

/* ---------- Painted song covers ---------- */

.song-cover-art-wrap {
  min-height: 196px;
  padding: 0;
  background: #e9d2a6;
}

.song-cover-art-wrap::before,
.song-cover-art-wrap::after {
  display: none;
}

.song-cover-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s ease;
}

.song-card:hover .song-cover-art {
  transform: scale(1.055);
  filter: saturate(1.04);
}

.song-cover-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(28, 26, 24, 0.18), transparent 35%, transparent 58%, rgba(30, 27, 24, 0.48)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 35%);
  pointer-events: none;
}

.song-cover-art-wrap .song-cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  color: #443313;
  background: rgba(255, 252, 242, 0.86);
}

.song-cover-scene {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(28, 31, 34, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 253, 244, 0.91);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.song-cover-art-wrap .song-cover-title {
  z-index: 4;
  color: rgba(255, 253, 245, 0.76);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.song-cover-art-wrap .cover-preview {
  z-index: 5;
  background: rgba(255, 253, 246, 0.9);
}

.song-cover-art-wrap .song-cover-ring {
  display: none;
}

.v2-song-cast-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 7px;
  border-radius: 7px;
  background: linear-gradient(135deg, #fff4d4, #ffe8e0);
  border: 1px solid #f1ddc0;
  color: #98702d;
  font-size: 7.5px;
  font-weight: 800;
}

/* ---------- Mini routine painted headers ---------- */

.mini-routine-cover-card {
  isolation: isolate;
  color: #fffdf5;
  border-color: rgba(255, 255, 255, 0.28);
  background: #443c37;
}

.mini-routine-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.mini-routine-cover-card:hover .mini-routine-cover {
  transform: scale(1.06);
}

.mini-routine-cover-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(27, 27, 32, 0.62), rgba(27, 27, 32, 0.08) 70%, rgba(27, 27, 32, 0.18));
}

.mini-routine-cover-card .mini-routine-emoji {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.mini-routine-cover-card .mini-routine-copy strong,
.mini-routine-cover-card.is-selected .mini-routine-copy strong {
  color: #fffdf5;
}

.mini-routine-cover-card .mini-routine-copy span {
  color: rgba(255, 253, 245, 0.78);
}

.mini-routine-cover-card::after {
  z-index: 2;
  color: #fff;
  background: rgba(255, 118, 95, 0.82);
}

.mini-routine-cover-card.is-selected {
  border-color: #fff4c4;
  box-shadow: 0 0 0 3px rgba(255, 230, 143, 0.3), 0 17px 34px -25px rgba(36, 22, 7, 0.7);
}

/* ---------- Characters V2 head ---------- */

.characters-head-v2 {
  align-items: center;
}

.characters-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.family-cast-mount {
  margin-bottom: 20px;
}

.v2-empty-l1 {
  min-height: 250px;
  margin-top: 3px;
}

/* ---------- Family studio shell ---------- */

.v2-family-studio {
  position: relative;
  padding: clamp(16px, 2.1vw, 28px);
  border: 1px solid #e4d3bd;
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 226, 150, 0.38), transparent 27rem),
    radial-gradient(circle at 96% 2%, rgba(166, 230, 214, 0.28), transparent 26rem),
    linear-gradient(150deg, #fffaf0, #fffdf8 52%, #f6fcf7);
  box-shadow: 0 24px 58px -46px rgba(61, 39, 13, 0.55);
  overflow: hidden;
}

.v2-family-studio::before {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -160px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px dashed rgba(145, 119, 76, 0.16);
  pointer-events: none;
}

.v2-studio-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(222, 205, 180, 0.7);
}

.v2-studio-head h1,
.v2-studio-head h2 {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.v2-studio-head p {
  max-width: 760px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.v2-studio-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.v2-family-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  margin-top: 17px;
  align-items: start;
}

.v2-photo-column,
.v2-cast-column {
  min-width: 0;
}

/* ---------- Photo-to-2.5D pod ---------- */

.v2-photo-pod {
  position: relative;
  padding: 16px;
  border: 1px solid #e6d5bd;
  border-radius: 23px;
  background:
    radial-gradient(circle at 80% 4%, rgba(255, 226, 159, 0.38), transparent 12rem),
    rgba(255, 253, 247, 0.9);
  box-shadow: 0 18px 38px -36px rgba(69, 45, 17, 0.52);
}

.v2-photo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.v2-pod-kicker,
.v2-roster-kicker,
.v2-modal-kicker {
  color: var(--mint-deep);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.105em;
}

.v2-photo-head h3 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.v2-photo-head p {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.55;
}

.v2-pod-safe {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 12px;
  background: #f0fbf7;
  border: 1px solid #d5efe5;
  color: #6d8c80;
  font-size: 7px;
  font-weight: 750;
  text-align: center;
}

.v2-pod-safe b {
  display: block;
  color: var(--mint-deep);
  font-size: 17px;
  line-height: 1;
}

.v2-photo-stage {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.v2-photo-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.64), transparent 65%),
    linear-gradient(145deg, #ffe6c8, #ffd2d5 50%, #d7f0e8);
  border: 1px solid rgba(214, 181, 149, 0.8);
  overflow: hidden;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.36);
}

.v2-photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-photo-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
  color: #8b6f58;
}

.v2-photo-preview-placeholder span {
  font-size: 43px;
  filter: drop-shadow(0 8px 10px rgba(95, 58, 20, 0.12));
}

.v2-photo-preview-placeholder small {
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 6.5px;
  font-weight: 800;
}

.v2-photo-frame-corner {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(33, 37, 43, 0.55);
  color: rgba(255, 253, 244, 0.84);
  font-family: var(--mono);
  font-size: 5px;
  line-height: 1.3;
  letter-spacing: 0.08em;
}

.v2-photo-controls {
  min-width: 0;
}

.v2-photo-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.v2-photo-role-row button {
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid #e9dfd0;
  background: #fbf7ef;
  color: #8d806d;
  font-size: 7px;
  font-weight: 800;
}

.v2-photo-role-row button.is-active {
  color: #2b6557;
  background: #e9faf4;
  border-color: #b8e5d8;
}

.v2-photo-name-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 7.5px;
  font-weight: 750;
}

.v2-photo-name-label input {
  width: 102px;
  padding: 5px 7px;
  border: 1px solid #e8ddcd;
  border-radius: 7px;
  background: white;
  font-size: 8px;
  font-weight: 650;
  outline: none;
}

.v2-photo-name-label input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(62, 185, 162, 0.12);
}

.v2-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.v2-photo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.v2-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.v2-button:hover {
  transform: translateY(-1px);
}

.v2-button-primary {
  color: #fffdf7;
  background: linear-gradient(135deg, #4bc6af, #2ba790);
  border-color: #289782;
  box-shadow: 0 9px 18px -15px rgba(23, 140, 120, 0.75);
}

.v2-button-primary:hover {
  background: linear-gradient(135deg, #5dd3bd, #30b49c);
}

.v2-button-quiet {
  color: #665941;
  background: #fbf6ec;
  border-color: #e8dcc8;
}

.v2-button-quiet:hover {
  background: #fffdf6;
  border-color: #d8c6a9;
}

.v2-button-ghost {
  color: #8d7b64;
  background: transparent;
  border-color: #ebe0cf;
}

.v2-photo-safe-note {
  margin-top: 7px;
  color: #9c8c78;
  font-size: 6.8px;
  line-height: 1.45;
}

.v2-photo-processing {
  margin-top: 13px;
  padding: 12px;
  border-radius: 15px;
  background: #fbf7ef;
  border: 1px solid #eee2d2;
}

.v2-photo-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7e6f5c;
  font-size: 8px;
  font-weight: 750;
}

.v2-photo-progress-head strong {
  color: var(--coral-deep);
  font-family: var(--mono);
  font-size: 9px;
}

.v2-photo-progress {
  height: 6px;
  margin-top: 7px;
  border-radius: 99px;
  background: #eadfce;
  overflow: hidden;
}

.v2-photo-progress span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffc951, #ff7a64, #3eb9a2);
  transition: width 0.3s ease;
}

.v2-photo-gates {
  display: grid;
  gap: 4px;
  margin-top: 9px;
}

.v2-photo-gate {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid transparent;
  color: #9b8d7a;
}

.v2-photo-gate.is-active {
  background: #fff9df;
  border-color: #f0ddaa;
  color: #7b6337;
}

.v2-photo-gate.is-done {
  background: #f0fbf7;
  border-color: #d8efe6;
  color: #4f7d6d;
}

.v2-gate-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: #f1e8d9;
  color: #a79377;
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 800;
}

.v2-photo-gate.is-done .v2-gate-dot {
  background: #d6f3e9;
  color: #1f8c74;
}

.v2-photo-gate.is-active .v2-gate-dot {
  background: #ffe8a4;
  color: #8e6413;
}

.v2-photo-gate > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.v2-photo-gate strong {
  font-size: 7.5px;
  font-weight: 850;
}

.v2-photo-gate small {
  margin-top: 1px;
  color: #a89a86;
  font-size: 6.5px;
  line-height: 1.35;
}

.v2-photo-gate em {
  color: #b7a993;
  font-family: var(--mono);
  font-size: 5.5px;
  font-style: normal;
  font-weight: 800;
}

.v2-photo-gate.is-done em { color: #2a9b80; }
.v2-photo-gate.is-active em { color: #b38521; }

.v2-photo-result {
  margin-top: 13px;
  padding: 11px;
  border-radius: 15px;
  background: linear-gradient(145deg, #f1fcf8, #fffdf4);
  border: 1px solid #d8eee4;
}

.v2-photo-result-head {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.v2-result-check {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 8px;
  background: #d7f4e9;
  color: #218d76;
  font-size: 11px;
  font-weight: 900;
}

.v2-photo-result-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.v2-photo-result-head strong {
  color: #285d52;
  font-size: 9px;
  font-weight: 900;
}

.v2-photo-result-head small {
  margin-top: 2px;
  color: #7e9b90;
  font-size: 6.8px;
  line-height: 1.4;
}

.v2-photo-countdown {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 7px;
  background: #fff2c9;
  color: #8e671a;
  font-family: var(--mono);
  font-size: 5.7px;
  font-weight: 750;
  white-space: nowrap;
}

.v2-photo-countdown.is-expired {
  background: #ffe2de;
  color: #aa4a42;
}

.v2-receipt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #d5e8e0;
}

.v2-receipt div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.v2-receipt span {
  color: #97aba3;
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 650;
}

.v2-receipt strong {
  overflow: hidden;
  color: #4e6e63;
  font-size: 6.8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-photo-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
}

.v2-raw-deleted-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eaf8f3;
  border: 1px solid #cceade;
  color: #4f7f70;
  font-size: 6.5px;
  font-weight: 750;
}

.l0-receipt-seal.is-pending {
  background: #fff2c5;
  color: #8c6718;
  border-color: #efd998;
}

.v2-photo-receipt {
  border-color: #d9eadf;
  background: linear-gradient(145deg, #f7fdf9, #fffdf6);
}

/* ---------- Cast selector ---------- */

.v2-cast-column {
  padding: 15px;
  border: 1px solid #e6d5bd;
  border-radius: 23px;
  background: rgba(255, 253, 247, 0.86);
}

.v2-cast-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 2px 10px;
  border-bottom: 1px solid rgba(229, 214, 192, 0.8);
}

.v2-cast-topline h3 {
  margin-top: 3px;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.v2-cast-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  background: #f1fbf7;
  color: #648477;
  font-size: 7px;
  font-weight: 750;
  white-space: nowrap;
}

.v2-cast-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(62, 185, 162, 0.14);
  animation: livePulse 1.8s infinite;
}

.v2-roster-group {
  margin-top: 12px;
}

.v2-roster-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.v2-roster-head h4 {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.v2-roster-count {
  color: #a39076;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 750;
}

.v2-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.v2-cast-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #eadfcf;
  border-radius: 15px;
  background: #fffdf8;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.v2-cast-card:hover {
  transform: translateY(-1px);
  border-color: #d7c5a8;
  box-shadow: 0 10px 20px -20px rgba(61, 40, 12, 0.5);
}

.v2-cast-card.is-selected {
  border-color: #a9dccc;
  background: linear-gradient(145deg, #f8fffc, #f1fcf8);
  box-shadow: 0 0 0 2px rgba(62, 185, 162, 0.08);
}

.v2-cast-card.is-custom {
  border-style: dashed;
}

.v2-cast-check {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 1px solid #e1d3be;
  background: rgba(255, 253, 247, 0.92);
  color: #a89372;
  font-size: 10px;
  font-weight: 900;
  transition: all 0.2s var(--ease);
}

.v2-cast-card.is-selected .v2-cast-check {
  border-color: #43b29b;
  background: var(--mint);
  color: #fff;
  box-shadow: 0 4px 10px -7px rgba(23, 140, 120, 0.7);
}

.v2-cast-avatar {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffe8c8, #ffd8de);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.v2-cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-cast-avatar.is-svg {
  display: grid;
  place-items: center;
}

.v2-cast-avatar-glyph {
  font-size: 25px;
}

.v2-cast-scale {
  position: absolute;
  left: 3px;
  bottom: 3px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(29, 35, 39, 0.54);
  color: rgba(255, 254, 247, 0.9);
  font-family: var(--mono);
  font-size: 5px;
  font-weight: 700;
}

.v2-cast-copy {
  min-width: 0;
  flex: 1;
  padding-right: 16px;
}

.v2-cast-role {
  display: block;
  overflow: hidden;
  color: #9b8a72;
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-cast-copy h4 {
  margin-top: 1px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.v2-cast-copy p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 6.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-cast-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.v2-cast-tags span {
  padding: 2px 4px;
  border-radius: 4px;
  background: #f7f1e7;
  color: #9c896d;
  font-size: 5.5px;
  font-weight: 700;
}

.v2-card-countdown {
  background: #fff2c7 !important;
  color: #98701b !important;
  font-family: var(--mono);
}

.v2-portrait-switch {
  display: inline-flex;
  gap: 2px;
  margin-top: 4px;
  padding: 2px;
  border-radius: 6px;
  background: #f5ede0;
}

.v2-portrait-switch button {
  padding: 3px 5px;
  border-radius: 4px;
  color: #9d8b72;
  font-size: 5.5px;
  font-weight: 800;
}

.v2-portrait-switch button.is-active {
  background: white;
  color: #465548;
  box-shadow: 0 2px 5px -4px rgba(61, 41, 13, 0.5);
}

/* ---------- Formation + vocal ---------- */

.v2-formation-section,
.v2-vocal-section {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px dashed #e4d5c0;
}

.v2-section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.v2-section-line > span:last-child {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 750;
}

.v2-formation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.v2-formation-pill {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #eadfce;
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.v2-formation-pill:hover {
  transform: translateY(-1px);
  border-color: #d9c6a8;
}

.v2-formation-pill.is-active {
  border-color: #e5ad4b;
  background: linear-gradient(145deg, #fff9e8, #fff4d5);
  box-shadow: 0 0 0 2px rgba(255, 201, 81, 0.12);
}

.v2-formation-pill > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  white-space: nowrap;
  border-radius: 8px;
  background: #fbf2e3;
  font-size: 13px;
}

.v2-formation-pill strong {
  color: #504b40;
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1.2;
}

.v2-formation-pill small {
  overflow: hidden;
  color: #a49580;
  font-size: 5.8px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-vocal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.v2-vocal-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #e9dfd0;
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.v2-vocal-card:hover {
  transform: translateY(-1px);
  border-color: #d9c6a8;
}

.v2-vocal-card.is-active {
  border-color: #7acab8;
  background: linear-gradient(145deg, #f7fffc, #ecfaf5);
  box-shadow: 0 0 0 2px rgba(62, 185, 162, 0.08);
}

.v2-vocal-emoji {
  flex: 0 0 auto;
  font-size: 15px;
}

.v2-vocal-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.v2-vocal-card strong {
  color: #46564b;
  font-size: 7px;
  font-weight: 850;
  line-height: 1.3;
}

.v2-vocal-card small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: #9a8b75;
  font-size: 5.6px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v2-vocal-card em {
  position: absolute;
  right: 5px;
  top: 5px;
  color: #4fa38f;
  font-family: var(--mono);
  font-size: 4.5px;
  font-style: normal;
  font-weight: 800;
}

/* ---------- Preview block ---------- */

.v2-preview-block {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  padding: 14px;
  border: 1px solid #dfcdb4;
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 0%, rgba(255, 219, 139, 0.24), transparent 18rem),
    linear-gradient(150deg, #202133, #29243a 48%, #1b2a2b);
  box-shadow: 0 24px 46px -40px rgba(24, 19, 34, 0.8);
}

.v2-preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.v2-preview-head .v2-roster-kicker {
  color: #e8bf62;
}

.v2-preview-head h3 {
  margin-top: 3px;
  color: #fff9e8;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.v2-preview-head p {
  margin-top: 3px;
  color: rgba(218, 220, 208, 0.63);
  font-size: 7px;
}

.v2-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.v2-preview-actions .v2-button-quiet {
  color: #f2e5c9;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.17);
}

.v2-preview-vocal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: rgba(218, 218, 204, 0.62);
  font-size: 6px;
  font-weight: 750;
}

.v2-preview-vocal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.v2-vocal-pill {
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(225, 226, 213, 0.64);
  font-size: 6.5px;
  font-weight: 800;
  transition: all 0.2s var(--ease);
}

.v2-vocal-pill.is-active {
  border-color: rgba(126, 215, 193, 0.52);
  background: linear-gradient(135deg, rgba(84, 206, 180, 0.3), rgba(255, 201, 81, 0.22));
  color: #fff9e7;
  box-shadow: 0 0 14px -8px rgba(91, 217, 190, 0.8);
}

.v2-preview-vocal-pills-modal {
  flex: 1 1 100%;
  padding: 4px;
  border-radius: 9px;
  background: #f6eddf;
}

.v2-preview-vocal-pills-modal .v2-vocal-pill {
  border-color: #e7d7c2;
  background: #fffdf8;
  color: #8d7c65;
}

.v2-preview-vocal-pills-modal .v2-vocal-pill.is-active {
  border-color: #9dd9ca;
  background: #eafaf5;
  color: #2e6f61;
  box-shadow: none;
}

.v2-preview-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.v2-preview-body {
  position: relative;
}

.v2-preview-stage-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 19px;
  overflow: hidden;
  background: #1b1a2d;
}

.v2-preview-stage-wrap .v2-stage-format {
  display: none;
}

.v2-preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 2px 0;
  color: rgba(221, 218, 206, 0.64);
  font-size: 6.5px;
}

.v2-song-picker {
  position: absolute;
  z-index: 12;
  right: 12px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(25, 29, 39, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 251, 237, 0.7);
  font-size: 5.5px;
  font-weight: 750;
  backdrop-filter: blur(9px);
}

.v2-song-picker select {
  max-width: 128px;
  padding: 2px 3px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff8e6;
  font-size: 6px;
  outline: none;
}

.v2-song-picker option {
  color: #302e29;
  background: #fffdf7;
}

.v2-preview-modal-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.v2-preview-modal-switcher .v2-song-picker {
  position: static;
  background: #f5ecdc;
  border-color: #e4d4bd;
  color: #806e54;
}

.v2-preview-modal-switcher .v2-song-picker select {
  color: #5c4d39;
  background: #fffdf8;
  border: 1px solid #e3d4bd;
}

/* ---------- Theater switcher ---------- */

.theater-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 5px;
  border-radius: 13px;
  background: rgba(247, 239, 226, 0.78);
  border: 1px solid rgba(228, 212, 189, 0.9);
}

.theater-pill-group {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.theater-pill-group button {
  padding: 6px 9px;
  border-radius: 8px;
  color: #9a8a72;
  font-size: 7.5px;
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.theater-pill-group button.is-active {
  color: #33443c;
  background: #fffdf8;
  box-shadow: 0 4px 10px -8px rgba(54, 40, 19, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.theater-cast-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  color: #9b8d78;
  font-size: 6.5px;
  white-space: nowrap;
}

.theater-cast-summary strong {
  color: #4b5d50;
  font-size: 7px;
}

.theater-cast-summary small {
  padding: 2px 4px;
  border-radius: 4px;
  background: #fff1c8;
  color: #9b731d;
  font-size: 5.5px;
  font-weight: 750;
}

/* ---------- Ensemble stage ---------- */

.v2-ensemble-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  background: #16172a;
  isolation: isolate;
  overflow: hidden;
  font-family: var(--font);
}

.mini-stage .v2-ensemble-stage {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  min-height: 0;
}

.v2-ensemble-bg,
.v2-ensemble-sheen,
.v2-ensemble-floor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.v2-ensemble-bg {
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.01);
  transition: background-image 0.8s ease;
}

.v2-ensemble-stage.is-night .v2-ensemble-bg {
  filter: saturate(0.82) brightness(0.76) contrast(1.04);
}

.v2-ensemble-sheen {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 236, 178, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(13, 15, 25, 0.08), transparent 32%, transparent 58%, rgba(16, 17, 25, 0.36));
}

.v2-ensemble-floor {
  z-index: 2;
  top: auto;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(255, 219, 145, 0.11) 44%, rgba(255, 202, 92, 0.2));
  mix-blend-mode: screen;
}

.v2-stage-ribbon {
  position: absolute;
  z-index: 15;
  left: 13px;
  right: 13px;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.v2-stage-live,
.v2-stage-format {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(21, 25, 35, 0.38);
  color: rgba(255, 251, 236, 0.82);
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.v2-stage-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff7a64;
  box-shadow: 0 0 0 3px rgba(255, 122, 100, 0.16);
  animation: livePulse 1.5s infinite;
}

.v2-stage-castline {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 37px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.v2-stage-castline span {
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(255, 252, 240, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(58, 67, 52, 0.8);
  font-size: 5.5px;
  font-weight: 750;
  backdrop-filter: blur(7px);
  white-space: nowrap;
}

.v2-ensemble-stage.is-night .v2-stage-castline span {
  background: rgba(26, 30, 52, 0.42);
  color: rgba(246, 241, 218, 0.8);
}

.v2-ensemble-cast {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.v2-stage-member {
  position: absolute;
  left: var(--member-x);
  bottom: var(--member-y);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: calc(var(--member-scale) * 24%);
  height: auto;
  min-width: 35px;
  padding: 0;
  border: 0;
  background: none;
  transform: translateX(-50%);
  transform-origin: bottom center;
  pointer-events: auto;
  filter: drop-shadow(0 12px 11px rgba(31, 22, 14, 0.2));
  transition: height 0.45s var(--ease), filter 0.3s ease;
}

.v2-stage-member.role-mom,
.v2-stage-member.role-dad {
  z-index: 3;
}

.v2-stage-member.role-mascot {
  z-index: 4;
}

.v2-stage-member.tier-kid,
.v2-stage-member.tier-toddler {
  z-index: 6;
}

.v2-stage-member:hover {
  filter: drop-shadow(0 15px 17px rgba(31, 22, 14, 0.26)) brightness(1.04);
}

.v2-sprite-box {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: auto;
  aspect-ratio: 512 / 640;
  transform-origin: bottom center;
}

.v2-stage-sprite {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.v2-sprite-fallback {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.v2-sprite-fallback[hidden] {
  display: none !important;
}

.v2-sprite-fallback .rig-svg {
  width: auto;
  height: 100%;
  max-width: none;
  overflow: visible;
}

.v2-member-label {
  position: absolute;
  left: 50%;
  bottom: 1%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 42px;
  max-width: 90px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(255, 252, 243, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 5px 10px -8px rgba(31, 22, 12, 0.54);
  transform: translateX(-50%);
  backdrop-filter: blur(7px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.v2-stage-member:hover .v2-member-label,
.v2-stage-member.is-spotlight .v2-member-label,
.v2-stage-member.is-singing .v2-member-label {
  opacity: 1;
}

.v2-member-label strong {
  color: #3e4e42;
  font-size: 6.5px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.v2-member-label small {
  display: none;
  margin-top: 1px;
  color: #8c7c66;
  font-size: 5px;
  line-height: 1.1;
  white-space: nowrap;
}

.v2-stage-member:hover .v2-member-label small {
  display: block;
}

.v2-sing-halo {
  position: absolute;
  z-index: 11;
  left: 50%;
  top: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 99px;
  background: linear-gradient(135deg, #fff5c8, #ffe3a2);
  border: 1px solid rgba(255, 248, 213, 0.82);
  color: #8a5d10;
  font-size: 5.5px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(255, 220, 128, 0.35);
  transform: translateX(-50%) translateY(-100%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-bounce);
}

.v2-stage-member.is-singing .v2-sing-halo {
  opacity: 1;
  transform: translateX(-50%) translateY(-100%) scale(1);
  animation: haloFloat 1.6s ease-in-out infinite alternate;
}

.v2-stage-member.role-mom.is-singing .v2-sing-halo {
  background: linear-gradient(135deg, #ffe6eb, #ffc7d5);
  border-color: rgba(255, 236, 241, 0.85);
  color: #a34a62;
  box-shadow: 0 0 20px rgba(255, 166, 190, 0.3);
}

.v2-stage-member.role-dad.is-singing .v2-sing-halo {
  background: linear-gradient(135deg, #dff0ff, #bcdcff);
  border-color: rgba(229, 244, 255, 0.85);
  color: #35607f;
  box-shadow: 0 0 20px rgba(137, 192, 241, 0.3);
}

.v2-spotlight-ring {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -1%;
  width: 66%;
  height: 13%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 225, 134, 0.65) 0%, rgba(255, 213, 101, 0.28) 42%, transparent 70%);
  filter: blur(2px);
  transform: translateX(-50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.v2-spotlight-ring span {
  position: absolute;
  inset: 26% 16%;
  border: 1px solid rgba(255, 242, 185, 0.7);
  border-radius: 50%;
  animation: spotlightPulse 1.7s ease-in-out infinite;
}

.v2-stage-member.is-spotlight .v2-spotlight-ring {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.v2-ensemble-stage.is-vocal-preview .v2-stage-member.is-singing .v2-sprite-box,
.mini-stage.is-playing .v2-stage-member.is-singing .v2-sprite-box {
  animation: familyBounce 0.78s ease-in-out infinite alternate;
}

.mini-stage.is-playing .v2-stage-member.is-parent.is-singing .v2-sprite-box {
  animation: familySway 1.5s ease-in-out infinite alternate;
}

.mini-stage.is-playing .v2-stage-member.tier-mascot .v2-sprite-box {
  animation: familySway 2.2s ease-in-out infinite;
}

.v2-stage-caption {
  position: absolute;
  z-index: 12;
  left: 5%;
  right: 5%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.v2-stage-caption-kicker {
  padding: 3px 7px;
  border-radius: 99px;
  background: rgba(255, 251, 237, 0.46);
  color: rgba(63, 74, 58, 0.76);
  font-size: 5.5px;
  font-weight: 750;
  backdrop-filter: blur(5px);
}

.v2-stage-caption strong {
  margin-top: 3px;
  padding: 4px 10px;
  border-radius: 9px;
  background: rgba(255, 252, 242, 0.4);
  color: #3f503e;
  font-size: clamp(9px, 1.2vw, 15px);
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}

.v2-stage-caption strong .gold-name {
  color: #b85a21;
  text-shadow: 0 2px 0 #ffec9f;
}

.v2-ensemble-stage.is-night .v2-stage-caption strong {
  background: rgba(21, 23, 45, 0.48);
  color: #f7f1da;
  text-shadow: 0 1px 4px rgba(10, 12, 24, 0.35);
}

.v2-ensemble-stage.is-night .v2-stage-caption strong .gold-name {
  color: #ffe089;
  text-shadow: 0 1px 5px rgba(255, 201, 81, 0.44);
}

.v2-ensemble-stage.is-night .v2-stage-caption-kicker {
  background: rgba(25, 28, 52, 0.46);
  color: rgba(246, 241, 220, 0.76);
}

.mini-stage .v2-stage-caption {
  display: none;
}

.v2-stage-watermark {
  position: absolute;
  z-index: 13;
  right: 11px;
  bottom: 7px;
  color: rgba(255, 251, 237, 0.5);
  font-family: var(--mono);
  font-size: 5px;
  font-weight: 600;
  letter-spacing: 0.025em;
  pointer-events: none;
}

.mini-stage.has-v2-ensemble .stage-topbar,
.mini-stage.has-v2-ensemble .stage-watermark {
  display: none;
}

.mini-stage.has-v2-ensemble .stage-lyrics {
  bottom: 8%;
}

.mini-stage.has-v2-ensemble .stage-lyrics .stage-lyric-card {
  background: rgba(255, 252, 242, 0.64);
  box-shadow: 0 8px 18px -16px rgba(24, 22, 17, 0.6);
}

/* ---------- Video player ---------- */

.mini-video-panel {
  position: relative;
}

.v2-video-player {
  padding: 10px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 199, 92, 0.17), transparent 15rem),
    linear-gradient(145deg, #1c2630, #111b1e);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v2-video-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 2px 9px;
}

.v2-video-kicker {
  color: #e8bf62;
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.v2-video-head h3 {
  margin-top: 2px;
  color: #fff7e8;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.v2-video-head p {
  margin-top: 2px;
  color: rgba(190, 206, 199, 0.68);
  font-size: 6.5px;
}

.v2-video-pills {
  display: flex;
  gap: 3px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.v2-video-pills button {
  padding: 4px 6px;
  border-radius: 6px;
  color: rgba(209, 218, 208, 0.64);
  font-size: 6px;
  font-weight: 800;
  white-space: nowrap;
}

.v2-video-pills button.is-active {
  color: #21332d;
  background: #fff8e7;
}

.v2-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #080b11;
  overflow: hidden;
}

.v2-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080b11;
}

.v2-video-unavailable {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 207, 108, 0.13), transparent 20rem),
    linear-gradient(145deg, #17212a, #111820);
  color: #f7ead0;
  text-align: center;
}

.v2-video-unavailable span {
  font-size: 36px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.2));
}

.v2-video-unavailable strong {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 850;
}

.v2-video-unavailable p {
  max-width: 420px;
  margin-top: 4px;
  color: rgba(220, 218, 200, 0.66);
  font-size: 7px;
  line-height: 1.55;
}

.v2-video-player.is-unavailable video {
  opacity: 0;
}

.v2-video-player.is-unavailable .v2-video-unavailable {
  display: flex;
}

.v2-video-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 2px 1px;
  color: rgba(188, 205, 197, 0.66);
  font-family: var(--mono);
  font-size: 5.5px;
}

.v2-video-empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 22px;
  border-radius: 15px;
  background: #f7efe2;
  color: #8c7b63;
  font-size: 10px;
  font-weight: 750;
}

/* ---------- Proof family preview ---------- */

.v2-proof-family {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e2d2bb;
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 213, 130, 0.28), transparent 18rem),
    linear-gradient(150deg, #242435, #2d283d 57%, #1d292a);
  box-shadow: 0 18px 35px -34px rgba(30, 24, 36, 0.72);
}

.v2-proof-family-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.v2-proof-family-head .eyebrow {
  color: #e7bf65;
}

.v2-proof-family-head h4 {
  margin-top: 3px;
  color: #fff8e8;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.v2-proof-family-head .theater-pill-group {
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
}

.v2-proof-family-head .theater-pill-group button {
  color: rgba(212, 218, 207, 0.66);
  font-size: 6.5px;
}

.v2-proof-family-head .theater-pill-group button.is-active {
  color: #263a33;
  background: #fff9e9;
}

.v2-proof-family-content {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  background: #171728;
}

.v2-proof-family-stage {
  min-height: 0;
}

.v2-proof-family-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 2px 0;
  color: rgba(206, 214, 203, 0.65);
  font-size: 5.8px;
}

.v2-proof-family-foot .mini-button {
  color: #f4e8cd;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.v2-proof-family-content .v2-video-player {
  border-radius: 0;
  border: 0;
}

/* ---------- Family modal + toasts ---------- */

.family-modal-root {
  position: relative;
  z-index: 1300;
}

.v2-family-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 207, 117, 0.08), transparent 32rem),
    rgba(18, 20, 26, 0.68);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.22s ease both;
}

.v2-family-modal-card {
  display: flex;
  flex-direction: column;
  width: min(1420px, 96vw);
  max-height: 92vh;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 25px;
  background:
    radial-gradient(circle at 4% 2%, rgba(255, 220, 142, 0.29), transparent 25rem),
    radial-gradient(circle at 96% 4%, rgba(164, 229, 211, 0.23), transparent 24rem),
    linear-gradient(150deg, #fffaf0, #fffdf8 55%, #f7fcf7);
  box-shadow: 0 40px 100px -35px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: familyModalIn 0.32s var(--ease);
}

.v2-family-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(225, 209, 186, 0.8);
}

.v2-family-modal-head h2 {
  margin-top: 4px;
  color: var(--ink-strong);
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.v2-family-modal-head p {
  max-width: 740px;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 9px;
}

.v2-modal-close {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border-radius: 12px;
  border: 1px solid #e5d7c3;
  background: #fffdf8;
  color: #7e6e57;
  font-size: 23px;
  line-height: 1;
}

.v2-modal-close:hover {
  background: #f9f0df;
}

.v2-modal-body {
  overflow: auto;
  padding: 14px 20px 20px;
}

.v2-customizer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.v2-customizer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.v2-customizer-summary span {
  padding: 5px 8px;
  border-radius: 99px;
  background: #f8f1e5;
  border: 1px solid #eadbc7;
  color: #8b7558;
  font-size: 7px;
  font-weight: 750;
}

.v2-customizer-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
}

.v2-customizer-roster {
  min-width: 0;
}

.v2-formation-list-compact,
.v2-vocal-list-compact {
  margin-bottom: 10px;
}

.v2-customizer-stage {
  position: sticky;
  top: 0;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5d5c0;
  border-radius: 19px;
  background: rgba(255, 253, 247, 0.72);
}

.v2-customizer-stage .v2-ensemble-stage,
.v2-modal-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.v2-modal-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.v2-preview-modal-body {
  position: relative;
  border-radius: 17px;
  overflow: hidden;
  background: #18182b;
}

.v2-modal-stage-large {
  min-height: 0;
}

.v2-preview-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 7px;
}

.v2-preview-modal-foot > span:first-child {
  margin-right: auto;
}

body.v2-family-modal-open {
  overflow: hidden;
}

.family-toast-region {
  position: fixed;
  z-index: 1400;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(330px, calc(100vw - 28px));
  pointer-events: none;
}

.family-toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(222, 206, 181, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 20px 40px -27px rgba(35, 25, 13, 0.6);
  backdrop-filter: blur(16px);
  transform-origin: bottom right;
  animation: toastIn 0.3s var(--ease-bounce);
  pointer-events: auto;
}

.family-toast.is-leaving {
  animation: toastOut 0.25s ease forwards;
}

.family-toast-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 8px;
  background: var(--sun-soft);
  font-size: 12px;
}

.family-toast > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.family-toast strong {
  color: var(--ink-strong);
  font-size: 9px;
  font-weight: 850;
}

.family-toast small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7.5px;
  line-height: 1.45;
}

.family-toast.is-warn .family-toast-icon {
  background: var(--coral-soft);
}

/* ---------- V2 motion ---------- */

@keyframes heroPillFloat {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-5px) rotate(0.8deg); }
}

@keyframes familyModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes familyBounce {
  0%, 100% { transform: translateY(0) scaleY(0.99); }
  50% { transform: translateY(-5px) scaleY(1.02); }
}

@keyframes familySway {
  0%, 100% { transform: rotate(-1.1deg) translateY(0); }
  50% { transform: rotate(1.2deg) translateY(-2px); }
}

@keyframes haloFloat {
  0%, 100% { transform: translateX(-50%) translateY(-100%) scale(1); }
  50% { transform: translateX(-50%) translateY(-112%) scale(1.02); }
}

@keyframes spotlightPulse {
  0%, 100% { opacity: 0.62; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(5px) scale(0.97); }
}

/* ---------- V2 responsive ---------- */

@media (max-width: 1320px) {
  .owner-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-hero-v2 {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
  }

  .v2-family-layout {
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  }

  .v2-roster-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-vocal-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1120px) {
  .studio-hero-v2 {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.69fr);
  }

  .hero-art-v2 {
    min-height: 390px;
  }

  .v2-family-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-photo-pod {
    display: block;
  }

  .v2-photo-stage {
    margin-top: 13px;
  }

  .v2-photo-processing,
  .v2-photo-result {
    margin-top: 13px;
  }

  .v2-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-vocal-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v2-customizer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-customizer-stage {
    position: relative;
    grid-row: 1;
  }
}

@media (max-width: 980px) {
  .studio-hero-v2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art-v2 {
    min-height: 400px;
    max-width: 720px;
    margin: 6px auto 0;
  }

  .hero-cast-pills {
    max-width: 70%;
  }

  .v2-photo-pod {
    display: block;
  }

  .v2-photo-stage {
    margin-top: 13px;
  }

  .v2-photo-processing,
  .v2-photo-result {
    margin-top: 13px;
  }

  .v2-studio-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-studio-head-actions {
    justify-content: flex-start;
  }

  .v2-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .characters-head-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .owner-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-hero-v2 {
    padding: 24px 19px;
  }

  .hero-art-v2 {
    min-height: 320px;
    border-radius: 24px;
  }

  .hero-cast-pill {
    padding: 4px 7px;
    font-size: 6.5px;
  }

  .hero-live-cast {
    left: 3%;
    bottom: 17%;
    max-width: 78%;
  }

  .hero-live-chip {
    padding: 4px 7px 4px 4px;
  }

  .hero-live-chip img,
  .hero-live-glyph {
    width: 23px;
    height: 23px;
  }

  .hero-art-v2 .hero-nameplate {
    right: 3%;
    bottom: 3%;
  }

  .hero-art-v2 .hero-sticker-top {
    top: 20%;
    right: 2%;
  }

  .hero-art-v2 .hero-sticker-bottom {
    display: none;
  }

  .song-cover-art-wrap {
    min-height: 176px;
  }

  .v2-family-studio {
    padding: 14px;
    border-radius: 23px;
  }

  .v2-studio-head h1,
  .v2-studio-head h2 {
    font-size: 27px;
  }

  .v2-studio-head-actions {
    width: 100%;
  }

  .v2-studio-head-actions .button {
    flex: 1;
    min-width: 130px;
  }

  .v2-photo-stage {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .v2-photo-name-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .v2-photo-name-label input {
    width: 100%;
  }

  .v2-photo-buttons .v2-button {
    flex: 1;
  }

  .v2-roster-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-vocal-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-formation-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-cast-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-preview-block {
    padding: 10px;
    border-radius: 19px;
  }

  .v2-preview-actions {
    width: 100%;
  }

  .v2-preview-actions .v2-button {
    flex: 1;
  }

  .v2-preview-vocal-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .theater-switcher {
    align-items: stretch;
    flex-direction: column;
  }

  .theater-pill-group {
    width: 100%;
  }

  .theater-pill-group button {
    flex: 1;
    white-space: normal;
    line-height: 1.25;
  }

  .theater-cast-summary {
    justify-content: center;
  }

  .v2-ensemble-stage {
    min-height: 220px;
  }

  .v2-stage-member {
    width: calc(var(--member-scale) * 28%);
  }

  .v2-stage-castline {
    top: 32px;
    max-width: 92%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .v2-stage-castline span:nth-child(3) {
    display: none;
  }

  .v2-stage-caption {
    bottom: 5%;
  }

  .v2-stage-caption strong {
    font-size: 8px;
  }

  .v2-video-head {
    flex-direction: column;
  }

  .v2-video-pills {
    width: 100%;
  }

  .v2-video-pills button {
    flex: 1;
  }

  .v2-video-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-proof-family {
    padding: 9px;
  }

  .v2-proof-family-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .v2-proof-family-head .theater-pill-group {
    width: 100%;
  }

  .v2-proof-family-head .theater-pill-group button {
    flex: 1;
    white-space: normal;
  }

  .v2-proof-family-foot {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .v2-family-modal-backdrop {
    padding: 7px;
  }

  .v2-family-modal-card {
    width: 100%;
    max-height: 95vh;
    border-radius: 19px;
  }

  .v2-family-modal-head {
    padding: 13px 14px 11px;
  }

  .v2-family-modal-head h2 {
    font-size: 21px;
  }

  .v2-modal-body {
    padding: 10px 12px 14px;
  }

  .v2-customizer-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .v2-customizer-top .v2-preview-switcher {
    width: 100%;
  }

  .v2-customizer-stage {
    padding: 7px;
  }

  .v2-preview-modal-foot {
    justify-content: flex-start;
  }

  .v2-preview-modal-foot .v2-button {
    flex: 1;
  }

  .family-toast-region {
    right: 9px;
    bottom: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
