:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: rgba(23, 25, 31, 0.88);
  --panel-solid: #17191f;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f3ea;
  --muted: #aaa6a0;
  --teal: #39d7c8;
  --coral: #ff7468;
  --amber: #ffc766;
  --green: #72e89b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  --top-control-height: 48px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(16, 17, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.nav-links,
.mode-tab,
.mini-btn,
.generate-btn,
.status-header,
.track-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand .xlike-logo-shell {
  --xlike-logo-size: 44px;
  border-radius: 11px;
}

.brand-mark,
.icon-btn,
.play-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-mark {
  color: #06100f;
  background: linear-gradient(135deg, var(--teal), var(--amber));
}

.brand svg,
.icon-btn svg,
.play-btn svg,
.mode-tab svg,
.mini-btn svg,
.generate-btn svg,
.cover svg,
.extras-grid svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  margin-left: auto;
  gap: 8px;
  color: var(--muted);
  font-size: 16px;
  align-items: center;
}

.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  line-height: 1;
}

.nav-links a,
.nav-button,
.language-picker,
.member-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--top-control-height);
  box-sizing: border-box;
  min-height: var(--top-control-height);
  max-height: var(--top-control-height);
  margin: 0;
  padding: 0 22px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.nav-links a,
.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.nav-links a:hover,
.nav-button:hover,
.language-picker:hover,
.member-button:hover {
  color: #091311;
  border-color: rgba(57, 215, 200, 0.82);
  background: linear-gradient(135deg, var(--teal), var(--amber));
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.18),
    0 12px 30px rgba(57, 215, 200, 0.2);
  transform: translateY(-2px);
}

.nav-links a.is-current,
.nav-links a:focus,
.nav-links a:active,
.nav-button:focus,
.nav-button:active {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.top-actions {
  gap: 10px;
  align-items: center;
}

.language-picker,
.member-button {
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.language-menu-wrap {
  position: relative;
  width: 106px;
}

.language-picker {
  width: 100%;
  min-width: 0;
  padding: 0 16px;
  justify-content: center;
  border-color: rgba(56, 189, 248, 0.52);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(124, 58, 237, 0.28)),
    rgba(17, 17, 20, 0.92);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.language-picker span {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.language-picker strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.language-picker svg {
  width: 16px;
  height: 16px;
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 70;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, 0.24);
  border-radius: 8px;
  background: rgba(9, 7, 13, 0.99);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 28px rgba(139, 92, 246, 0.18);
  backdrop-filter: blur(18px);
}

.language-dropdown button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  padding: 0 12px;
}

.language-dropdown button:last-child {
  border-bottom: 0;
}

.language-dropdown button:hover,
.language-dropdown button.is-active {
  color: #fff;
  background: rgba(139, 92, 246, 0.18);
}

.member-wrap {
  position: relative;
}

.member-button {
  min-width: 100px;
  padding: 0 16px;
  justify-content: center;
  line-height: 1;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #071211;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  font-size: 13px;
  font-weight: 900;
}

.member-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.member-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 40;
  width: 280px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 20, 25, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.member-panel[hidden] {
  display: none;
}

.member-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 28px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(18, 20, 25, 0.96);
  transform: rotate(45deg);
}

.member-panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.member-panel-head strong {
  font-size: 16px;
}

.member-panel-head span,
.member-stat span {
  color: var(--muted);
  font-size: 12px;
}

.member-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.member-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.member-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.member-panel a,
.member-panel button {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #e9e3d8;
  background: transparent;
  text-align: left;
  line-height: 38px;
}

.member-panel a:hover,
.member-panel button:hover {
  background: rgba(57, 215, 200, 0.12);
}

.badge-member-panel {
  padding: 0;
  overflow: hidden;
}

.badge-member-row,
.badge-member-name,
.member-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(246, 240, 232, 0.86);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.badge-member-name {
  color: var(--text);
  font-size: 15px;
}

.member-panel .member-dropdown-item {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 0;
  line-height: normal;
  text-align: center;
}

.member-panel .member-dropdown-item:last-child {
  border-bottom: 0;
}

.member-button.is-member {
  width: 42px;
  padding: 0;
  justify-content: center;
  border-color: rgba(57, 215, 200, 0.45);
}

.member-button.is-member .member-name {
  display: none;
}

