.studio-hero {
  padding: clamp(34px, 6vw, 76px) 0 46px;
}

.preview-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(34px, 6vw, 66px);
  padding: 11px 14px;
  border: 1px solid rgba(255, 189, 82, 0.28);
  border-radius: 12px;
  color: #d9c69f;
  background: rgba(255, 189, 82, 0.055);
  font-size: 12px;
}

.preview-banner strong {
  color: #ffcf7d;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 13px rgba(255, 189, 82, 0.72);
}

.studio-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  align-items: end;
  gap: clamp(34px, 7vw, 90px);
}

.studio-hero h1 {
  max-width: 760px;
  font-size: clamp(3.15rem, 7.4vw, 6.5rem);
}

.studio-hero .lede {
  max-width: 670px;
}

.identity-panel {
  max-width: 670px;
  margin-top: 25px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(43, 140, 255, 0.3);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(43, 140, 255, 0.09), rgba(13, 16, 20, 0.88));
}

.identity-panel[data-state="authenticated"] {
  border-color: rgba(43, 213, 118, 0.32);
  background: linear-gradient(145deg, rgba(43, 213, 118, 0.08), rgba(13, 16, 20, 0.88));
}

.identity-panel[data-state="error"] {
  border-color: rgba(255, 102, 82, 0.34);
}

.identity-copy {
  min-width: 180px;
  flex: 1 1 230px;
}

.identity-copy strong,
.identity-copy span {
  display: block;
}

.identity-copy strong {
  color: #d9eaff;
  font-size: 13px;
}

.identity-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.google-signin-slot {
  min-width: 230px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.compact-button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.studio-secondary-actions {
  margin-top: 14px;
}

.button:disabled {
  cursor: not-allowed;
  color: #aab3bf;
  border-color: var(--line-strong);
  background: #1b2027;
  box-shadow: none;
  opacity: 0.72;
}

.truth-note {
  max-width: 630px;
  margin: 16px 0 0;
  color: #7f8a97;
  font-size: 12px;
}

.launch-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    linear-gradient(145deg, rgba(43, 140, 255, 0.08), transparent 54%),
    rgba(13, 16, 20, 0.92);
  overflow: hidden;
}

.launch-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: rgba(43, 140, 255, 0.12);
  filter: blur(18px);
}

.launch-card .card-kicker {
  display: block;
  margin-bottom: 13px;
}

.allowance-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.allowance-row strong {
  font-size: 13px;
}

.allowance-row span,
.launch-card p {
  color: var(--muted);
  font-size: 12px;
}

.launch-card p {
  margin: 15px 0 0;
}

.studio-shell {
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(10, 12, 15, 0.9);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.workspace-head .eyebrow {
  margin-bottom: 7px;
}

.workspace-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.identity-chip,
.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.identity-chip span {
  color: var(--amber);
}

.identity-chip[data-state="authenticated"] {
  color: #b8f2cd;
  border-color: rgba(43, 213, 118, 0.32);
  background: rgba(43, 213, 118, 0.06);
}

.identity-chip[data-state="authenticated"] > span:first-child {
  color: var(--green);
}

.studio-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 28px 0;
}

.studio-tabs button {
  min-width: 120px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 11px 11px 0 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.studio-tabs button[aria-selected="true"] {
  color: #d9eaff;
  border-color: rgba(43, 140, 255, 0.35);
  border-bottom-color: #111820;
  background: #111820;
}

.studio-panel {
  padding: 0 28px 30px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(290px, 0.72fr);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(43, 140, 255, 0.24);
}

.creation-form,
.voice-card,
.video-preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(19, 23, 29, 0.96), rgba(13, 16, 20, 0.94));
}

.creation-form {
  padding: clamp(20px, 3vw, 30px);
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.step-label {
  color: #7ebaff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.creation-form h3,
.voice-card h3,
.video-preview-card h3 {
  margin: 5px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.creation-form label {
  display: block;
  margin: 18px 0 7px;
  color: #c8d1dc;
  font-size: 12px;
  font-weight: 700;
}

.creation-form textarea,
.creation-form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: #0b0e12;
  font: inherit;
  font-size: 14px;
}

.creation-form textarea {
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
}

.creation-form select {
  height: 43px;
  padding: 0 12px;
}

.creation-form textarea:focus,
.creation-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.12);
}

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

.optional {
  color: #75808c;
  font-weight: 500;
}

.creation-form .consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}

.consent-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.estimate-card {
  margin-top: 22px;
  padding: 14px 15px;
  border: 1px solid rgba(43, 213, 118, 0.22);
  border-radius: 12px;
  background: rgba(43, 213, 118, 0.045);
}

.estimate-card span,
.estimate-card strong,
.estimate-card small {
  display: block;
}

.estimate-card span {
  color: #7fe4a7;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.estimate-card strong {
  margin-top: 4px;
  font-size: 13px;
}

.estimate-card small {
  margin-top: 4px;
  color: var(--muted);
}

.create-button {
  width: 100%;
  margin-top: 16px;
}

