:root {
  --lavender: #9f6df2;
  --lavender-deep: #7b3ee6;
  --ink: #050505;
  --muted: #6d6679;
  --line: #141414;
  --white: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.74);
  --panel-bg-strong: rgba(255, 255, 255, 0.86);
  --soft-line: rgba(5, 5, 5, 0.12);
  --shadow: 0 22px 58px rgba(9, 6, 20, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: Poppins, Arial, sans-serif;
  color: var(--ink);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(239, 231, 255, 0.12)),
    var(--project-bg-image, url("../bg/1.png"));
  background-position:
    center,
    center;
  background-repeat:
    no-repeat,
    no-repeat;
  background-size:
    cover,
    cover;
  background-attachment:
    fixed,
    fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0 2px, transparent 4px),
    radial-gradient(circle at 72% 18%, rgba(230, 210, 255, 0.9) 0 2px, transparent 5px),
    radial-gradient(circle at 84% 68%, rgba(255, 255, 255, 0.86) 0 1px, transparent 4px),
    linear-gradient(118deg, transparent 0 43%, rgba(255, 255, 255, 0.72) 44%, rgba(185, 139, 255, 0.48) 46%, transparent 49%),
    linear-gradient(64deg, transparent 0 58%, rgba(255, 255, 255, 0.48) 59%, transparent 62%);
  animation: backgroundSpark 5s ease-in-out infinite;
}

.project-background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.project-background-layer.is-visible {
  opacity: 1;
}

@keyframes backgroundSpark {
  0%, 88%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  3% {
    opacity: 0.72;
    transform: scale(1.015);
  }
  6% {
    opacity: 0.18;
  }
  9% {
    opacity: 0.5;
  }
  13% {
    opacity: 0;
    transform: scale(1.03);
  }
}

a,
button,
input,
textarea {
  font: inherit;
}

button,
.primary-button,
.outline-button,
.compact-button {
  text-transform: uppercase;
}

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

.voice-input-wrap textarea,
.voice-input-wrap input[type="text"] {
  width: 100%;
  padding-right: 82px;
}

.voice-input-wrap textarea {
  padding-bottom: 78px;
}

.voice-mic-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 0;
  font-weight: 800;
  box-shadow: 0 8px 0 rgba(5, 5, 5, 0.16);
}

.voice-mic-button svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.voice-input-wrap input[type="text"] + .voice-mic-button {
  top: 50%;
  bottom: auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  transform: translateY(-50%);
  font-size: 0.96rem;
}

.voice-mic-button.is-recording {
  color: #d83b68;
  background: rgba(255, 255, 255, 0.26);
}

.voice-mic-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.voice-input-status {
  margin: 7px 0 0;
  min-height: 18px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.project-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 2.2vw, 32px);
  overflow: visible;
}

.project-nav {
  position: relative;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 22px;
  background: rgba(8, 6, 18, 0.28);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.project-nav-links {
  display: flex;
  position: relative;
  z-index: 12010;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
}

.brand-mark {
  display: inline-block;
  width: clamp(210px, 20vw, 340px);
  height: clamp(44px, 4.8vw, 72px);
  overflow: hidden;
  background: url("../assets/divyadhara-logo-transparent.png") center / contain no-repeat;
  color: transparent !important;
  text-decoration: none;
  text-indent: -9999px;
  text-shadow: none !important;
  text-transform: uppercase;
}

.brand-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.global-logout-button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 0.64rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.creator-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(5, 5, 5, 0.34);
  box-shadow: 0 10px 26px rgba(5, 5, 5, 0.18);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.creator-wallet-chip svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.creator-wallet-rupee {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #050505;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
}

.creator-wallet-history-link {
  display: inline-grid;
  place-items: center;
  width: 31px;
  min-width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  color: #fff !important;
  background: rgba(5, 5, 5, 0.34);
  box-shadow: 0 10px 26px rgba(5, 5, 5, 0.18);
  text-decoration: none;
}

.creator-wallet-history-link svg {
  width: 16px;
  height: 16px;
  fill: #fff !important;
}

.creator-wallet-history-link:hover,
.creator-wallet-history-link:focus-visible {
  background: rgba(123, 62, 230, 0.72);
  outline: none;
}

.creator-wallet-chip[data-state="loading"] {
  opacity: 0.74;
}

.creator-wallet-chip[data-state="error"] {
  border-color: rgba(252, 165, 165, 0.72);
  color: #fee2e2;
}

.project-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: auto;
}

.project-tab {
  min-height: 40px;
  border: 1px solid rgba(5, 5, 5, 0.22);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0;
}

.project-tab.is-active {
  color: var(--white);
  background: var(--lavender-deep);
}

.reset-project-tab {
  border-color: rgba(180, 35, 44, 0.42);
  color: #8f1d25;
  background: rgba(255, 237, 237, 0.9);
}

.reset-project-tab:hover:not(:disabled) {
  color: #fff;
  background: #b4232c;
}

.reset-project-tab:disabled {
  cursor: wait;
  opacity: 0.62;
}

.outline-button {
  min-height: 44px;
  border: 1.5px solid rgba(5, 5, 5, 0.32);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--ink);
  background: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  min-height: 42px;
  border: 1.5px solid rgba(5, 5, 5, 0.34);
  border-radius: 999px;
  padding: 9px 20px;
  color: var(--white);
  background: var(--lavender-deep);
  box-shadow: 0 12px 30px rgba(123, 62, 230, 0.22);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.78rem;
}

.project-hero,
.project-panel {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.project-view {
  display: none;
}

.project-view.is-active {
  display: block;
}

[data-graphics-stage][hidden] {
  display: none !important;
}

#projectHomeView [hidden] {
  display: none !important;
}

.project-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4.6vw, 54px);
}