.icon-btn,
.ghost-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.ghost-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-proof span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #efe8dc;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 92vh;
  padding: 118px clamp(20px, 5vw, 72px) 72px;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 17, 20, 0.82), rgba(16, 17, 20, 0.35) 45%, rgba(16, 17, 20, 0.78)),
    linear-gradient(180deg, rgba(16, 17, 20, 0.25), var(--bg) 96%),
    url("assets/studio-bg.png") center / cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(700px, 820px);
  gap: clamp(24px, 3vw, 42px);
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
}

.generator {
  margin-top: -22px;
}

.hero-copy {
  max-width: 590px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 640px;
  margin-bottom: 20px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
}

.hero-subtitle {
  max-width: 560px;
  color: #d8d2c8;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.generator,
.status-panel,
.track-card,
.plan {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.generator {
  border-radius: 8px;
  padding: 20px;
  overflow: visible;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -2px -2px 18px;
  padding: 2px;
  overflow: visible;
}

.mode-tab {
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab.is-active {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
}

.mode-tab.is-active:hover,
.mode-tab:hover {
  color: #091311 !important;
  border-color: rgba(57, 215, 200, 0.82) !important;
  background: linear-gradient(135deg, var(--teal), var(--amber)) !important;
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.18),
    0 12px 30px rgba(57, 215, 200, 0.2) !important;
  transform: translateY(-2px) !important;
  font-weight: 800;
}

.lyrics-source {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.lyrics-source.is-visible {
  display: flex;
}

.source-btn,
.template-cloud button,
.section-inserts button,
.settings-toggle,
.language-pills button,
.style-cats button,
.style-tags button,
.mode-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.source-btn:hover,
.template-cloud button:hover,
.section-inserts button:hover,
.settings-toggle:hover,
.language-pills button:hover,
.style-cats button:hover,
.style-tags button:hover,
.mode-tab:hover {
  color: var(--text);
  border-color: rgba(57, 215, 200, 0.72);
  background: rgba(57, 215, 200, 0.08);
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.14),
    0 10px 26px rgba(57, 215, 200, 0.16);
  transform: translateY(-2px);
}

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
}

.source-btn.is-active {
  color: #071211;
  border-color: transparent;
  background: var(--green);
  font-weight: 800;
}

.template-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 78px;
  margin: -2px -2px 12px;
  padding: 2px;
  overflow: hidden;
}

.template-cloud.is-expanded {
  max-height: none;
}

.template-cloud button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
}

.section-inserts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.section-inserts button {
  min-height: 30px;
  padding: 0 10px;
}

.field-label,
.control-field span {
  display: block;
  margin-bottom: 8px;
  color: #e8e0d4;
  font-size: 13px;
  font-weight: 700;
}

.prompt-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 11, 14, 0.72);
  overflow: hidden;
}

textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 16px;
  border: 0;
  resize: vertical;
  color: var(--text);
  background: transparent;
  outline: none;
  line-height: 1.7;
}

textarea::placeholder {
  color: #7c7770;
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.settings-toggle {
  --settings-angle: 0deg;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  color: #e9e2d8;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(31, 33, 39, 0.96), rgba(31, 33, 39, 0.96)) padding-box,
    conic-gradient(
      from var(--settings-angle),
      rgba(13, 13, 16, 0) 0deg,
      #ff4d6d 42deg,
      #ff8a2a 110deg,
      #facc15 180deg,
      #7c3aed 250deg,
      rgba(13, 13, 16, 0) 330deg
    ) border-box;
  box-shadow: 0 0 22px rgba(255, 138, 42, 0.1);
  animation: settings-border-orbit 5s linear infinite;
}

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

.advanced-panel[hidden] {
  display: none;
}

.language-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.language-pills span,
.style-board-head span {
  color: #e8e0d4;
  font-size: 13px;
  font-weight: 800;
}

.language-pills button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
}

.language-pills button.is-selected,
.style-tags button.is-selected {
  color: #071211;
  border-color: transparent;
  background: var(--green);
  font-weight: 900;
}

.style-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(10, 11, 14, 0.45);
  overflow: visible;
}

.style-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.style-board-head strong {
  color: var(--muted);
  font-size: 12px;
}

.style-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: -2px -2px 10px;
  padding: 2px;
  overflow: visible;
}

.style-cats button {
  min-height: 34px;
}

.style-cats button.is-active {
  color: #071211;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  font-weight: 900;
}

