:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --stage-ratio: 16 / 9;
  --ui-color: rgba(255, 255, 255, 0.92);
  --ui-surface: rgba(8, 17, 29, 0.62);
  --ui-border: rgba(255, 255, 255, 0.2);
  --transition-duration: 180ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #090e16;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.presentation-player {
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  place-items: center;
  background: #090e16;
}

.presentation-stage {
  position: relative;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  overflow: hidden;
  aspect-ratio: var(--stage-ratio);
  background: #ffffff;
  container-type: inline-size;
  isolation: isolate;
}

.scene-host,
.scene-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-frame {
  opacity: 0;
  transition: opacity var(--transition-duration) ease-out;
}

.scene-frame.is-visible {
  opacity: 1;
}

.scene-frame.has-html-header {
  display: grid;
  grid-template-rows: 15.5% minmax(0, 84.5%);
}

.scene-shell-header {
  color: #526987;
  pointer-events: none;
}

.scene-shell-header--overlay {
  position: absolute;
  z-index: 2;
  top: 1.8%;
  left: 4.15%;
}

.scene-shell-header--overlay.has-mask {
  top: 3.55%;
}

.scene-shell-header.has-mask::before {
  position: absolute;
  z-index: -1;
  top: -1.05cqw;
  left: -1.15cqw;
  width: 15.3cqw;
  height: 4.35cqw;
  content: "";
}

.scene-shell-header.has-mask--white::before {
  background: #ffffff;
}

.scene-shell-header.has-mask--cool::before {
  background: #f7fbff;
}

.scene-shell-header--html {
  position: relative;
  z-index: 2;
  padding: 2.8cqw 4.15cqw 0;
  background: #ffffff;
}

.scene-shell-header__label {
  display: flex;
  align-items: center;
  gap: 0.62cqw;
  margin: 0;
  font-size: clamp(12px, 1.04cqw, 20px);
  line-height: 1.25;
  letter-spacing: 0.035em;
}

.scene-shell-header__number {
  color: #2e7fe7;
  font-weight: 700;
}

.scene-shell-header__divider {
  color: #9aa9ba;
  font-weight: 450;
}

.scene-shell-header__theme {
  color: #587293;
  font-weight: 580;
}

.scene-shell-header__title {
  margin: 0.42cqw 0 0;
  color: #0d2e59;
  font-size: clamp(22px, 1.82cqw, 35px);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.html-scene-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.slide-image,
.html-scene {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: #ffffff;
}

.slide-image {
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
}

.slide-image:focus-visible {
  outline: 3px solid rgba(95, 170, 255, 0.92);
  outline-offset: -3px;
}

.missing-slide {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  gap: clamp(8px, 1vw, 18px);
  color: #728095;
  text-align: center;
  background:
    linear-gradient(rgba(31, 78, 121, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 78, 121, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 48px 48px;
}

.missing-slide strong {
  color: #17395c;
  font-size: clamp(24px, 2.4vw, 48px);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.missing-slide span {
  font-size: clamp(14px, 1.1vw, 22px);
}

.missing-slide code {
  color: #8995a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12px, 0.82vw, 16px);
}

.player-ui {
  position: fixed;
  z-index: 20;
  right: clamp(5px, 0.55vw, 11px);
  bottom: clamp(5px, 0.55vw, 11px);
  left: clamp(5px, 0.55vw, 11px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-duration) ease;
}

.presentation-player.is-ui-active .player-ui,
.player-ui:focus-within {
  opacity: 0.68;
}

.player-ui:hover,
.player-ui:focus-within {
  opacity: 0.94;
}

.page-count {
  min-width: 50px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  color: var(--ui-color);
  background: rgba(8, 17, 29, 0.48);
  font-size: clamp(11px, 0.7vw, 14px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  backdrop-filter: blur(6px);
}

.player-actions {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.control-button,
.focus-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ui-border);
  color: var(--ui-color);
  background: var(--ui-surface);
  cursor: pointer;
  transition:
    background-color var(--transition-duration) ease,
    opacity var(--transition-duration) ease;
  backdrop-filter: blur(6px);
}

.control-button {
  width: clamp(31px, 1.9vw, 37px);
  height: clamp(31px, 1.9vw, 37px);
  border-radius: 50%;
  font-size: clamp(15px, 1vw, 20px);
  line-height: 1;
}

.control-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.control-button:hover,
.control-button:focus-visible,
.focus-close:hover,
.focus-close:focus-visible {
  background: rgba(8, 17, 29, 0.86);
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 2px;
}

.control-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.focus-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 2vw, 38px);
  background: rgba(4, 8, 14, 0.94);
  cursor: zoom-out;
}

.focus-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-out;
  user-select: none;
}

.focus-stage {
  position: relative;
  width: min(100%, calc((100dvh - clamp(32px, 4vw, 76px)) * 16 / 9));
  max-height: 100%;
  aspect-ratio: var(--stage-ratio);
  container-type: inline-size;
}

.focus-shell-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.focus-close {
  position: absolute;
  top: clamp(12px, 1.4vw, 26px);
  right: clamp(12px, 1.4vw, 26px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

noscript {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
  background: #090e16;
}

@media (hover: none) {
  .player-ui {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
