.presentation-capability-icon {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #0f6fe8;
  border: 1px solid rgba(15, 111, 232, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(13, 30, 55, 0.12);
  backdrop-filter: blur(8px);
}

.presentation-capability-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-cover.has-presentation {
  position: relative;
  isolation: isolate;
}

.article-cover.has-presentation > [data-presentation-poster][hidden] {
  display: none !important;
}

.presentation-launch {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: #fff;
  font: inherit;
  font-weight: 600;
  border: 0;
  background: rgba(8, 20, 38, 0.2);
  cursor: pointer;
}

.presentation-launch[hidden] {
  display: none !important;
}

.presentation-launch-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(7, 21, 40, 0.72);
  box-shadow: 0 16px 36px rgba(5, 18, 36, 0.24);
}

.presentation-launch-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.presentation-host-surface {
  position: absolute;
  z-index: 4;
  inset: 0;
  background: #071426;
  overflow: hidden;
  color: #fff;
}

.presentation-host-surface[hidden],
.presentation-host-surface [hidden] {
  display: none !important;
}

.presentation-frame-mount,
.presentation-frame-mount iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.presentation-frame-mount iframe {
  display: block;
  background: #f4f7fa;
}

.presentation-loading,
.presentation-error,
.presentation-ended,
.presentation-gate {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: #071426;
}

.presentation-loading > span:last-child,
.presentation-error > span,
.presentation-gate [data-presentation-gate-message] {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.presentation-gate-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 4px;
  color: #45d6da;
  border: 1px solid rgba(69, 214, 218, 0.36);
  border-radius: 50%;
  background: rgba(69, 214, 218, 0.1);
}

.presentation-gate-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.presentation-gate-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: #062733;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: #45d6da;
  text-decoration: none;
  cursor: pointer;
}

.presentation-gate-action:hover,
.presentation-gate-action:focus-visible {
  background: #6fe3e6;
  outline: none;
}

.presentation-loading-mark {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #45d6da;
  border-radius: 50%;
  animation: presentation-spin 0.9s linear infinite;
}

.presentation-error div,
.presentation-ended div,
.presentation-gate div {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.presentation-error button,
.presentation-ended button,
.presentation-gate button {
  min-height: 38px;
  padding: 0 16px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.presentation-controls-zone {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  height: 20%;
  min-height: 72px;
  touch-action: manipulation;
}

.presentation-controls {
  position: absolute;
  z-index: 5;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: 38px minmax(80px, 1fr) auto 38px 38px 38px;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 16, 31, 0.86);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.presentation-controls.has-narration-controls {
  grid-template-columns: 38px minmax(80px, 1fr) auto 38px 38px 38px 38px 38px;
}

.presentation-subtitle {
  position: absolute;
  z-index: 5;
  right: 50%;
  bottom: 80px;
  width: min(86%, 860px);
  padding: 0 10px;
  color: #fff;
  font-size: clamp(13px, 1.35vw, 17px);
  font-weight: 600;
  line-height: 1.48;
  text-align: center;
  text-wrap: balance;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.92),
    0 0 2px rgba(0, 0, 0, 0.82);
  transform: translateX(50%);
  pointer-events: none;
  transition: bottom 180ms ease, opacity 180ms ease;
}

.are-presentation-controls-hidden .presentation-subtitle {
  bottom: 18px;
}

.are-presentation-controls-hidden .presentation-controls {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.is-presentation-fullscreen.are-presentation-controls-hidden .presentation-host-surface {
  cursor: none;
}

.presentation-control-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.84);
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.presentation-control-button:hover,
.presentation-control-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.presentation-control-button.is-muted,
.presentation-control-button.is-off {
  color: rgba(255, 255, 255, 0.48);
}

.presentation-sound-off-icon,
.presentation-control-button.is-muted .presentation-sound-on-icon {
  display: none;
}

.presentation-control-button.is-muted .presentation-sound-off-icon {
  display: block;
}

.presentation-control-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.presentation-toggle .presentation-play-icon {
  fill: currentColor;
}

.presentation-toggle .presentation-pause-icon,
[data-presentation-state="playing"] .presentation-toggle .presentation-play-icon {
  display: none;
}

[data-presentation-state="playing"] .presentation-toggle .presentation-pause-icon {
  display: block;
}

.presentation-fullscreen-exit-icon,
.is-presentation-fullscreen .presentation-fullscreen-enter-icon {
  display: none;
}

.is-presentation-fullscreen .presentation-fullscreen-exit-icon {
  display: block;
}

.presentation-seek {
  width: 100%;
  min-width: 0;
  accent-color: #45d6da;
  cursor: pointer;
}

.presentation-time {
  min-width: 88px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.article-cover.has-presentation.is-presentation-fullscreen-fallback {
  position: fixed;
  z-index: 1200;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: #071426;
}

.article-cover.has-presentation:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: #071426;
}

.article-cover.has-presentation.is-presentation-fullscreen-fallback,
.article-cover.has-presentation:fullscreen {
  display: grid;
  place-items: center;
}

.article-cover.has-presentation.is-presentation-fullscreen-fallback .presentation-host-surface,
.article-cover.has-presentation:fullscreen .presentation-host-surface {
  position: relative;
  inset: auto;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  aspect-ratio: 16 / 9;
}

@keyframes presentation-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .presentation-capability-icon {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .presentation-launch-icon {
    width: 50px;
    height: 50px;
  }

  .presentation-controls {
    right: 8px;
    bottom: 8px;
    left: 8px;
    grid-template-columns: 34px minmax(64px, 1fr) 34px 34px 34px;
    gap: 4px;
    min-height: 46px;
    padding: 5px;
    border-radius: 12px;
  }

  .presentation-controls.has-narration-controls {
    grid-template-columns: 34px minmax(64px, 1fr) repeat(5, 34px);
  }

  .presentation-subtitle {
    bottom: 62px;
    width: calc(100% - 28px);
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.45;
    border-radius: 8px;
  }

  .are-presentation-controls-hidden .presentation-subtitle {
    bottom: 10px;
  }

  .presentation-control-button {
    width: 34px;
    height: 34px;
  }

  .presentation-time {
    position: absolute;
    right: 9px;
    bottom: 48px;
    min-width: 0;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(5, 16, 31, 0.72);
  }
}

@media (hover: none) and (pointer: coarse) {
  .presentation-controls-zone {
    inset: 0;
    height: auto;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .presentation-capability-icon {
    backdrop-filter: none;
  }

  .presentation-loading-mark {
    animation: none;
    border-color: #45d6da;
  }

  .presentation-controls {
    backdrop-filter: none;
    transition: none;
  }

  .are-presentation-controls-hidden .presentation-controls {
    transform: none;
  }
}