.style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 118px;
  margin: -2px;
  padding: 2px;
  overflow-y: auto;
  overflow-x: visible;
}

.style-tags button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
}

.mini-btn {
  gap: 7px;
  min-height: 34px;
  border: 0;
  color: var(--text);
  background: transparent;
}

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

.control-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #20242b;
  outline: none;
}

.control-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #20242b;
  outline: none;
}

.title-field {
  display: block;
}

.compact-controls {
  margin-top: 14px;
}

.tag-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.tag {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.tag.is-selected {
  color: #071211;
  border-color: transparent;
  background: var(--green);
  font-weight: 800;
}

.generate-btn {
  --generate-angle: 0deg;
  position: relative;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(rgba(17, 19, 24, 0.96), rgba(17, 19, 24, 0.96)) padding-box,
    conic-gradient(
      from var(--generate-angle),
      rgba(13, 13, 16, 0) 0deg,
      rgba(13, 13, 16, 0) 14deg,
      #ef4444 28deg,
      #f59e0b 82deg,
      #22c55e 136deg,
      #06b6d4 190deg,
      #7c3aed 244deg,
      rgba(13, 13, 16, 0) 298deg,
      rgba(13, 13, 16, 0) 360deg
    ) border-box;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 16px 44px rgba(6, 182, 212, 0.1);
  animation: generate-border-orbit 4.1s linear infinite;
  overflow: visible;
  transition:
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.generate-btn svg {
  width: 22px;
  height: 22px;
}

.generate-btn::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 14px;
  background:
    conic-gradient(
      from var(--generate-angle),
      rgba(13, 13, 16, 0) 0deg,
      rgba(13, 13, 16, 0) 14deg,
      rgba(239, 68, 68, 0.18) 28deg,
      rgba(245, 158, 11, 0.14) 82deg,
      rgba(34, 197, 94, 0.14) 136deg,
      rgba(6, 182, 212, 0.2) 190deg,
      rgba(124, 58, 237, 0.2) 244deg,
      rgba(13, 13, 16, 0) 298deg,
      rgba(13, 13, 16, 0) 360deg
    );
  filter: blur(16px);
  opacity: 0.46;
  pointer-events: none;
}

.generate-btn:hover {
  color: #08100f;
  background:
    linear-gradient(135deg, var(--teal), var(--amber) 62%, var(--coral)) padding-box,
    conic-gradient(
      from var(--generate-angle),
      #ef4444,
      #f59e0b,
      #22c55e,
      #06b6d4,
      #7c3aed,
      #ef4444
    ) border-box;
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.2),
    0 18px 50px rgba(57, 215, 200, 0.24);
  transform: translateY(-2px);
}

@property --generate-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes generate-border-orbit {
  to {
    --generate-angle: 360deg;
  }
}

@property --settings-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes settings-border-orbit {
  to {
    --settings-angle: 360deg;
  }
}

.generator .settings-toggle:hover {
  color: #fff !important;
  border-color: transparent !important;
  background:
    linear-gradient(135deg, #ff4d6d, #ff8a2a 50%, #7c3aed) padding-box,
    conic-gradient(
      from var(--settings-angle),
      #ff4d6d,
      #ff8a2a,
      #facc15,
      #7c3aed,
      #ff4d6d
    ) border-box !important;
  box-shadow:
    0 0 0 1px rgba(255, 138, 42, 0.18),
    0 14px 34px rgba(255, 77, 109, 0.24) !important;
  transform: translateY(-2px) !important;
}

.generation-note {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.generation-note span + span::before {
  content: "·";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.26);
}

.workbench,
.plans {
  padding: 80px clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 1280px;
  margin: 0 auto 24px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.queue-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
}

.status-panel {
  border-radius: 8px;
  padding: 22px;
}

.status-header {
  gap: 10px;
  margin-bottom: 22px;
  color: #ede6dc;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(255, 199, 102, 0.13);
}

.progress-track {
  height: 10px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 320ms ease;
}

.metrics {
  display: grid;
  gap: 12px;
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.metrics strong {
  font-size: 21px;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

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

.track-card {
  gap: 16px;
  min-height: 108px;
  border-radius: 8px;
  padding: 14px;
}

.cover {
  display: grid;
  place-items: center;
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-radius: 8px;
}

.cover-one {
  background: linear-gradient(135deg, #39d7c8, #1b564e);
}

.cover-two {
  background: linear-gradient(135deg, #ff7468, #5e2c33);
}

.cover-three {
  background: linear-gradient(135deg, #ffc766, #476c55);
}

.cover svg {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.92);
}

.track-info {
  min-width: 0;
  flex: 1;
}

.track-info p {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

.track-info span {
  color: var(--muted);
  font-size: 14px;
}

.play-btn {
  flex: 0 0 42px;
  border: 0;
  color: #06100f;
  background: var(--teal);
}

.plans {
  background: #15161a;
}

.feature-hub {
  padding: 80px clamp(20px, 5vw, 72px);
  background: #101114;
}

.guide-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.market-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto 14px;
}

.extras-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-solid);
  font-weight: 900;
}

.comment-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.comment-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comment-box input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.comment-box button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #071211;
  background: var(--teal);
  font-weight: 900;
}

.guide-grid article,
.market-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel-solid);
}

