/* Hide the narration/duration subtitle across existing and future players,
   including the locked heading and the enhanced playback controls. */
.gh-content .mw-article-audio .mw-audio-meta {
  display: none !important;
}

/* The article opening is a listening invitation; transport controls belong
   in the dock. Only enhance players whose original controls are ready. */
.gh-content .mw-article-audio.mw-audio-launcher-ready:not(.mw-audio-docked) {
  padding: 0;
  border: 0;
  margin: 0;
}
.gh-article-header + .gh-content:has(> .mw-audio-launcher-ready:not(.mw-audio-docked):first-child) {
  margin-top: 16px !important;
}
.gh-content > .mw-audio-launcher-ready:not(.mw-audio-docked):first-child + p {
  margin-top: 18px !important;
}
.gh-content .mw-audio-launcher-ready:not(.mw-audio-docked) .mw-audio-main,
.gh-content .mw-audio-launcher-ready:not(.mw-audio-docked) .mw-audio-timeline,
.gh-content .mw-audio-docked .mw-audio-launcher {
  display: none !important;
}
.gh-content .mw-article-audio button.mw-audio-launcher {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 13px 18px;
  border: 1px solid #e4d9d6;
  border-radius: 4px;
  background: #fdfbfa;
  color: #602029;
  font: 600 16px/1.4 "Work Sans", Arial, sans-serif;
  text-align: left;
}
.gh-content .mw-article-audio button.mw-audio-launcher span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #761e28;
  color: #fff;
  font-size: 12px;
  padding-left: 2px;
}
.gh-content .mw-article-audio button.mw-audio-launcher:hover {
  color: #57161e;
  background: #faf6f4;
  border-color: #c7a9a3;
}
.gh-content .mw-article-audio button.mw-audio-launcher:focus-visible {
  outline: 2px solid #761e28;
  outline-offset: 3px;
}

/* Keep article-local player styling and controls; only its playing position
   changes. The element remains in place in the DOM to avoid restarting audio. */
.gh-content .mw-article-audio.mw-audio-docked {
  position: fixed;
  inset: auto 0 0;
  z-index: 1100;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 10px max(16px, calc((100vw - 1100px) / 2));
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: #faf8f5;
  border: 0;
  border-top: 1px solid #d4cec6;
  box-shadow: 0 -4px 24px rgba(30, 25, 20, .12);
}
.gh-content .mw-audio-docked .mw-audio-player {
  padding-right: 44px;
}
.gh-content .mw-audio-docked .mw-audio-main,
.gh-content .mw-audio-docked .mw-audio-timeline {
  min-width: 0;
  gap: 8px;
}
.gh-content .mw-audio-docked .mw-audio-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 500 13px/1.4 "Work Sans", Arial, sans-serif;
  color: #514b46;
}
.gh-content .mw-audio-docked .mw-audio-speed {
  padding-left: 4px;
  border-left: 0;
  flex-shrink: 0;
}
.gh-content .mw-audio-docked .mw-audio-timeline {
  margin-top: 0;
}
/* A single row on wider screens cuts the dock height in half while keeping
   every control's 44px touch target. Narrow screens retain two usable rows. */
@media (min-width: 760px) {
  .gh-content .mw-audio-docked .mw-audio-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(260px, 2fr);
    align-items: center;
    column-gap: 12px;
  }
  .gh-content .mw-audio-docked .mw-audio-status {
    grid-column: 1 / -1;
  }
}
.gh-content .mw-article-audio button.mw-audio-dock-close {
  position: absolute;
  top: 10px;
  right: max(8px, calc((100vw - 1100px) / 2));
  width: 44px;
  height: 44px;
  font: 400 26px/1 Arial, sans-serif;
  color: #68615b;
}
.gh-content .mw-article-audio button.mw-audio-dock-close:hover {
  color: #761e28;
}
.mw-audio-bottom-space { height: var(--mw-audio-dock-height, 140px); }
/* Once the opening player is fixed, leave a single modest gap between
   the introduction and prose instead of stacking both original margins. */
.gh-article-header + .gh-content:has(> .mw-audio-docked:first-child) {
  margin-top: 24px !important;
}
.gh-content > .mw-audio-docked:first-child + p {
  margin-top: 0 !important;
}
html.mw-audio-is-docked { scroll-padding-bottom: var(--mw-audio-dock-height, 140px); }
/* Keep Ghost's floating account button above the playback controls. */
html.mw-audio-is-docked .gh-portal-triggerbtn-iframe {
  bottom: calc(var(--mw-audio-dock-height, 140px) + 16px) !important;
}
