html {
  scroll-padding-top: 4rem;
}

body {
  min-height: 100vh;
  padding-bottom: 8.5rem;
}

[x-cloak] {
  display: none !important;
}

.line-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.auth-shell {
  display: grid;
  min-height: min(34rem, 75vh);
  place-items: center;
}

.auth-card {
  max-width: 28rem;
  width: 100%;
}

.min-w-0 {
  min-width: 0;
}

.podcast-art {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f1f5f9, #dbeafe);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 700;
  justify-content: center;
  overflow: hidden;
  align-self: flex-start;
  text-transform: uppercase;
}

.podcast-art img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.podcast-art-sm {
  font-size: 0.875rem;
  height: 3rem;
  width: 3rem;
}

.podcast-art-md {
  font-size: 1.25rem;
  height: 3.75rem;
  width: 3.75rem;
}

.podcast-art-lg {
  font-size: 2.25rem;
  height: min(7.5rem, 28vw);
  width: min(7.5rem, 28vw);
}

.show-card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.show-shelf {
  --show-shelf-card-size: clamp(7.5rem, 31vw, 9rem);
  display: grid;
  gap: 1rem;
  grid-auto-columns: var(--show-shelf-card-size);
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 0.25rem;
  scroll-padding-inline: 0.25rem;
  scroll-snap-type: inline proximity;
}

.show-shelf-card {
  color: inherit;
  display: block;
  max-width: var(--show-shelf-card-size);
  min-width: 0;
  scroll-snap-align: start;
  width: var(--show-shelf-card-size);
}

.show-shelf-card:hover .show-shelf-title,
.show-shelf-card:focus .show-shelf-title {
  color: var(--bs-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.show-shelf-art {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f1f5f9, #dbeafe);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  color: #1d4ed8;
  display: flex;
  font-size: 2.5rem;
  font-weight: 700;
  justify-content: center;
  margin-bottom: 0.5rem;
  max-height: var(--show-shelf-card-size);
  max-width: var(--show-shelf-card-size);
  overflow: hidden;
  position: relative;
  text-transform: uppercase;
  width: var(--show-shelf-card-size);
}

.show-shelf-art img {
  height: 100%;
  max-height: var(--show-shelf-card-size);
  max-width: var(--show-shelf-card-size);
  object-fit: cover;
  width: 100%;
}

.show-shelf-title {
  color: var(--bs-body-color);
  display: -webkit-box;
  font-size: 0.95rem;
  line-height: 1.2;
  min-height: 2.3em;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.show-shelf-rank {
  color: var(--bs-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.show-shelf-meta {
  color: var(--bs-secondary-color);
  display: block;
  font-size: 0.825rem;
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .show-shelf {
    --show-shelf-card-size: 9.5rem;
  }
}

.show-card {
  align-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  color: inherit;
  display: flex;
  gap: 0.625rem;
  min-height: 3.75rem;
  padding: 0.625rem;
}

.show-card:hover,
.show-card:focus {
  border-color: var(--bs-primary);
}

.show-card-title,
.show-card-meta {
  display: block;
}

.show-card-title {
  overflow-wrap: anywhere;
}

.show-card-meta {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.show-library-card .card-title {
  overflow-wrap: anywhere;
}

.podcast-description {
  overflow-wrap: anywhere;
}

.podcast-description > :last-child {
  margin-bottom: 0;
}

.podcast-description ul,
.podcast-description ol {
  padding-left: 1.25rem;
}

.show-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
}

.episode-list {
  display: grid;
  gap: 0.75rem;
}

.episode-card h3 {
  overflow-wrap: anywhere;
}

.episode-player {
  display: block;
  max-width: 36rem;
  width: 100%;
}

.transcript-text {
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
}

.ai-report-preview {
  max-height: 32rem;
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
}

.search-snippet {
  overflow-wrap: anywhere;
}

.search-type-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
}

.search-type-card,
.search-result-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.search-type-card {
  display: flex;
  flex-direction: column;
  min-height: 4rem;
  padding: 0.65rem 0.75rem;
}

.search-type-card span {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.search-type-card strong {
  font-size: 1.1rem;
}

.search-type-card.active,
.search-type-card:hover,
.search-type-card:focus,
.search-result-card:hover,
.search-result-card:focus {
  border-color: var(--bs-primary);
}

.process-card {
  background: var(--bs-primary-bg-subtle);
}

.search-result-list {
  display: grid;
  gap: 0.65rem;
}

.search-result-card {
  display: block;
  padding: 0.85rem;
}

.search-result-title {
  overflow-wrap: anywhere;
}

.provider-settings-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.provider-settings-card code,
.overflow-wrap-anywhere {
  overflow-wrap: anywhere;
}

.template-action {
  min-width: min(100%, 28rem);
}

.episode-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
}

.episode-tabs .nav-link {
  white-space: nowrap;
}

.episode-chapter-menu {
  max-height: min(24rem, 70vh);
  overflow-y: auto;
  min-width: min(22rem, calc(100vw - 2rem));
}

.episode-chapter-jump-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.episode-chapter-jump-grid .btn {
  overflow-wrap: anywhere;
}

.episode-sticky-action {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 4.25rem;
  z-index: 1030;
}

@media (min-width: 768px) {
  .episode-sticky-action {
    display: none;
  }
}

@media (min-width: 992px) {
  body {
    padding-bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  .show-detail-header {
    flex-direction: column;
  }

  .podcast-art-lg {
    width: 6rem;
  }
}