.guide-grid strong,
.market-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.guide-grid p,
.market-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.market-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.market-card button,
.modal-actions button {
  min-height: 40px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #071211;
  background: var(--teal);
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #17191f;
  box-shadow: var(--shadow);
}

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

.modal-card h3 {
  margin-bottom: 12px;
  font-size: 26px;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.modal-actions button:last-child {
  color: var(--text);
  border-color: var(--line);
  background: transparent;
}

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

.feedback-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.feedback-field span {
  color: #e8e0d4;
  font-size: 13px;
  font-weight: 800;
}

.feedback-field textarea {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.tip-grid button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 900;
}

.generator :is(.mode-tab, .source-btn, .template-cloud button, .section-inserts button, .settings-toggle, .language-pills button, .style-cats button, .style-tags button):hover {
  color: var(--text) !important;
  border-color: rgba(57, 215, 200, 0.72) !important;
  background: rgba(57, 215, 200, 0.08) !important;
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.14),
    0 10px 26px rgba(57, 215, 200, 0.16) !important;
  transform: translateY(-2px) !important;
}

.stem-options article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.plan {
  border-radius: 8px;
  padding: 24px;
}

.plan.featured {
  border-color: rgba(57, 215, 200, 0.55);
}

.plan h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.plan p {
  min-height: 54px;
  color: var(--muted);
  line-height: 1.7;
}

.plan strong {
  font-size: 28px;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .topbar {
    gap: 12px;
  }

  .language-picker span,
  .member-name {
    display: none;
  }

  .language-menu-wrap {
    width: 110px;
  }

  .hero-content,
  .queue-layout,
  .plans-grid,
  .guide-grid,
  .market-grid,
  .extras-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 14px 16px;
  }

  .brand {
    font-size: 14px;
  }

  .ghost-btn {
    display: none;
  }

  .member-button {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .member-panel {
    left: auto;
    right: 0;
    width: min(280px, calc(100vw - 32px));
  }

  .member-panel::before {
    left: auto;
    right: 14px;
  }

  .hero,
  .workbench,
  .plans {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    max-width: 360px;
    font-size: 40px;
    line-height: 1.12;
  }

  .mode-tabs,
  .form-grid,
  .style-cats,
  .stem-options {
    grid-template-columns: 1fr;
  }

  .track-card {
    align-items: flex-start;
  }

  .comment-box {
    grid-template-columns: 1fr;
  }
}

.generator .mode-tabs .mode-tab:hover,
.generator .mode-tabs .mode-tab.is-active:hover {
  color: #091311 !important;
  border-color: rgba(57, 215, 200, 0.82) !important;
  background: linear-gradient(135deg, var(--teal), var(--amber)) !important;
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.18),
    0 12px 30px rgba(57, 215, 200, 0.2) !important;
  transform: translateY(-2px) !important;
  font-weight: 800;
}

.generator :is(
  .mode-tab.is-active,
  .source-btn.is-active,
  .tag.is-selected,
  .language-pills button.is-selected,
  .style-cats button.is-active,
  .style-tags button.is-selected
) {
  color: var(--muted) !important;
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  transform: none !important;
}

.generator :is(
  .mode-tab,
  .source-btn,
  .tag,
  .template-cloud button,
  .section-inserts button,
  .settings-toggle,
  .language-pills button,
  .style-cats button,
  .style-tags button,
  .mini-btn
):hover {
  color: #091311 !important;
  border-color: rgba(57, 215, 200, 0.82) !important;
  background: linear-gradient(135deg, var(--teal), var(--amber)) !important;
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.18),
    0 12px 30px rgba(57, 215, 200, 0.2) !important;
  transform: translateY(-2px) !important;
  font-weight: 800;
}

