﻿:root {
  color-scheme: dark;
  --bg-top: #0a0811;
  --bg-bottom: #121a29;
  --panel: rgba(12, 18, 30, 0.84);
  --panel-strong: rgba(16, 23, 38, 0.96);
  --panel-inner: rgba(255, 255, 255, 0.035);
  --border: rgba(122, 184, 255, 0.12);
  --border-strong: rgba(122, 184, 255, 0.3);
  --text: #f2f8ff;
  --muted: #9fb1c9;
  --accent: #39c5ff;
  --accent-soft: #6a8dff;
  --accent-pale: rgba(57, 197, 255, 0.12);
  --accent-warm: #ffbb7a;
  --accent-warm-pale: rgba(255, 187, 122, 0.1);
  --hero-tint-a: rgba(57, 197, 255, 0.18);
  --hero-tint-b: rgba(255, 187, 122, 0.12);
  --hero-orb-a: rgba(40, 195, 255, 0.18);
  --hero-orb-b: rgba(73, 117, 255, 0.12);
  --mode-signal-bg: linear-gradient(135deg, rgba(57, 197, 255, 0.18), rgba(255, 187, 122, 0.1));
  --mode-signal-dot: #39c5ff;
  --mode-signal-shadow: rgba(57, 197, 255, 0.7);
  --mode-tab-active: linear-gradient(135deg, rgba(57, 197, 255, 0.24), rgba(255, 187, 122, 0.08));
  --mode-pill-border: rgba(102, 214, 255, 0.24);
  --scenario-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.014));
  --scenario-surface-strong: linear-gradient(135deg, rgba(57, 197, 255, 0.1), rgba(255, 187, 122, 0.04));
  --scenario-card-border: rgba(102, 214, 255, 0.14);
  --scenario-card-shadow: rgba(40, 195, 255, 0.08);
  --scenario-input-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01));
  --scenario-input-border: rgba(102, 214, 255, 0.16);
  --scenario-focus-ring: rgba(40, 195, 255, 0.12);
  --scenario-soft-text: rgba(220, 236, 255, 0.82);
  --danger: #ff8a8a;
  --success: #7ce8b4;
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-xl: 0 34px 100px rgba(0, 0, 0, 0.48);
  --shadow-card: 0 20px 56px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 187, 122, 0.14), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(57, 197, 255, 0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(88, 101, 255, 0.1), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

body[data-scenario="GPT_LYRICS"] {
  --hero-tint-a: rgba(64, 190, 255, 0.32);
  --hero-tint-b: rgba(108, 123, 255, 0.2);
  --hero-orb-a: rgba(41, 200, 255, 0.34);
  --hero-orb-b: rgba(90, 107, 255, 0.22);
  --mode-signal-bg: linear-gradient(135deg, rgba(79, 214, 255, 0.28), rgba(110, 126, 255, 0.18));
  --mode-signal-dot: #62d8ff;
  --mode-signal-shadow: rgba(98, 216, 255, 0.72);
  --mode-tab-active: linear-gradient(135deg, rgba(64, 190, 255, 0.32), rgba(120, 128, 255, 0.16));
  --mode-pill-border: rgba(102, 214, 255, 0.28);
  --scenario-surface: linear-gradient(180deg, rgba(84, 208, 255, 0.078), rgba(255, 255, 255, 0.014));
  --scenario-surface-strong: linear-gradient(135deg, rgba(81, 213, 255, 0.13), rgba(113, 122, 255, 0.07));
  --scenario-card-border: rgba(108, 212, 255, 0.18);
  --scenario-card-shadow: rgba(67, 198, 255, 0.12);
  --scenario-input-bg: linear-gradient(180deg, rgba(85, 202, 255, 0.055), rgba(255, 255, 255, 0.01));
  --scenario-input-border: rgba(104, 214, 255, 0.18);
  --scenario-focus-ring: rgba(97, 210, 255, 0.14);
  --scenario-soft-text: rgba(221, 242, 255, 0.84);
}

body[data-scenario="READY_POEM"] {
  --hero-tint-a: rgba(77, 232, 196, 0.3);
  --hero-tint-b: rgba(255, 179, 102, 0.22);
  --hero-orb-a: rgba(66, 227, 184, 0.28);
  --hero-orb-b: rgba(255, 156, 88, 0.22);
  --mode-signal-bg: linear-gradient(135deg, rgba(67, 233, 190, 0.24), rgba(255, 182, 98, 0.18));
  --mode-signal-dot: #57efcb;
  --mode-signal-shadow: rgba(87, 239, 203, 0.72);
  --mode-tab-active: linear-gradient(135deg, rgba(71, 233, 193, 0.26), rgba(255, 185, 110, 0.18));
  --mode-pill-border: rgba(95, 239, 207, 0.28);
  --scenario-surface: linear-gradient(180deg, rgba(74, 235, 194, 0.07), rgba(255, 188, 114, 0.028));
  --scenario-surface-strong: linear-gradient(135deg, rgba(72, 236, 196, 0.12), rgba(255, 188, 110, 0.07));
  --scenario-card-border: rgba(95, 239, 207, 0.18);
  --scenario-card-shadow: rgba(74, 232, 193, 0.1);
  --scenario-input-bg: linear-gradient(180deg, rgba(72, 236, 196, 0.048), rgba(255, 190, 112, 0.012));
  --scenario-input-border: rgba(95, 239, 207, 0.18);
  --scenario-focus-ring: rgba(95, 239, 207, 0.14);
  --scenario-soft-text: rgba(228, 244, 238, 0.84);
}

body[data-scenario="SUNO_LYRICS"] {
  --hero-tint-a: rgba(121, 139, 255, 0.32);
  --hero-tint-b: rgba(62, 217, 255, 0.2);
  --hero-orb-a: rgba(104, 125, 255, 0.3);
  --hero-orb-b: rgba(44, 213, 255, 0.2);
  --mode-signal-bg: linear-gradient(135deg, rgba(121, 139, 255, 0.26), rgba(62, 217, 255, 0.18));
  --mode-signal-dot: #84a6ff;
  --mode-signal-shadow: rgba(132, 166, 255, 0.72);
  --mode-tab-active: linear-gradient(135deg, rgba(121, 139, 255, 0.28), rgba(62, 217, 255, 0.16));
  --mode-pill-border: rgba(124, 162, 255, 0.28);
  --scenario-surface: linear-gradient(180deg, rgba(122, 145, 255, 0.075), rgba(74, 221, 255, 0.02));
  --scenario-surface-strong: linear-gradient(135deg, rgba(122, 145, 255, 0.125), rgba(72, 218, 255, 0.07));
  --scenario-card-border: rgba(124, 162, 255, 0.2);
  --scenario-card-shadow: rgba(103, 136, 255, 0.1);
  --scenario-input-bg: linear-gradient(180deg, rgba(124, 162, 255, 0.048), rgba(72, 218, 255, 0.012));
  --scenario-input-border: rgba(124, 162, 255, 0.18);
  --scenario-focus-ring: rgba(124, 162, 255, 0.14);
  --scenario-soft-text: rgba(227, 236, 255, 0.84);
}

body[data-scenario="INSTRUMENTAL"] {
  --hero-tint-a: rgba(255, 172, 92, 0.3);
  --hero-tint-b: rgba(214, 128, 88, 0.2);
  --hero-orb-a: rgba(255, 171, 92, 0.24);
  --hero-orb-b: rgba(220, 122, 76, 0.18);
  --mode-signal-bg: linear-gradient(135deg, rgba(255, 184, 102, 0.26), rgba(227, 134, 84, 0.18));
  --mode-signal-dot: #ffcb8c;
  --mode-signal-shadow: rgba(255, 203, 140, 0.72);
  --mode-tab-active: linear-gradient(135deg, rgba(255, 176, 104, 0.28), rgba(219, 136, 87, 0.16));
  --mode-pill-border: rgba(255, 187, 122, 0.28);
  --scenario-surface: linear-gradient(180deg, rgba(255, 184, 104, 0.07), rgba(225, 139, 86, 0.022));
  --scenario-surface-strong: linear-gradient(135deg, rgba(255, 189, 118, 0.12), rgba(224, 136, 88, 0.07));
  --scenario-card-border: rgba(255, 195, 128, 0.18);
  --scenario-card-shadow: rgba(255, 176, 104, 0.1);
  --scenario-input-bg: linear-gradient(180deg, rgba(255, 188, 118, 0.048), rgba(223, 140, 90, 0.012));
  --scenario-input-border: rgba(255, 194, 126, 0.18);
  --scenario-focus-ring: rgba(255, 190, 120, 0.14);
  --scenario-soft-text: rgba(255, 237, 223, 0.82);
}

.ambient {
  position: fixed;
  inset: auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
}

.ambient--left {
  top: -120px;
  left: -140px;
  background: rgba(255, 187, 122, 0.18);
}

.ambient--right {
  top: 260px;
  right: -180px;
  background: rgba(57, 197, 255, 0.15);
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 22px 18px 320px;
  overflow-anchor: none;
}

#track-form,
#section-create {
  overflow-anchor: none;
}

