:root {
  --bg: #060912;
  --panel: rgba(14, 20, 35, 0.76);
  --panel-solid: #0d1424;
  --panel-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --muted: #95a2c4;
  --faint: #6b7a9d;
  --pink: #ff4fd8;
  --violet: #8b5cf6;
  --cyan: #4ce6e0;
  --green: #46e6a0;
  --amber: #ffc65c;
  --danger: #ff657f;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Inter", "Segoe UI", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(760px 520px at 92% 8%, rgba(255, 79, 216, 0.14), transparent 62%),
    radial-gradient(900px 700px at 50% 110%, rgba(76, 230, 224, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

.page-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.glow-a {
  width: 380px;
  height: 380px;
  top: 12%;
  left: -160px;
  background: rgba(139, 92, 246, 0.35);
}

.glow-b {
  width: 420px;
  height: 420px;
  top: 45%;
  right: -200px;
  background: rgba(255, 79, 216, 0.18);
}

.page-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.topbar,
.shell,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  color: var(--text);
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 79, 216, 0.2), rgba(139, 92, 246, 0.18), rgba(76, 230, 224, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  color: #ffd7f6;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand-copy .brand-version {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  vertical-align: 2px;
}

.brand-copy span {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 22, 0.6);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 198, 92, 0.12);
}

.status-pill.online .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(70, 230, 160, 0.14);
}

