.prla {
  --prla-accent: #1a7f37;
  --prla-border: rgba(0, 0, 0, 0.12);
  --prla-muted: rgba(0, 0, 0, 0.6);
  --prla-card: #fff;
}
.prla-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 0 0 1.5rem;
}
.prla-show {
  background: var(--prla-card);
  border: 1px solid var(--prla-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.prla-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain; /* show the whole picture, never crop */
  background: rgba(0, 0, 0, 0.04);
  margin: 0;
}
.prla-body { padding: 1rem 1rem 1.1rem; }
.prla .prla-name { margin: 0 0 0.2rem; font-size: 1.15rem; line-height: 1.3; }
.prla .prla-meta { margin: 0 0 0.8rem; font-size: 0.875rem; color: var(--prla-muted); }
.prla .prla-eps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.prla .prla-eps li { margin: 0; padding: 0; }

.prla .prla-ep {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--prla-border);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  color: inherit;
  background: transparent;
  transition: border-color 0.15s, background-color 0.15s;
}
.prla .prla-ep:hover { border-color: var(--prla-accent); }
.prla .prla-ep:focus-visible { outline: 2px solid var(--prla-accent); outline-offset: 2px; }
.prla .prla-day { font-weight: 600; }
.prla .prla-date { margin-left: auto; color: var(--prla-muted); font-size: 0.875rem; }

/* play / pause icon */
.prla-icon {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--prla-accent);
  position: relative;
}
.prla-icon::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.4rem 0 0.4rem 0.65rem;
  border-color: transparent transparent transparent #fff;
}
.prla-ep.is-playing { border-color: var(--prla-accent); background: color-mix(in srgb, var(--prla-accent) 8%, transparent); }
.prla-ep.is-playing .prla-icon::after {
  left: 50%;
  width: 0.55rem;
  height: 0.75rem;
  border: 0;
  border-left: 0.18rem solid #fff;
  border-right: 0.18rem solid #fff;
}
.prla-ep.is-paused { border-color: var(--prla-accent); }
.prla-ep.is-loading .prla-icon::after {
  width: 0.8rem;
  height: 0.8rem;
  left: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: prla-spin 0.8s linear infinite;
}
@keyframes prla-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* player */
.prla-player {
  position: sticky;
  bottom: 0;
  z-index: 50;
  background: var(--prla-card);
  border: 1px solid var(--prla-border);
  border-top: 3px solid var(--prla-accent);
  border-radius: 10px 10px 0 0;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.prla-player[hidden] { display: none; }
.prla-now { font-size: 0.9rem; margin-bottom: 0.4rem; }
.prla-now-label { color: var(--prla-muted); }
.prla-audio { display: block; width: 100%; }
.prla .prla-error { margin: 0.5rem 0 0; color: #b42318; font-size: 0.875rem; }
.prla .prla-empty { padding: 1rem; border: 1px dashed var(--prla-border); border-radius: 8px; }

/* 1.1: episode notes, deep links, schedule links */
.prla .prla-ep-text { display: flex; flex-direction: column; min-width: 0; }
.prla .prla-note { font-size: 0.8rem; color: var(--prla-muted); line-height: 1.3; }
.prla .prla-show, .prla .prla-ep { scroll-margin: 6rem; }
.prla .prla-flash { animation: prla-flash 2.4s ease-out; }
@keyframes prla-flash {
  0%, 40% { box-shadow: 0 0 0 3px var(--prla-accent); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.prla-sched-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--prla-accent, #1a7f37);
  text-decoration: none;
}
.prla-sched-link:hover { text-decoration: underline; }
.prla-sched-link span { font-size: 0.75em; }

/* 1.2.3: presenter photo beside the name when there's a show image */
.prla .prla-presenter { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.2rem; font-size: 0.9rem; }
.prla .prla-presenter + .prla-meta { margin-top: 0; }
.prla .prla-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin: 0; flex: none; }