.card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
}

.card--inner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015)),
    var(--panel-inner);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero {
  padding: 24px 24px 22px;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, var(--hero-tint-a), var(--hero-tint-b)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
  transition: background 0.36s ease, border-color 0.36s ease, box-shadow 0.36s ease;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 36%);
  opacity: 0.7;
  pointer-events: none;
}

.hero__mark {
  position: absolute;
  top: 18px;
  right: -6px;
  width: 360px;
  height: 220px;
  margin: 0;
  border-radius: 0;
  border: 0;
  background:
    radial-gradient(circle at 48% 38%, rgba(57, 197, 255, 0.14), transparent 34%),
    url("/miniapp/static/logo-no-bg.png") center top / 84% auto no-repeat;
  box-shadow: none;
  opacity: 0.13;
  filter: saturate(1.04);
  pointer-events: none;
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.92) 56%, rgba(0, 0, 0, 0.08) 72%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.92) 56%, rgba(0, 0, 0, 0.08) 72%, rgba(0, 0, 0, 0) 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
}

.hero__glow--one {
  width: 260px;
  height: 260px;
  top: -96px;
  right: -56px;
  background: var(--hero-orb-a);
  transition: background 0.36s ease;
}

.hero__glow--two {
  width: 210px;
  height: 210px;
  bottom: -78px;
  left: -48px;
  background: var(--hero-orb-b);
  transition: background 0.36s ease;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.hero__copy {
  max-width: min(100%, 540px);
  position: relative;
  z-index: 1;
  padding-top: 2px;
}

.hero__title {
  max-width: none;
  text-wrap: pretty;
}

.hero__title-line {
  display: block;
}

.hero__title-line:last-child {
  white-space: nowrap;
}

.top-tabs {
  position: sticky;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 9;
  margin: 0 0 14px;
  padding: 8px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(9, 15, 26, 0.96), rgba(8, 14, 24, 0.92)),
    var(--panel-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

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

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #98dfff;
}

.hero h1,
.section h2 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -0.035em;
  line-height: 0.96;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hero__subtitle {
  margin: 12px 0 0;
  color: rgba(228, 240, 255, 0.86);
  line-height: 1.62;
  font-size: 15.5px;
  max-width: none;
  text-wrap: pretty;
}

.hero__brand-secondary {
  margin: 8px 0 0;
  color: rgba(220, 236, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  max-width: none;
  line-height: 1.42;
  text-wrap: pretty;
}

.hero__mode-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(7, 14, 24, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef8ff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.36s ease, color 0.36s ease, border-color 0.36s ease;
}

.hero__signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 15px;
  border-radius: 999px;
  background: var(--mode-signal-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #dbf5ff;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  transition: background 0.36s ease, border-color 0.36s ease, color 0.36s ease;
  width: fit-content;
}

.hero__signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mode-signal-dot);
  box-shadow: 0 0 18px var(--mode-signal-shadow);
  transition: background 0.36s ease, box-shadow 0.36s ease;
}

