/* The artwork is the viewport; interface panels stay in screen space. */
body.immersive {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #183538;
}
.immersive .page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.immersive .stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: clip;
  isolation: isolate;
  touch-action: auto;
  cursor: grab;
}
.immersive .stage.is-dragging,
.immersive .stage.is-dragging .scene-object { cursor: grabbing; }
.immersive .scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 2168px;
  height: 725px;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
  transform-origin: 0 0;
  transform: translate(calc(50vw - 1084px), calc(50dvh - 362.5px));
  will-change: transform;
  touch-action: none;
}
.immersive .scene:focus-visible { outline: none; }
.immersive .stage:has(.scene:focus-visible)::after {
  content: '';
  position: absolute;
  inset: 8px;
  z-index: 230;
  border: 1px solid #efdfb866;
  pointer-events: none;
}
/* One quiet corner tab; its tools occupy a single scrollable strip. */
.immersive .porch-controls {
  position: fixed;
  z-index: 260;
  left: max(5px, env(safe-area-inset-left));
  bottom: max(3px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  width: max-content;
  max-width: calc(100vw - max(5px, env(safe-area-inset-left)) - max(7px, env(safe-area-inset-right)));
  margin: 0;
  padding: 0;
}
.immersive .controls-toggle {
  position: relative;
  isolation: isolate;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.immersive .controls-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.immersive .toggle-close { display: none; }
.immersive .controls-toggle[aria-expanded='true'] .toggle-lines { display: none; }
.immersive .controls-toggle[aria-expanded='true'] .toggle-close { display: block; }
.immersive .scene-tools {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  max-width: 850px;
  height: 44px;
  padding: 0 3px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: #b8a477 transparent;
}
.immersive .scene-tools::-webkit-scrollbar { height: 3px; }
.immersive .scene-tools::-webkit-scrollbar-track { background: transparent; }
.immersive .scene-tools::-webkit-scrollbar-thumb { background: #b8a477; border: 0; }
.immersive .control-buttons,
.immersive .camera-controls,
.immersive .scene-settings {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.immersive .control,
.immersive .layers-link {
  --paper-inset-y: 6px;
  --paper-inset-x: 0px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 6px 8px;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.1;
  text-decoration: none;
}
.immersive .control span { padding-left: 1px; }
.immersive #motion { min-width: 78px; }
.immersive #sound { min-width: 72px; }
.immersive .comic-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.immersive .camera-button {
  --paper-inset-y: 8px;
  --paper-inset-x: 3px;
  position: relative;
  isolation: isolate;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 40px;
  padding: 7px;
}
.immersive .camera-button svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.immersive .camera-track {
  --paper-inset-y: 6px;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 90px;
  height: 40px;
  padding: 0 9px;
  cursor: ew-resize;
}
.immersive .camera-track > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.immersive .camera-track input {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.immersive .camera-track input::-webkit-slider-runnable-track { height: 2px; }
.immersive .camera-track input::-moz-range-track { height: 2px; }
.immersive .camera-track input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 15px; height: 10px; margin-top: -4px; }
.immersive .camera-track input::-moz-range-thumb { width: 13px; height: 8px; }

/* Messages live in the sky, leaving the steps and foreground clear. */
.immersive .speech,
.immersive .scene-note,
.immersive .find-panel,
.immersive .streetcar-route {
  position: fixed;
  z-index: 250;
  left: auto;
  right: max(12px, env(safe-area-inset-right));
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  width: min(360px, calc(100vw - 24px));
  max-width: none;
  max-height: min(330px, 46dvh);
  margin: 0;
  padding: 9px 14px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  cursor: auto;
}
.immersive .streetcar-route {
  z-index: 251;
  width: min(340px, calc(100vw - 24px));
  max-height: min(300px, calc(100dvh - max(12px, env(safe-area-inset-top)) - 12px));
  padding: 7px 14px 9px;
}
.immersive .streetcar-route .close-button { flex-basis: 40px; width: 40px; height: 40px; }
.immersive .speech::before,
.immersive .speech::after { display: none; }
.immersive .scene-note { width: min(310px, calc(100vw - 24px)); max-height: min(200px, 36dvh); }
.immersive .find-panel { width: min(310px, calc(100vw - 24px)); max-height: min(300px, 46dvh); }
.immersive .find-panel .eyebrow { margin: 0; }
.immersive .find-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; }
.immersive .find-list button { min-height: 32px; padding: 5px 7px; text-align: left; font-size: 12px; }
.immersive .panel-top { min-height: 30px; gap: 8px; }
.immersive .close-button { flex: 0 0 32px; width: 32px; height: 32px; font-size: 23px; }
.immersive .reply { margin: 1px 0 8px; font-size: 18px; line-height: 1.35; }
.immersive .scene-note p { margin: 2px 0 0; font-size: 16px; line-height: 1.35; }
.immersive .last-message { margin: 2px 0 7px; font-size: 11px; }
.immersive .suggestions { gap: 4px; margin-bottom: 7px; }
.immersive .suggestions button { min-height: 32px; padding: 5px 7px; font-size: 10px; }
.immersive .chat-form { gap: 5px; }
.immersive .chat-form input { min-height: 40px; padding: 7px 8px; font-size: 16px; }
.immersive .send-button { min-width: 48px; min-height: 40px; padding: 7px 9px; }
.immersive .chat-status { margin-top: 4px; min-height: 0; font-size: 10px; }
.immersive .chat-status:empty { display: none; }
.immersive .fineprint { margin-top: 5px; font-size: 9px; }
.immersive .newsstand-dialog {
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(940px, calc(100vw - 24px));
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - 12px);
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.immersive .reader-page img { max-height: 66dvh; }
.immersive .noscript-note {
  position: fixed;
  z-index: 280;
  top: 12px;
  left: 50%;
  width: min(440px, calc(100vw - 24px));
  transform: translateX(-50%);
  margin: 0;
  padding: 12px 16px;
}
@media (max-width: 600px) {
  .immersive .speech,
  .immersive .scene-note,
  .immersive .find-panel,
  .immersive .streetcar-route {
    top: max(9px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: min(360px, calc(100vw - 20px));
    padding: 7px 11px 10px;
  }
  .immersive .streetcar-route {
    width: min(340px, calc(100vw - 20px));
    max-height: min(300px, calc(100dvh - max(9px, env(safe-area-inset-top)) - 10px));
    padding: 7px 11px 9px;
  }
  .immersive .scene-note { width: min(310px, calc(100vw - 20px)); }
  .immersive .find-panel { width: min(310px, calc(100vw - 20px)); }
  .immersive .reply { font-size: 17px; }
}
@media (forced-colors: active) {
  .immersive .camera-track input { appearance: auto; -webkit-appearance: auto; }
  .immersive .camera-button:disabled { opacity: 1; color: GrayText; }
}
