/* Audio archive pages. Everything is scoped under .ap so it cannot touch the home page. */
.ap { padding-bottom: 7.5rem; }
.ap .ahead { padding-block: 1.4rem 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: end; justify-content: space-between; }
.ap .wzcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-bottom: 1.4rem; padding: 1rem 1.2rem; border: 1px solid color-mix(in srgb, var(--lamp) 50%, var(--line)); border-radius: 12px; background: var(--night-3); color: var(--moon); text-decoration: none; transition: border-color .2s, background .2s; }
.ap .wzcard:hover { border-color: var(--lamp); background: var(--night-2); }
.ap .wzcard .wi { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--lamp); color: var(--night); }
.ap .wzcard .wi svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.ap .wzcard .wt { display: grid; gap: 0.15rem; }
.ap .wzcard b { font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; }
.ap .wzcard small { color: var(--moon-dim); font-size: 0.92rem; }
.ap .wzcard .wa { color: var(--lamp); font-size: 1.4rem; }
html[data-lang="ur"] .ap .bi .wzcard .wa, [dir="rtl"] .ap .wzcard .wa { transform: scaleX(-1); }
.ap .ahead h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.ap .ahead p { color: var(--moon-dim); margin-top: 0.7rem; max-width: 36rem; }
.ap .abtn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; background: var(--lamp); color: var(--night); border: 0; text-decoration: none; padding: 0.7rem 1.2rem; border-radius: 8px; cursor: pointer; min-height: 2.75rem; transition: background .2s; }
.ap .abtn:hover { background: #ffc875; }
.ap .abtn.ghost { background: transparent; color: var(--moon); border: 1px solid var(--line); }
.ap .abtn.ghost:hover { border-color: var(--lamp); background: transparent; }

/* overview */
.ap .sec { font-size: 1.6rem; margin: 2.4rem 0 1rem; }
.ap .ygrid, .ap .clist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.ap .ygrid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.ap .clist { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.ap .ygrid a, .ap .clist a { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .2s, background .2s; min-height: 3.5rem; }
.ap .ygrid a:hover, .ap .clist a:hover { border-color: var(--lamp); background: var(--night-2); }
.ap .ygrid b { font-family: var(--f-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.ap .clist b { font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; }
.ap .ygrid a > span, .ap .clist a > span { color: var(--moon-dim); font-size: 0.85rem; }

/* list pages */
.ap .yrail { display: flex; gap: 0.5rem; overflow-x: auto; padding-block: 0.3rem 0.8rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; border-bottom: 1px solid var(--line); }
.ap .yrail a { flex: none; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--moon-dim); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.8rem; text-decoration: none; transition: all .2s; }
.ap .yrail a:hover { color: var(--moon); border-color: var(--moon-dim); }
.ap .yrail a[aria-current] { background: var(--lamp); border-color: var(--lamp); color: var(--night); font-weight: 600; }
.ap .tools { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 1.4rem; }
.ap .tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ap .tabs button { font: inherit; font-size: 0.95rem; color: var(--moon-dim); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 1rem; cursor: pointer; transition: all .2s; min-height: 2.5rem; }
.ap .tabs button:hover { color: var(--moon); }
.ap .tabs button[aria-pressed="true"] { background: var(--night-3); color: var(--lamp); border-color: var(--lamp); }
.ap .tabs b { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 0.3rem; color: var(--moon-dim); }
.ap .filter { flex: 0 1 18rem; min-width: 0; }
.ap .filter input { width: 100%; font: inherit; font-size: 0.95rem; color: var(--moon); background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; min-height: 2.75rem; }
.ap .filter input::placeholder { color: var(--moon-dim); }
.ap .filter input:focus { outline: none; border-color: var(--lamp); }
.ap .group { margin-top: 1.2rem; }
.ap .group h2 { font-size: 1.5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; padding-bottom: 0.7rem; }
.ap .group h2 small { font-family: var(--f-body); font-size: 0.92rem; font-weight: 400; color: var(--moon-dim); letter-spacing: 0; }
.ap .atracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ap .atracks li { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr) 8rem auto; gap: 0.2rem 1rem; align-items: center; padding: 0.6rem 0.3rem; border-bottom: 1px solid var(--line); transition: background .2s; cursor: pointer; }
.ap .atracks li:hover { background: var(--night-2); }
.ap .atracks li[aria-current="true"] { background: var(--night-3); }
.ap .pb { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--lamp); cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.ap .pb:hover, .ap li[aria-current="true"] .pb { background: var(--lamp); color: var(--night); border-color: var(--lamp); }
.ap .pb svg { width: 0.95rem; height: 0.95rem; fill: currentColor; }
.ap .tt { min-width: 0; }
.ap .tt b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.ap .tt span { color: var(--moon-dim); font-size: 0.85rem; font-weight: 300; opacity: .8; overflow-wrap: anywhere; }
.ap .dt { color: var(--moon-dim); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
/* Download and Share are two matching pills; Download is the main one, Share is the quieter one */
.ap .acts { justify-self: end; display: flex; align-items: center; gap: 0.8rem; }
.ap .dl, .ap .shr { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.4rem; padding: 0.35rem 1rem; border-radius: 999px; font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ap .dl { color: var(--lamp); background: transparent; border: 1px solid var(--lamp); }
.ap .shr { color: var(--moon); background: transparent; border: 1px solid var(--line); }
.ap .dl:hover { background: var(--lamp); color: var(--night); }
.ap .shr:hover { border-color: var(--moon-dim); background: var(--night-2); }
.ap .dl svg, .ap .shr svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ap .dl:focus-visible, .ap .shr:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.sharemenu { position: absolute; z-index: 60; display: grid; min-width: 12rem; padding: 0.3rem; background: var(--night-3); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.sharemenu a, .sharemenu button { font: inherit; font-size: 0.95rem; text-align: start; color: var(--moon); background: transparent; border: 0; padding: 0.6rem 0.8rem; border-radius: 6px; text-decoration: none; cursor: pointer; }
.sharemenu a:hover, .sharemenu button:hover { background: var(--night-2); }
.ap .empty { padding: 2rem 0; color: var(--moon-dim); }
.ap .empty b { color: var(--moon); }
.ap .note { margin-top: 2.5rem; color: var(--moon-dim); font-size: 0.9rem; }
.ap .note a { color: var(--lamp); }

/* docked player */
.ap .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--night-3); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ap .dock .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.4rem 1.2rem; align-items: center; padding-block: 0.8rem; }
.ap .aplay { width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 0; background: var(--lamp); color: var(--night); cursor: pointer; display: grid; place-items: center; transition: transform .2s; }
.ap .aplay:hover { transform: scale(1.06); }
.ap .aplay svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.ap .dock .meta { min-width: 0; }
.ap .dock .meta b { display: block; font-family: var(--f-display); font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap .dock .meta span { font-size: 0.85rem; color: var(--moon-dim); }
.ap .abar { grid-column: 1 / -1; height: 26px; display: flex; align-items: center; cursor: pointer; position: relative; direction: ltr; touch-action: none; }
.ap .abar::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; background: var(--line); border-radius: 4px; }
.ap .abar i { position: relative; display: block; height: 4px; width: 0; background: var(--lamp); border-radius: 4px; }
.ap .abar i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 4px transparent; transition: box-shadow .15s; }
.ap .abar:hover i::after, .ap .abar:focus-visible i::after, .ap .abar.drag i::after { box-shadow: 0 0 0 5px color-mix(in srgb, var(--lamp) 30%, transparent); }
.ap .abar:focus-visible { outline: none; }
.ap .times { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--moon-dim); font-variant-numeric: tabular-nums; margin-top: -0.2rem; }
.ap .ctl { display: flex; align-items: center; gap: 0.25rem; }
.ap .cb { min-width: 2.6rem; height: 2.6rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--moon); cursor: pointer; display: grid; place-items: center; font: inherit; transition: background .2s, color .2s; }
.ap .cb:hover { background: color-mix(in srgb, var(--lamp) 14%, transparent); color: var(--lamp); }
.ap .cb:focus-visible { outline: 2px solid var(--lamp); outline-offset: 1px; }
.ap .cb svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ap .cb.skip svg { width: 1.7rem; height: 1.7rem; stroke-width: 1.6; }
.ap .cb svg text { fill: currentColor; stroke: none; font: 700 7.5px/1 var(--f-body, sans-serif); }
.ap .cb.spd { border-radius: 999px; padding-inline: 0.7rem; border: 1px solid var(--line); font-size: 0.85rem; font-variant-numeric: tabular-nums; margin-inline-start: 0.4rem; }
.ap .cb.spd.on { color: var(--lamp); border-color: var(--lamp); }
.ap .aplay.wait { opacity: .65; }
.ap .dock .meta span.err { color: #d98a6a; }

@media (max-width: 760px) {
  .ap .atracks li { grid-template-columns: 2.9rem minmax(0, 1fr) auto; }
  .ap .atracks .dt { grid-column: 2; grid-row: 2; }
  .ap .atracks .acts { grid-column: 3; grid-row: 1 / span 2; gap: 0.5rem; }
  .ap .dl, .ap .shr { width: 2.5rem; height: 2.5rem; min-height: 0; padding: 0; }
  .ap .dl .lb, .ap .shr .lb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ap .filter { flex: 1 1 100%; }
  .ap .ahead h1 { font-size: 2.2rem; }
}
@media (max-width: 520px) {
  .ap .dock .wrap { grid-template-columns: auto minmax(0, 1fr); }
  .ap .tabs button { flex: 1 1 auto; text-align: center; }
  .ap .ygrid { grid-template-columns: repeat(3, 1fr); }
  .ap .ygrid span { display: none; }
}

/* phones: the docked player sits above the bottom tab bar */
@media (max-width: 600px) {
  .ap { padding-bottom: calc(7.5rem + var(--tabh, 0px)); }
  .ap .dock { bottom: var(--tabh, 0px); padding-bottom: 0; }
}

/* phone controls: elements that only exist for small screens */
.ap .fbtn { display: none; }

/* year: a dropdown on every screen size instead of a long scrolling rail of buttons */
.ap .yrail { display: none; }
.ap .ysel { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; max-width: 22rem; }
.ap .ysel label { color: var(--moon-dim); font-size: 0.95rem; }
.ap .ysel select { flex: 1; min-width: 0; font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--moon); background-color: var(--night-3); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 2.4rem 0.5rem 0.9rem; min-height: 2.75rem; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1rem; transition: border-color .2s; }
.ap .ysel select:hover, .ap .ysel select:focus-visible { border-color: var(--lamp); }
.ap .fpanel { display: contents; }