.auth-gate {
  margin-bottom: 18px;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.auth-gate__copy h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.08;
}

.auth-gate__lead,
.auth-gate__note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.auth-gate__widget {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.auth-gate .primary-button,
.auth-gate .secondary-button {
  width: 100%;
}

.auth-hint {
  display: grid;
  gap: 8px;
}

.tab-button,
.primary-button,
.secondary-button,
.chip {
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.tab-button {
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  box-shadow: var(--shadow-card);
}

.top-tabs .tab-button {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.tab-button.is-active {
  background: linear-gradient(135deg, rgba(57, 197, 255, 0.22), rgba(255, 187, 122, 0.08));
  border-color: var(--border-strong);
  box-shadow: 0 16px 36px rgba(57, 197, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.section {
  padding: 24px;
  margin-bottom: 18px;
  background:
    var(--scenario-surface-strong),
    var(--scenario-surface),
    var(--panel);
  border-color: var(--scenario-card-border);
  box-shadow:
    0 24px 62px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.015),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: background 0.36s ease, border-color 0.36s ease, box-shadow 0.36s ease;
}

.section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section__header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.section__pill {
  padding: 10px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-pale), var(--accent-warm-pale));
  color: #ddf6ff;
  border: 1px solid rgba(40, 195, 255, 0.18);
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.36s ease, color 0.36s ease, border-color 0.36s ease;
}

.section h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.section__copy {
  margin: 0 0 18px;
  color: var(--scenario-soft-text);
  line-height: 1.6;
  max-width: none;
  transition: color 0.24s ease, opacity 0.24s ease;
}

.tracks-retention-note {
  margin: -6px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 187, 122, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 187, 122, 0.105), rgba(57, 197, 255, 0.045));
  color: rgba(245, 251, 255, 0.86);
  font-size: 14px;
  line-height: 1.45;
}