.project-journey-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.45fr) auto;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  padding: clamp(16px, 2.1vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.project-journey-copy h2 {
  font-size: clamp(1.15rem, 2vw, 1.75rem);
}

.project-journey-copy p:not(.panel-label) {
  margin: 8px 0 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.55;
}

.project-journey-copy h2:empty,
.project-journey-copy p:empty {
  display: none;
}

.project-journey-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-journey-steps li {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(5, 5, 5, 0.13);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.project-journey-steps span {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(123, 62, 230, 0.11);
  color: var(--lavender-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.project-journey-steps strong {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.25;
}

.project-journey-steps small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-journey-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-journey-steps li[data-state="done"] {
  border-color: rgba(20, 130, 82, 0.25);
  background: rgba(219, 252, 237, 0.76);
}

.project-journey-steps li[data-state="current"] {
  border-color: rgba(123, 62, 230, 0.42);
  background: rgba(239, 231, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(123, 62, 230, 0.2);
}

.project-next-action {
  white-space: nowrap;
}

.project-hero.has-cover {
  min-height: clamp(280px, 44vw, 460px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)),
    var(--project-cover) center / cover no-repeat;
}

.project-hero.has-cover h1,
.project-hero.has-cover p {
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.86);
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  color: var(--lavender-deep);
  font-weight: 800;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.6rem, 4.9vw, 3.9rem);
}

.project-hero p:not(.eyebrow),
.project-panel p:not(.panel-label) {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.7;
}

.project-grid {
  gap: 16px;
}

.wide-panel,
.project-panel {
  padding: clamp(18px, 2.1vw, 26px);
}

.project-panel a,
.song-player a {
  color: var(--lavender-deep);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.song-player {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px solid var(--soft-line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-bg-strong);
}

.hero-song-player {
  width: min(100%, 620px);
  min-height: 62px;
  margin-top: 18px;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 14px 42px rgba(5, 5, 5, 0.16);
}

.balance-preview {
  display: none;
  margin: 12px auto 0;
  width: min(100%, 720px);
  border: 1px solid rgba(123, 62, 230, 0.22);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.balance-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9400;
  width: min(360px, calc(100vw - 28px));
  border: 1.5px solid rgba(123, 62, 230, 0.26);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--lavender-deep);
  box-shadow: 0 18px 44px rgba(48, 28, 86, 0.24);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  animation: balanceToastIn 0.24s ease-out both;
}

.balance-toast.is-hiding {
  animation: balanceToastOut 0.34s ease-in both;
}

.balance-toast[hidden] {
  display: none;
}

@keyframes balanceToastIn {
  from {
    opacity: 0;
    transform: translate(18px, -12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes balanceToastOut {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(18px, -10px) scale(0.98);
  }
}

.balance-preview[data-state="ready"] {
  border-color: rgba(20, 130, 82, 0.28);
  background: rgba(219, 252, 237, 0.78);
}

.balance-preview[data-state="blocked"] {
  border-color: rgba(190, 81, 34, 0.32);
  background: rgba(255, 234, 220, 0.82);
}

.song-player audio {
  display: none;
}

.song-player.has-custom-player {
  display: block;
  place-items: initial;
  min-height: 0;
  padding: 8px;
}

.hero-song-player.has-custom-player {
  width: min(100%, 720px);
  border-radius: 28px;
}

.song-player-custom {
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  padding: 10px 12px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 226, 255, 0.92));
  box-shadow: none;
}

.song-player-play-button {
  width: 48px;
  height: 48px;
}

.song-player.is-empty {
  color: var(--muted);
  font-weight: 800;
}

#projectHomeView #projectSubtitle:empty,
#projectHomeView .hero-song-player.is-empty:empty {
  display: none;
}

.new-project-tutorial-marker {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 13000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(5, 5, 5, 0.42);
  border-radius: 999px;
  padding: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(20, 12, 44, 0.22);
  transition: transform 0.18s ease;
}

.new-project-tutorial-marker[hidden] {
  display: none;
}

.new-project-tutorial-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid rgba(5, 5, 5, 0.28);
  border-bottom: 1.5px solid rgba(5, 5, 5, 0.28);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.tutorial-focus-button,
.tutorial-skip-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.tutorial-focus-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 11px;
  color: #fff;
  background: var(--lavender-deep);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.tutorial-focus-button span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.58rem;
}

.tutorial-focus-button strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-skip-button {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(5, 5, 5, 0.06);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.field-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(5, 5, 5, 0.18);
  border-radius: 14px;
  padding: 10px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 2.5vw, 1.42rem);
  font-weight: 800;
  letter-spacing: 0;
}

.field-input:focus {
  outline: 3px solid rgba(159, 109, 242, 0.34);
  outline-offset: 3px;
}

.field-input[readonly],
.field-input:disabled {
  cursor: default;
  background: rgba(255, 255, 255, 0.52);
}

.creative-concept-field {
  min-height: 150px;
  resize: vertical;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 700;
}

.field-input[readonly]:focus,
.field-input:disabled:focus {
  outline: none;
}

.creative-concept-chat {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.creative-concept-chat[hidden] {
  display: none;
}

.creative-concept-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.creative-concept-chat-head h2 {
  font-size: clamp(1.08rem, 2vw, 1.52rem);
}

.creative-concept-chat-message {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.55;
}

.creative-concept-list {
  display: grid;
  gap: 10px;
}

.creative-concept-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 92px;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.creative-concept-card h3 {
  margin: 0 0 7px;
  color: var(--lavender-deep);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
}

.creative-concept-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.58;
}

.creative-concept-import {
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .creative-concept-card {
    grid-template-columns: 1fr;
  }

  .creative-concept-chat-head {
    align-items: stretch;
    flex-direction: column;
  }

  .creative-concept-import {
    width: 100%;
  }
}

#projectTitle[contenteditable="true"],
#contentTypeValue[contenteditable="true"] {
  border: 1px solid rgba(5, 5, 5, 0.18);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.68);
  outline-offset: 3px;
}

#projectTitle[contenteditable="true"]:focus,
#contentTypeValue[contenteditable="true"]:focus {
  outline: 3px solid rgba(159, 109, 242, 0.34);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 22px;
}

.section-heading .panel-label {
  margin-bottom: 0;
}

.graphic-panel {
  display: flex;
  flex-direction: column;
}

.graphic-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 12px;
  color: var(--muted);
  background: var(--white);
  background-position: center;
  background-size: cover;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.graphic-preview.has-image {
  color: transparent;
}

.graphic-file-input {
  display: none;
}

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

.project-actions .lyrics-actions {
  justify-content: center;
  margin-top: 0;
}

