/* ── Scorer Page ── */
.scorer-page {
  min-height: calc(100vh - 80px);
  padding: 64px 48px 80px;
  max-width: 860px;
  margin: 0 auto;
}

.scorer-hero {
  margin-bottom: 48px;
}
.scorer-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 16px;
}
.scorer-hero h1 em { color: var(--accent); font-style: italic; }
.scorer-hero .lede {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Form ── */
.scorer-form {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-group label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.field-group input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}
.field-group input:focus { border-color: var(--accent); }
.field-group input::placeholder { color: var(--fg-muted); opacity: 0.5; }
.btn-score {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-score:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-score:active { transform: translateY(0); }

/* ── Score Card ── */
.score-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.track-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--fg);
  margin-bottom: 4px;
}
.track-artist {
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.score-tier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 100px;
}
.tier-high { background: rgba(232, 163, 23, 0.2); color: var(--accent); }
.tier-mid  { background: rgba(138, 130, 168, 0.15); color: var(--fg-muted); }
.tier-low  { background: rgba(138, 130, 168, 0.1); color: var(--fg-muted); opacity: 0.7; }

.score-number {
  font-family: var(--font-display);
  font-size: 7rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 4px;
}
.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.score-meter {
  height: 6px;
  background: rgba(240, 234, 248, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 40px;
}
.meter-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Breakdown ── */
.breakdown { display: flex; flex-direction: column; gap: 0; }
.breakdown-row {
  display: grid;
  grid-template-columns: 28px 1fr 140px 40px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.breakdown-row:first-child { border-top: 1px solid var(--border); }
.breakdown-icon { color: var(--accent); display: flex; align-items: center; }
.breakdown-info { display: flex; flex-direction: column; gap: 3px; }
.breakdown-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}
.breakdown-desc {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.breakdown-bar-wrap { display: flex; align-items: center; }
.breakdown-bar {
  flex: 1;
  height: 5px;
  background: rgba(240, 234, 248, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.breakdown-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.breakdown-score {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--fg);
  text-align: right;
}

/* ── Score Footer ── */
.score-footer {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.disclaimer {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-align: center;
  max-width: 480px;
  line-height: 1.6;
}
.btn-rescore {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-rescore:hover { border-color: var(--accent); color: var(--accent); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 0 32px;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.empty-waveform {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 64px;
  margin-bottom: 20px;
  opacity: 0.4;
}
.ew-bar {
  width: 6px;
  background: var(--accent);
  border-radius: 3px;
  animation: wave 1.6s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .scorer-page { padding: 40px 24px 60px; }
  .input-row { grid-template-columns: 1fr; gap: 12px; }
  .btn-score { width: 100%; }
  .score-number { font-size: 5rem; }
  .breakdown-row { grid-template-columns: 24px 1fr 100px 32px; gap: 10px; }
  .breakdown-desc { display: none; }
}