.tracks-retention-emphasis {
  display: inline-block;
  margin: 0 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 90, 90, 0.16);
  color: #ff6b6b !important;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 107, 107, 0.2);
}

.template-strip {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  overflow: visible;
}

.template-strip__header {
  display: grid;
  gap: 5px;
}

.template-strip__header strong {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--scenario-soft-text);
}

.template-strip__header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: none;
}

.template-strip__chips {
  margin-top: 2px;
}

.template-chip {
  font-size: 14px;
}

.template-chip.is-active {
  position: relative;
}

.template-chip.is-active::after {
  content: "✓";
}

.template-chip:hover {
  transform: translateY(-1px);
}

.template-chip:active {
  transform: translateY(1px) scale(0.99);
}

body[data-scenario="GPT_LYRICS"] .section__pill,
body[data-scenario="GPT_LYRICS"] .hero__mode-chip {
  background: linear-gradient(135deg, rgba(102, 214, 255, 0.22), rgba(255, 194, 126, 0.12));
  border-color: var(--mode-pill-border);
}

body[data-scenario="READY_POEM"] .section__pill,
body[data-scenario="READY_POEM"] .hero__mode-chip {
  background: linear-gradient(135deg, rgba(72, 236, 196, 0.26), rgba(255, 183, 102, 0.18));
  border-color: var(--mode-pill-border);
}

body[data-scenario="SUNO_LYRICS"] .section__pill,
body[data-scenario="SUNO_LYRICS"] .hero__mode-chip {
  background: linear-gradient(135deg, rgba(124, 162, 255, 0.28), rgba(88, 226, 255, 0.16));
  border-color: var(--mode-pill-border);
}

body[data-scenario="INSTRUMENTAL"] .section__pill,
body[data-scenario="INSTRUMENTAL"] .hero__mode-chip {
  background: linear-gradient(135deg, rgba(255, 187, 122, 0.28), rgba(224, 137, 86, 0.16));
  border-color: var(--mode-pill-border);
}

.grid {
  display: grid;
  gap: 14px;
}

.field-group {
  padding: 18px;
  cursor: default;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01)),
    var(--scenario-surface);
  border: 1px solid var(--scenario-card-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 14px 34px var(--scenario-card-shadow);
  transition: background 0.36s ease, border-color 0.36s ease, box-shadow 0.36s ease;
}

.field-group__header {
  margin-bottom: 14px;
}

.field-group__header h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.field-group__header p {
  margin: 0;
  color: var(--scenario-soft-text);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  color: #dff0ff;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 16px 17px;
  border-radius: 18px;
  border: 1px solid var(--scenario-input-border);
  background:
    var(--scenario-input-bg),
    rgba(8, 13, 23, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  scroll-margin-top: 180px;
  scroll-margin-bottom: 210px;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.36s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7590a8;
}

.file-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--scenario-input-border);
  background:
    var(--scenario-input-bg),
    rgba(8, 13, 23, 0.78);
  color: var(--muted);
  font: inherit;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.36s ease;
}

