.episode-list {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.episode-list__empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 28px 20px;
  color: var(--muted);
  font-family: inherit;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}

.episode-list__empty[hidden] {
  display: none;
}

.episode-list__spacer {
  width: 1px;
  opacity: 0;
}

.episode-list__items {
  position: absolute;
  inset: 0 0 auto 0;
}

.episode-row {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 44px 36px minmax(0, 1fr) auto;
  height: var(--row);
  align-items: stretch;
  gap: 8px;
  padding: 0 10px 0 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  transition: background 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .episode-row:hover {
    background: rgba(255, 255, 255, 0.045);
  }
}

.episode-row.is-selected {
  background: rgba(255, 255, 255, 0.075);
}

.episode-row__cover,
.episode-row__play {
  align-self: center;
}

.episode-row__body {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.episode-row__select {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: 0;
}

.episode-row__aside {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  min-width: 4rem;
  padding: 0;
  pointer-events: auto;
}

.episode-row__date {
  padding: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.episode-row__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.episode-row__favorite {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
}

.episode-row__favorite svg {
  width: 22px;
  height: 22px;
  fill: transparent;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.episode-row__favorite[aria-pressed="true"] {
  color: var(--text);
}

.episode-row__favorite[aria-pressed="true"] svg {
  fill: currentColor;
}

.episode-row__menu {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.episode-row__menu-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.episode-row__menu-toggle svg {
  width: 16px;
  height: 16px;
}

.episode-row__menu.is-open .episode-row__menu-toggle {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.episode-row__menu-panel {
  z-index: 250;
  display: grid;
  gap: 4px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.episode-row__menu-panel[hidden] {
  display: none;
}

.episode-row__menu-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: background 150ms ease;
}

.episode-row__menu-icon {
  display: grid;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--muted);
}

.episode-row__menu-icon svg {
  width: 16px;
  height: 16px;
}

.episode-row__menu-label {
  min-width: 0;
}

.episode-row__menu-item:hover,
.episode-row__menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.episode-row__menu-item:hover .episode-row__menu-icon,
.episode-row__menu-item:focus-visible .episode-row__menu-icon {
  color: var(--text);
}

.episode-row__menu-item[hidden] {
  display: none;
}

.episode-row__select:focus-visible,
.episode-row__cover:focus-visible,
.episode-row__play:focus-visible,
.episode-row__menu-toggle:focus-visible,
.episode-row__favorite:focus-visible,
.episode-row__date:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.42);
  outline-offset: -2px;
}

.episode-row__cover {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
}

.episode-row__cover img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.episode-row__play {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
}

.episode-row__play svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.episode-row__play.is-locked svg {
  width: 18px;
  height: 18px;
  stroke: none;
}

.episode-row__main {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.episode-row__signals {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.episode-row__signal--views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.78);
}

.episode-row__signal-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.episode-row__signal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 12px;
}

.episode-row__signal-count .signal-pending-mark {
  width: 10px;
  height: 12px;
  display: block;
}

.episode-row__signal[hidden] {
  display: none;
}

.episode-row__title,
.episode-row__episode {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-row__line {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  white-space: normal;
}

.episode-row__meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.episode-row__progress {
  flex: 0 0 52px;
  width: 52px;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.episode-row__progress[hidden],
.episode-row__time-left[hidden],
.episode-row__completed[hidden] {
  display: none;
}

.episode-row__time-left {
  flex: 0 1 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}

.episode-row__progress-fill {
  display: block;
  height: 100%;
  background: rgba(248, 242, 236, 0.88);
  border-radius: inherit;
  transition: width 180ms ease;
}

.episode-row__completed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 242, 236, 0.88);
}

.episode-row__completed svg {
  width: 14px;
  height: 14px;
}

.episode-row.is-finished .episode-row__cover img {
  filter: grayscale(1);
  opacity: 0.58;
}

.episode-row__title {
  color: var(--text);
  flex: 1 1 auto;
  width: 100%;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
  min-width: 0;
}

.episode-row.is-selected .episode-row__title {
  overflow: hidden;
}

.episode-row__title-text {
  display: block;
  width: max-content;
  min-width: 100%;
  will-change: transform;
}

.episode-row:not(.is-selected) .episode-row__title-text {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-row--no-play {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.episode-row__episode {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
