:root {
  --bg: #070708;
  --bg-soft: #0d0d0f;
  --panel: rgba(20, 20, 23, 0.74);
  --panel-solid: #141417;
  --panel-2: #1b1b1f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f6f7;
  --muted: #a5a5ae;
  --muted-2: #77777f;
  --green: #1ed760;
  --green-2: #1fdf64;
  --green-dim: rgba(30, 215, 96, 0.12);
  --danger: #ff5d64;
  --warning: #ffcc66;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::selection {
  background: rgba(30, 215, 96, 0.3);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.ambient-one {
  width: 58vw;
  height: 58vw;
  top: -34vw;
  left: -16vw;
  background: #1ed760;
  opacity: 0.15;
}

.ambient-two {
  width: 52vw;
  height: 52vw;
  top: 6vw;
  right: -26vw;
  background: #6d4aff;
  opacity: 0.12;
}

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

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

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 8, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  padding-bottom: 10px;
  box-shadow: 0 0 34px rgba(30, 215, 96, 0.28);
  flex: 0 0 auto;
}

.brand-mark i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #041006;
  transform-origin: bottom;
  animation: equalizer 1.15s ease-in-out infinite;
}

.brand-mark i:nth-child(1) { height: 7px; animation-delay: -0.3s; }
.brand-mark i:nth-child(2) { height: 12px; animation-delay: -0.1s; }
.brand-mark i:nth-child(3) { height: 16px; animation-delay: -0.45s; }
.brand-mark i:nth-child(4) { height: 9px; animation-delay: -0.2s; }

@keyframes equalizer {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.18); }
}

.brand-small {
  font-size: 1rem;
  gap: 8px;
}

.brand-small .brand-mark {
  width: 28px;
  height: 28px;
  padding-bottom: 7px;
  gap: 2px;
}

.brand-small .brand-mark i:nth-child(1) { height: 5px; }
.brand-small .brand-mark i:nth-child(2) { height: 9px; }
.brand-small .brand-mark i:nth-child(3) { height: 12px; }
.brand-small .brand-mark i:nth-child(4) { height: 7px; }

.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.topnav a:hover {
  color: var(--text);
}

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

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(30, 215, 96, 0.7);
}

.status-pill.is-warn .status-dot {
  background: var(--warning);
  box-shadow: 0 0 10px rgba(255, 204, 102, 0.6);
}

.status-pill.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 93, 100, 0.6);
}

/* ------------------------------------------------------------------ hero */
.hero {
  padding: 92px 0 26px;
  text-align: center;
}

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

.hero > .eyebrow {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(30, 215, 96, 0.5);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 215, 96, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(30, 215, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 215, 96, 0); }
}

.hero h1 {
  margin: 26px 0 20px;
  font-size: clamp(2.7rem, 6.4vw, 5.15rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(100deg, #ffffff 0%, #c5ffd8 28%, #1ed760 62%, #9dffbd 100%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 7s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------------- search */
.search-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(860px, 100%);
  margin: 38px auto 0;
  padding: 10px 10px 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 30, 34, 0.94), rgba(15, 15, 17, 0.94));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-card:focus-within {
  border-color: rgba(30, 215, 96, 0.55);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.6),
    0 0 0 4px rgba(30, 215, 96, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--muted-2);
  flex: 0 0 auto;
}

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

.search-card input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
}

.search-card input::placeholder {
  color: var(--muted-2);
}

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.paste-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.paste-btn svg {
  width: 17px;
  height: 17px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn-primary {
  color: #041006;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  box-shadow: 0 10px 28px rgba(30, 215, 96, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(30, 215, 96, 0.28);
  filter: brightness(1.04);
}

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

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

.btn-small {
  padding: 9px 12px;
  font-size: 12px;
}

.btn.is-disabled,
.btn:disabled {
  opacity: 0.42;
  pointer-events: none;
  box-shadow: none;
}

.resolve-btn {
  flex: 0 0 auto;
  min-width: 116px;
  padding: 14px 20px;
  border-radius: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 16, 6, 0.22);
  border-top-color: #041006;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.examples {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.examples-label {
  margin-right: 2px;
}

.examples button {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.examples button:hover {
  color: var(--green);
  border-color: rgba(30, 215, 96, 0.35);
  background: rgba(30, 215, 96, 0.06);
}

.form-error {
  width: min(860px, 100%);
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 93, 100, 0.28);
  border-radius: 12px;
  background: rgba(255, 93, 100, 0.09);
  color: #ffb6ba;
  font-size: 13.5px;
  text-align: left;
}