.file-input::file-selector-button {
  margin-right: 14px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(57, 197, 255, 0.2), rgba(255, 187, 122, 0.08));
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.poem-upload .muted {
  margin: 0;
  font-size: 13px;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.chip {
  position: relative;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.chip.is-active {
  background: var(--mode-tab-active);
  border-color: color-mix(in srgb, var(--mode-pill-border) 88%, white 12%);
  box-shadow: 0 12px 28px var(--scenario-card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding-right: 36px;
}

.chip.is-active::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #f4fbff, #d6f1ff);
  color: #06111f;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(57, 197, 255, 0.18);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  position: relative;
  z-index: 8;
}

.scenario-switcher {
  margin-top: 16px;
}

.scenario-switcher .scenario-grid {
  margin-bottom: 0;
}

.scenario-dock {
  padding: 10px;
  border-radius: 28px;
  background:
    var(--scenario-surface-strong),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(7, 14, 24, 0.72);
  border: 1px solid var(--scenario-card-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), 0 14px 34px var(--scenario-card-shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scenario-dock__button {
  min-height: 76px;
  padding: 11px 8px 12px;
  border-radius: 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(7, 14, 24, 0.9);
  border: 1px solid color-mix(in srgb, var(--scenario-card-border) 70%, rgba(255, 255, 255, 0.04) 30%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transform: translateY(0) scale(1);
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.scenario-dock__button::before {
  display: none;
}

.scenario-dock__button strong,
.scenario-dock__button p,
.scenario-dock__button .scenario-card__eyebrow,
.scenario-dock__button .scenario-card__check {
  display: none !important;
}

.scenario-dock__icon {
  font-size: 18px;
  line-height: 1;
  color: #9ad8ff;
  transition: transform 0.22s ease, color 0.22s ease;
}

.scenario-dock__label {
  font-size: 11px;
  line-height: 1.2;
  color: #d9ebff;
  font-weight: 700;
  transition: color 0.22s ease, transform 0.22s ease;
}

.scenario-dock__button.is-active,
.scenario-dock__button[data-active="true"] {
  border-color: color-mix(in srgb, var(--mode-pill-border) 88%, white 12%);
  background:
    var(--mode-tab-active),
    rgba(10, 18, 32, 0.96);
  box-shadow:
    0 16px 40px var(--scenario-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-6px) scale(1.03);
}

.scenario-dock__button.is-active .scenario-dock__icon,
.scenario-dock__button[data-active="true"] .scenario-dock__icon,
.scenario-dock__button.is-active .scenario-dock__label,
.scenario-dock__button[data-active="true"] .scenario-dock__label {
  color: #ffffff;
}

.scenario-dock__button.is-active .scenario-dock__icon,
.scenario-dock__button[data-active="true"] .scenario-dock__icon {
  transform: translateY(-1px) scale(1.08);
}

.scenario-dock__button.is-active .scenario-dock__label,
.scenario-dock__button[data-active="true"] .scenario-dock__label {
  transform: translateY(-1px);
}

.scenario-dock__button:active {
  transform: translateY(-3px) scale(0.99);
}

.scenario-card {
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(7, 14, 24, 0.86);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 8px;
  min-height: 156px;
  position: relative;
  padding-right: 56px;
  outline: none;
  z-index: 9;
  isolation: isolate;
  touch-action: manipulation;
}

.scenario-card__check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4fbff, #d6f1ff);
  color: #06111f;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(57, 197, 255, 0.18);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.scenario-card__check[hidden] {
  display: none !important;
}

.scenario-card:focus-visible {
  border-color: rgba(57, 197, 255, 0.44);
  box-shadow: 0 0 0 3px rgba(57, 197, 255, 0.12), var(--shadow-card);
}

.scenario-card strong {
  font-size: 19px;
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.scenario-card__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ad8ff;
}

.scenario-card.is-active {
  border-color: rgba(57, 197, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(57, 197, 255, 0.18), rgba(255, 187, 122, 0.08)),
    rgba(10, 18, 32, 0.92);
  box-shadow: 0 18px 50px rgba(57, 197, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.scenario-card.is-active strong {
  color: #ffffff;
}

.scenario-card.is-active p {
  color: #dff4ff;
}

.scenario-card.is-active::after {
  content: none;
}

.scenario-card.is-active .scenario-card__check {
  opacity: 1;
  transform: scale(1);
}

.scenario-card[data-active="true"] .scenario-card__check {
  opacity: 1;
  transform: scale(1);
}

.toggle-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-card__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
}

.toggle-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  width: 100%;
  border-radius: 20px;
  padding: 17px 18px;
  font-size: 16px;
  cursor: pointer;
}

.primary-button {
  border: none;
  color: #06111f;
  font-weight: 800;
  background:
    linear-gradient(135deg, #6cd6ff 0%, #5bbdff 42%, #ffbf82 100%);
  box-shadow: 0 22px 46px rgba(57, 197, 255, 0.22);
}

.primary-button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.96;
  padding-left: 48px;
}

.primary-button.is-loading::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid rgba(6, 17, 31, 0.28);
  border-top-color: #06111f;
  animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.secondary-button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
  padding-left: 48px;
}

.secondary-button.is-loading::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid rgba(242, 248, 255, 0.2);
  border-top-color: #f2f8ff;
  animation: button-spin 0.8s linear infinite;
}

.notice,
.track-item,
.copy-card,
.result-summary,
.status-summary,
.field-group {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-item,
.scenario-card,
.copy-card,
.result-summary,
.status-summary,
.notice,
.field-group {
  position: relative;
}

.track-item::before,
.scenario-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(57, 197, 255, 0.06), rgba(255, 187, 122, 0.03));
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.track-item:hover::before,
.scenario-card:hover::before {
  opacity: 1;
}

.info-block {
  cursor: default;
  background:
    var(--scenario-surface),
    rgba(8, 14, 24, 0.7);
  border-color: var(--scenario-card-border);
  box-shadow: none;
}

.info-block::before {
  display: none;
}

.info-block:hover {
  transform: none;
}

.notice.info-block,
.copy-card.info-block,
.result-summary.info-block,
.status-summary.info-block,
.field-group.info-block {
  background:
    var(--scenario-surface),
    rgba(8, 14, 24, 0.72);
  border-color: var(--scenario-card-border);
}

.notice.info-block {
  color: var(--scenario-soft-text);
}

.copy-card.info-block,
.result-summary.info-block,
.status-summary.info-block,
.field-group.info-block {
  box-shadow: none;
}

.copy-grid {
  display: grid;
  gap: 12px;
}

.status-stack {
  display: grid;
  gap: 16px;
}

.status-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 14px;
  align-items: start;
}

.status-column {
  display: grid;
  gap: 12px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.result-actions .primary-button,
.result-actions .secondary-button {
  width: auto;
  min-width: 180px;
  flex: 1 1 180px;
}

.status-summary {
  padding: 18px;
}

.status-summary ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.status-summary li {
  line-height: 1.55;
  color: var(--muted);
}

.status-summary strong {
  color: var(--text);
}

.status-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.status-steps li::marker {
  color: var(--accent);
}

.copy-card {
  padding: 18px;
  border-radius: 22px;
  background:
    var(--scenario-surface),
    rgba(255, 255, 255, 0.035);
  border: 1px solid var(--scenario-card-border);
  box-shadow: var(--shadow-card), 0 12px 28px var(--scenario-card-shadow);
}

.copy-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.copy-card__head .secondary-button {
  width: auto;
  padding: 10px 14px;
  font-size: 14px;
}

.copy-card__code {
  margin: 0;
  padding: 17px;
  border-radius: 18px;
  background: rgba(4, 11, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.6;
}

.editable-lyrics-card__hint {
  color: var(--muted);
  font-size: 13px;
}

.editable-lyrics-card__meta {
  display: grid;
  gap: 4px;
}

.editable-lyrics-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 12px;
}

.editable-lyrics-card__textarea {
  width: 100%;
  min-height: 360px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 11, 20, 0.78);
  color: var(--text);
  resize: vertical;
  line-height: 1.65;
  font-family: "Manrope", "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
}

.editable-lyrics-card__textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(57, 197, 255, 0.12);
}

.editable-lyrics-card__footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.result-summary {
  padding: 18px;
}

.result-summary h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.result-summary p {
  margin: 0;
}

.generation-cover {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 10, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.generation-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.generation-cover--compact {
  margin-top: 0;
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  border-radius: 16px;
}

.audio-preview-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.audio-preview {
  padding: 15px 15px 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 18, 32, 0.92), rgba(5, 12, 22, 0.84));
  border: 1px solid rgba(116, 234, 229, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.audio-preview--compact {
  margin-top: 8px;
  padding: 12px;
}

.audio-preview__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.audio-preview__titles {
  display: grid;
  gap: 5px;
}

.audio-preview__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ad8ff;
}

.audio-preview__hint {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(224, 232, 246, 0.7);
}

.audio-preview__links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audio-preview__favorite {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(116, 234, 229, 0.24);
  background: rgba(16, 26, 42, 0.9);
  color: rgba(236, 241, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.audio-preview__favorite.is-active {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.5);
  background: rgba(63, 19, 31, 0.9);
}

.audio-preview__download {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.audio-preview__download:hover {
  text-decoration: underline;
}

.audio-preview audio {
  width: 100%;
  min-height: 46px;
  display: block;
  accent-color: var(--accent);
  filter: saturate(1.06);
}

.notice {
  margin-bottom: 16px;
  color: var(--muted);
  box-shadow: var(--shadow-card);
}

#notice {
  position: sticky;
  top: calc(72px + env(safe-area-inset-top, 0px));
  z-index: 8;
  padding: 11px 13px;
  border-radius: 16px;
  backdrop-filter: blur(18px);
  background:
    linear-gradient(135deg, rgba(12, 21, 35, 0.94), rgba(10, 18, 30, 0.9)),
    var(--scenario-surface);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    0 6px 18px var(--scenario-card-shadow);
  font-size: 14px;
  line-height: 1.45;
}

.notice.is-error {
  color: #ffd7d7;
  border-color: rgba(255, 138, 138, 0.24);
}

.notice.is-success {
  color: #d8ffee;
  border-color: rgba(124, 232, 180, 0.22);
}

.status-list,
.track-list {
  display: grid;
  gap: 12px;
}

.status-list p,
.track-item p {
  line-height: 1.55;
}

.track-item {
  text-align: left;
  display: grid;
  gap: 10px;
  min-height: 108px;
  padding: 16px;
}

.track-item__main {
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.track-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}


.track-item__action {
  margin-top: 8px;
  width: 100%;
}

.track-item__main-layout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.track-item__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.track-item__delete {
  width: auto;
  min-width: 150px;
  padding: 12px 16px;
  font-size: 14px;
  border-color: rgba(255, 138, 138, 0.24);
  color: #ffd9d9;
  background: linear-gradient(180deg, rgba(255, 138, 138, 0.12), rgba(255, 255, 255, 0.03));
}

.track-item__delete:hover:not(:disabled) {
  border-color: rgba(255, 138, 138, 0.34);
  color: #fff1f1;
}

.track-item__delete:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.track-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.track-item p {
  margin: 0;
}

.track-item__eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--mode-signal-dot) 86%, white 14%);
}

