/* ------------------------------------------------------------
   Song for You — premium design system
   Editorial typography, generous whitespace, restrained gold.
-------------------------------------------------------------*/

:root {
  --ink: #0a0b0d;
  --ink-soft: #2e3137;
  --ink-mute: #787c84;
  --ink-faint: #b6bac0;
  --line: #e9e7e1;
  --line-soft: #f0eee8;
  --bg: #f6f4ee;          /* warm ivory */
  --bg-deep: #ede9df;     /* slightly deeper for gradients */
  --card: #ffffff;
  --card-deep: #0a0b0d;   /* featured card */
  --accent-contrast: #ffffff;
  --gold: #b68b4c;
  --gold-soft: #d8b57d;
  --gold-faint: #f2e6cc;
  --shadow-sm: 0 1px 2px rgba(10, 11, 13, .04);
  --shadow-md: 0 6px 20px -8px rgba(10, 11, 13, .10);
  --shadow-lg: 0 40px 100px -30px rgba(10, 11, 13, .25),
               0 12px 30px -10px rgba(10, 11, 13, .10);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

/* [hidden] must win over display:flex/grid from our component rules. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* A very subtle radial warmth behind the hero — reads as "premium paper". */
  background-image:
    radial-gradient(1100px 500px at 50% -80px, rgba(182, 139, 76, .07), transparent 65%),
    radial-gradient(800px 500px at 85% 0, rgba(182, 139, 76, .04), transparent 60%);
  background-repeat: no-repeat;
}

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

::selection { background: var(--gold-faint); color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--gold);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(182, 139, 76, .12);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13.5px;
  color: var(--ink-mute);
}
.nav-links a { transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }

.nav-history {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.nav-history:hover { border-color: var(--ink); color: var(--ink); }
.nav-history svg { opacity: .8; }

.lang-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 0 4px;
  position: relative;
  cursor: pointer;
}
.lang-select select {
  appearance: none;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: inherit;
  padding: 6px 22px 6px 4px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%),
                    linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: right 10px top 55%, right 5px top 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-select select:focus { outline: none; color: var(--ink); }

/* ---------- Main layout ---------- */
main {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 24px 48px 80px;
}

.view { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 0 64px;
  position: relative;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 10.5px;
  color: var(--gold);
  margin: 0 0 24px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  width: 18px; height: 1px;
  background: var(--gold);
  opacity: .5;
}
.eyebrow.eyebrow--bare::before, .eyebrow.eyebrow--bare::after { display: none; }

.headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 auto 28px;
  max-width: 14ch;
  font-variation-settings: "opsz" 144;
}
.headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  font-variation-settings: "opsz" 144;
}