/* Home hero refactor */
:root {
  --bg: #070a12;
  --panel: rgba(18, 22, 32, 0.88);
  --muted: #a8b0c0;
  --line: rgba(255, 255, 255, 0.12);
}

.topbar {
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 72px);
  background: rgba(7, 10, 18, 0.76);
}

.nav-links {
  gap: 10px;
}

.nav-links a,
.nav-button,
.language-picker,
.member-button {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
}

.language-picker,
.member-button {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.language-picker {
  min-width: 0;
  gap: 6px;
  padding-left: 10px;
  padding-right: 10px;
}

.language-picker:hover,
.member-button:hover {
  color: var(--text);
  border-color: rgba(57, 215, 200, 0.72);
  background: rgba(57, 215, 200, 0.08);
  box-shadow:
    0 0 0 1px rgba(57, 215, 200, 0.14),
    0 10px 26px rgba(57, 215, 200, 0.16);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 86px 24px 28px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 8, 15, 0.72), rgba(5, 8, 15, 0.72)),
    radial-gradient(circle at 50% 42%, rgba(57, 215, 200, 0.16), transparent 42%),
    url("assets/studio-bg.png") center / cover no-repeat;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 18, 0.12), rgba(7, 10, 18, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(90, 124, 255, 0.12), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  transform: scale(0.98);
  transform-origin: center center;
}

.hero-copy {
  width: 100%;
  max-width: 760px;
  text-align: center;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 auto 8px;
  color: #fff;
  font-size: clamp(40px, 5.6vw, 66px);
  line-height: 1.04;
  letter-spacing: 0;
}

.kinetic-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-wrap: balance;
  white-space: nowrap;
  width: 100%;
}

.kinetic-title span {
  display: inline-block;
  margin: 0;
  color: #fff;
  text-shadow:
    0 0 16px rgba(34, 211, 238, 0.28),
    0 0 34px rgba(139, 92, 246, 0.16);
  animation: title-beat 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.08s);
}

.kinetic-title span:nth-child(8),
.kinetic-title span:nth-child(9) {
  color: #67e8f9;
  text-shadow:
    0 0 18px rgba(34, 211, 238, 0.52),
    0 0 42px rgba(139, 92, 246, 0.3);
}

@keyframes title-beat {
  0%,
  62%,
  100% {
    transform: translateY(0) scale(1);
  }

  7% {
    transform: translateY(-8px) scale(1.035);
  }

  13% {
    transform: translateY(2px) scale(0.995);
  }
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto;
  color: #a8b0c0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.generator {
  width: min(100%, 760px);
  max-width: 760px;
  margin: -4px auto 0;
  padding: 20px;
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 32, 0.88);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mode-tabs {
  gap: 9px;
  margin: 0 0 12px;
  padding: 0;
}

.mode-tab {
  min-height: 42px;
  border-radius: 12px;
}

.hero-tags {
  gap: 8px;
  margin: 0 0 12px;
}

.tag {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
}

.field-label,
.control-field span {
  color: #fff;
  font-size: 14px;
}

.prompt-box {
  border-radius: 16px;
  background: rgba(8, 10, 16, 0.78);
}

textarea {
  min-height: 104px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
}

textarea::placeholder {
  color: rgba(168, 176, 192, 0.72);
}

.prompt-footer {
  padding: 8px 14px;
}

