@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@800&family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./assets/kinetic-fonts/CormorantGaramond-SemiBoldItalic.ttf");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/kinetic-fonts/BarlowCondensed-SemiBold.ttf");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #111114;
  --panel-2: #17171b;
  --line: rgba(255, 255, 255, 0.11);
  --muted: #9797a1;
  --text: #f7f7f5;
  --lime: #d9ff66;
  --cyan: #54e8ff;
  --coral: #ff5c7c;
  --radius: 24px;
  font-family: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 5%, rgba(84, 232, 255, 0.08), transparent 25rem),
    radial-gradient(circle at 90% 90%, rgba(255, 92, 124, 0.07), transparent 28rem),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
label,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.topbar {
  width: min(1420px, calc(100% - 48px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.brand-mark i {
  width: 2px;
  border-radius: 2px;
  background: var(--lime);
}

.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand-mark i:nth-child(4) { height: 6px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b9b9c2;
  font-size: 0.8rem;
  font-weight: 600;
}

.privacy-pill svg {
  width: 17px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto;
}

.upload-view {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  align-items: center;
  column-gap: clamp(48px, 8vw, 140px);
  padding: 80px clamp(0px, 3vw, 40px) 100px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--lime);
  font: 500 0.72rem/1 "DM Mono", monospace;
  letter-spacing: 0.18em;
}

.upload-copy h1 {
  margin: 0;
  max-width: 790px;
  font-size: clamp(3.6rem, 7.2vw, 7.6rem);
  line-height: 0.91;
  letter-spacing: -0.075em;
  font-weight: 700;
}

.upload-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.58);
}

.lead {
  max-width: 580px;
  margin: 34px 0 0;
  color: #aaaab4;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.drop-zone {
  position: relative;
  min-height: 430px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, rgba(84, 232, 255, 0.5), rgba(255, 255, 255, 0.03), rgba(255, 92, 124, 0.46)) border-box;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.drop-zone::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 21px;
  pointer-events: none;
}