.status-pill.offline .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 101, 127, 0.14);
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.hero {
  padding: 56px 0 40px;
  max-width: 920px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.eyebrow.ready {
  color: var(--green);
}

.eyebrow.ready > span {
  background: var(--green);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(46px, 7.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, #ffb3f0 0%, var(--pink) 32%, var(--violet) 68%, var(--cyan) 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 28, 48, 0.78), rgba(11, 16, 29, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}

.tool-card {
  padding: 24px;
}

.url-field {
  margin: 14px 0 18px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 38px 22px;
  text-align: center;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(139, 92, 246, 0.12), transparent 70%),
    rgba(4, 7, 14, 0.38);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  cursor: pointer;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: rgba(76, 230, 224, 0.62);
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(76, 230, 224, 0.14), transparent 70%),
    rgba(5, 10, 20, 0.55);
}

.dropzone.dragover {
  transform: scale(1.005);
}

.drop-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffd7f6;
  background: linear-gradient(145deg, rgba(255, 79, 216, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.drop-icon svg {
  width: 30px;
  height: 30px;
}

.drop-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.drop-sub {
  margin-top: 4px;
  color: var(--faint);
  font-size: 12.5px;
}

.browse-btn {
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.browse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid rgba(76, 230, 224, 0.24);
  background: linear-gradient(90deg, rgba(76, 230, 224, 0.08), rgba(139, 92, 246, 0.08));
}

.file-preview-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(76, 230, 224, 0.12);
  color: var(--cyan);
}

.file-preview-icon svg {
  width: 22px;
  height: 22px;
}

.file-preview-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.file-preview-meta strong {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-meta span {
  color: var(--faint);
  font-size: 11.5px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.field label span {
  color: var(--faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background-color: rgba(4, 7, 14, 0.62);
  color: var(--text);
  outline: none;
  font-size: 13.5px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2395a2c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

select option {
  background: #0c1220;
  color: var(--text);
}

select option:disabled {
  color: var(--faint);
}

select:hover,
input[type="text"]:hover {
  border-color: var(--line-strong);
}

select:focus,
input[type="text"]:focus {
  border-color: rgba(255, 79, 216, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 79, 216, 0.1);
  background-color: rgba(6, 10, 18, 0.85);
}

select:disabled,
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field-hint {
  margin: 0;
  min-height: 30px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--faint);
}

.field-hint.warn {
  color: var(--amber);
}

.primary-btn {
  width: 100%;
  margin-top: 20px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(105deg, var(--pink), var(--violet) 62%, #6f7bff);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 38px rgba(255, 79, 216, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-btn svg {
  width: 19px;
  height: 19px;
  transition: transform 160ms ease;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 46px rgba(255, 79, 216, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.primary-btn:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-btn.busy .btn-label::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -1px;
}

.form-note {
  margin: 13px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 11.5px;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.side-card {
  padding: 22px;
}

.card-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mini-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.mini-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.mini-steps li > span {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--mono);
}

.mini-steps li strong {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.mini-steps li small {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.45;
}

.engine-status {
  display: grid;
  gap: 9px;
}

.engine-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
}

.engine-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: 0 0 7px;
}

.engine-row.available .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(70, 230, 160, 0.1);
}

.engine-row.unavailable .dot {
  background: #4a5572;
}

.engine-row .name {
  flex: 1;
  color: var(--muted);
}

.engine-row .tag {
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.engine-row.available .tag {
  color: var(--green);
}

.engine-skeleton {
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.side-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
}

.job-section,
.result-section {
  margin-top: 26px;
}

.job-card {
  padding: 26px;
}

.job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.job-heading {
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 198, 92, 0.1);
  border: 1px solid rgba(255, 198, 92, 0.22);
  color: var(--amber);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-badge.running {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b0ff;
}

.status-badge.completed {
  background: rgba(70, 230, 160, 0.1);
  border-color: rgba(70, 230, 160, 0.3);
  color: var(--green);
}

.status-badge.failed {
  background: rgba(255, 101, 127, 0.1);
  border-color: rgba(255, 101, 127, 0.3);
  color: var(--danger);
}

.job-head h2 {
  margin: 10px 0 2px;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}

.subtle {
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
}

.job-percent {
  flex: 0 0 auto;
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(105deg, #fff, #c7b5ff 50%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.bar {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.overall-bar {
  margin-top: 20px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--violet) 50%, var(--cyan));
  box-shadow: 0 0 18px rgba(255, 79, 216, 0.35);
  transition: width 350ms ease;
  position: relative;
  overflow: hidden;
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: translateX(-100%);
  animation: sweep 1.8s ease infinite;
}

.job-message {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  min-height: 20px;
}

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: 13px;
  border: 1px solid transparent;
  color: var(--faint);
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease;
}

.steps li.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.13), rgba(255, 79, 216, 0.06));
  border-color: rgba(139, 92, 246, 0.28);
  color: var(--text);
}

.steps li.completed {
  color: var(--muted);
}

.step-dot {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  transition: all 220ms ease;
}

.steps li.active .step-dot {
  border-color: transparent;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  box-shadow: 0 0 0 5px rgba(255, 79, 216, 0.1), 0 0 24px rgba(255, 79, 216, 0.3);
  animation: pulse 2s ease infinite;
}

.steps li.completed .step-dot {
  border-color: rgba(70, 230, 160, 0.35);
  background: rgba(70, 230, 160, 0.12);
  color: transparent;
  font-size: 0;
}

.steps li.completed .step-dot::after {
  content: "✓";
  font-size: 13px;
  color: var(--green);
}

.steps li.failed .step-dot {
  border-color: rgba(255, 101, 127, 0.4);
  background: rgba(255, 101, 127, 0.12);
  color: var(--danger);
}

.step-copy {
  min-width: 0;
}

.step-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.step-copy small {
  display: block;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.4;
}

.steps li.active .step-copy small {
  color: #b5a8e0;
}

.error-box {
  margin-top: 18px;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid rgba(255, 101, 127, 0.32);
  background: rgba(255, 101, 127, 0.07);
}

.error-box strong {
  color: var(--danger);
  font-size: 13px;
}

.error-box p {
  margin: 5px 0 12px;
  color: #ffc1cb;
  font-size: 12.5px;
  white-space: pre-wrap;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.26);
}

.result-card {
  padding: 28px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.result-head h2 {
  margin: 12px 0 10px;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.1;
  word-break: break-word;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
}

.meta-chip strong {
  color: var(--text);
  font-weight: 600;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.player-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.12));
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.player-head strong {
  display: block;
  font-size: 13.5px;
}

.player-head span {
  display: block;
  color: var(--faint);
  font-size: 11px;
}

