/* Shared badges and modal styles extracted from styles.css. */

.footer-legal .footer-letter-link,
.footer-legal .footer-privacy-link {
  color: #d0a56b;
}

.footer-legal .footer-letter-link:hover,
.footer-legal .footer-letter-link:focus-visible,
.footer-legal .footer-privacy-link:hover,
.footer-legal .footer-privacy-link:focus-visible {
  color: #f3ebdd;
}

.tag-rewind {
  padding: 0.22rem 0.58rem;
  border: 1px solid rgba(199, 155, 87, 0.42);
  border-radius: 999px;
  color: #6d4d1c;
  background: rgba(199, 155, 87, 0.18);
}

.episode-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.95rem;
}

.episode-guide-badge,
.episode-guide-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.episode-guide-badge {
  color: #3f3325;
  border: 1px solid rgba(93, 70, 48, 0.22);
  background: #d7bf8f;
}

.episode-guide-badge.sensitive {
  color: #4d3418;
  border-color: rgba(120, 74, 24, 0.26);
  background: #e1c783;
}

.episode-guide-badge.dark {
  color: #382d4a;
  border-color: rgba(78, 73, 100, 0.26);
  background: #c9b8d6;
}

.episode-guide-note {
  color: #4a3b2b;
  border: 1px solid rgba(92, 74, 53, 0.22);
  background: #d8ccb8;
  font-weight: 700;
}

.episode-card > .episode-meta {
  margin-bottom: 1rem;
}

.episode-card > audio {
  display: block;
  width: calc(100% - 2.6rem);
  margin: 1rem 1.3rem 0;
}

.episode-summary {
  font-size: 0.94rem;
  line-height: 1.52;
}

.episode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1.3rem;
}

.episode-play-button,
.episode-details-button,
.episode-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.48rem 0.76rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.66);
  color: var(--plum);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.episode-details-button:hover,
.episode-link:hover {
  background: var(--cream);
}

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

.episode-empty {
  margin: 1.2rem 0 0;
  padding: 1rem 1.2rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 236, 0.68);
}

.episode-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(4px);
}

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

.modal-open {
  overflow: hidden;
}

.episode-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: clamp(1.55rem, 3.2vw, 2.2rem);
  color: #2e241a;
  border: 1px solid rgba(216, 204, 184, 0.75);
  border-radius: 20px;
  background: #e9dfcf;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.listening-guide-panel {
  width: min(720px, 100%);
  max-height: min(88vh, 720px);
  padding: clamp(1.2rem, 2.4vw, 1.65rem);
}

.listening-guide-panel h2 {
  margin-bottom: 0.62rem;
}

.episode-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 42px;
  height: 42px;
  color: #8c5b2e;
  border: 1px solid rgba(216, 204, 184, 0.75);
  border-radius: 50%;
  background: rgba(243, 235, 221, 0.72);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.episode-modal-close:hover,
