/* Podcasts */
.app-podcasts { background: var(--surface); container-type: inline-size; }
.pc-split { min-height: 0; }
.pc-side { width: 224px; }
.pc-side-show { gap: 9px; }
.pc-side-show .pc-art { border-radius: 6px; }
.pc-main { position: relative; min-width: 0; }
.pc-toolbar { gap: 6px; }
.pc-back[hidden] { display: none; }
.pc-title { margin: 0 4px; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pc-search { flex: 0 1 280px; min-width: 140px; }
.pc-mtabs { display: none; }
.pc-content { flex: 1; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 12px; }

.pc-art { position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); }
.pc-art b { font-family: var(--font-display); font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.pc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.pc-art.has-img img { opacity: 1; }
.pc-art.has-img b { visibility: hidden; }

.pc-note { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px; background: rgba(var(--accent-rgb), .1); color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.pc-note .ic { color: var(--accent); flex: 0 0 auto; }
.pc-note.warn { background: rgba(245, 165, 36, .14); }
.pc-note.warn .ic { color: #d48806; }
.pc-head-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.pc-head-row .spinner { width: 12px; height: 12px; }
.pc-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.pc-empty-ic { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: rgba(192, 132, 252, .14); color: #a855f7; }
.pc-empty-small { padding: 16px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--text-3); font-size: 13px; text-align: center; }
.pc-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-loading { display: flex; align-items: center; gap: 10px; padding: 20px 4px; color: var(--text-2); }

/* tiles */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.pc-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: var(--text); text-align: left; }
.pc-tile-art { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; margin-bottom: 4px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); transition: transform .15s var(--ease); }
.pc-tile:hover .pc-tile-art { transform: translateY(-2px); }
.pc-tile-art .pc-art { width: 100% !important; height: 100% !important; border-radius: 0; }
.pc-tile b { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-tile small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-tile-badge { position: absolute; right: 8px; top: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-size: 11.5px; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.pc-tile-sub { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); }
.pc-tile.skel .pc-tile-art, .pc-tile.skel i { background: var(--surface-2); box-shadow: none; animation: pc-pulse 1.2s ease-in-out infinite; }
.pc-tile.skel i { display: block; height: 11px; border-radius: 6px; margin-top: 4px; width: 80%; }
.pc-tile.skel i:last-child { width: 55%; }
@keyframes pc-pulse { 50% { opacity: .5; } }

/* show page */
.pc-hero { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 6px; }
.pc-hero > .pc-art { border-radius: 18px; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .6); }
.pc-hero-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.pc-hero-t h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.pc-hero-a { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.pc-hero-d { margin: 2px 0 4px; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-hero-b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* episodes */
.pc-eps { display: flex; flex-direction: column; }
.pc-ep { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.pc-ep:last-child { border-bottom: 0; }
.pc-ep > .pc-art { align-self: flex-start; margin-top: 2px; }
.pc-ep-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; border-radius: 8px; cursor: default; }
.pc-ep-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pc-ep-m { font-size: 11.5px; font-weight: 600; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 0 4px; align-items: center; }
.pc-dl { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); }
.pc-ep-t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.pc-ep-b:hover .pc-ep-t { color: var(--accent); }
.pc-ep-d { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-ep-p { max-width: 220px; margin-top: 4px; }
.pc-ep-p[hidden] { display: none; }
.pc-ep.played .pc-ep-t, .pc-ep.played .pc-ep-d { color: var(--text-3); }
.pc-ep.now .pc-ep-t { color: var(--accent); }
.pc-ep-play { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(var(--accent-rgb), .14); color: var(--accent); transition: background .12s, transform .1s; }
.pc-ep-play:hover { background: var(--accent); color: var(--accent-fg); }
.pc-ep-play:active { transform: scale(.94); }
.pc-ep.now .pc-ep-play { background: var(--accent); color: var(--accent-fg); }
.pc-ep-more { color: var(--text-3); }

/* queue rows */
.pc-queue { display: flex; flex-direction: column; gap: 6px; }
.pc-qrow { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.pc-qrow.current { box-shadow: inset 0 0 0 2px var(--accent); }
.pc-qrow-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-qrow-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-qrow-t small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* show-notes sheet */
.pc-sheet { position: absolute; inset: 0; z-index: 5; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, .28); animation: pc-fade .18s ease-out; }
.pc-sheet[hidden] { display: none; }
@keyframes pc-fade { from { opacity: 0; } }
.pc-sheet-card { width: min(520px, 100%); height: 100%; overflow-y: auto; background: var(--surface); box-shadow: -10px 0 40px -10px rgba(0, 0, 0, .4); padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 14px; animation: pc-slide .22s var(--ease); }
@keyframes pc-slide { from { transform: translateX(30px); opacity: 0; } }
.pc-sheet-h { display: flex; gap: 14px; align-items: flex-start; }
.pc-sheet-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pc-sheet-t small { color: var(--accent); font-weight: 700; font-size: 12px; }
.pc-sheet-t h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.pc-sheet-t .muted { font-size: 12px; }
.pc-sheet-b { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-notes { font-size: 14px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pc-notes a { color: var(--accent); }
.pc-notes p { margin: 0 0 10px; }
.pc-notes ul, .pc-notes ol { padding-left: 20px; margin: 0 0 10px; }
.pc-notes h1, .pc-notes h2, .pc-notes h3, .pc-notes h4 { font-size: 15px; margin: 14px 0 6px; }

/* player bar */
.pc-player {
  flex: 0 0 auto; height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1.3fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 0 14px;
  border-top: 1px solid var(--line); background: var(--surface-2);
}
.pc-player.empty { display: flex; height: 48px; justify-content: center; }
.pc-pl-empty { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.pc-pl-info { display: flex; align-items: center; gap: 11px; min-width: 0; border: 0; background: none; padding: 0; color: var(--text); text-align: left; }
.pc-pl-info .pc-art { border-radius: 9px; }
.pc-pl-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-pl-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-pl-txt small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-pl-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pc-pl-btns { display: flex; align-items: center; gap: 14px; }
.pc-pl-play { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--text); color: var(--surface); transition: transform .1s; }
.pc-pl-play:active { transform: scale(.94); }
.pc-pl-play .spinner { border-color: rgba(128, 128, 128, .4); border-top-color: var(--surface); }
.pc-skip { position: relative; }
.pc-skip small { position: absolute; font-size: 7.5px; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -38%); }
.pc-pl-seek { display: flex; align-items: center; gap: 8px; width: 100%; }
.pc-seek { flex: 1; height: 4px; }
.pc-seek::-webkit-slider-thumb { width: 12px; height: 12px; }
.pc-time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 40px; }
.pc-time:last-child { text-align: right; }
.pc-pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pc-speed { min-width: 46px; font-variant-numeric: tabular-nums; }
.pc-sleep { position: relative; width: auto; padding: 0 7px; gap: 3px; display: inline-flex; align-items: center; }
.pc-sleep small { font-size: 11px; font-weight: 700; }

@container (max-width: 760px) {
  .pc-side { display: none; }
  .pc-mtabs { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
  .pc-mtabs::-webkit-scrollbar { display: none; }
  .pc-content { padding: 12px 12px 20px; }
  .pc-title { display: none; }
  .pc-search { flex: 1 1 auto; }
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px 10px; }
  .pc-hero { flex-direction: column; align-items: center; text-align: center; }
  .pc-hero > .pc-art { width: 140px !important; height: 140px !important; }
  .pc-hero-b { justify-content: center; }
  .pc-ep > .pc-art { display: none; }
  .pc-player { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; height: auto; padding: 8px 12px 10px; gap: 6px 10px; }
  .pc-pl-mid { grid-column: 1 / -1; grid-row: 2; }
  .pc-pl-right { grid-column: 2; grid-row: 1; }
  .pc-pl-right .icon-btn:last-child { display: none; }
}
[data-layout="mobile"] .app-podcasts .pc-player { padding-bottom: 20px; }