.voice-card,
.video-preview-card {
  padding: clamp(22px, 3vw, 30px);
}

.voice-card {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.voice-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 140, 255, 0.13), transparent 67%);
  pointer-events: none;
}

.voice-orb {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  margin: 10px auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(43, 140, 255, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, #152d4d 0%, #0d1724 55%, #0b0e12 100%);
  box-shadow: inset 0 0 35px rgba(43, 140, 255, 0.12), 0 0 60px rgba(43, 140, 255, 0.08);
}

.voice-orb span {
  width: 5px;
  height: 28px;
  border-radius: 99px;
  background: linear-gradient(#78b8ff, #277fdc);
  transform: scaleY(0.45);
}

.voice-orb span:nth-child(2),
.voice-orb span:nth-child(4) {
  height: 48px;
  transform: scaleY(0.7);
}

.voice-orb span:nth-child(3) {
  height: 72px;
}

.voice-card.is-recording .voice-orb span {
  animation: studio-wave 0.85s ease-in-out infinite alternate;
}

.voice-card.is-recording .voice-orb span:nth-child(2) { animation-delay: -0.55s; }
.voice-card.is-recording .voice-orb span:nth-child(3) { animation-delay: -0.2s; }
.voice-card.is-recording .voice-orb span:nth-child(4) { animation-delay: -0.72s; }
.voice-card.is-recording .voice-orb span:nth-child(5) { animation-delay: -0.34s; }

@keyframes studio-wave {
  from { transform: scaleY(0.28); opacity: 0.58; }
  to { transform: scaleY(1); opacity: 1; }
}

.voice-card p,
.video-preview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.record-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 24px 0 12px;
}

.record-button,
.clear-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: #11161c;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.record-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.clear-button { padding: 0 13px; }

.record-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6652;
  box-shadow: 0 0 8px rgba(255, 102, 82, 0.5);
}

.record-button[aria-pressed="true"] {
  border-color: rgba(255, 102, 82, 0.55);
  background: rgba(255, 102, 82, 0.08);
}

.record-button[aria-pressed="true"] .record-icon {
  border-radius: 2px;
}

.voice-status {
  min-height: 22px;
  color: #9dcaff;
  font-family: var(--mono);
  font-size: 10px;
}

.voice-card audio {
  width: 100%;
  margin-top: 12px;
}

.boundary-list {
  margin: 23px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: #8b96a3;
  text-align: left;
  font-size: 11px;
}

.boundary-list li {
  position: relative;
  padding-left: 17px;
}

.boundary-list li + li { margin-top: 7px; }
.boundary-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); }

.video-preview-card {
  display: flex;
  flex-direction: column;
}

.frame-guide {
  position: relative;
  width: min(56%, 230px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 140, 255, 0.4);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(43, 140, 255, 0.18), rgba(12, 14, 18, 0.2)),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.025) 12px 13px);
  box-shadow: inset 0 0 50px rgba(43, 140, 255, 0.08);
}

.frame-guide > span {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #96a2af;
  font-family: var(--mono);
  font-size: 9px;
}

.play-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #d6e9ff;
  background: rgba(8, 9, 11, 0.7);
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
}

.receipt-line + .receipt-line { margin-top: 0; }
.receipt-line span { color: #687482; }
.receipt-line strong { color: #b4c0cd; font-weight: 600; }

.studio-principles .principle {
  min-height: 190px;
}

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .studio-hero-grid,
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .launch-card { max-width: 580px; }
  .voice-card { min-height: 520px; }
  .frame-guide { width: min(48%, 220px); }
}

@media (max-width: 620px) {
  .preview-banner { align-items: flex-start; flex-wrap: wrap; }
  .studio-hero h1 { font-size: clamp(3rem, 16vw, 4.4rem); }
  .identity-panel { align-items: flex-start; flex-direction: column; }
  .identity-copy { min-width: 0; flex: none; }
  .google-signin-slot { min-width: 0; width: 100%; justify-content: flex-start; }
  .workspace-head { align-items: flex-start; flex-direction: column; padding: 21px 18px 17px; }
  .studio-tabs { padding-inline: 18px; }
  .studio-tabs button { min-width: 0; flex: 1; }
  .studio-panel { padding: 0 18px 20px; }
  .form-heading { flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .voice-card { min-height: 0; }
  .frame-guide { width: min(68%, 220px); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-card.is-recording .voice-orb span { animation: none; transform: scaleY(0.8); }
}

/* studio-music v1 */
.music-jobs { display: grid; gap: 10px; margin-top: 14px; }
.music-job { border: 1px solid rgba(57, 67, 83, .7); border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .03); }
.music-job .job-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.music-job .job-body { color: #a7b0bc; font-size: 14px; display: grid; gap: 8px; }
.music-job audio { width: 100%; }
.job-state { color: #f5f7fa; font-weight: 700; margin-right: 6px; }
.job-done { color: #2bd576; } .job-failed { color: #ff8a7a; }
.job-download { color: #7cc0ff; font-weight: 650; }