.drop-zone:focus-within,
.drop-zone.dragging {
  transform: translateY(-4px);
  outline: none;
  border-color: rgba(217, 255, 102, 0.65);
  background:
    linear-gradient(#151519, #151519) padding-box,
    linear-gradient(135deg, var(--cyan), var(--lime), var(--coral)) border-box;
}

.drop-zone .native-audio-input {
  position: relative;
  z-index: 4;
  width: 198px;
  max-width: 100%;
  height: 52px;
  margin-top: 25px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: transparent;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.drop-zone .native-audio-input::file-selector-button,
.drop-zone .native-audio-input::-webkit-file-upload-button {
  width: 198px;
  max-width: 100%;
  height: 52px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  color: #10110d;
  background: var(--lime);
  cursor: pointer;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.drop-zone .native-audio-input:focus-visible {
  outline: 3px solid rgba(84, 232, 255, 0.55);
  outline-offset: 4px;
}

.upload-icon {
  width: 74px;
  height: 74px;
  margin-bottom: 30px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #111;
  background: var(--lime);
  box-shadow: 0 0 60px rgba(217, 255, 102, 0.18);
}

.upload-icon svg {
  width: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.drop-subtitle {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.95rem;
}

.mobile-file-tip {
  display: none;
}

.resume-project-button {
  position: relative;
  z-index: 4;
  max-width: 100%;
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.resume-project-button:hover,
.resume-project-button:focus-visible {
  color: var(--lime);
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.browser-notice {
  position: relative;
  z-index: 5;
  width: min(100%, 370px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-zone.webview-blocked > :not(.browser-notice) {
  display: none !important;
}

.browser-notice-icon {
  width: 66px;
  height: 66px;
  margin-bottom: 23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84, 232, 255, 0.28);
  border-radius: 21px;
  color: var(--cyan);
  background: rgba(84, 232, 255, 0.08);
}

.browser-notice-icon svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.browser-notice p {
  margin: 12px 0 24px;
  color: #92929c;
  font-size: 0.9rem;
  line-height: 1.55;
}

.safari-button,
.primary-action {
  min-height: 52px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  color: #10110d;
  background: var(--lime);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.copy-link-button {
  margin-top: 15px;
  padding: 6px 10px;
  border: 0;
  color: #a4a4ad;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.flow-note {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #777780;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flow-note span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-note b {
  color: #bdbdc4;
  font: 500 0.68rem "DM Mono", monospace;
}

.flow-note i {
  width: 50px;
  height: 1px;
  background: var(--line);
}

.studio-view {
  padding: 42px 0 80px;
}

.studio-heading {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.studio-heading .eyebrow {
  margin-bottom: 10px;
}

.studio-heading h1 {
  margin: 0;
  max-width: min(70vw, 820px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.project-artist {
  margin: 7px 0 0;
  color: #898993;
  font-size: 0.9rem;
  font-weight: 600;
}

.ghost-button {
  min-height: 44px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #c6c6ce;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-weight: 650;
  font-size: 0.85rem;
}

.ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

.ghost-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(400px, 1.05fr);
  min-height: 740px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}

.preview-panel {
  min-width: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #0c0c0f;
  background-size: 30px 30px;
}

.preview-shell {
  width: min(100%, 354px);
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: #050506;
  box-shadow: 0 32px 65px rgba(0, 0, 0, 0.55);
  transition: width 220ms ease, aspect-ratio 220ms ease;
}

.preview-shell.square {
  width: min(100%, 500px);
  aspect-ratio: 1;
}

.preview-shell.wide {
  width: min(100%, 590px);
  aspect-ratio: 16 / 9;
}

#videoCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.source-video {
  display: none;
}

.transport {
  width: min(100%, 590px);
  margin-top: 26px;
  display: grid;
  grid-template-columns: 42px 38px 1fr 38px;
  align-items: center;
  gap: 12px;
  color: #83838d;
  font: 500 0.69rem/1 "DM Mono", monospace;
}

.play-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #121214;
  background: var(--text);
  cursor: pointer;
}

.play-button svg {
  width: 19px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.play-button .pause-svg,
.play-button.playing .play-svg {
  display: none;
}

.play-button.playing .pause-svg {
  display: block;
  fill: none;
}

.seek-bar {
  --position: 0%;
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(to right, var(--lime) var(--position), rgba(255, 255, 255, 0.13) var(--position));
  cursor: pointer;
}

.seek-bar::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  appearance: none;
  border: 3px solid #0c0c0f;
  border-radius: 50%;
  background: var(--lime);
}

.seek-bar::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 3px solid #0c0c0f;
  border-radius: 50%;
  background: var(--lime);
}

.controls-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #121216;
}

.control-section {
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}

.control-section.first {
  padding-top: 32px;
}

.section-title-row {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title-row > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 0.96rem;
  letter-spacing: -0.015em;
}

.section-title-row > span,
.section-title-row div + span {
  color: #73737c;
  font: 400 0.68rem "DM Mono", monospace;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.format-btn {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #8d8d96;
  background: #17171b;
  cursor: pointer;
  font: 600 0.76rem "DM Mono", monospace;
}

.format-btn:hover {
  color: #c9c9d0;
  border-color: rgba(255, 255, 255, 0.23);
}

.format-btn.active {
  color: var(--text);
  border-color: rgba(217, 255, 102, 0.55);
  background: rgba(217, 255, 102, 0.07);
}

.ratio-icon {
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.ratio-icon.vertical { width: 9px; height: 16px; }
.ratio-icon.square { width: 13px; height: 13px; }
.ratio-icon.wide { width: 17px; height: 10px; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.theme-btn {
  padding: 0;
  border: 0;
  color: #86868f;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
}

.theme-swatch {
  height: 52px;
  margin-bottom: 8px;
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #222;
}

.theme-btn.active {
  color: var(--text);
}

.theme-btn.active .theme-swatch {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px #121216, 0 0 0 3px rgba(217, 255, 102, 0.5);
}

.theme-swatch.electric {
  background: radial-gradient(circle at 25% 20%, #22426a, transparent 50%), radial-gradient(circle at 80% 80%, #5d1736, transparent 48%), #080911;
}

.theme-swatch.ember {
  background: radial-gradient(circle at 30% 90%, #fc733c, transparent 48%), radial-gradient(circle at 75% 20%, #8d1e46, transparent 50%), #150907;
}

.theme-swatch.mono {
  background: radial-gradient(circle at 65% 20%, #6a6a72, transparent 46%), linear-gradient(140deg, #070707, #232329);
}

.theme-swatch.kinetic {
  background: radial-gradient(circle at 75% 25%, #6d5ba9, transparent 42%), linear-gradient(145deg, #090c20, #211b39);
}

.theme-swatch.kinetic i {
  height: auto;
  width: auto;
  color: #e6e5fa;
  background: none;
  box-shadow: none;
  font: italic 600 1.25rem "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.05em;
  animation: swatch-kinetic 1.3s ease-in-out infinite alternate;
}

.theme-swatch.kinetic i::before { content: "TYPE"; }

@keyframes swatch-kinetic {
  from { transform: translate(-50%, -50%) scale(.9); letter-spacing: .16em; }
  to { transform: translate(-50%, -50%) scale(1.08); letter-spacing: .02em; }
}

.theme-swatch i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  height: 5px;
  border-radius: 9px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 9px 0 rgba(255, 255, 255, 0.18);
  animation: swatch-beat 1.15s ease-in-out infinite alternate;
}

.theme-swatch::before,
.theme-swatch::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.theme-swatch.electric::before {
  width: 22px;
  height: 22px;
  left: 11%;
  top: 13%;
  background: rgba(84, 232, 255, 0.52);
  box-shadow: 75px 24px 22px rgba(255, 92, 124, 0.58);
  filter: blur(5px);
  animation: swatch-drift 2.4s ease-in-out infinite alternate;
}

.theme-swatch.ember::before {
  inset: 10px 28%;
  border: 1px solid rgba(255, 209, 102, 0.46);
  animation: swatch-pulse 1.3s ease-out infinite;
}

.theme-swatch.mono::before {
  width: 52%;
  height: 30px;
  left: 24%;
  top: 11px;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.2) 0 2px, transparent 2px 7px);
  animation: swatch-beat 900ms ease-in-out infinite alternate-reverse;
}

@keyframes swatch-beat {
  to { transform: translate(-50%, -50%) scaleY(1.55); }
}

@keyframes swatch-drift {
  to { transform: translate(42px, 12px) scale(1.25); }
}

@keyframes swatch-pulse {
  from { transform: scale(0.7); opacity: 0.9; }
  to { transform: scale(1.6); opacity: 0; }
}

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

.background-video-status { margin: 10px 0 0; color: var(--cyan); font-size: 0.78rem; line-height: 1.5; }
.background-video-picker { min-height: 74px; padding: 12px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px dashed rgba(255, 255, 255, 0.17); border-radius: 13px; cursor: pointer; background: rgba(255, 255, 255, 0.025); }

.artwork-picker,
.generate-artwork-button,
.artwork-design-controls { margin-top: 16px; }
.artwork-mode { display: flex; gap: 4px; padding: 4px; border: 1px solid #303036; border-radius: 14px; background: #0c0c10; }
.artwork-mode button { flex: 1; min-height: 46px; padding: 10px 8px; border: 0; border-radius: 10px; color: #9999a3; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.artwork-mode button[aria-pressed="true"] { background: #262b1c; color: #ddff89; }
.artwork-design-summary { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: #a8a8b1; font-size: 12px; line-height: 1.6; }
.artwork-swatches { display: flex; flex-shrink: 0; padding-left: 3px; }
.artwork-swatches i { display: block; width: 18px; height: 18px; margin-left: -3px; border: 2px solid #161619; border-radius: 50%; }
.artwork-finetune { color: #a8a8b1; font-size: 13px; }
.artwork-finetune summary { width: fit-content; min-height: 44px; display: list-item; padding: 10px 0; cursor: pointer; }
.artwork-finetune label { display: block; margin: 10px 0 8px; }
.artwork-finetune select { width: 100%; min-height: 46px; border: 1px solid #37373f; border-radius: 10px; padding: 10px 12px; background: #1b1b20; color: #f5f5f7; font: inherit; font-size: 16px; }
.artwork-design-controls button:focus-visible, .artwork-finetune select:focus-visible, .artwork-finetune summary:focus-visible { outline: 2px solid #dbff68; outline-offset: 3px; }
.artwork-selected {
  min-height: 74px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px dashed rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  color: #d4d4da;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.artwork-picker:hover,
.generate-artwork-button:hover,
.artwork-input:focus-visible + .artwork-picker {
  border-color: rgba(217, 255, 102, 0.48);
  background: rgba(217, 255, 102, 0.045);
}

.artwork-add-icon,
.artwork-selected img {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(84, 232, 255, 0.08);
}

.artwork-add-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.artwork-picker > span:nth-child(2),
.generate-artwork-button > span:nth-child(2),
.artwork-selected > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.artwork-picker strong,
.generate-artwork-button strong,
.artwork-selected strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.artwork-picker small,
.generate-artwork-button small,
.artwork-selected small {
  color: #707079;
  font-size: 0.67rem;
}

.artwork-add {
  padding: 7px 10px;
  border-radius: 8px;
  color: #11120d;
  background: var(--lime);
  font-size: 0.68rem;
  font-weight: 800;
}

.generate-artwork-button {
  width: 100%;
  margin-top: 10px;
  color: #d4d4da;
  font-family: inherit;
  text-align: left;
}

.generate-artwork-button .artwork-add-icon {
  color: var(--lime);
  background: rgba(217, 255, 102, 0.07);
}

.generate-artwork-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.artwork-selected {
  border-style: solid;
  border-color: rgba(217, 255, 102, 0.22);
  cursor: default;
}

.artwork-selected img {
  object-fit: cover;
  background: #08080a;
}

.artwork-selected button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #9b9ba5;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.lyrics-section {
  min-height: 290px;
}

.draft-badge {
  padding: 4px 6px;
  border: 1px solid rgba(84, 232, 255, 0.25);
  border-radius: 5px;
  color: var(--cyan);
  background: rgba(84, 232, 255, 0.07);
  font: 500 0.56rem "DM Mono", monospace;
  letter-spacing: 0.08em;
}

.edit-help {
  margin: -7px 0 14px;
  color: #696972;
  font-size: 0.76rem;
}

.lyrics-title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.lyrics-section .section-title-row {
  flex-wrap: wrap;
  gap: 12px;
}

.add-lyric-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.add-lyric-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 255, 102, 0.35);
  border-radius: 8px;
  color: var(--lime);
  background: rgba(217, 255, 102, 0.06);
  font: 600 0.68rem "DM Mono", monospace;
  cursor: pointer;
}

.add-lyric-button:hover,
.add-lyric-button:focus-visible {
  border-color: var(--lime);
  background: rgba(217, 255, 102, 0.11);
}

.lyrics-list {
  height: 190px;
  padding-right: 6px;
  overflow-y: auto;
  scrollbar-color: #3a3a40 transparent;
  scrollbar-width: thin;
}

.lyric-row {
  min-height: 45px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 44px 32px;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.lyric-time-input {
  width: 100%;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  color: #5d5d66;
  background: transparent;
  font: 400 0.65rem "DM Mono", monospace;
}

.lyric-time-input:focus {
  border-color: rgba(217, 255, 102, 0.35);
  color: var(--lime);
  background: rgba(217, 255, 102, 0.05);
}

.lyric-input {
  width: 100%;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  outline: none;
  color: #c4c4ca;
  background: transparent;
  font-size: 0.85rem;
}

.lyric-input:hover {
  background: rgba(255, 255, 255, 0.025);
}

.lyric-input:focus {
  border-color: rgba(217, 255, 102, 0.3);
  color: var(--text);
  background: rgba(217, 255, 102, 0.04);
}

.lyric-row.active .lyric-time-input {
  color: var(--lime);
}

.lyric-row.active .lyric-input {
  color: var(--text);
}

.lyric-sync-button,
.lyric-remove-button {
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: #8b8b94;
  background: rgba(255, 255, 255, 0.025);
  font: 600 0.58rem "DM Mono", monospace;
  cursor: pointer;
}

.lyric-sync-button:hover,
.lyric-sync-button:focus-visible {
  border-color: rgba(84, 232, 255, 0.42);
  color: var(--cyan);
}

.lyric-remove-button {
  font: 400 1.05rem/1 sans-serif;
}

.lyric-remove-button:hover,
.lyric-remove-button:focus-visible {
  border-color: rgba(255, 120, 90, 0.42);
  color: #ff785a;
}

@media (max-width: 520px) {
  .lyrics-title-actions {
    gap: 7px;
  }

  .add-lyric-button {
    padding-inline: 8px;
  }

  .lyric-row {
    grid-template-columns: 58px minmax(0, 1fr) 42px 30px;
  }

  .lyric-input {
    padding-inline: 4px;
  }
}

.export-button {
  width: calc(100% - 64px);
  min-height: 66px;
  margin: 24px 32px 30px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 14px;
  color: #10110d;
  background: var(--lime);
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(217, 255, 102, 0.1);
  transition: transform 160ms ease, filter 160ms ease;
}

.export-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.export-button > span {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
}

.export-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.export-button small {
  color: rgba(16, 17, 13, 0.55);
  font: 500 0.63rem "DM Mono", monospace;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 6, 0.86);
  backdrop-filter: blur(18px);
}

.modal-card {
  width: min(100%, 490px);
  padding: 46px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #121216;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.55);
}

.modal-card .eyebrow {
  margin: 30px 0 13px;
}

.modal-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.045em;
}

.modal-card > p:not(.eyebrow) {
  min-height: 22px;
  margin: 12px 0 25px;
  color: #85858e;
  font-size: 0.9rem;
}

.selection-card .eyebrow {
  margin-top: 25px;
}

.selected-file-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #10110d;
  background: var(--lime);
}

.selected-file-icon svg {
  width: 35px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.selection-card .primary-action {
  width: 100%;
}

.selection-card {
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
}

.song-details-fields {
  margin: -2px 0 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.song-details-fields label {
  display: grid;
  gap: 7px;
  color: #d9d9de;
  font-size: 0.78rem;
  font-weight: 700;
}

.song-details-fields input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 0.82rem;
}

.song-details-fields input:focus {
  border-color: rgba(217, 255, 102, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 255, 102, 0.06);
}

.song-details-fields input::placeholder {
  color: #666670;
}

.lyrics-paste-field {
  margin: -2px 0 18px;
  display: block;
  text-align: left;
}

@media (max-width: 480px) {
  .song-details-fields {
    grid-template-columns: 1fr;
  }
}

.lyrics-paste-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d9d9de;
  font-size: 0.78rem;
  font-weight: 700;
}

.lyrics-paste-field b {
  padding: 3px 6px;
  border: 1px solid rgba(217, 255, 102, 0.25);
  border-radius: 5px;
  color: var(--lime);
  background: rgba(217, 255, 102, 0.07);
  font: 500 0.52rem "DM Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lyrics-paste-field textarea {
  width: 100%;
  min-height: 118px;
  margin-top: 9px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.8rem;
  line-height: 1.5;
}

.lyrics-paste-field textarea:focus {
  border-color: rgba(217, 255, 102, 0.55);
  box-shadow: 0 0 0 3px rgba(217, 255, 102, 0.06);
}

.lyrics-paste-field textarea::placeholder {
  color: #666670;
}

.lyrics-paste-field small {
  margin-top: 7px;
  display: block;
  color: #777780;
  font-size: 0.67rem;
  line-height: 1.45;
}

.selection-card .ghost-button {
  width: 100%;
  margin-top: 10px;
}

.processing-art {
  width: 116px;
  height: 116px;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
}

.record-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(217, 255, 102, 0.3);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.record-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(84, 232, 255, 0.18);
  border-bottom-color: var(--cyan);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
}

.wave-bars {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wave-bars i {
  width: 3px;
  border-radius: 6px;
  background: var(--text);
  animation: wave 780ms ease-in-out infinite alternate;
}

.wave-bars i:nth-child(1), .wave-bars i:nth-child(7) { height: 9px; animation-delay: -200ms; }
.wave-bars i:nth-child(2), .wave-bars i:nth-child(6) { height: 19px; animation-delay: -450ms; }
.wave-bars i:nth-child(3), .wave-bars i:nth-child(5) { height: 30px; animation-delay: -100ms; }
.wave-bars i:nth-child(4) { height: 36px; animation-delay: -320ms; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { to { transform: scaleY(0.35); opacity: 0.45; } }

.progress-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width 280ms ease;
}

#processingPercent,
#exportPercent {
  margin-top: 11px;
  display: block;
  color: #666670;
  font: 500 0.68rem "DM Mono", monospace;
}

.processing-eta {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: var(--text);
  font: 600 0.78rem "DM Mono", monospace;
  letter-spacing: -0.02em;
}

.modal-card > p.processing-resume-note {
  min-height: 0;
  margin: 20px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 255, 102, 0.16);
  border-radius: 10px;
  color: #9ea58d;
  background: rgba(217, 255, 102, 0.04);
  font-size: 0.72rem;
  line-height: 1.45;
}

.export-orbit {
  width: 116px;
  height: 116px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(217, 255, 102, 0.12);
  border-radius: 50%;
}

.export-orbit i {
  position: absolute;
  inset: -1px;
  border: 2px solid transparent;
  border-top-color: var(--lime);
  border-right-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.export-orbit span {
  color: var(--text);
  font: 600 0.8rem "DM Mono", monospace;
}

.export-card .ghost-button {
  margin-top: 22px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100% - 48px));
  padding: 16px 16px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid rgba(255, 92, 124, 0.3);
  border-radius: 14px;
  background: #181316;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.toast span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast strong {
  font-size: 0.85rem;
}

.toast small {
  color: #a58f96;
  font-size: 0.74rem;
}

.toast button {
  border: 0;
  color: #8e747c;
  background: none;
  cursor: pointer;
  font-size: 1.4rem;
}

@media (max-width: 920px) {
  .upload-view {
    grid-template-columns: 1fr;
    padding-top: 68px;
  }

  .upload-copy {
    text-align: center;
  }

  .upload-copy h1,
  .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .lead {
    margin-bottom: 44px;
  }

  .drop-zone {
    width: min(100%, 590px);
    min-height: 360px;
    margin: 0 auto;
  }

  .flow-note {
    justify-content: center;
  }

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

  .preview-panel {
    min-height: 680px;
  }

  .controls-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .topbar,
  main {
    width: min(100% - 28px, 1420px);
  }

  .topbar {
    height: 70px;
  }

  .privacy-pill {
    font-size: 0;
  }

  .privacy-pill svg {
    width: 20px;
  }

  .upload-view {
    min-height: calc(100vh - 70px);
    padding: 54px 0 60px;
  }

  .upload-copy h1 {
    font-size: clamp(3.25rem, 16vw, 5.1rem);
  }

  .lead {
    margin-top: 26px;
    font-size: 1rem;
  }

  .drop-zone {
    min-height: 320px;
    padding: 32px;
    border-radius: 24px;
  }

  .drop-zone::after {
    inset: 12px;
    border-radius: 16px;
  }

  .upload-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 23px;
    border-radius: 19px;
  }

  .mobile-file-tip {
    position: static;
    margin-top: 8px;
    display: block;
    color: #898992;
    font-size: 0.72rem;
  }

  .flow-note {
    margin-top: 42px;
    gap: 9px;
    font-size: 0.63rem;
  }

  .flow-note i {
    width: 16px;
  }

  .flow-note b {
    display: none;
  }

  .studio-view {
    padding-top: 28px;
  }

  .studio-heading {
    align-items: center;
  }

  .studio-heading .ghost-button {
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .studio-heading h1 {
    max-width: 65vw;
  }

  .studio-grid {
    border-radius: 20px;
  }

  .preview-panel {
    min-height: auto;
    padding: 26px 18px 22px;
  }

  .preview-shell {
    width: min(100%, 300px);
  }

  .preview-shell.square {
    width: min(100%, 340px);
  }

  .preview-shell.wide {
    width: min(100%, 390px);
  }

  .transport {
    grid-template-columns: 40px 34px 1fr 34px;
    gap: 8px;
  }

  .control-section {
    padding: 25px 20px;
  }

  .export-button {
    width: calc(100% - 40px);
    margin: 22px 20px 24px;
  }

  .modal-card {
    padding: 38px 24px;
    border-radius: 23px;
  }

  .selection-card {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .selection-card .selected-file-icon {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  .selection-card .eyebrow {
    margin-top: 18px;
  }

  .modal {
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