.settings-toggle {
  min-height: 42px;
  margin-top: 10px;
  border-radius: 12px;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.settings-toggle svg {
  width: 20px;
  height: 20px;
}

.advanced-panel {
  gap: 8px;
  margin-top: 8px;
  padding-top: 0;
}

.extra-tags {
  max-height: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.language-pills,
.style-board,
.title-field {
  margin-top: 4px;
}

.language-pills {
  row-gap: 6px;
}

.generate-btn {
  --generate-angle: 0deg;
  min-height: 56px;
  margin-top: 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, #ff4d6d 0%, #ff8a2a 46%, #7c3aed 100%) padding-box,
    conic-gradient(
      from var(--generate-angle),
      #60a5fa,
      #38bdf8,
      #a78bfa,
      #f0abfc,
      #38bdf8,
      #60a5fa
    ) border-box;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  animation: generate-border-orbit 4.4s linear infinite;
  box-shadow:
    0 18px 48px rgba(255, 77, 109, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.generate-btn::before {
  display: block;
  inset: -7px;
  border-radius: 22px;
  background:
    conic-gradient(
      from var(--generate-angle),
      rgba(96, 165, 250, 0.26),
      rgba(56, 189, 248, 0.24),
      rgba(167, 139, 250, 0.26),
      rgba(240, 171, 252, 0.22),
      rgba(56, 189, 248, 0.24),
      rgba(96, 165, 250, 0.26)
    );
  filter: blur(18px);
  opacity: 0.44;
}

.generate-btn svg {
  width: 26px;
  height: 26px;
}

.generate-btn:hover {
  color: #fff;
  background:
    linear-gradient(135deg, #ff355d 0%, #ff8a2a 44%, #7c3aed 100%) padding-box,
    conic-gradient(
      from var(--generate-angle),
      #60a5fa,
      #38bdf8,
      #a78bfa,
      #f0abfc,
      #38bdf8,
      #60a5fa
    ) border-box;
  box-shadow:
    0 22px 62px rgba(255, 77, 109, 0.36),
    0 0 30px rgba(255, 138, 42, 0.28);
}

@media (max-width: 960px) {
  .hero-content {
    transform: none;
  }

  .hero {
    min-height: calc(100vh - 72px);
    padding: 84px 18px 28px;
  }

  .generator {
    padding: 18px;
    border-radius: 18px;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 64px;
  }

  .hero {
    min-height: calc(100vh - 64px);
    padding: 74px 14px 24px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 38px;
  }

  .kinetic-title {
    white-space: normal;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .generator {
    padding: 16px;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }
}

body .language-menu-wrap {
  width: 96px !important;
  flex: 0 0 96px;
}

body .language-picker {
  width: 96px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

body .language-picker span,
body .language-picker strong {
  font-size: 15px;
}

body .generate-btn {
  min-height: 50px;
  margin-top: 8px;
  border: 2px solid rgba(32, 244, 200, 0.88);
  background: linear-gradient(135deg, #ff4d6d 0%, #ff8a2a 46%, #7c3aed 100%);
  box-shadow:
    0 18px 48px rgba(255, 77, 109, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 18px rgba(32, 244, 200, 0.24);
  animation: generate-breathing-glow 2.8s ease-in-out infinite;
  overflow: hidden;
}

body .generate-btn::after {
  display: none;
}

body .generate-btn:hover {
  background: linear-gradient(135deg, #ff355d 0%, #ff8a2a 44%, #7c3aed 100%);
}

@keyframes generate-breathing-glow {
  0%,
  100% {
    border-color: rgba(32, 244, 200, 0.72);
    box-shadow:
      0 18px 48px rgba(255, 77, 109, 0.22),
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 16px rgba(32, 244, 200, 0.22);
  }

  50% {
    border-color: rgba(99, 255, 142, 0.98);
    box-shadow:
      0 20px 58px rgba(255, 138, 42, 0.28),
      0 0 0 1px rgba(255, 255, 255, 0.14),
      0 0 38px rgba(99, 255, 142, 0.52);
  }
}

.google-model-panel {
  display: none !important;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(6, 8, 17, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.google-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.google-model-head strong,
.google-model-head span,
.lyria-status {
  display: block;
}

.google-model-head strong {
  color: #fff;
  font-size: 15px;
}

.google-model-head span,
.lyria-status,
.lyria-result small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.google-model-head span.is-warning {
  color: #ffd166;
}

.google-model-head label {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.google-model-head select {
  min-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 10px;
}

.lyria-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.lyria-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #ff8a2a);
  transition: width 0.28s ease;
}

.lyria-results {
  display: grid;
  gap: 12px;
}

.lyria-result {
  align-items: flex-start;
}

.lyria-result .track-info {
  min-width: 0;
}

.lyria-result audio {
  width: 100%;
  margin-top: 10px;
}

.lyria-result details {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.lyria-result summary {
  cursor: pointer;
  font-size: 12px;
}

.lyria-result pre {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.download-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  flex: 0 0 auto;
}

.generate-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 620px) {
  .google-model-head {
    align-items: stretch;
    flex-direction: column;
  }

  .google-model-head select {
    min-width: 0;
    width: 100%;
  }
}