@media (max-width: 600px) {
  /* the "All years" button is a choice in the year select on phones */
  .ap .ahead .abtn { display: none; }
  .ap .ysel { max-width: none; }
  .ap .ahead { padding-block: 1rem 1rem; }
  .ap .ahead p { margin-top: 0.4rem; }

  /* group tabs and name filter: closed behind one row */
  .ap .tools { display: block; padding-block: 0 0.6rem; }
  .ap .fbtn { display: flex; width: 100%; justify-content: space-between; align-items: center; font: inherit; font-size: 1rem; color: var(--moon); background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; min-height: 2.75rem; cursor: pointer; text-align: left; }
  .ap .tools.open .fbtn { border-color: var(--lamp); }
  .ap .fpanel { display: none; margin-top: 0.6rem; }
  .ap .tools.open .fpanel { display: grid; gap: 0.6rem; }
  .ap .tabs { flex-direction: column; }
  .ap .tabs button { text-align: left; border-radius: 8px; display: flex; justify-content: space-between; }
  .ap .filter { flex: none; }

  /* player: one line when idle, two when playing */
  .ap .dock .wrap { grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.8rem; padding-block: 0.5rem; }
  .ap .aplay { width: 2.6rem; height: 2.6rem; }
  .ap .dock .meta b { font-size: 1rem; }
  .ap .dock .meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ap .dock .ctl { grid-column: 1 / -1; justify-content: space-between; order: 5; }
  .ap .dock .cb.spd { margin-inline-start: 0; }
  .ap .dock .times { font-size: 0.75rem; margin-top: -0.35rem; }
  .ap .dock.idle .abar, .ap .dock.idle .meta span, .ap .dock.idle .ctl, .ap .dock.idle .times { display: none; }
  .ap { padding-bottom: calc(10rem + var(--tabh, 0px)); }
}

@media (max-width: 600px) {
  .ap .tools.solo .fbtn { display: none; }
  .ap .tools.solo .fpanel { display: block; margin-top: 0; }
}