#saveProjectButton {
  min-height: 62px;
  padding: 0 34px;
  color: var(--lavender-deep);
  background: var(--white);
  font-size: 1.02rem;
  text-transform: uppercase;
}

.danger-button {
  min-height: 52px;
  padding: 0 24px;
  border-color: rgba(188, 38, 38, 0.42);
  color: #9f2020;
  background: rgba(255, 245, 245, 0.94);
  text-transform: uppercase;
}

.danger-button:hover {
  border-color: rgba(188, 38, 38, 0.7);
  background: #ffe6e6;
}

.danger-button[hidden] {
  display: none;
}

#lyricsValue {
  width: 100%;
  min-height: 96px;
  max-height: none;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  line-height: 1.85;
  overflow: hidden;
  resize: none;
  white-space: pre-wrap;
}

#lyricsValue.is-empty-lyrics {
  min-height: 68px;
  resize: none;
}

.lyrics-empty-notice {
  margin: 0 0 12px;
  color: var(--lavender-deep);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.45;
}

.lyrics-empty-notice[hidden] {
  display: none;
}

#createLyricsButton {
  margin-inline: auto;
  text-transform: uppercase;
}

#musicgenLyricsValue,
#trackSoundDesignValue,
#lyricsgenLyricsValue,
#lyricsgenLatinValue,
#lyricsgenChangePrompt {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.9;
  overflow: hidden;
  resize: none;
  white-space: pre-wrap;
}

.character-count {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.character-count.is-warning {
  color: #b45309;
}

.character-count.is-over {
  color: #b91c1c;
}

#musicgenLyricsValue {
  min-height: 180px;
}

#trackSoundDesignValue {
  height: 260px;
  min-height: 260px;
  max-height: 260px;
}

.voice-design-applied-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0 0;
  border: 1.5px solid #16a34a;
  border-radius: 999px;
  padding: 6px 12px;
  color: #166534;
  background: #dcfce7;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.voice-design-applied-status[hidden] {
  display: none;
}

.song-length-control {
  margin-top: 10px;
  border: 1.5px solid rgba(75, 43, 177, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.58);
}

.song-length-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.song-length-label {
  display: block;
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

#songLengthDisplay {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
}

#songLengthSlider {
  width: 100%;
  margin: 10px 0 4px;
  accent-color: var(--purple);
}

.song-length-scale {
  display: flex;
  justify-content: space-between;
  color: rgba(22, 18, 33, 0.58);
  font-size: 0.68rem;
  font-weight: 800;
}

.sound-design-enhance-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.sound-design-enhance-row .compact-button {
  min-height: 34px;
  padding: 0 14px;
  border-width: 2px;
  font-size: 0.72rem;
}

.lyricsgen-title h2 {
  margin: 8px 0 6px;
  color: var(--white);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.12;
  text-shadow: 0 3px 18px rgba(5, 5, 5, 0.45);
}

.lyricsgen-title {
  width: min(100%, 920px);
  margin-inline: auto;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  padding: 18px 22px;
  background: rgba(5, 5, 5, 0.32);
  backdrop-filter: blur(14px);
  text-align: center;
}

.lyricsgen-context {
  margin: 0;
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 700;
  text-shadow: 0 2px 14px rgba(5, 5, 5, 0.45);
}

.lyricsgen-panel {
  width: min(80vw, 1320px);
  min-height: min(78vh, 860px);
  margin: 18px auto 0;
}

.lyricsgen-textarea-wrap {
  position: relative;
}

.lyricsgen-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
  align-items: start;
  gap: 18px;
}

.lyricsgen-latin-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lyricsgen-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lyricsgen-main-wrap .panel-label,
.lyricsgen-latin-wrap .panel-label {
  margin: 0;
  color: var(--lavender-deep);
}

.lyricsgen-highlight-shell {
  position: relative;
}

.lyricsgen-latin-shell {
  position: relative;
}

.lyricsgen-highlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 22px 22px 48px;
  color: var(--ink);
  font: inherit;
  line-height: 1.9;
  white-space: pre-wrap;
  pointer-events: none;
}

.lyricsgen-highlight strong {
  font-weight: 950;
}

#lyricsgenLyricsValue {
  position: relative;
  z-index: 1;
  min-height: 480px;
  padding-bottom: 54px;
  color: transparent;
  caret-color: var(--ink);
  background: transparent;
}

.lyricsgen-highlight-shell .voice-input-wrap,
.lyricsgen-latin-shell .voice-input-wrap {
  position: static;
}

.lyricsgen-highlight-shell .voice-mic-button,
.lyricsgen-latin-shell .voice-mic-button,
.lyricsgen-highlight-shell .voice-input-status,
.lyricsgen-latin-shell .voice-input-status {
  display: none;
}

.lyricsgen-highlight-shell .voice-input-wrap textarea,
.lyricsgen-latin-shell .voice-input-wrap textarea {
  padding-right: 22px;
}

.lyricsgen-highlight-shell .voice-input-wrap textarea {
  padding-bottom: 54px;
}

.lyricsgen-latin-shell .voice-input-wrap textarea {
  padding: 14px 14px 132px;
}

#lyricsgenLyricsValue::placeholder {
  color: rgba(5, 5, 5, 0.48);
}

