:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #000; color: #eee; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #ffa340; outline-offset: 2px; }
button:disabled { cursor: default; opacity: .38; }
#viewer { width: min(100vw, 1200px); margin: auto; }
#stage-wrap { position: relative; margin: auto; overflow: hidden; background: #000; }
#stage { width: 800px; height: 600px; position: absolute; transform-origin: top left; outline: none; background: #000; }
#page-layer, #hotspots { position: absolute; inset: 0; }
.page-image { position: absolute; display: block; user-select: none; -webkit-user-drag: none; }
.page-image.enter { animation: page-in .6s ease both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.hotspot { position: absolute; border: 0; background: transparent; border-radius: 0; padding: 0; }
.hotspot.portrait { cursor: pointer; }
.hotspot.video { cursor: pointer; }
.hotspot:focus-visible { outline: 3px solid #ff9f24; outline-offset: -3px; }
#hotspots.show .hotspot { outline: 2px dashed #ff9800; outline-offset: -2px; background: #ff990015; }
.video-label { position: absolute; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px 16px; border: 2px solid #ffa032; border-radius: 4px; background: #191919; color: #fff; box-shadow: 0 3px 12px #0007; text-align: left; }
.video-play-icon { flex: none; color: #ffad52; font-size: 26px; }
.video-label-text { font: bold 18px/1.35 Arial, sans-serif; }
.hotspot.video:hover .video-label, .hotspot.video:focus-visible .video-label { background: #352616; border-color: #ffc787; }
#reveal-nav { position: absolute; left: 0; bottom: 0; width: 50px; height: 30px; padding: 0; background: transparent; border: 0; z-index: 8; }
#reveal-nav img { position: absolute; bottom: 0; left: 0; }
#toolbar { position: absolute; top: 540px; left: 0; width: 800px; height: 60px; background: url('assets/navigation/base.png'); z-index: 10; opacity: 0; visibility: hidden; transition: opacity .15s; }
#stage.nav-visible #toolbar, #toolbar:focus-within { opacity: 1; visibility: visible; }
.nav-button { position: absolute; padding: 0; border: 0; background: none; }
.nav-button img { display: block; width: 100%; height: 100%; pointer-events: none; }
.nav-button:focus-visible { outline-offset: -4px; }
#statusbar { min-height: 40px; padding: 6px 12px; display: flex; gap: 15px; align-items: center; color: #aaa; font-size: 12px; }
#statusbar button { padding: 4px 0; border: 0; color: inherit; background: transparent; white-space: nowrap; }
#statusbar button:hover { color: #fff; }
#statusbar a { color: #ffad52; white-space: nowrap; text-decoration: none; padding: 4px 0; }
#statusbar a:hover, .download-link:hover { text-decoration: underline; }
.download-link { display: inline-block; margin-top: 18px; color: #ffad52; font-size: 13px; }
#section-name { text-align: left; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.page-jump { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
#page-number { width: 42px; padding: 3px 0; text-align: center; border: 1px solid #333; background: #101010; color: #ddd; appearance: textfield; }
#page-number::-webkit-inner-spin-button { appearance: none; }
#controls-toggle[aria-pressed="true"] { color: #ffad52; }
.welcome { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #000b; backdrop-filter: blur(5px); padding: 20px; }
.welcome-card { width: min(470px, 100%); text-align: center; background: linear-gradient(155deg,#282828,#111); padding: 38px 30px 28px; border: 1px solid #777; border-top: 4px solid #ff8800; box-shadow: 0 15px 80px #000; }
.eyebrow { font-size: 11px; letter-spacing: .22em; color: #ffac52; margin: 0 0 20px; }
h1 { font-family: Georgia, serif; font-weight: normal; font-size: 42px; margin: 0 0 12px; }
h1 span { color: #ffa032; }
.welcome-card > p:not(.eyebrow) { color: #ccc; font-size: 14px; }
.primary { color: #181000; border: 1px solid #ffbb70; background: linear-gradient(#ffb254,#f58a16); padding: 13px 24px; margin: 16px 0 14px; font-weight: bold; box-shadow: 0 2px 0 #9c4e00; }
.primary span { margin-left: 12px; }
.sound-choice { display: block; font-size: 13px; }
.sound-choice input { accent-color: #fa941f; vertical-align: middle; }
.welcome-card .welcome-tip { font-size: 11px !important; color: #999 !important; line-height: 1.7; margin: 22px 0 0; }
dialog { color-scheme: light; padding: 0; border: 1px solid #888; background: #d4d0c8; color: #111; width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 10px 70px #000c; }
dialog::backdrop { background: #0008; }
.dialog-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px 5px 10px; background: linear-gradient(90deg,#243e67,#728cad); color: white; min-height: 31px; }
.dialog-titlebar h2 { font: bold 14px Arial, sans-serif; margin: 0; }
.dialog-titlebar button { font: bold 21px/18px Arial; width: 24px; height: 22px; padding: 0; color: #222; background: #ddd; border: 2px outset #eee; }
#dialog-content { max-height: calc(100dvh - 70px); overflow: auto; }
.dialog-body { padding: 20px; font-size: 14px; line-height: 1.5; }
.dialog-body p:first-child { margin-top: 0; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 12px; }
.classic-button { border: 2px outset #eee; background: #d4d0c8; color: #111; padding: 5px 18px; min-width: 75px; }
.classic-button:active { border-style: inset; }
.toc-search { padding: 12px; }
.toc-search input { width: 100%; padding: 7px; background: white; color: black; border: 2px inset #eee; }
.toc-tree { background: white; color: #111; margin: 0 12px 12px; padding: 8px; height: min(450px,60vh); overflow: auto; border: 2px inset #eee; font-size: 13px; }
.toc-tree details { margin-left: 14px; }
.toc-tree > details { margin-left: 0; }
.toc-tree summary { padding: 4px 0; cursor: pointer; }
.toc-tree summary span { color: #777; font-size: 11px; }
.toc-page { display: block; text-align: left; color: #111; background: none; border: none; padding: 4px 5px 4px 25px; width: 100%; }
.toc-page:hover, .toc-page.current { background: #183c77; color: white; }
.no-results { padding: 20px; color: #555; }
dialog.people { width: min(680px,calc(100vw - 24px)); background: #000; color: #fff; color-scheme: dark; }
.people-layout { padding: 12px; display: grid; grid-template-columns: 210px 1fr; gap: 18px; font-size: 13px; }
.person-photo { width: 195px; height: 240px; object-fit: contain; object-position: center top; background: black; }
.person-title { color: #ffb2c5; font-size: 21px; margin: 0 0 18px; }
.person-name { color: #ffb2c5; font-size: 16px; margin: 6px 0 12px; }
.person-caption { line-height: 1.5; margin-bottom: 16px; }
.people-layout label { display: block; margin: 0 0 5px; }
.people-layout input { width: 100%; padding: 7px; border: 1px solid white; color: white; background: #333; }
.people-results { margin: 9px 0; height: 165px; border: 1px solid #777; overflow-y: auto; }
.people-results button { display: block; width: 100%; background: #222; color: white; border: 0; padding: 6px 9px; text-align: left; }
.people-results button:hover, .people-results button.selected { background: #405983; }
.person-buttons { display: flex; gap: 8px; justify-content: center; }
.asset-button { padding: 0; border: none; background: none; }
.asset-button img { display: block; max-width: 90px; }
.person-goto { padding: 6px 10px; background: #333; color: white; border: 1px solid #777; margin-top: 10px; }
dialog.movie { background: #000; color: white; width: min(850px,calc(100vw - 24px)); }
.movie video { display: block; width: 100%; max-height: 75dvh; background: #000; }
.movie-caption { font-size: 12px; color: #aaa; margin: 8px 12px 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 15px 0; }
.settings-row input[type="range"] { width: 180px; }
.help-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.help-table th { text-align: left; width: 110px; }
.help-table td, .help-table th { padding: 9px 6px; border-bottom: 1px solid #aaa; }
#toast { position: fixed; bottom: 54px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 9px 16px; color: white; background: #222e; border: 1px solid #666; border-radius: 3px; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity .2s; }
#toast.visible { opacity: 1; }
body.native-size #viewer { max-width: 800px; }
@media (max-width: 600px) { #statusbar { gap: 10px; padding: 8px; font-size: 11px; flex-wrap: wrap; } #section-name { flex-basis: 40%; } .people-layout { grid-template-columns: 130px 1fr; gap: 10px; } .person-photo { width: 125px; height: 180px; } .person-title { font-size: 18px; } .person-buttons img { max-width: 55px; } .person-caption { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .page-image.enter { animation: none; } }