.sub {
  font-size: 18px;
  color: var(--ink-mute);
  max-width: 42ch;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.form {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.field { display: block; margin-bottom: 28px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.optional {
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-left: 4px;
}

.field input {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(10, 11, 13, .05);
}

.form-error {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fdf1f1;
  color: #a1242d;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* ---------- Chips (occasion) ---------- */
.field--chips {
  border: 0;
  padding: 0;
  margin: 0 0 28px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(10, 11, 13, .1);
}

/* ---------- Personalize (expandable note) ---------- */
.personalize {
  margin: 8px 0 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.personalize summary {
  list-style: none;
  padding: 20px 2px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--ink);
}
.personalize summary::-webkit-details-marker { display: none; }
.personalize summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--ink-mute);
  border-bottom: 1.5px solid var(--ink-mute);
  transform: rotate(45deg);
  transition: transform .25s var(--ease);
  margin-top: -4px;
}
.personalize[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.personalize summary > span:first-child { font-weight: 500; }
.personalize-hint {
  color: var(--ink-mute);
  font-size: 13px;
  margin-left: auto;
}
.field--note { position: relative; padding: 0 0 20px; }
.field--note textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
  min-height: 92px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field--note textarea::placeholder { color: var(--ink-faint); }
.field--note textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(10, 11, 13, .05);
}
.counter {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.sr-only {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Pricing ---------- */
.pricing { margin: 64px 0 0; }
.pricing-head { text-align: center; margin-bottom: 40px; }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 52px 36px 44px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #ddd6c4;
}

.plan-head { margin-bottom: 24px; }
.plan-name {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
.plan-sub {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13.5px;
}

.plan-price {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 64px;
  line-height: 1;
  margin: 8px 0 32px;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144;
}
.currency {
  font-size: 0.45em;
  vertical-align: top;
  margin-right: 2px;
  color: var(--ink-mute);
  font-weight: 400;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  font-size: 15px;
  color: var(--ink-soft);
}
.plan-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-list li:first-child { border-top: none; }
.plan-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
  flex-shrink: 0;
}

/* Featured plan — bigger, highlighted */
.plan--featured {
  transform: scale(1.035);
  background: linear-gradient(160deg, #15171a 0%, #0a0b0d 100%);
  color: #f0ece2;
  border-color: #0a0b0d;
  box-shadow: var(--shadow-lg);
}
.plan--featured:hover { transform: scale(1.035) translateY(-3px); border-color: #0a0b0d; }
.plan--featured .plan-sub { color: #9c9588; }
.plan--featured .plan-list { color: #c5bfb1; }
.plan--featured .plan-list li { border-top-color: rgba(255,255,255,.06); }
.plan--featured .plan-list li::before { background: var(--gold-soft); }
.plan--featured .currency { color: #9c9588; }

.badge {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #1a1404;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(182, 139, 76, .55);
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 16px 28px;
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  width: 100%;
}
.btn:active { transform: scale(0.98); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--accent-contrast);
}

.btn--primary {
  background: #f0ece2;
  color: #0a0b0d;
  font-weight: 600;
  padding: 18px 28px;
  font-size: 16px;
  position: relative;
  z-index: 1;
}
.btn--primary:hover {
  background: var(--gold);
  color: #1a1404;
}

.btn--center {
  max-width: 260px;
  margin: 48px auto 0;
  display: block;
}

/* ---------- How ---------- */
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 640px;
  margin: 128px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.how-step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-mute);
  font-size: 14px;
}
.how-step span {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.how-step p { margin: 0; }

/* ---------- Loading ---------- */
.view--loading {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader { text-align: center; }
.loading-title {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  margin: 36px 0 6px;
  font-weight: 300;
  letter-spacing: -0.015em;
}
.loading-sub { color: var(--ink-mute); margin: 0; font-size: 14px; }

/* Progress bar */
.progress-wrap {
  width: 260px;
  height: 4px;
  background: var(--surface-2, #eee);
  border-radius: 2px;
  margin: 28px auto 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold, #c9a84c), var(--ink, #1a1a1a));
  border-radius: 2px;
  transition: width 1s linear;
}
.progress-label {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 8px 0 0;
  min-height: 18px;
  letter-spacing: 0.01em;
}

.wave {
  display: inline-flex;
  gap: 6px;
  align-items: flex-end;
  height: 56px;
}
.wave span {
  width: 4px;
  height: 12px;
  background: linear-gradient(to top, var(--gold), var(--ink));
  border-radius: 2px;
  animation: wave 1.1s var(--ease) infinite;
}
.wave span:nth-child(2) { animation-delay: .1s; }
.wave span:nth-child(3) { animation-delay: .2s; }
.wave span:nth-child(4) { animation-delay: .3s; }
.wave span:nth-child(5) { animation-delay: .4s; }
@keyframes wave {
  0%, 100% { height: 12px; opacity: .4; }
  50%      { height: 44px; opacity: 1; }
}

/* ---------- Result ---------- */
.view--result {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: center;
}
.result-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 300;
  margin: 16px 0 8px;
  letter-spacing: -0.025em;
}
.result-styles {
  color: var(--ink-mute);
  margin: 0 0 44px;
  font-size: 15px;
}

.player-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-sm);
}

.player-card audio {
  width: 100%;
  display: block;
  border-radius: 999px;
}

.tier-chip {
  display: inline-block;
  margin: 20px 0 8px;
  padding: 6px 12px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
}
.tier-chip[data-tier="full"] {
  color: var(--gold);
  background: var(--gold-faint);
  border-color: #e6d5ae;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.action {
  appearance: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.action:hover:not(:disabled) {
  background: var(--ink);
  color: var(--accent-contrast);
  border-color: var(--ink);
}
.action:disabled {
  color: var(--ink-faint);
  cursor: not-allowed;
  background: #fafafa;
}

.download-hint {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
}
.download-hint strong { color: var(--ink); font-weight: 600; }
.linky {
  background: none;
  border: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0 2px;
}

/* ---------- Lyrics ---------- */
.lyrics-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 44px 44px;
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
  text-align: left;
  animation: fadeUp .4s var(--ease) both;
}
.lyrics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.lyrics-head .eyebrow { margin: 0; }
.lyrics-copy {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.lyrics-copy:hover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}
.lyrics-body {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 48;
}
.lyrics-section { margin-bottom: 32px; }
.lyrics-section:last-child { margin-bottom: 0; }
.lyrics-section-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
  font-weight: 500;
}
.lyrics-section.is-chorus {
  padding-left: 20px;
  border-left: 2px solid var(--gold);
}
.lyrics-section.is-chorus .lyrics-section-label {
  color: var(--gold);
}
.lyrics-line { display: block; }
.lyrics-line + .lyrics-line { margin-top: 2px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
  z-index: 40;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  padding: 40px 32px;
  color: var(--ink-mute);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0; }

/* ---------- Drawer (history) ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, .28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  animation: fadeIn .25s var(--ease) forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(480px, 100%);
  background: var(--bg);
  box-shadow: -30px 0 80px -20px rgba(10, 11, 13, .25);
  padding: 36px 36px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  animation: slideIn .35s var(--ease) forwards;
}
@keyframes slideIn { to { transform: none; } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.drawer-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0;
}
.drawer-close {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 38px; height: 38px;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.drawer-close:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.drawer-sub {
  color: var(--ink-mute);
  font-size: 13.5px;
  margin: 0 0 28px;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.history-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.history-item:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.history-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.history-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.015em;
}
.history-date {
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.history-meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.history-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.history-tag.is-gold {
  background: var(--gold-faint);
  color: var(--gold);
}
.history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.history-btn {
  appearance: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.history-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.history-btn.is-danger:hover { background: #a1242d; border-color: #a1242d; }
.history-empty {
  color: var(--ink-mute);
  font-size: 14px;
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav { padding: 20px 24px; gap: 12px; flex-wrap: wrap; }
  .nav-links { gap: 14px; font-size: 13px; }
  .nav-links a[href="#how"], .nav-links a[href="#pricing"] { display: none; }
  main { padding: 16px 24px 64px; }
  .hero { padding: 32px 0 48px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 28px; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-2px); }
  .how { grid-template-columns: 1fr; gap: 16px; margin-top: 88px; }
  .player-card { padding: 24px 20px; }
  .lyrics-card { padding: 28px 24px 32px; }
  .lyrics-body { font-size: 17.5px; }
  .drawer-panel { padding: 28px 24px 32px; }
}
