:root { color-scheme: dark; font-family: Arial, "Microsoft YaHei", sans-serif; background: #110c1e; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: #f7f3ff; }
button { font: inherit; }
.viewer { height: 100vh; height: 100svh; display: grid; grid-template-rows: minmax(0, 1fr) 64px 3px; background: #110c1e; }
.stage-wrap { display: flex; justify-content: center; align-items: center; min-height: 0; min-width: 0; overflow: hidden; }
.stage { position: relative; width: min(100vw, calc((100svh - 67px) * 1.7777778)); aspect-ratio: 16 / 9; overflow: hidden; background: #0b0912; box-shadow: 0 18px 80px #0007; touch-action: pan-y; user-select: none; }
#slide-image { display: block; width: 100%; height: 100%; object-fit: contain; }
#slide-image.enter-next { animation: next 260ms ease-out both; }
#slide-image.enter-previous { animation: previous 260ms ease-out both; }
@keyframes next { from { opacity: .6; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes previous { from { opacity: .6; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
.video-layer { position: absolute; inset: 0; pointer-events: none; }
.video-hotspot, .slide-video { position: absolute; pointer-events: auto; width: var(--w); height: var(--h); left: var(--x); top: var(--y); }
.video-hotspot { border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.video-hotspot .play { display: grid; place-items: center; width: clamp(38px, 4vw, 68px); aspect-ratio: 1; border-radius: 50%; background: #231038cc; color: white; border: 2px solid #fff9; box-shadow: 0 5px 24px #0009; transition: transform 180ms, background 180ms; }
.video-hotspot .play svg { width: 35%; height: 35%; margin-left: 4px; fill: currentColor; }
.video-hotspot:hover .play, .video-hotspot:focus-visible .play { transform: scale(1.12); background: #7535ba; }
.slide-video { object-fit: cover; background: #000; }
.toolbar { display: flex; align-items: center; gap: 14px; padding: 0 max(18px, env(safe-area-inset-right)); background: #150f24; }
.nav-button, .icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #f7f3ff; background: transparent; cursor: pointer; transition: background 160ms, opacity 160ms; }
.nav-button:hover, .icon-button:hover { background: #ffffff20; }
.nav-button:disabled { opacity: .28; cursor: default; }
.nav-button:focus-visible, .icon-button:focus-visible, .video-hotspot:focus-visible { outline: 2px solid #bb8af3; outline-offset: 2px; }
.nav-button svg, .icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-count { min-width: 62px; text-align: center; font-size: 13px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.toolbar-spacer { flex: 1; }
.hint { color: #a39ab1; font-size: 12px; letter-spacing: .04em; }
.progress { background: #281e39; }
.progress span { display: block; height: 100%; width: 6.25%; background: #a76be6; transition: width 260ms ease; }
@media (max-width: 640px) { .toolbar { gap: 8px; padding: 0 12px; } .hint { display: none; } .stage { width: 100vw; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