#lyricsgenLatinValue {
  min-height: 480px;
  padding: 14px 14px 132px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.lyricsgen-box-count {
  position: absolute;
  right: 56px;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid rgba(5, 5, 5, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  color: rgba(5, 5, 5, 0.68);
  min-width: 74px;
  font-size: 0.62rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.lyricsgen-latin-count {
  right: 14px;
  bottom: 86px;
  min-width: 68px;
  font-size: 0.54rem;
}

.lyricsgen-swap-button {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(68%, 220px);
  min-height: 42px;
}

.lyricsgen-panel.is-initial-lyrics-entry #lyricsgenLyricsValue {
  min-height: 90px;
}

.lyricsgen-panel.is-awaiting-lyrics-choice .lyricsgen-editor-grid,
.lyricsgen-panel.is-awaiting-lyrics-choice .transliterate-wrap,
.lyricsgen-panel.is-awaiting-lyrics-choice .lyricsgen-primary-actions,
.lyricsgen-panel.is-awaiting-lyrics-choice .balance-preview,
.lyricsgen-panel.is-awaiting-lyrics-choice .lyricsgen-recreate-box,
.lyricsgen-panel.is-awaiting-lyrics-choice .save-status {
  visibility: hidden;
}

.lyrics-choice-card {
  width: min(100%, 620px);
  max-width: calc(100vw - 32px);
  text-align: center;
  overflow: hidden;
}

.lyrics-choice-actions {
  justify-content: center;
  flex-wrap: nowrap;
  margin-top: 18px;
  width: 100%;
}

.lyrics-choice-actions button {
  flex: 1 1 0;
  min-height: 54px;
  min-width: 0;
  max-width: 100%;
  padding-inline: 12px;
  white-space: normal;
  line-height: 1.2;
  font-size: clamp(0.68rem, 1vw, 0.82rem);
}

.lyrics-intent-box {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.lyrics-intent-box[hidden] {
  display: none;
}

.lyrics-intent-box label {
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lyrics-intent-box textarea {
  width: 100%;
  min-height: 118px;
  border: 2px solid rgba(123,62,230,0.22);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  font: 750 0.9rem/1.55 Poppins, Arial, sans-serif;
  resize: vertical;
}

.transliterate-wrap {
  position: absolute;
  left: auto;
  right: 50%;
  bottom: 10px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: calc(50% - 10px);
  max-width: 100%;
  margin-top: 0;
  padding: 5px;
  border: 1px solid rgba(5, 5, 5, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  transform: translateX(50%);
}

.transliterate-wrap select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}

.transliterate-wrap .compact-button {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.7rem;
}

.lyricsgen-primary-actions {
  display: grid;
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(560px, 100%);
  margin-inline: auto;
  text-align: center;
  margin-top: 18px;
}

.lyricsgen-primary-actions > button,
.lyricsgen-primary-actions .save-lyrics-action-wrap > button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding-inline: 12px;
}

.save-lyrics-action-wrap {
  display: grid;
  grid-column: 2;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.lyricsgen-primary-actions #saveLyricsgenButton {
  min-height: 60px;
  font-size: 1.03rem;
  box-shadow: 0 12px 24px rgba(123, 62, 230, 0.18);
}

.lyricsgen-primary-actions #recreateLyricsButton {
  min-height: 50px;
  font-size: 0.96rem;
}

.lyricsgen-primary-actions #throwIdeasButton {
  grid-column: 1 / -1;
}

.lyricsgen-primary-actions #restorePreviousLyricsButton:not([hidden]) {
  grid-column: 1 / -1;
}

.lyricsgen-primary-actions .next-step-guide {
  position: relative;
  justify-self: center;
  z-index: 20;
  width: min(240px, 100%);
  margin: 0 auto;
  transform: none;
  pointer-events: auto;
}

.lyricsgen-primary-actions .next-step-guide::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 18px;
  height: 18px;
  border-left: 2px solid rgba(123, 62, 230, 0.34);
  border-top: 2px solid rgba(123, 62, 230, 0.34);
  background: rgba(247, 243, 255, 0.92);
  transform: translateX(-50%) rotate(45deg);
}

@media (max-width: 680px) {
  .save-lyrics-action-wrap {
    grid-column: 1 / -1;
  }

  .lyricsgen-primary-actions .next-step-guide {
    width: min(260px, 100%);
  }
}

.next-step-guide {
  position: relative;
  display: grid;
  gap: 4px;
  width: min(100%, 620px);
  margin: 14px auto 0;
  border: 2px solid rgba(123, 62, 230, 0.34);
  border-radius: 16px;
  padding: 12px 46px 12px 16px;
  color: var(--lavender-deep);
  background: rgba(247, 243, 255, 0.92);
  text-align: center;
  box-shadow: 0 16px 36px rgba(76, 45, 132, 0.12);
}

.next-step-guide[hidden] {
  display: none;
}

.next-step-guide strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.next-step-guide span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.next-step-close {
  position: absolute;
  top: 9px;
  right: 10px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 16, 31, 0.92);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.next-step-close:focus-visible {
  outline: 3px solid rgba(123, 62, 230, 0.28);
  outline-offset: 2px;
}

.musicgen-next-step-guide {
  margin-top: 16px;
  margin-bottom: 2px;
}

.tutorial-action-highlight {
  position: relative;
  outline: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 5px rgba(123, 62, 230, 0.3),
    0 14px 30px rgba(123, 62, 230, 0.24);
  animation: tutorialPulse 1.4s ease-in-out infinite;
}

@keyframes tutorialPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.lyricsgen-recreate-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.lyricsgen-recreate-box[hidden] {
  display: none;
}

.lyricsgen-change-title {
  margin: 0;
  color: var(--lavender-deep);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.lyricsgen-change-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.lyricsgen-change-explainer {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.55;
  text-align: center;
}

.lyricsgen-change-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.lyricsgen-change-actions .compact-button {
  min-width: 195px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 0.9rem;
}

.lyricsgen-change-actions #sendLyricsChangeButton {
  min-width: 254px;
  min-height: 62px;
  font-size: 1.08rem;
}

#lyricsgenChangePrompt {
  min-height: 118px;
  padding: 16px;
  line-height: 1.65;
}

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

.musicgen-title {
  margin-top: 18px;
}

.musicgen-title .panel-label {
  color: var(--white);
  font-size: clamp(1.35rem, 4vw, 2.4rem);
  line-height: 1.1;
  text-shadow: 0 3px 18px rgba(5, 5, 5, 0.45);
}

.musicgen-panel {
  min-width: 0;
}