.episode-modal-close:focus-visible {
  background: rgba(184, 130, 69, 0.08);
  outline: none;
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

.episode-modal-panel h2 {
  max-width: 620px;
  padding-right: 3rem;
  color: #2e241a;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.episode-modal-panel .eyebrow {
  color: var(--brand-gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.episode-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.1rem 0 1.25rem;
  color: #54463a;
  font-size: 0.92rem;
}

.episode-detail-meta-pill,
.episode-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.34rem 0.74rem;
  border: 1px solid rgba(216, 204, 184, 0.75);
  border-radius: 999px;
  background: rgba(243, 235, 221, 0.72);
  color: #54463a;
  line-height: 1.1;
}

.episode-detail-copy {
  color: #54463a;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.62;
}

.episode-detail-copy p {
  margin: 0 0 1rem;
}

.listening-guide-content {
  display: grid;
  gap: 0.56rem;
}

.listening-guide-content p {
  margin: 0;
  line-height: 1.45;
}

.listening-guide-item {
  margin-top: 0.08rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(216, 204, 184, 0.72);
  border-radius: 14px;
  background: rgba(243, 235, 221, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.listening-guide-item h3 {
  margin: 0 0 0.24rem;
  color: #2e241a;
  font-size: 1rem;
  line-height: 1.18;
}

.listening-guide-item h3 span {
  margin-right: 0.4rem;
}

.listening-guide-muted {
  color: #7b6a5a;
}

.episode-guide-badge,
.episode-guide-badge[role="button"] {
  cursor: pointer;
}

.episode-guide-badge:hover {
  filter: brightness(1.04);
  box-shadow: 0 0 0 2px rgba(208, 165, 107, 0.16);
}

.episode-guide-badge[role="button"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

.latest-info-panel {
  width: min(560px, 100%);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  max-height: none;
}

.latest-info-body {
  display: grid;
  justify-items: center;
  gap: 0;
}

.latest-info-body p {
  margin: 0;
  color: var(--muted);
}

.latest-info-body img {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: block;
  border: 1px solid rgba(243, 235, 221, 0.28);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.latest-info-panel .episode-modal-close {
  top: 0.55rem;
  right: 0.55rem;
  color: #f3ebdd;
  border-color: rgba(243, 235, 221, 0.34);
  background: rgba(10, 9, 8, 0.42);
}

.latest-info-panel .episode-modal-close:hover,
.latest-info-panel .episode-modal-close:focus-visible {
  background: rgba(10, 9, 8, 0.6);
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

.rewind-info-panel h2 {
  margin-bottom: 0.7rem;
}

.rewind-info-panel .episode-modal-body {
  color: #54463a;
}

.rewind-info-panel .episode-modal-body a {
  color: #8c5b2e;
}

.rewind-info-panel .episode-modal-body a:hover,
.rewind-info-panel .episode-modal-body a:focus-visible {
  color: #a26d3c;
}

.episode-modal-actions {
  margin-top: 1.05rem;
  margin-bottom: 0.1rem;
}

.episode-modal-play-button {
  color: var(--button-filled-text);
  border-color: transparent;
  background: var(--button-filled-bg);
}

.episode-modal-play-button:hover,
.episode-modal-play-button:focus-visible {
  background: var(--button-filled-bg-hover);
  outline: none;
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

.episode-modal-actions .button.secondary,
.episode-modal-actions a.secondary {
  color: #8c5b2e;
  border: 1px solid #b88245;
  background: transparent;
}

.episode-modal-actions .button.secondary:hover,
.episode-modal-actions .button.secondary:focus-visible,
.episode-modal-actions a.secondary:hover,
.episode-modal-actions a.secondary:focus-visible {
  color: #2e241a;
  background: rgba(184, 130, 69, 0.08);
  outline: none;
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

@media (max-width: 680px) {
  .episode-modal {
    padding: 0.9rem;
  }

  .episode-modal-panel {
    width: min(760px, calc(100vw - 1.8rem));
    max-height: min(86vh, 760px);
    padding: clamp(1.15rem, 4.8vw, 1.5rem);
  }

  .episode-modal-close {
    top: 0.7rem;
    right: 0.7rem;
    width: 44px;
    height: 44px;
  }
}

.episode-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

html[data-theme="dark"] .tag-rewind {
  color: var(--candle);
  border-color: rgba(199, 155, 87, 0.42);
  background: rgba(199, 155, 87, 0.12);
}

html[data-theme="dark"] .episode-modal-panel {
  color: #d8ccb8;
  border: 1px solid rgba(208, 165, 107, 0.22);
  background: #2f2a24;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .episode-modal-panel h2 {
  color: #f3ebdd;
}

html[data-theme="dark"] .episode-modal-panel .eyebrow {
  color: #d0a56b;
}

html[data-theme="dark"] .episode-detail-meta {
  color: #d8ccb8;
}

html[data-theme="dark"] .episode-detail-meta-pill,
html[data-theme="dark"] .episode-detail-meta span {
  color: #d8ccb8;
  border-color: rgba(208, 165, 107, 0.22);
  background: rgba(243, 235, 221, 0.08);
}

html[data-theme="dark"] .episode-detail-copy {
  color: #d8ccb8;
}

html[data-theme="dark"] .listening-guide-item {
  border-color: rgba(208, 165, 107, 0.22);
  background: rgba(243, 235, 221, 0.08);
}

html[data-theme="dark"] .listening-guide-item h3 {
  color: #f3ebdd;
}

html[data-theme="dark"] .listening-guide-muted {
  color: #b8a995;
}

html[data-theme="dark"] .rewind-info-panel .episode-modal-body,
html[data-theme="dark"] .episode-modal-panel p {
  color: #d8ccb8;
}

html[data-theme="dark"] .rewind-info-panel .episode-modal-body a,
html[data-theme="dark"] .episode-modal-panel a {
  color: #d0a56b;
}

html[data-theme="dark"] .rewind-info-panel .episode-modal-body a:hover,
html[data-theme="dark"] .rewind-info-panel .episode-modal-body a:focus-visible,
html[data-theme="dark"] .episode-modal-panel a:hover,
html[data-theme="dark"] .episode-modal-panel a:focus-visible {
  color: #f0c987;
}

html[data-theme="dark"] .episode-modal-close {
  color: #d0a56b;
  border-color: rgba(208, 165, 107, 0.36);
  background: rgba(243, 235, 221, 0.04);
}

html[data-theme="dark"] .episode-modal-close:hover,
html[data-theme="dark"] .episode-modal-close:focus-visible {
  background: rgba(208, 165, 107, 0.12);
  box-shadow: 0 0 0 3px rgba(208, 165, 107, 0.24);
}

html[data-theme="dark"] .episode-modal-actions .button.secondary,
html[data-theme="dark"] .episode-modal-actions a.secondary {
  color: #d0a56b;
  border-color: rgba(208, 165, 107, 0.65);
  background: transparent;
}

html[data-theme="dark"] .episode-modal-actions .button.secondary:hover,
html[data-theme="dark"] .episode-modal-actions .button.secondary:focus-visible,
html[data-theme="dark"] .episode-modal-actions a.secondary:hover,
html[data-theme="dark"] .episode-modal-actions a.secondary:focus-visible {
  color: #f0c987;
}

html[data-theme="dark"] .latest-info-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}
