.library {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(250px, min(35vw, 520px)) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  background: var(--bg);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.38);
  transform: translateX(0);
  transition: transform 340ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.has-player .library {
  padding-bottom: calc(var(--mini-player-height) + var(--mini-player-bottom-fill));
}

.library.is-entering,
.library.is-leaving {
  transform: translateX(100%);
}

.library__hero,
.episode-panel {
  min-height: 0;
  background: var(--bg);
  border: 0;
  border-radius: 0;
}

.library__hero {
  position: relative;
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr) auto auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  row-gap: 0;
  padding: clamp(18px, 3vw, 34px);
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.back-button {
  position: relative;
  grid-row: 1;
  top: auto;
  left: auto;
  justify-self: start;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.back-button:hover,
.back-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

.back-button:hover {
  transform: translateY(-1px);
}

.back-button span {
  position: relative;
  width: 16px;
  height: 16px;
  font-size: 0;
  line-height: 0;
}

.back-button span::before,
.back-button span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 3px;
  content: "";
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.back-button span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.back-button span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .library {
    transition: none;
  }
}


.episode-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: visible;
}

.panel-top {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(22px, 2.4vw, 34px);
  border-bottom: 1px solid var(--line);
}

.panel-controls {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}


.search {
  display: flex;
  width: min(340px, 42vw);
  min-width: 190px;
  height: 42px;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search__icon {
  color: var(--muted);
  font-weight: 800;
}

.search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