.videogen-frame {
  width: 100%;
  min-height: calc(100vh - 120px);
  margin-top: 18px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.soundtrack-result-panel {
  margin-top: 18px;
}

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

.soundtrack-result-panel.is-popup {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(18px, 4vw, 42px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(214, 190, 255, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(8, 6, 18, 0.94), rgba(61, 31, 121, 0.92));
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.soundtrack-result-panel.is-popup > .panel-label {
  display: none;
}

.soundtrack-result-panel.is-popup .soundtrack-loader,
.soundtrack-result-panel.is-popup .soundtrack-player {
  width: min(100%, 680px);
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 32px 86px rgba(0, 0, 0, 0.34);
}

.api-wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 38%, rgba(184, 154, 255, 0.28), transparent 34%),
    linear-gradient(135deg, rgba(5, 5, 8, 0.96), rgba(54, 28, 109, 0.92));
  color: var(--white);
}

.api-wait-overlay[hidden] {
  display: none;
}

.api-wait-card {
  width: min(92vw, 360px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  padding: 28px 24px;
  background: rgba(0, 0, 0, 0.42);
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.api-wait-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #d8c6ff;
  border-radius: 50%;
  animation: apiWaitSpin 0.9s linear infinite;
}

.api-wait-card p {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}

.api-wait-card strong {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #efe7ff;
  font-size: 1.25rem;
}

@keyframes apiWaitSpin {
  to { transform: rotate(360deg); }
}

.soundtrack-loader {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 220px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 24px;
  text-align: center;
}

.soundtrack-loader[hidden] {
  display: none;
}

.soundtrack-loader-ring {
  width: 74px;
  height: 74px;
  border: 8px solid rgba(159, 109, 242, 0.2);
  border-top-color: var(--lavender-deep);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.soundtrack-loader p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.soundtrack-progress {
  width: min(100%, 560px);
  height: 9px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.soundtrack-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lavender-deep), #f2b6ff);
  transition: width 0.4s ease;
}

.soundtrack-player {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.soundtrack-player h2 {
  margin: 0;
  color: var(--lavender-deep);
  font-size: clamp(1.35rem, 3vw, 2rem);
  text-align: center;
  line-height: 1.12;
}

.soundtrack-render-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 18px;
  border: 2px solid rgba(124, 62, 199, 0.28);
  border-radius: 999px;
  background: rgba(246, 240, 255, 0.92);
  color: var(--lavender-deep);
  font-weight: 900;
}

.soundtrack-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}

.soundtrack-wave span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lavender-deep), #c79cff);
  animation: soundtrackWave 0.86s ease-in-out infinite;
}

.soundtrack-wave span:nth-child(2) { animation-delay: 0.08s; }
.soundtrack-wave span:nth-child(3) { animation-delay: 0.16s; }
.soundtrack-wave span:nth-child(4) { animation-delay: 0.24s; }
.soundtrack-wave span:nth-child(5) { animation-delay: 0.32s; }
.soundtrack-wave span:nth-child(6) { animation-delay: 0.40s; }
.soundtrack-wave span:nth-child(7) { animation-delay: 0.48s; }

@keyframes soundtrackWave {
  0%, 100% { height: 8px; opacity: 0.58; }
  45% { height: 24px; opacity: 1; }
}

.soundtrack-render-status[hidden],
.soundtrack-custom-player[hidden] {
  display: none;
}

.soundtrack-render-status span::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  text-align: left;
  animation: soundtrackDots 1.2s steps(4, end) infinite;
}

@keyframes soundtrackDots {
  to { width: 1.6em; }
}

.soundtrack-player audio {
  display: none;
}

.soundtrack-custom-player {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px 18px;
  width: min(100%, 680px);
  padding: 18px;
  border: 1px solid rgba(37, 23, 52, 0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 232, 255, 0.88));
  box-shadow:
    0 22px 54px rgba(45, 24, 75, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.soundtrack-volume-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 40px 40px minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(37, 23, 52, 0.08);
}

.soundtrack-volume-label {
  color: rgba(37, 23, 52, 0.58);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.soundtrack-volume-icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  color: #4d306e;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,240,255,0.84));
  box-shadow:
    inset 0 0 0 1px rgba(37, 23, 52, 0.10),
    0 8px 18px rgba(45, 24, 75, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.soundtrack-volume-icon-button:hover:not(:disabled),
.soundtrack-volume-icon-button:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--lavender-deep), #9b63f2);
  box-shadow: 0 12px 24px rgba(124, 62, 199, 0.24);
  transform: translateY(-1px);
}

.soundtrack-volume-icon-button:disabled {
  color: rgba(37, 23, 52, 0.26);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 0 0 1px rgba(37, 23, 52, 0.08);
  cursor: default;
}

.soundtrack-volume-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.soundtrack-volume-controls input[type="range"] {
  width: 100%;
  height: 9px;
  margin: 0;
  border-radius: 999px;
  outline: none;
  accent-color: var(--lavender-deep);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--lavender-deep) var(--soundtrack-volume, 100%), rgba(124, 62, 199, 0.16) var(--soundtrack-volume, 100%));
}

.soundtrack-volume-controls input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4d306e;
  box-shadow: 0 5px 14px rgba(37, 23, 52, 0.22);
  -webkit-appearance: none;
  appearance: none;
}

.soundtrack-volume-controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4d306e;
  box-shadow: 0 5px 14px rgba(37, 23, 52, 0.22);
}

.soundtrack-action-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: min(100%, 620px);
}

.soundtrack-action-row .primary-button,
.soundtrack-action-row .outline-button {
  min-height: 48px;
  padding-inline: 24px;
}

.soundtrack-action-row button:disabled,
.soundtrack-action-row button.is-render-waiting {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.28);
  box-shadow: none;
  transform: none;
}

.soundtrack-action-row .primary-button.is-render-waiting {
  border-color: rgba(5, 5, 5, 0.18);
  background: #8f86a3;
  color: rgba(255, 255, 255, 0.84);
}

.soundtrack-action-row .outline-button.is-render-waiting {
  border-color: rgba(5, 5, 5, 0.18);
  background: rgba(255, 255, 255, 0.62);
  color: rgba(5, 5, 5, 0.5);
}

.soundtrack-action-row button.is-render-waiting:hover {
  box-shadow: none;
  filter: grayscale(0.28);
}

.soundtrack-recreate-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  padding: 16px;
  border: 1.5px solid rgba(123, 62, 230, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(88, 52, 126, 0.12);
  text-align: center;
}

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

.soundtrack-recreate-panel p:not(.panel-label) {
  margin: 0;
  color: rgba(37, 23, 52, 0.72);
  font-size: 0.9rem;
  line-height: 1.55;
}