.track-item__status {
  color: var(--scenario-soft-text);
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(4, 10, 18, 0) 0%, rgba(4, 10, 18, 0.86) 24%, rgba(4, 10, 18, 0.96) 100%);
  backdrop-filter: blur(18px);
  z-index: 6;
}

.footer-bar__inner {
  width: min(100%, 820px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.footer-bar__meta {
  display: flex;
  justify-content: center;
}

.footer-bar__legal {
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(211, 231, 255, 0.68);
  text-decoration: none;
  padding: 0 6px;
}

.footer-bar__legal:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bar__secondary-action {
  width: 100%;
}

body.is-text-entry-active .footer-bar__meta,
body.is-text-entry-active .scenario-dock {
  display: none;
}

body.is-text-entry-active .footer-bar {
  padding-top: 8px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

body.is-text-entry-active .footer-bar__inner {
  gap: 8px;
}

body.is-keyboard-open .footer-bar {
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.floating-action-shell {
  position: fixed;
  right: 18px;
  bottom: calc(132px + env(safe-area-inset-bottom));
  z-index: 7;
  pointer-events: none;
}

.footer-fab {
  pointer-events: auto;
  width: auto;
  min-width: 186px;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 1px solid rgba(57, 197, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(108, 214, 255, 0.96) 0%, rgba(91, 189, 255, 0.92) 42%, rgba(255, 191, 130, 0.96) 100%);
  color: #06111f;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow:
    0 24px 52px rgba(57, 197, 255, 0.22),
    0 10px 20px rgba(0, 0, 0, 0.18);
  position: relative;
  backdrop-filter: blur(18px);
}

.footer-fab::before {
  content: "✦";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 17, 31, 0.18);
  color: #06111f;
  font-size: 13px;
  font-weight: 900;
}

.footer-fab.hidden {
  display: none !important;
}

.footer-fab:hover {
  transform: translateY(-2px) scale(1.01);
}

.footer-fab:active {
  transform: translateY(0) scale(0.99);
}

#track-form.is-scenario-switching .field-group,
#track-form.is-scenario-switching .field,
#track-form.is-scenario-switching .advanced-panel,
#track-form.is-scenario-switching .notice,
#track-form.is-scenario-switching .chips,
#track-form.is-scenario-switching .section__copy {
  animation: scenario-pop 0.24s ease;
}

@keyframes scenario-pop {
  0% {
    opacity: 0.82;
  }
  100% {
    opacity: 1;
  }
}

.tab-button:hover,
.primary-button:hover,
.secondary-button:hover,
.chip:hover,
.track-item:hover {
  transform: translateY(-1px);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--scenario-input-border) 80%, white 20%);
  box-shadow: 0 0 0 4px var(--scenario-focus-ring);
}

