.view-choice { position:relative; flex:0 0 auto; z-index:15; color:inherit; font-family:system-ui,"Microsoft YaHei",sans-serif }
.view-choice summary { cursor:pointer; list-style:none; box-sizing:border-box; display:grid; place-items:center; width:40px; height:40px; padding:0; border-radius:50%; border:1px solid transparent; color:inherit }
.view-choice summary::-webkit-details-marker { display:none }
.view-choice summary:hover,.view-choice[open] summary { border-color:#91a793aa }
.view-choice svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round }
.view-options { position:absolute; z-index:20; top:calc(100% + 3px); right:0; min-width:148px; padding:5px; color:#163b31; background:#f6f4ec; border:1px solid #99ab9d; border-radius:8px; box-shadow:0 8px 22px #061d1633 }
.view-choice .view-options button { display:grid; grid-template-columns:19px 1fr 13px; align-items:center; gap:9px; padding:0 10px; min-height:44px; width:100%; color:inherit; text-align:left; cursor:pointer; border:0; border-radius:4px; background:transparent; font:500 14px/1.3 system-ui,"Microsoft YaHei",sans-serif }
.view-choice .view-options button:hover,.view-choice .view-options button:focus-visible { background:#e7eae0 }
.view-options button[aria-pressed="true"] b::after { content:"✓" }
.view-choice summary:focus-visible,.view-options button:focus-visible { outline:2px solid #b38547; outline-offset:2px }
#side-forward { position:fixed; right:max(6px,env(safe-area-inset-right)); top:50%; transform:translateY(-50%); z-index:3; display:grid; place-items:center; width:44px; height:52px; color:#fff5df; text-decoration:none; touch-action:none; -webkit-tap-highlight-color:transparent }
#side-forward::before { content:""; position:absolute; inset:6px 4px; border:1px solid #ead8af88; border-radius:24px; background:#103c32a8; box-shadow:0 1px 8px #041b1829 }
#side-forward svg { position:relative; width:16px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
#side-forward:hover::before,#side-forward:focus-visible::before { background:#144c40ee; border-color:#f2d8a2 }
body:has(dialog[open]) #side-forward { visibility:hidden }
html:has(#exhibit) { overscroll-behavior-x:contain }
.view-shell { margin:0; height:100vh; height:100dvh; display:grid; grid-template-rows:auto minmax(0,1fr); font:14px/1.4 system-ui,sans-serif; background:#162b26; color:#f2f0e5 }
.view-toolbar { padding:2px max(12px,env(safe-area-inset-right)) 2px 16px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #7c94875c; background:#0e2822; z-index:4 }
.view-toolbar > span { color:#eceadb; font-weight:600; letter-spacing:.05em }
.view-stage { min-height:0; display:grid; place-items:center; overflow:hidden; background:radial-gradient(ellipse at 50% 38%, #314a3f, #162b26 70%) }
.view-device { position:relative; overflow:hidden; outline:1px solid #86988859; box-shadow:0 5px 24px #07150f59 }
.view-device iframe { display:block; position:absolute; top:0; left:0; border:0; transform-origin:top left; background:#112f27 }
@media(max-width:520px){.view-choice summary{width:34px;height:38px} #side-forward{right:max(1px,env(safe-area-inset-right))} #side-forward::before{inset:9px 6px} .masthead .view-choice summary{width:32px}.masthead .view-options {left:auto;right:-54px}}
@media print { .view-choice,#side-forward { display:none!important } }

@media(max-width:360px){.mast .view-options{right:-24px}}

@media (max-width:360px) {
  .mast #open-info span {display:none}
  .mast #open-info {width:44px;padding:0}
  .mast .utils {gap:0}
}

/* On a small data slide the footer already offers the same next-page action. */
@media (max-width:1024px), (max-height:600px) {
  #exhibit:is([data-scene="6"], [data-scene="8"]) + #side-forward { display:none }
}
/* The fallback presentation toolbar needs its own row above dense charts. */
.compact-player:has(#exhibit:is([data-scene="6"], [data-scene="8"])) { --mast:44px }
.compact-player:has(#exhibit:is([data-scene="6"], [data-scene="8"])) .mast {
  height:calc(var(--mast) + env(safe-area-inset-top));
  padding-top:env(safe-area-inset-top)
}
.compact-player:has(#exhibit:is([data-scene="6"], [data-scene="8"])) .mast .utils {
  position:static; margin-inline-start:auto
}

#exhibit:is([data-scene="6"], [data-scene="8"]) > .composition {
  padding-inline:env(safe-area-inset-left) env(safe-area-inset-right)
}