.soundtrack-recreate-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.soundtrack-recreate-actions .primary-button,
.soundtrack-recreate-actions .outline-button {
  min-height: 42px;
  padding-inline: 18px;
}

.soundtrack-manual-cdn {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  padding: 14px;
  border: 1.5px dashed rgba(123, 62, 230, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.soundtrack-manual-cdn[hidden] {
  display: none;
}

.soundtrack-manual-cdn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.soundtrack-manual-cdn-row input {
  width: 100%;
  min-height: 42px;
  border: 2px solid rgba(37, 23, 52, 0.18);
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.soundtrack-manual-cdn-row input[type="file"] {
  border-radius: 14px;
  padding: 9px 12px;
}

@media (max-width: 720px) {
  .soundtrack-custom-player {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  .soundtrack-volume-controls {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 38px 38px;
  }

  .soundtrack-volume-label {
    grid-column: 1 / -1;
  }
}

.soundtrack-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button-wait-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(123, 62, 230, 0.18);
  border-top-color: var(--lavender-deep);
  border-radius: 50%;
  animation: soundtrackButtonSpin 0.8s linear infinite;
}

@keyframes soundtrackButtonSpin {
  to { transform: rotate(360deg); }
}

.soundtrack-play-button {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.34), transparent 28%),
    linear-gradient(135deg, var(--lavender-deep), #9a61f1);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 16px 32px rgba(124, 62, 199, 0.30),
    inset 0 1px 0 rgba(255,255,255,0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.soundtrack-play-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow:
    0 20px 40px rgba(124, 62, 199, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.32);
}

.soundtrack-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.soundtrack-icon-pause,
.soundtrack-play-button.is-playing .soundtrack-icon-play {
  display: none;
}

.soundtrack-play-button.is-playing .soundtrack-icon-pause {
  display: block;
}

.soundtrack-scrubber {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-self: stretch;
  align-content: center;
}

.soundtrack-scrubber input[type="range"] {
  width: 100%;
  height: 12px;
  margin: 0;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background:
    linear-gradient(90deg, var(--lavender-deep) var(--soundtrack-progress, 0%), rgba(124, 62, 199, 0.16) var(--soundtrack-progress, 0%)),
    rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(37, 23, 52, 0.08);
}

.soundtrack-scrubber input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--lavender-deep);
  box-shadow: 0 4px 12px rgba(37, 23, 52, 0.24);
  -webkit-appearance: none;
  appearance: none;
}

.soundtrack-scrubber input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--lavender-deep);
  box-shadow: 0 4px 12px rgba(37, 23, 52, 0.24);
}

.soundtrack-time-row {
  display: flex;
  justify-content: space-between;
  color: rgba(37, 23, 52, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.graphic-prompt-modal[hidden] {
  display: none;
}

.graphic-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 5, 5, 0.58);
  backdrop-filter: blur(10px);
}

.graphic-prompt-card {
  width: min(100%, 620px);
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.approval-state-overlay[hidden] {
  display: none;
}

.approval-state-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 6, 18, 0.7);
  backdrop-filter: blur(14px);
}

.approval-state-card {
  width: min(100%, 680px);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.approval-state-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.12;
}

.approval-state-card p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.approval-state-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.graphic-prompt-card h2 {
  margin-bottom: 14px;
}

#graphicPromptInput {
  width: 100%;
  min-height: 160px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  resize: vertical;
}

#graphicPromptInput:focus {
  outline: 3px solid rgba(159, 109, 242, 0.34);
  outline-offset: 3px;
}

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

#lyricsValue[readonly] {
  cursor: default;
  color: #26222f;
  background: rgba(255, 255, 255, 0.72);
}

#lyricsValue:focus {
  outline: 3px solid rgba(159, 109, 242, 0.34);
  outline-offset: 3px;
}

.lyrics-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 16px;
}

.project-step-back-button {
  justify-self: start;
  width: fit-content;
  min-height: 32px;
  padding: 0 14px;
  font-size: 0.68rem;
}

.project-step-back-row {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 12px;
}

.musicgen-title .project-step-back-button {
  margin-top: 10px;
}

.floating-previous-step-button {
  position: fixed;
  left: 18px;
  bottom: 74px;
  z-index: 1200;
  min-height: 40px;
  max-width: min(320px, calc(100vw - 36px));
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(27, 17, 48, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.floating-previous-step-button:hover {
  color: #fff;
  background: var(--lavender-deep);
  transform: translateY(-1px);
}

.floating-previous-step-button[hidden] {
  display: none;
}

.sound-design-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.sound-design-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.sound-design-tool-row .outline-button,
.sound-design-tool-row .primary-button {
  width: 100%;
  min-width: 0;
  padding-inline: clamp(8px, 1.1vw, 16px);
  font-size: clamp(0.72rem, 1.05vw, 0.86rem);
  line-height: 1.2;
  white-space: normal;
}

.sound-design-create-button {
  grid-column: 1 / -1;
  justify-self: stretch;
  min-height: 56px;
  font-size: clamp(0.88rem, 1.2vw, 1.05rem);
}

.sound-design-actions .save-status {
  justify-self: end;
  max-width: 100%;
  text-align: right;
}

.save-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.new-project-requirements {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 18px;
  padding: clamp(18px, 2.2vw, 26px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 255, 0.94));
  box-shadow: var(--shadow);
}

.new-project-requirements[hidden] {
  display: none;
}

.new-project-requirements h2 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.new-project-requirements p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.requirement-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.requirement-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.requirement-item::after {
  content: "Needed";
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 9px;
  color: #8a3412;
  background: #ffedd5;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.requirement-item.is-done {
  border-color: rgba(4, 120, 87, 0.26);
}

.requirement-item.is-done::after {
  content: "Done";
  color: #047857;
  background: #ecfdf5;
}

.workflow-dashboard {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  padding: clamp(18px, 2.1vw, 26px);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

#projectHomeView > .workflow-dashboard {
  margin: 0 0 12px;
}

#projectHomeView > .new-project-requirements {
  margin: 0 0 12px;
}

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

.workflow-head h2 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

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

.workflow-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.workflow-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
}