/* -------------------------------------------------------------- features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 56px;
  text-align: left;
}

.feature {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: rgba(30, 215, 96, 0.24);
  transform: translateY(-2px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green);
}

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

.feature h3 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

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

/* ------------------------------------------------------------- collection */
.result-section {
  margin-top: 42px;
  scroll-margin-top: 92px;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.collection-card {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0% 0%, rgba(30, 215, 96, 0.09), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(109, 74, 255, 0.08), transparent 40%),
    linear-gradient(135deg, rgba(28, 28, 32, 0.92), rgba(12, 12, 14, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cover-shell {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  align-self: center;
}

.cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 25%, rgba(30, 215, 96, 0.35), transparent 45%),
    linear-gradient(135deg, #26262d, #111114);
  color: rgba(255, 255, 255, 0.35);
  z-index: 2;
}

.cover-placeholder svg {
  width: 44px;
  height: 44px;
}

#collection-cover {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.52);
  background: #17171b;
}

.cover-glow {
  position: absolute;
  z-index: 1;
  inset: 14% -10% -14% 10%;
  border-radius: 36px;
  background-image: var(--cover-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.25);
  opacity: 0.5;
  pointer-events: none;
}

.collection-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.collection-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}

.source-badge svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.collection-body h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.collection-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.collection-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.collection-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.collection-meta svg {
  width: 14px;
  height: 14px;
}

.source-note {
  margin: 14px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(255, 204, 102, 0.22);
  border-radius: 10px;
  background: rgba(255, 204, 102, 0.07);
  color: #ffe0a3;
  font-size: 12.5px;
  line-height: 1.5;
}

.quality-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.quality-select select {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
}

.quality-select select option {
  background: var(--panel-solid);
  color: var(--text);
}

.track-alt-list {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 204, 102, 0.22);
  border-radius: 10px;
  background: rgba(255, 204, 102, 0.06);
  display: grid;
  gap: 6px;
  font-size: 12.5px;
}

.alt-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alt-info {
  display: flex;
  flex-direction: column;
}