.generation-action {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.lyrics-editor {
  width: min(92vw, 860px);
  border: 1px solid rgba(39, 194, 255, 0.18);
  border-radius: 28px;
  padding: 0;
  background: rgba(8, 18, 31, 0.96);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.lyrics-editor::backdrop {
  background: rgba(4, 10, 18, 0.76);
  backdrop-filter: blur(8px);
}

.lyrics-editor__content {
  padding: 24px;
}

.lyrics-editor__textarea {
  min-height: 360px;
}

.advanced-panel {
  margin-top: 16px;
  padding: 16px 18px 18px;
  border-radius: 24px;
  border: 1px solid var(--scenario-card-border);
  background:
    var(--scenario-surface),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 12px 32px var(--scenario-card-shadow);
  transition: background 0.36s ease, border-color 0.36s ease, box-shadow 0.36s ease;
}

.advanced-panel > summary {
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}

.advanced-panel > summary::-webkit-details-marker {
  display: none;
}

.advanced-panel > summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.advanced-panel[open] > summary::after {
  content: "▴";
}

.advanced-panel__body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.sound-panel {
  margin-top: 8px;
  border-radius: 24px;
  border: 1px solid var(--scenario-card-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--scenario-surface);
  box-shadow: 0 10px 28px var(--scenario-card-shadow);
  overflow: hidden;
}

.sound-panel__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.sound-panel__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.sound-panel__summary strong {
  display: block;
  font-size: 15px;
}

.sound-panel__summary p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sound-panel__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  flex: 1 1 240px;
}

.sound-panel__badge {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sound-panel__body {
  gap: 16px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sound-panel__toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sound-panel__toggle:hover {
  transform: translateY(-1px);
}

.sound-panel__toggle:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--scenario-input-border) 80%, white 20%);
  box-shadow: 0 0 0 4px var(--scenario-focus-ring);
}