.workflow-status {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 9px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-status[data-state="completed"] {
  color: #047857;
  background: #ecfdf5;
}

.workflow-status[data-state="current"] {
  color: #1d4ed8;
  background: #eff6ff;
}

.project-panel {
  padding: 24px;
}

.wide-panel {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .project-shell {
    padding: 8px 12px;
  }

  .project-nav {
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .brand-mark {
    width: clamp(180px, 17vw, 250px);
    height: clamp(34px, 3.4vw, 46px);
  }

  .brand-stack,
  .brand-row,
  .project-nav-links,
  .project-tabs {
    gap: 6px;
  }

  .project-tab,
  .project-nav-links .outline-button,
  .global-logout-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.64rem;
  }

  .creator-wallet-chip,
  .creator-wallet-history-link {
    min-height: 30px;
  }

  #projectHomeView .project-hero {
    display: grid;
    grid-template-columns: 0.8fr 1.35fr 0.9fr;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
  }

  #projectHomeView .project-hero h1 {
    font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  }

  #projectHomeView .project-hero p:not(.eyebrow) {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  #projectHomeView .hero-song-player {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  #projectHomeView .project-journey-panel {
    grid-template-columns: minmax(190px, 0.85fr) minmax(400px, 1.9fr) auto;
    gap: 8px;
    margin: 6px 0;
    padding: 7px 9px;
    border-radius: 12px;
  }

  #projectHomeView .project-journey-copy h2 {
    font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  }

  #projectHomeView .project-journey-copy p:not(.panel-label) {
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.18;
  }

  #projectHomeView .project-journey-steps {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    gap: 5px;
  }

  #projectHomeView .project-journey-steps li {
    min-height: 42px;
    gap: 2px;
    padding: 5px 7px;
    border-radius: 8px;
  }

  #projectHomeView .project-journey-steps span {
    width: 16px;
    height: 16px;
    font-size: 0.58rem;
  }

  #projectHomeView .project-journey-steps strong {
    font-size: 0.62rem;
  }

  #projectHomeView .project-journey-steps small {
    font-size: 0.52rem;
  }

  #projectHomeView .project-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-top: 7px;
    counter-reset: project-card;
  }

  #projectHomeView .project-panel,
  #projectHomeView .wide-panel,
  #projectHomeView .workflow-dashboard {
    padding: 8px 10px;
    border-radius: 10px;
  }

  #projectHomeView .project-grid > .project-panel {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
  }

  #projectHomeView .project-grid > .project-panel > .panel-label {
    width: 100%;
    margin-bottom: 0;
    text-align: left;
  }

  #projectHomeView .project-grid > .project-panel {
    counter-increment: project-card;
  }

  #projectHomeView .project-grid > .project-panel > .panel-label::before {
    content: counter(project-card, upper-roman) ". ";
  }

  #projectHomeView .project-grid > .project-panel > h2,
  #projectHomeView .project-grid > .project-panel > .field-input {
    width: 100%;
    margin: auto 0 0;
    align-self: center;
    text-align: center;
  }

  #projectHomeView .project-grid > .project-panel > select.field-input {
    text-align-last: center;
  }

  #projectHomeView .project-grid > .project-panel.wide-panel > .creative-concept-field {
    margin-top: 0;
    text-align: left;
  }

  #projectHomeView .project-grid > .system-meta-card {
    display: none;
  }

  #projectHomeView .project-panel h2 {
    font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  }

  #projectHomeView .panel-label,
  #projectHomeView .eyebrow {
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.03em;
  }

  #projectHomeView .field-input {
    min-height: 32px;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: clamp(0.78rem, 1.05vw, 0.92rem);
  }

  #projectHomeView .creative-concept-field {
    min-height: 74px;
    line-height: 1.22;
  }

  #projectHomeView .new-project-requirements {
    grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.3fr);
    gap: 8px;
    margin: 0 0 6px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  #projectHomeView .new-project-requirements h2 {
    margin: 1px 0 3px;
    font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  }

  #projectHomeView .new-project-requirements p {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  #projectHomeView .requirement-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  #projectHomeView .requirement-item {
    min-height: 27px;
    gap: 5px;
    border-radius: 8px;
    padding: 4px 7px;
    font-size: 0.62rem;
  }

  #projectHomeView .requirement-item::after {
    padding: 2px 6px;
    font-size: 0.48rem;
  }

  #projectHomeView .section-heading {
    min-height: 14px;
  }

  #projectHomeView .project-actions .lyrics-actions {
    gap: 8px;
  }

  #projectHomeView #saveProjectButton,
  #projectHomeView #saveAndNextStageButton,
  #projectHomeView #discardScratchProjectButton,
  #projectHomeView .project-next-action,
  #projectHomeView .project-previous-action {
    min-height: 31px;
    padding: 5px 12px;
    font-size: 0.62rem;
  }

  #projectHomeView .workflow-dashboard {
    margin: 0 0 6px;
  }

  #projectHomeView .workflow-head {
    margin-bottom: 3px;
  }

  #projectHomeView .workflow-head h2 {
    font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  }

  #projectHomeView .workflow-cards {
    gap: 6px;
  }

  #projectHomeView .workflow-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    padding: 7px 8px;
  }

  #projectHomeView .workflow-card h3 {
    font-size: 0.78rem;
  }

  #projectHomeView .workflow-card p {
    margin: 0;
    font-size: 0.64rem;
    line-height: 1.18;
  }

  #projectHomeView .workflow-status {
    padding: 2px 6px;
    font-size: 0.48rem;
  }

  #projectHomeView .workflow-card .compact-button {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.56rem;
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll, scroll;
  }

  .project-shell {
    padding: 12px;
  }

  .project-nav,
  .project-grid,
  .project-journey-panel,
  .new-project-requirements,
  .workflow-cards,
  .musicgen-grid {
    grid-template-columns: 1fr;
  }

  .project-journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-journey-steps li:last-child {
    grid-column: 1 / -1;
  }

  .project-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .project-nav-links {
    justify-content: stretch;
  }

  .project-nav-links .outline-button {
    flex: 1 1 180px;
  }

  .brand-stack {
    align-items: stretch;
  }

  .project-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .project-tab {
    padding-inline: 8px;
    min-height: 42px;
    font-size: 0.7rem;
  }

  .outline-button {
    text-align: center;
  }

  .lyrics-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sound-design-actions {
    grid-template-columns: 1fr;
  }

  .sound-design-tool-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sound-design-actions .save-status {
    justify-self: stretch;
    text-align: center;
  }

  .lyrics-choice-actions {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .lyrics-choice-actions button {
    width: 100%;
  }

  .project-panel,
  .graphic-prompt-card {
    border-radius: 18px;
    padding: 16px;
  }

  .project-hero h1,
  .musicgen-title h2 {
    font-size: clamp(1.55rem, 8vw, 2.35rem);
    line-height: 1.06;
  }

  textarea,
  input,
  select {
    font-size: 16px;
  }

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

  .lyricsgen-editor-grid {
    grid-template-columns: 1fr;
  }

  .lyricsgen-panel {
    width: min(100%, 920px);
    min-height: 0;
  }

  .transliterate-wrap {
    margin-top: 12px;
  }

  #lyricsgenLyricsValue {
    min-height: 420px;
  }

  #lyricsgenLatinValue {
    min-height: 420px;
  }

  .primary-button {
    width: 100%;
  }
}