.alt-title {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alt-artist {
  color: var(--muted-2);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alt-duration {
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
}

.collection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.selection-hint {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---------------------------------------------------------------- tracks */
.tracks-card {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.tracks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 12.5px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  flex: 0 0 auto;
}

.tracks-count {
  color: var(--muted-2);
}

.track-list {
  display: flex;
  flex-direction: column;
}

.track {
  display: grid;
  grid-template-columns: 16px 26px 40px minmax(0, 1fr) 68px 38px;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.14s ease;
}

.track .track-alt-list {
  grid-column: 1 / -1;
}

.track:last-child {
  border-bottom: 0;
}

.track:hover {
  background: rgba(255, 255, 255, 0.032);
}

.track.is-selected {
  background: rgba(30, 215, 96, 0.042);
}

.track-index {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  justify-self: center;
}

.track-index .play {
  display: none;
  width: 14px;
  height: 14px;
  color: var(--text);
}

.track:hover .track-index .num {
  display: none;
}

.track:hover .track-index .play {
  display: block;
}

.track-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #1b1b20;
  background-image: var(--thumb, none);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.track-cover.is-empty {
  background-image:
    radial-gradient(circle at 30% 25%, rgba(30, 215, 96, 0.25), transparent 45%),
    linear-gradient(135deg, #25252b, #141417);
}

.track-main {
  min-width: 0;
}

.track-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-artist {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explicit-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  margin-left: 6px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  vertical-align: 1px;
}

.track-duration {
  color: var(--muted-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--green);
  background: var(--green-dim);
  border-color: rgba(30, 215, 96, 0.18);
}

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

.icon-btn.is-done {
  color: var(--green);
}

.icon-btn.is-error {
  color: var(--danger);
}

.icon-btn .spinner {
  width: 15px;
  height: 15px;
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: var(--green);
}

.limit-note {
  margin: 12px 4px 0;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------- job */
.job-section {
  margin-top: 26px;
  scroll-margin-top: 92px;
  animation: rise 0.4s ease both;
}

.job-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 215, 96, 0.07), transparent 40%),
    var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

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

.job-head h3 {
  margin: 6px 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.job-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.job-status.is-running {
  background: rgba(30, 215, 96, 0.1);
  color: var(--green);
}

.job-status.is-done {
  background: rgba(30, 215, 96, 0.14);
  color: var(--green);
}

.job-status.is-partial {
  background: rgba(255, 204, 102, 0.1);
  color: var(--warning);
}

.job-status.is-error {
  background: rgba(255, 93, 100, 0.1);
  color: var(--danger);
}

.progress-track {
  position: relative;
  height: 8px;
  margin-top: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  overflow: hidden;
}

.progress-fill {
  position: relative;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #8cffb0);
  transition: width 0.45s ease;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.7s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.job-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.job-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 330px;
  margin-top: 16px;
  padding-right: 4px;
  overflow-y: auto;
}

.job-track {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.job-track-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
}

.job-track-icon svg {
  width: 13px;
  height: 13px;
}

.job-track-icon .spinner {
  width: 13px;
  height: 13px;
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: var(--green);
}

.job-track.is-done .job-track-icon {
  background: var(--green-dim);
  color: var(--green);
}

.job-track.is-error .job-track-icon {
  background: rgba(255, 93, 100, 0.1);
  color: var(--danger);
}

.job-track-main {
  min-width: 0;
}

.job-track-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-track-sub {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-track.is-error .job-track-sub {
  color: rgba(255, 93, 100, 0.78);
}

.job-track-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-track-state {
  color: var(--muted-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.job-track.is-done .job-track-state {
  color: var(--green);
}

.job-track.is-error .job-track-state {
  color: var(--danger);
}

.mini-download {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.mini-download:hover {
  color: var(--green);
  background: var(--green-dim);
}

.mini-download svg {
  width: 15px;
  height: 15px;
}

.job-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------- how */
.how-section {
  margin-top: 84px;
  scroll-margin-top: 92px;
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3.1vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

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

.step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.step-num {
  display: block;
  margin-bottom: 22px;
  color: rgba(30, 215, 96, 0.4);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.step h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* --------------------------------------------------------------- history */
.history-section {
  margin-top: 84px;
  scroll-margin-top: 92px;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
}

.history-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.history-card:hover {
  border-color: rgba(30, 215, 96, 0.3);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.history-cover {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: #1b1b20;
  background-image: var(--thumb, none);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

.history-cover.is-empty {
  background-image:
    radial-gradient(circle at 30% 25%, rgba(30, 215, 96, 0.25), transparent 45%),
    linear-gradient(135deg, #25252b, #141417);
}

.history-main {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.history-title {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-type {
  display: inline-flex;
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.empty-state {
  margin: 0;
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}

/* ---------------------------------------------------------------- footer */
.footer {
  margin-top: 84px;
  padding: 28px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-size: 12.5px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer p {
  margin: 0;
  text-align: right;
}

/* --------------------------------------------------------- selection bar */
.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(18, 18, 21, 0.93);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(-50%);
  animation: bar-in 0.22s ease both;
}

@keyframes bar-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.selection-info {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.selection-info strong {
  color: var(--text);
  font-size: 15px;
}

.selection-duration {
  color: var(--muted-2);
}

/* ---------------------------------------------------------------- toasts */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--green);
  border-radius: 11px;
  background: rgba(28, 28, 32, 0.97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  animation: toast-in 0.24s ease both;
  pointer-events: auto;
}

.toast.is-error {
  border-left-color: var(--danger);
}

.toast.is-warning {
  border-left-color: var(--warning);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* -------------------------------------------------------------- scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

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

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .topnav {
    display: none;
  }

  .collection-card {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
  }

  .cover-shell {
    max-width: 170px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1160px, calc(100% - 28px));
  }

  .hero {
    padding: 62px 0 20px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.4rem);
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .search-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 10px;
    gap: 6px;
  }

  .search-icon {
    margin-left: 6px;
  }

  .search-card input {
    width: 100%;
    padding: 12px 2px;
    font-size: 0.92rem;
  }

  .paste-btn {
    padding: 8px;
  }

  .paste-btn span {
    display: none;
  }

  .resolve-btn {
    min-width: 0;
    padding: 12px 16px;
  }

  .features,
  .steps {
    grid-template-columns: 1fr;
  }

  .features {
    margin-top: 38px;
  }

  .collection-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .cover-shell {
    width: 150px;
    max-width: 150px;
  }

  .collection-body h2 {
    font-size: 1.75rem;
  }

  .collection-actions {
    margin-top: 18px;
  }

  .track {
    grid-template-columns: 16px 22px 36px minmax(0, 1fr) 34px;
    gap: 9px;
    padding: 8px 14px;
  }

  .track-cover {
    width: 36px;
    height: 36px;
  }

  .track-duration {
    display: none;
  }

  .tracks-head {
    padding: 12px 14px;
  }

  .job-card {
    padding: 18px;
  }

  .job-head {
    flex-direction: column;
    gap: 10px;
  }

  .job-track {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px 10px;
  }

  .job-track-state {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer p {
    text-align: left;
  }

  .selection-bar {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
    gap: 12px;
    padding: 9px 9px 9px 16px;
    transform: none;
    animation-name: bar-in-mobile;
  }

  @keyframes bar-in-mobile {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .selection-bar .btn {
    padding: 11px 13px;
    font-size: 12.5px;
  }

  .toast-stack {
    right: 14px;
    bottom: 86px;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.15rem;
  }

  .status-pill {
    padding: 7px 9px;
  }

  .status-pill #health-text {
    display: none;
  }

  .hero > .eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .search-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .search-icon {
    display: none;
  }

  .resolve-btn {
    gap: 6px;
    padding: 12px;
  }

  .examples-label {
    width: 100%;
    text-align: center;
  }

  .collection-actions .btn {
    flex: 1 1 auto;
  }

  .selection-hint {
    width: 100%;
  }

  .selection-bar {
    gap: 8px;
  }

  .selection-info {
    font-size: 12px;
  }

  .selection-bar .btn span {
    display: none;
  }

  .selection-bar .btn {
    width: 42px;
    padding: 11px;
  }
}

@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;
  }
}