.sound-panel.is-attention {
  border-color: rgba(255, 166, 77, 0.7);
  box-shadow: 0 12px 36px rgba(255, 166, 77, 0.16);
}

@media (max-width: 720px) {
  .sound-panel__summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sound-panel__controls {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .sound-panel__badges {
    justify-content: flex-start;
  }

  .sound-panel__badge {
    max-width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lyrics-editor__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.lyrics-inline-editor {
  margin-top: 16px;
}

.lyrics-inline-editor__hint {
  margin: 0 0 12px;
  line-height: 1.5;
}

.lyrics-inline-editor__textarea {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 11, 20, 0.78);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

body.is-poem-flow #lyrics_or_idea {
  min-height: 220px;
  font-size: 16px;
  line-height: 1.7;
}

body.is-poem-flow .field-group:first-of-type {
  padding-bottom: 20px;
}

body.is-poem-flow .field-group:first-of-type .field {
  gap: 10px;
}

body.is-poem-flow .field-group:first-of-type .field label {
  font-size: 15px;
}

.offer-page .page {
  padding-bottom: 84px;
}

.offer-page .offer-hero {
  margin-bottom: 18px;
}

.offer-page .offer-intro {
  margin-top: 18px;
}

.offer-page .offer-document {
  padding: 22px;
}

.offer-page .offer-text {
  display: grid;
  gap: 12px;
}

.offer-page .offer-text h2 {
  margin: 22px 0 2px;
  font-size: 22px;
}

.offer-page .offer-text p {
  margin: 0;
  line-height: 1.68;
  color: var(--scenario-soft-text);
}

.offer-page .offer-text strong {
  color: var(--text);
}

.offer-page .offer-back {
  width: fit-content;
}

@media (max-width: 720px) {
  .section__header {
    flex-direction: column;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .top-tabs__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .scenario-dock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scenario-dock__button {
    min-height: 68px;
    padding: 10px 6px;
  }

  .scenario-dock__label {
    font-size: 10px;
  }

  .floating-action-shell {
    right: 12px;
    bottom: calc(124px + env(safe-area-inset-bottom));
  }

  .footer-fab {
    min-width: 160px;
    padding: 13px 16px 13px 42px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px 12px 220px;
  }

  .hero {
    padding: 18px 18px 20px;
  }

  .hero__mark {
    top: 36px;
    right: -36px;
    width: 250px;
    height: 160px;
    opacity: 0.11;
    background:
      radial-gradient(circle at 46% 34%, rgba(57, 197, 255, 0.13), transparent 32%),
      url("/miniapp/static/logo-no-bg.png") center top / 82% auto no-repeat;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__title {
    max-width: 9.6ch;
  }

  .hero h1 {
    font-size: 29px;
  }

  .hero__subtitle {
    max-width: 100%;
    font-size: 14.5px;
  }

  .hero__brand-secondary {
    max-width: 100%;
  }

  .section {
    padding: 18px;
  }

  .top-tabs {
    top: calc(8px + env(safe-area-inset-top));
    margin-bottom: 12px;
    padding: 7px;
    border-radius: 18px;
  }

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

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .top-tabs .tab-button {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 15px;
  }

  .auth-gate__actions {
    grid-template-columns: 1fr;
  }

  .inline-grid {
    grid-template-columns: 1fr;
  }

  .status-columns {
    grid-template-columns: 1fr;
  }

  .copy-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .lyrics-editor__content {
    padding: 18px;
  }

  body.is-text-entry-active .footer-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lyrics-editor__textarea {
    min-height: 280px;
  }

  .editable-lyrics-card__textarea {
    min-height: 280px;
  }
}

