/* Homepage-only batch input; shared article headers are unchanged. */
.downloader-page { --download-primary: linear-gradient(105deg, #00afd1, #6760f5 52%, #a344f5); --download-primary-hover: linear-gradient(105deg, #0bbbdc, #736bf8 52%, #ae52fb); }
.downloader-page :is(.batch-save-all, .batch-song-actions button) { -webkit-user-select: none; user-select: none; }
.song-batch-panel[hidden], .clear-song-links[hidden], .downloader-page .hero-input[hidden] { display: none; }
.header-actions { display: flex; align-items: center; gap: 28px; }
.daily-quota { position: relative; }
.daily-quota-button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid #3b3b50; border-radius: 999px; background: #15131e; color: #d4d1e4; font: inherit; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.daily-quota-button:hover, .daily-quota-button[aria-expanded="true"] { border-color: #ae8ddd; background: #211a30; }
.daily-quota-button[data-state="exhausted"] { border-color: #a17bc7; color: #ead6ff; }
.daily-quota-panel { position: absolute; right: 0; top: calc(100% + 14px); width: min(328px, calc(100vw - 32px)); padding: 22px; border: 1px solid #3c344b; border-radius: 18px; background: #15121c; color: #f6f4fa; box-shadow: 0 20px 70px #0009; }
.daily-quota-panel[hidden], .quota-status[hidden] { display: none; }
.daily-quota-panel h2 { margin: 0; font-size: 15px; font-weight: 500; }
.quota-balance { margin: 20px 0 12px; color: #b6b0c3; font-size: 14px; }
.quota-balance strong { color: #fff; font-size: 34px; font-weight: 500; font-variant-numeric: tabular-nums; }
.quota-meter { height: 5px; background: #302b3a; border-radius: 8px; overflow: hidden; }
.quota-meter span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #18bed9, #a665fa); }
.quota-status { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: #b6b0c3; }
/* Anchor both modes at the same height; shorter playlist content must not recenter the title. */
.downloader-page .hero-section { min-height: calc(100svh - 64px); justify-content: flex-start; padding-block: clamp(40px, calc((100svh - 780px) / 2), 128px); }
.downloader-page .hero-badge { margin-bottom: 22px; font-size: 12px; }
.downloader-page .hero-title { font-size: 56px; margin-bottom: 18px; }
.downloader-page .hero-description { font-size: 18px; line-height: 1.65; min-height: 2lh; display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.downloader-page .download-mode-switch { margin-bottom: 16px; }
.downloader-page .download-mode-tab { font-weight: 500; color: #a8a2b4; }
.downloader-page .download-mode-tab.active { color: #fff; }
.downloader-page :is(.download-mode-tab, .hero-form, .hero-form .hero-button) { transition: none; }
.downloader-page .hero-form[data-mode="single"] { display: flex; flex-direction: column; gap: 0; align-items: stretch; padding: 0; border-radius: 20px; border-color: #3c334a; background: #17131de8; overflow: hidden; box-shadow: 0 16px 60px #0003; text-align: left; }
.downloader-page .hero-form[data-mode="single"]:focus-within { border-color: #9365bf; box-shadow: 0 0 0 2px #a55de51c, 0 16px 60px #0003; }
.song-input-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; gap: 12px; }
.song-input-heading label { font-size: 13px; color: #e5dfec; font-weight: 500; }
.song-link-count { font-size: 12px; color: #bcb0c9; font-variant-numeric: tabular-nums; }
.song-link-count[data-over-limit="true"] { color: #ffa2af; }
.downloader-page .hero-form[data-mode="single"] .hero-input { min-height: 116px; max-height: 280px; resize: vertical; padding: 16px 22px; border-radius: 0; font: inherit; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.downloader-page .hero-form[data-mode="single"] .hero-input::placeholder { color: #9990a6; font-size: 16px; opacity: 1; }
.hero-form[data-mode="single"] .song-input-footer { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 22px; border-top: 1px solid #352b40; background: #ffffff03; }
.hero-form[data-mode="playlist"] .song-input-heading, .hero-form[data-mode="playlist"] #songInputTip, .hero-form[data-mode="playlist"] .clear-song-links, .hero-form[data-mode="single"] .playlist-input-icon { display: none; }
.hero-form[data-mode="playlist"] .song-input-footer { display: contents; }
.song-input-footer > span { margin-right: auto; color: #b8afc3; font-size: 12px; line-height: 1.5; }
.hero-form[data-mode="single"] .song-input-footer .hero-button { padding: 13px 20px; min-height: 48px; border-radius: 12px; font-weight: 700; font-size: 15px; line-height: 1.3; width: auto; background: var(--download-primary); box-shadow: 0 4px 18px #8b3df52e; }
.clear-song-links { border: 0; color: #d2c8dc; background: transparent; font: inherit; font-size: 12px; cursor: pointer; min-height: 44px; padding: 8px; }
.downloader-page .hero-form-helper { color: #a29aaa; font-size: 12px; }
.downloader-page .hero-features { margin-top: 25px; gap: 20px; }
.downloader-page .hero-feature { font-size: 12px; color: #b0a8bb; }
.song-batch-panel { margin-top: 24px; padding: 22px; text-align: left; border: 1px solid #39303e; border-radius: 20px; background: #121016; }
.song-batch-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.song-batch-heading > div:first-child { min-width: 0; }
.song-batch-heading h2 { font-size: 18px; font-weight: 500; margin: 0 0 5px; }
.song-batch-heading p { font-size: 12px; color: #aca2ba; margin: 0; }
.batch-save-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 10px; flex-shrink: 0; width: 306px; max-width: 100%; }
.batch-save-all { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; padding: 12px 10px; min-height: 46px; font: inherit; font-size: 13px; line-height: 1.3; font-weight: 700; white-space: nowrap; border-radius: 10px; border: 0; color: #392452; background: #eadfff border-box; cursor: pointer; transition: background-color .18s ease, box-shadow .18s ease; }
.batch-save-all:hover:not(:disabled) { background: #f5eeff; box-shadow: 0 3px 14px #c084fc26; }
.batch-save-all:disabled { color: #82778e; background: #211b29; cursor: not-allowed; }
.song-batch-list { list-style: none; margin: 0; padding: 0; }
.batch-song { display: flex; align-items: center; gap: 13px; padding: 16px 0; border-top: 1px solid #2d2634; }
.batch-song-cover { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(140deg, #39244c, #211b31); border: 1px solid #584067; }
.batch-song-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.batch-song-cover[data-placeholder="true"] img { padding: 0; object-fit: cover; }
.batch-song-duration { color: #c2b9cf; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; margin: 0 0 3px; }
.single-song-details { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; text-align: left; }
.batch-song-info { flex: 1; min-width: 0; }
.batch-song-title { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 500; color: #eee8f6; overflow-wrap: anywhere; }
.batch-song-status { margin: 0; color: #b3a8bf; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.batch-song[data-state="ready"] .batch-song-status { color: #95d7c1; }
.batch-song[data-state="error"] .batch-song-status, .batch-song-status[data-error="true"] { color: #f3a0ad; }
.batch-song-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex-shrink: 0; width: 306px; max-width: 100%; }
.batch-song-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 0; padding: 12px 10px; border-radius: 12px; border: 1px solid #635077; background: #211a2b; color: #f5f0ff; font: inherit; font-size: 14px; line-height: 1.3; font-weight: 700; white-space: nowrap; cursor: pointer; }
.batch-song-actions button[hidden] { display: none; }
.batch-song-actions .batch-retry { grid-column: 1 / -1; }
.batch-song-actions button:hover:not(:disabled) { background: #382649; border-color: #9e72c4; }
.batch-song-actions .batch-download-primary { width: 100%; background: var(--download-primary) border-box; border: 0; color: #fff; text-shadow: 0 1px 2px #163b6666; box-shadow: 0 4px 14px #8b3df526; }
.batch-song-actions .batch-download-secondary { background: #19151f; color: #f5f0ff; border-color: #635077; }
.downloader-page .download-result-btn--primary { background: var(--download-primary); }
.downloader-page :is(.batch-download-primary, .download-result-btn--primary):hover:not(:disabled), .hero-form[data-mode="single"] .song-input-footer .hero-button:hover:not(:disabled) { background: var(--download-primary-hover) border-box; border-color: transparent; filter: none; }
.batch-song-actions button:disabled { opacity: .45; cursor: not-allowed; }
@media(min-width: 1024px) and (min-height: 800px) {
  .downloader-page .hero-badge { font-size: 14px; margin-bottom: 24px; }
  .downloader-page .hero-title { font-size: 72px; margin-bottom: 24px; }
  .downloader-page .hero-description { font-size: 24px; line-height: 1.5; max-width: 800px; margin-bottom: 30px; }
  .downloader-page :is(.hero-form-wrap, .hero-form) { max-width: 880px; }
  .downloader-page .download-mode-tab { font-size: 16px; padding: 11px 22px; }
  .downloader-page .hero-form[data-mode="single"] .hero-input { font-size: 18px; }
  .downloader-page .hero-form .hero-button { font-size: 16px; min-height: 52px; }
  .downloader-page :is(.hero-form-helper, .hero-feature) { font-size: 14px; }
  .downloader-page .hero-features { gap: 28px; }
}
@media(max-width: 639px) {
  .header-actions { gap: 16px; }
  .daily-quota-button { padding: 0 10px; gap: 6px; font-size: 12px; min-height: 44px; }
  .downloader-page header { padding: 0 16px; }
  .downloader-page .header-nav { gap: 14px; }
  .downloader-page .header-nav a { font-size: 12px; }
  .downloader-page .hero-section { padding: 40px 18px 52px; }
  .downloader-page .hero-title { font-size: 43px; }
  .downloader-page .hero-description { font-size: 16px; min-height: 3lh; }
  .song-input-heading { padding: 17px 16px 0; }
  .downloader-page .hero-form[data-mode="single"] .hero-input { padding: 14px 16px; min-height: 132px; }
  .hero-form[data-mode="single"] .song-input-footer { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .song-input-footer > span { flex: 1; font-size: 11px; }
  .hero-form[data-mode="single"] .song-input-footer .hero-button { width: 100%; }
  .song-batch-panel { padding: 17px; }
  .song-batch-heading { flex-wrap: wrap; gap: 12px; }
  .batch-save-actions { width: 100%; }
  .batch-save-actions button { padding: 12px 6px; }
  .batch-song { flex-wrap: wrap; gap: 10px; }
  .batch-song-actions { width: 100%; padding-left: 0; }
  .batch-song-actions button { padding: 12px 6px; font-size: 13px; }
}
@media(max-width: 400px) { .downloader-page .header-nav a:first-child { display: none; } }
@media(max-width: 360px) {
  .downloader-page .hero-description { min-height: 4lh; }
  .song-batch-panel { padding: 14px; }
  .batch-save-actions, .batch-song-actions { gap: 8px; }
  .batch-save-actions button, .batch-song-actions button { font-size: 12px; }
}
@media(prefers-reduced-motion: reduce) {
  .downloader-page .hero-button-icon { transition: none; }
}

.batch-song[data-download-state="working"] .batch-song-status::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 1s linear infinite;
}
.batch-song[data-download-state="saved"] .batch-song-status::before {
  content: "✓";
  margin-right: 6px;
  color: #4ade80;
}
@media (prefers-reduced-motion: reduce) {
  .batch-song[data-download-state="working"] .batch-song-status::before { animation: none; }
}