/* Global Divyaverse button capitalization */
button,
[role="button"],
.primary-button,
.outline-button,
.compact-button,
.cta-button,
.ghost-button,
.idea-button,
.nav-link,
.dashboard-link-button,
.calendar-toggle,
.calendar-details-button,
.calendar-start-button,
.calendar-asset-button,
.calendar-video-link,
.calendar-song-link,
.festival-calendar-button,
.festival-vault-button {
  text-transform: uppercase !important;
}

/* Mobile polish for project, lyrics, music, and lyrical-video pages. */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background-attachment: scroll, scroll;
  }

  button,
  input,
  select,
  textarea {
    font-size: max(16px, 1rem);
  }

  .project-shell {
    width: 100%;
    padding: 10px;
  }

  .project-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -10px -10px 12px;
    border-radius: 0 0 18px 18px;
    background: rgba(8, 6, 18, 0.48);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .brand-stack,
  .brand-row,
  .project-nav-links {
    width: 100%;
    min-width: 0;
  }

  .brand-row {
    justify-content: space-between;
  }

  .brand-mark {
    width: min(260px, 76vw);
    height: 54px;
    margin: 0;
  }

  .creator-wallet-chip,
  .global-logout-button {
    min-height: 36px;
  }

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

  .project-nav-links .outline-button,
  .project-tabs .project-tab,
  .primary-button,
  .outline-button,
  .compact-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-radius: 14px;
    white-space: normal;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .project-hero,
  .project-panel,
  .workflow-dashboard,
  .graphic-prompt-card,
  .musicgen-panel,
  .lyricsgen-panel {
    border-radius: 18px;
    padding: 15px;
  }

  .lyricsgen-panel {
    width: 100%;
    min-height: 0;
  }

  .project-hero h1,
  .musicgen-title h2,
  .project-panel h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .project-hero p,
  .project-panel p,
  .workflow-card p {
    line-height: 1.55;
  }

  .workflow-head,
  .lyrics-actions,
  .musicgen-actions,
  .sound-design-actions,
  .lyrics-choice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-cards,
  .project-grid,
  .musicgen-grid,
  .lyricsgen-editor-grid,
  .new-project-requirements {
    grid-template-columns: 1fr !important;
  }

  .project-journey-steps {
    grid-template-columns: 1fr !important;
  }

  .workflow-card,
  .project-journey-steps li {
    min-width: 0;
  }

  .song-player,
  .hero-song-player,
  audio,
  video {
    width: 100%;
    max-width: 100%;
  }

  textarea {
    min-height: 180px;
    line-height: 1.6;
  }

  #lyricsgenLyricsValue {
    min-height: 360px;
  }

  #lyricsgenLatinValue {
    min-height: 360px;
  }
}

@media (max-width: 420px) {
  .project-nav-links,
  .project-tabs {
    grid-template-columns: 1fr;
  }

  .project-shell {
    padding: 8px;
  }

  .project-nav {
    margin: -8px -8px 10px;
  }

  .project-hero,
  .project-panel,
  .workflow-dashboard,
  .graphic-prompt-card,
  .musicgen-panel,
  .lyricsgen-panel {
    padding: 13px;
    border-radius: 16px;
  }
}

/* Project navbar polish: compact account row, predictable action buttons. */
.project-nav {
  display: grid;
  grid-template-columns: minmax(280px, auto) minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
}

.brand-stack,
.brand-row {
  min-width: 0;
}

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

.brand-row .brand-mark {
  flex: 1 1 auto;
  min-width: 132px;
}

.project-nav-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  align-items: stretch;
  gap: 9px;
  min-width: 0;
}

.project-nav-links .outline-button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-inline: 12px;
}

.brand-row .global-logout-button,
.brand-row .creator-wallet-chip,
.brand-row .creator-wallet-history-link {
  flex: 0 0 auto;
}

@media (max-width: 860px) {
  .project-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    gap: 8px;
  }

  .brand-row .brand-mark {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(260px, 76vw);
    height: 54px;
  }

  .brand-row .global-logout-button,
  .brand-row .creator-wallet-chip {
    width: 100%;
    justify-content: center;
  }

  .brand-row .creator-wallet-history-link {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

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

@media (max-width: 380px) {
  .project-nav-links {
    grid-template-columns: 1fr;
  }
}

/* Keep core project section tabs together as one row. */
.project-tabs {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap !important;
  gap: 6px;
  width: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.project-tabs::-webkit-scrollbar {
  display: none;
}

.project-tab {
  flex: 0 0 auto;
  min-width: clamp(88px, 8vw, 118px);
  min-height: 33px;
  padding: 0 10px;
  font-size: clamp(0.58rem, 0.64vw, 0.7rem);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .brand-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .project-tabs {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .project-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .project-tab {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 5px;
    font-size: clamp(0.5rem, 2.45vw, 0.58rem);
  }
}

.musicgen-protection-notice {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 99999;
  max-width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  border: 2px solid #1e1730;
  border-radius: 8px;
  background: #ffffff;
  color: #1e1730;
  box-shadow: 0 18px 42px rgba(28, 16, 48, 0.22);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.musicgen-protection-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