.mini-link {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mini-link:hover {
  color: var(--text);
  border-color: rgba(255, 79, 216, 0.4);
  background: rgba(255, 79, 216, 0.08);
}

audio {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--pink);
  height: 40px;
}

.key-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}

.key-control label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.key-control select {
  width: auto;
  min-width: 150px;
  min-height: 36px;
  padding: 7px 34px 7px 11px;
  font-size: 12.5px;
}

.key-status {
  color: var(--faint);
  font-size: 11px;
}

.key-control.busy .key-status {
  color: var(--amber);
  animation: key-pulse 1.4s ease-in-out infinite;
}

@keyframes key-pulse {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .key-control.busy .key-status {
    animation: none;
  }
}

.lyrics-panel {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.stems-row {
  display: flex;
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.1));
}

.stems-row.warn {
  border-color: rgba(255, 198, 92, 0.45);
}

.stems-block {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.stems-note {
  margin: -6px 0 4px;
  font-size: 12px;
}

.stems-grid {
  margin-top: 14px;
}

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

.lyrics-head h3,
.downloads-block h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.lyrics-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(76, 230, 224, 0.24);
  background: rgba(76, 230, 224, 0.07);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.lyrics-tip {
  color: var(--faint);
  font-size: 11px;
}

.secondary-btn.small {
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 11.5px;
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn.compact {
  width: auto;
  margin-top: 0;
  min-height: 40px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 13px;
}

.lyrics-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.editor-intro {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.editor-intro strong {
  color: var(--text);
  font-weight: 600;
}

.mode-switch {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px;
  gap: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(4, 7, 14, 0.5);
}

.mode-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.active {
  background: rgba(255, 79, 216, 0.14);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 79, 216, 0.4);
}

.lyrics-search {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
}

.lyrics-search .secondary-btn {
  min-height: 44px;
}

.lyrics-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.lyrics-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.lyrics-result:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.lyrics-result.selected {
  border-color: rgba(255, 79, 216, 0.5);
  background: rgba(255, 79, 216, 0.08);
}

.lyrics-result strong {
  font-size: 13px;
  font-weight: 600;
}

.lyrics-result > span:not(.result-tag) {
  grid-column: 1;
  color: var(--faint);
  font-size: 11.5px;
}

.result-tag {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.result-tag.synced {
  border-color: rgba(76, 230, 224, 0.24);
  background: rgba(76, 230, 224, 0.07);
  color: var(--cyan);
}

textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background-color: rgba(4, 7, 14, 0.62);
  color: var(--text);
  font: 13px/1.6 var(--font);
  resize: vertical;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:hover {
  border-color: var(--line-strong);
}

textarea:focus {
  border-color: rgba(255, 79, 216, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 79, 216, 0.1);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
}

.check-row input {
  margin-top: 3px;
  accent-color: var(--pink);
}

.check-row strong {
  color: var(--text);
  font-weight: 600;
}

.check-row em {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 198, 92, 0.3);
  color: var(--amber);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lyrics-report {
  --tone: var(--green);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
  background: color-mix(in srgb, var(--tone) 6%, transparent);
  font-size: 12.5px;
}

.lyrics-report.partial {
  --tone: var(--amber);
}

.lyrics-report.poor {
  --tone: var(--danger);
}

.lyrics-report.replace {
  --tone: var(--cyan);
}

.report-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.report-score {
  flex: 0 0 auto;
  color: var(--tone);
  font-size: 28px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.report-head strong {
  display: block;
  color: var(--tone);
  font-size: 13.5px;
}

.report-head div span {
  display: block;
  color: var(--muted);
}

.report-hint {
  margin: 10px 0 0;
  color: var(--text);
}

.lyrics-report ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.lyrics-report details {
  margin-top: 10px;
}

.lyrics-report summary {
  color: var(--muted);
  cursor: pointer;
}

.report-lines {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.report-lines li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.report-lines li.weak {
  color: var(--amber);
}

.timing-tag {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.timing-tag.reference {
  color: var(--cyan);
}

.timing-tag.estimated {
  color: var(--amber);
}

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

.editor-actions .spacer {
  flex: 1 1 auto;
}

@media (max-width: 720px) {
  .lyrics-search {
    grid-template-columns: 1fr;
  }

  .report-lines li {
    grid-template-columns: 42px 1fr;
  }

  .timing-tag {
    grid-column: 2;
  }
}

.lyrics-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 8px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.lyrics-list::-webkit-scrollbar {
  width: 8px;
}

.lyrics-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.lyric-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.lyric-line:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.lyric-line.active {
  background: linear-gradient(90deg, rgba(255, 79, 216, 0.11), rgba(139, 92, 246, 0.09));
  border-color: rgba(255, 79, 216, 0.22);
  color: var(--text);
}

.lyric-time {
  flex: 0 0 50px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.lyric-line.active .lyric-time {
  color: var(--pink);
}

.lyric-text {
  flex: 1;
}

.word {
  opacity: 0.62;
  transition: opacity 120ms linear, color 120ms linear, text-shadow 120ms linear;
}

.lyric-line.active .word {
  opacity: 0.8;
}

.lyric-line.active .word.sung {
  opacity: 1;
  color: #fff;
}

.lyric-line.active .word.current {
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 79, 216, 0.7);
}

.downloads-block {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.download-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}

.download-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.download-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(76, 230, 224, 0.32);
  background: rgba(76, 230, 224, 0.05);
}

.download-tile .dl-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b0ff;
}

.download-tile .dl-icon svg {
  width: 17px;
  height: 17px;
}

.download-tile .dl-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.download-tile .dl-copy strong {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-tile .dl-copy span {
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.warning-box {
  margin-top: 22px;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid rgba(255, 198, 92, 0.24);
  background: rgba(255, 198, 92, 0.06);
}

.warning-box strong {
  color: var(--amber);
  font-size: 12.5px;
}

.warning-box ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: #ffe0a8;
  font-size: 12px;
}

.warning-box li + li {
  margin-top: 5px;
}

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

.feature-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--cyan);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.feature-card p {
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.55;
}

.footer {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px 38px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-size: 11px;
}

.footer span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.footer .app-version {
  margin-left: 6px;
  color: var(--faint);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  transform: translate(-50%, 20px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 101, 127, 0.35);
  background: rgba(30, 12, 20, 0.94);
  color: #ffc1cb;
  font-size: 12.5px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.success {
  border-color: rgba(70, 230, 160, 0.35);
  background: rgba(10, 30, 23, 0.94);
  color: #b8f5d9;
}

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

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  55%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(255, 79, 216, 0.09), 0 0 22px rgba(255, 79, 216, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 79, 216, 0.04), 0 0 30px rgba(255, 79, 216, 0.34);
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar {
    padding-top: 18px;
  }

  .shell {
    padding: 0 16px 56px;
  }

  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 38px 0 30px;
  }

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

  .tool-card,
  .result-card,
  .job-card {
    padding: 18px;
  }

  .dropzone {
    padding: 30px 16px;
  }

  .form-grid,
  .player-grid,
  .features,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .features {
    margin-top: 32px;
  }

  .job-head,
  .result-head,
  .lyrics-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-percent {
    font-size: 34px;
  }

  .lyrics-tip {
    display: none;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .brand-copy span {
    display: none;
  }

  .status-pill {
    padding: 7px 10px;
    font-size: 11px;
  }

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

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

  .steps li {
    padding: 10px;
  }

  .step-copy small {
    display: none;
  }
}

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

.tags-panel {
  --tone: var(--green);
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
  background: color-mix(in srgb, var(--tone) 5%, transparent);
}
.tags-panel.review {
  --tone: var(--amber);
}
.tags-panel .tag-badge {
  border-color: color-mix(in srgb, var(--tone) 40%, transparent);
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
}
.tags-note {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.tags-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
}
.tags-form .secondary-btn {
  min-height: 44px;
}
.tag-suggestions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.tag-suggestions button {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tag-suggestions button:hover {
  background: color-mix(in srgb, var(--tone) 12%, transparent);
}
@media (max-width: 640px) {
  .tags-form {
    grid-template-columns: 1fr;
  }
}
