/* Stories stay in the room: a small field note, or the controls for a projection. */
.story-dialog {
  z-index: 12;
  top: 108px;
  right: 30px;
  bottom: auto;
  width: 340px;
  max-width: calc(100vw - 48px);
  height: auto;
  max-height: calc(100dvh - 234px);
  border: 1px solid #c59a6729;
  border-radius: 5px;
  background: #241b16ed;
  color: #ead9bf;
  box-shadow: 0 15px 50px #10090438;
  backdrop-filter: blur(18px);
  scrollbar-color: #8b694944 transparent;
}
.story-dialog::backdrop { background: transparent; }
.drawer-top {
  padding: 16px 22px;
  border-color: #bd93652b;
  background: #241b16ed;
}
#drawer-index { color: #ba9470; font-size: 8px; }
#close-story { color: #d2b796; gap: 12px; font-size: 9px; min-height: 24px; }
#close-story:hover { color: #ffebca; }
#close-story > span:last-child { font-size: 22px; }
.story-content-inner { padding: 22px; }
.story-kicker { color: #b18d6a; font-size: 7px; letter-spacing: 1.25px; }
.story-icon-large { width: 27px; height: 27px; color: #be8c78; margin: 14px 0 10px; }
.story-dialog h2 { font-size: 28px; line-height: 1.12; letter-spacing: -.5px; margin: 12px 0 14px; }
.story-lede { color: #d3b499; font-size: 17px; line-height: 1.5; margin-bottom: 18px; }
.story-body { color: #bda88e; font-size: 11px; line-height: 1.85; margin-top: 14px; }
.story-facts { gap: 18px; padding: 17px 0; margin: 20px 0; border-color: #b8946538; }
.story-fact strong { color: #e2b590; font-size: 25px; }
.story-fact span { color: #b79c7c; font-size: 9px; }
.story-subtitle { font-size: 21px; margin: 24px 0 14px; }
.archive-card { background: #96734b0c; border-color: #c29c6a2e; padding: 14px; }
.archive-card > span { color: #dcb895; font-size: 10px; }
.archive-card small, .material-note { color: #ac9478; font-size: 9px; }
.archive-card:hover { background: #a17b4c18; }
.paper-link { background: #793e4699; color: #f1ddbf; padding: 14px; margin-top: 19px; }
.physics-controls { padding: 15px; margin: 20px 0; border-color: #b8996b30; background: #13100c45; }
.physics-controls label { color: #c8aa87; font-size: 10px; margin-bottom: 12px; }
.physics-controls output { color: #e6c59d; }
.physics-controls input { accent-color: #d0a77a; margin-bottom: 15px; }
.release-button { padding: 12px; background: #91515a99; color: #f1ddbf; }
.release-button:hover { background: #a7616a99; }
.physics-note { color: #aa9276; }
.physics-readout { color: #dbb991; }
.activity-row, .honor-row { border-color: #b894652c; }
.activity-row summary { font-size: 11px; padding: 13px 0; }
.activity-row summary:after { color: #c19d76; }
.activity-row p { color: #b9a185; font-size: 10px; }
.honor-row { padding: 16px 0; }
.honor-row small { color: #b5926c; }
.honor-row h3 { font-size: 20px; }
.honor-row p { color: #bca184; }
.drawer-bottom { padding: 16px 22px; border-color: #bd93652b; }
.drawer-bottom > span { color: #a98a66; font-size: 6px; }
#next-object { color: #dfb994; }
.help-list { color: #c4ab8c; font-size: 11px; }
.index-item { padding: 12px; border-color: #b79d7c30; }
.index-item:hover { background: #b18b5c14; }
.object-index { gap: 8px; }
.index-item .object-name { font-size: 9px; }
html[lang=zh-CN] .story-dialog h2 { font-size: 25px; line-height: 1.3; }
html[lang=zh-CN] .story-lede { font-size: 15px; }
body.panel-open .header { opacity: 1; }
body.panel-open .room-intro, body.panel-open .room-note, body.panel-open .hotspots { visibility: hidden; }
.lab-notes { border-top: 1px solid #b894652c; margin-top: 16px; padding-top: 14px; }
.lab-notes summary { cursor: pointer; color: #dab995; font-size: 11px; }
.story-dialog[data-story=physics] .story-icon-large { display: none; }
.story-dialog[data-story=physics] .story-lede { font-size: 14px; }
#film-status { color: #dec09b; font-size: 11px; line-height: 1.5; margin-top: 10px; }
body.panel-open .object-nav, body.panel-open .camera-controls { opacity: .75; }
body.panel-open .object-nav:hover, body.panel-open .camera-controls:hover { opacity: 1; }

/* Only a small transport console belongs to the page. The film is in the scene. */
body.cinema-open .room-footer { opacity: 0; visibility: hidden; pointer-events: none; }
body.cinema-open .story-dialog {
  inset: auto 24px 24px;
  width: min(900px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 180px);
  height: auto;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}
body.cinema-open .story-dialog:before { display: none; }
body.cinema-open .drawer-top {
  position: fixed;
  top: 98px;
  right: 38px;
  display: flex;
  gap: 24px;
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
  pointer-events: auto;
}
body.cinema-open #drawer-index { color: #9e7f60; }
body.cinema-open #close-story { padding: 6px 0 6px 12px; text-shadow: 0 1px 8px #100905; }
body.cinema-open .drawer-bottom { display: none; }
body.cinema-open .story-content-inner { padding: 0; }
.cinema-meta {
  position: fixed;
  top: 107px;
  left: 39px;
  width: 210px;
  color: #e1c6a5;
  text-shadow: 0 2px 14px #100a06bb;
  pointer-events: none;
}
.cinema-meta .story-kicker { color: #bb9873; font-size: 7px; letter-spacing: 1.8px; }
.cinema-meta #story-title { font-size: 25px; line-height: 1.15; margin: 12px 0 10px; }
#projection-title { font-size: 10px; line-height: 1.7; color: #bda080; max-width: 190px; }
html[lang=zh-CN] .cinema-meta #story-title { font-size: 22px; }
.projection-player-source { pointer-events: auto; max-width: 620px; margin: 0 auto 12px; background: #110c09; border: 1px solid #9e77513b; }
.projection-player-source video, .projection-player-source iframe { display: block; width: 100%; max-height: 48dvh; aspect-ratio: 16/9; object-fit: contain; border: 0; }
body.projection-active .projection-player-source {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  margin: 0;
  border: 0;
}
.cinema-console {
  padding: 14px 19px 10px;
  border-top: 1px solid #b18b5b3b;
  background: #1d1510d9;
  border-radius: 3px;
  backdrop-filter: blur(16px);
  pointer-events: auto;
}
.transport-row { display: flex; align-items: center; gap: 15px; min-height: 29px; }
.transport-row button { color: #d7b58c; min-height: 30px; }
.transport-row button:hover { color: #ffedce; }
#film-play { width: 30px; flex-shrink: 0; font-size: 15px; text-align: center; }
#film-time { color: #a98b67; font: 9px monospace; white-space: nowrap; }
#film-progress { min-width: 45px; width: 100%; flex: 1; height: 18px; margin: 0; cursor: pointer; accent-color: #d0ad7f; }
#film-mute { font-size: 9px; white-space: nowrap; padding-inline: 4px; }
#film-fullscreen { width: 28px; flex-shrink: 0; font-size: 21px; }
.filmstrip { display: flex; gap: 9px; overflow-x: auto; padding: 11px 1px 3px; scrollbar-width: thin; scrollbar-color: #b08a5844 transparent; }
.film-choice {
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  flex: 1 0 185px;
  max-width: 280px;
  min-width: 0;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #f2cea508;
  text-align: left;
  color: #ae9474;
  transition: border-color .2s, background .2s, color .2s;
}
.film-choice img { grid-column: 1; grid-row: 1 / 3; display: block; width: 58px; height: 37px; object-fit: cover; opacity: .75; }
.film-choice > span { font-size: 9px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.film-choice > small { color: #997e5d; font: 8px monospace; }
.film-choice:hover { background: #e6b47a0e; color: #e9cba6; }
.film-choice[aria-pressed=true] { color: #edcfaa; border-color: #b895605c; background: #bd95631a; }
.film-choice[aria-pressed=true] img { opacity: 1; }
.film-choice[aria-pressed=true] > small { color: #bfa07c; }
.cinema-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 20px; padding: 10px 1px 0; color: #ac8e6b; font-size: 8px; line-height: 1.7; }
.cinema-links button:first-child { margin-right: auto; }
.cinema-links a:hover, .cinema-links button:hover { color: #efd5b2; }
.cinema-links a { text-decoration: none; }
.music-notes { max-height: 32dvh; overflow-y: auto; margin-top: 10px; padding: 17px 21px; background: #241b16f2; border-top: 1px solid #ba936136; backdrop-filter: blur(18px); pointer-events: auto; scrollbar-width: thin; }
.music-notes .story-subtitle { margin-top: 8px; }
.music-notes .story-facts { margin-block: 14px; }
.music-notes .story-body { max-width: 650px; }
body.cinema-open .toast { bottom: 230px; }

@media (min-width: 1600px) {
  .story-dialog { right: 55px; top: 130px; width: 370px; max-height: calc(100dvh - 265px); }
  body.cinema-open .drawer-top { top: 120px; right: 55px; }
  .cinema-meta { top: 130px; left: 55px; }
}
@media (max-width: 1000px) {
  .story-dialog { right: 22px; width: 320px; top: 95px; max-height: calc(100dvh - 225px); }
  .story-content-inner { padding: 20px; }
  body.cinema-open .drawer-top { right: 28px; top: 91px; }
  .cinema-meta { left: 28px; top: 96px; width: 170px; }
  .cinema-meta #story-title { font-size: 22px; }
  #projection-title { font-size: 9px; max-width: 160px; }
}
@media (max-width: 600px) {
  .story-dialog {
    inset: auto 12px 14px;
    width: calc(100vw - 24px);
    max-width: none;
    height: auto;
    max-height: 42dvh;
    border: 1px solid #c59a6729;
    border-radius: 6px;
    box-shadow: 0 10px 40px #10090444;
    background: #241b16f2;
  }
  .story-dialog:before { display: none; }
  .drawer-top { padding: 13px 18px; }
  .story-content-inner { padding: 18px; }
  .story-dialog h2 { font-size: 25px; margin: 10px 0 12px; }
  .story-lede { font-size: 16px; }
  .story-body { font-size: 11px; }
  .drawer-bottom { padding: 14px 18px; }
  .physics-controls { margin-block: 16px; padding: 13px; }
  html[lang=zh-CN] .story-dialog h2 { font-size: 23px; }
  body.panel-open:not(.cinema-open) .room-footer { opacity: 0; visibility: hidden; }
  body.cinema-open .story-dialog { inset: auto 12px 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 160px); }
  body.cinema-open .drawer-top { top: 82px; right: 21px; gap: 13px; }
  body.cinema-open #drawer-index { display: none; }
  body.cinema-open #close-story { font-size: 8px; gap: 7px; padding-top: 3px; }
  body.cinema-open #close-story > span:last-child { font-size: 20px; }
  .cinema-meta { top: 86px; left: 23px; width: 180px; }
  .cinema-meta .story-kicker { font-size: 6px; letter-spacing: 1.2px; }
  .cinema-meta #story-title { font-size: 20px; margin: 7px 0 6px; }
  html[lang=zh-CN] .cinema-meta #story-title { font-size: 18px; }
  #projection-title { font-size: 8px; max-width: 155px; line-height: 1.5; }
  .cinema-console { padding: 10px 11px 9px; }
  .transport-row { gap: 8px; }
  .transport-row button { min-height: 40px; }
  #film-play { width: 30px; }
  #film-time { font-size: 9px; }
  #film-mute { font-size: 9px; padding-inline: 0; }
  #film-fullscreen { width: 23px; font-size: 19px; }
  .filmstrip { gap: 6px; padding-top: 8px; }
  .film-choice { flex-basis: 156px; column-gap: 7px; padding: 5px; grid-template-columns: 49px 1fr; max-width: 200px; }
  .film-choice img { width: 49px; height: 33px; }
  .film-choice > span { font-size: 8px; }
  .film-choice > small { font-size: 7px; }
  .cinema-links { gap: 12px; font-size: 7px; padding-top: 8px; }
  .music-notes { max-height: 29dvh; padding: 15px; }
  .projection-player-source video, .projection-player-source iframe { max-height: 38dvh; }
  body.cinema-open .toast { bottom: 190px; }
}
@media (max-height: 550px) and (min-width: 601px) {
  .story-dialog { top: 69px; right: 20px; max-height: calc(100dvh - 146px); width: 310px; }
  .drawer-top { padding-block: 10px; }
  .story-content-inner { padding: 16px 20px; }
  body.cinema-open .story-dialog { bottom: 9px; max-height: calc(100dvh - 90px); width: min(740px, calc(100vw - 40px)); }
  body.cinema-open .drawer-top { top: 65px; right: 24px; }
  .cinema-meta { top: 68px; left: 26px; }
  .cinema-meta #story-title { font-size: 19px; margin-block: 6px; }
  .cinema-console { padding-block: 7px; }
  .transport-row { min-height: 24px; }
  .transport-row button { min-height: 24px; }
  .filmstrip { padding-top: 4px; }
  .film-choice { padding: 4px; }
  .film-choice img { height: 29px; }
  .cinema-links { padding-top: 5px; }
  .music-notes { max-height: 25dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .film-choice { transition: none; }
}
