:root {
  --bg-dark: #0f1115;
  --bg-elevated: #141820;
  --panel-bg: #1a1d23;
  --accent: #fb7185;
  --accent-soft: #fda4af;
  --accent-glow: rgba(251, 113, 133, 0.28);
  --text-main: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --border: #2d333f;
  --radius: 14px;
  --radius-sm: 10px;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(ellipse 70% 46% at 50% -18%, rgba(251, 113, 133, 0.14), transparent),
    radial-gradient(ellipse 50% 36% at 100% 12%, rgba(251, 113, 133, 0.05), transparent);
}

.app-container {
  min-height: 100vh;
}

.main-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.app-header {
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(251, 113, 133, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.logo-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logo-title-row h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-title-row .accent {
  color: var(--accent);
}

.btn-to-dashboard {
  margin-left: auto;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
}

.header-tagline {
  margin: 10px 0 0;
  color: var(--text-dim);
  line-height: 1.55;
}

.agent-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.composer,
.opts-panel,
.stage {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-bg);
}

.list-head,
.pick-row,
.opt-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pick-row {
  margin: 10px 0 8px;
}

.composer-label,
.opt-label {
  font-size: 13px;
  font-weight: 700;
}

.list-meta,
.composer-hint,
.download-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.composer-hint {
  margin-bottom: 12px;
}

.composer-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.composer-status.is-error {
  color: #fda4af;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.track-extras {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding-top: 6px;
}

.track-extra-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.track-extra-label input[type="number"] {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text-main);
  padding: 0 8px;
}

.vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vol-row input[type="number"] {
  width: 5.5rem;
  min-width: 4.5rem;
  flex: 1;
}

.vol-val {
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
}

.track-idx {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-soft);
}

.track-name {
  font-size: 13px;
  word-break: break-all;
}

.track-ops {
  display: flex;
  gap: 4px;
}

.track-ops button {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.opts-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.opts-title {
  margin: 4px 0 6px;
  font-size: 18px;
}

.opts-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.opts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.opt-card--wide {
  grid-column: 1 / -1;
}

.opt-select,
input[type="range"] {
  width: 100%;
  margin-top: 8px;
}

.opt-select {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text-main);
  padding: 0 10px;
}

.range-val {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 13px;
}

.btn-primary,
.btn-ghost {
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  border: 0;
  background: var(--accent);
  color: #1a1012;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
}

.btn-wide {
  width: 100%;
}

.btn-primary:disabled,
.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.progress {
  margin-top: 14px;
}

.progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-dark);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
}

.result-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
}

.editor-ad {
  margin: 22px 0;
  min-height: var(--itz-ad-height, 90px);
}

@media (max-width: 720px) {
  .opts-grid,
  .track-extras {
    grid-template-columns: 1fr;
  }
}
