/* Keep the shift board and the model visible together throughout the replay. */
#mk-coal #home .shift-start,
#mk-coal #home .shift-story :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px 13px;
  box-sizing: border-box;
  border: 1px solid var(--mk-line);
  border-radius: 4px;
  color: var(--mk-text);
  background: var(--mk-deep);
  font: 580 .94rem/1.2 var(--mk-sans);
  text-decoration: none;
  cursor: pointer;
}
#mk-coal #home .shift-start { border-color: #8eaaa9; }
#mk-coal #home :is(.shift-start, .shift-story button, .shift-story a):hover {
  border-color: var(--mk-accent);
  color: var(--mk-accent);
}
#mk-coal #home :is(.shift-start, .shift-story button, .shift-story a):focus-visible {
  outline: 2px solid var(--mk-accent);
  outline-offset: 2px;
}
#mk-coal #home .shift-start[hidden],
#mk-coal #home .shift-story[hidden],
#mk-coal #home .shift-story [hidden],
#mk-coal #home[data-room-mode=inspect] .shift-start,
#mk-coal #home[data-shift-active] :is(.hero-profile, .room-camera, .room-entry, .room-location, .shift-feed, .next-results) {
  display: none;
}
#mk-coal #home[data-shift-active] .arrival-panorama {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  min-height: calc(100svh - var(--mast-height));
  height: calc(100svh - var(--mast-height));
}
#mk-coal #home[data-shift-active] .room-hero {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
#mk-coal #home[data-shift-active] .room-hero::after { content: none; }
#mk-coal #home[data-shift-active] .room-hero .room-lens {
  position: absolute;
  inset: 0;
  height: 100%;
  overflow: clip;
  mask-image: none;
  pointer-events: none;
  container-type: size;
}
#mk-coal #home[data-shift-active] .room-lens .window-scene {
  position: absolute;
  inset: auto auto auto 50%;
  top: 50%;
  width: min(100%, 275cqh);
  min-width: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -54%);
}
#mk-coal #home[data-shift-active] .room-lens [data-map] { padding: 0; }
#mk-coal #home .shift-story {
  position: relative;
  z-index: 2;
  padding: 10px clamp(16px, 4vw, 72px) clamp(10px, 1.7vh, 20px);
  background: var(--mk-bg);
  color: var(--mk-text);
  border-top: 1px solid #547074;
}
#mk-coal #home .shift-story-inner { width: 100%; max-width: 1100px; margin: auto; }
#mk-coal #home .shift-story-meta,
#mk-coal #home .shift-story-footer,
#mk-coal #home .shift-story-meta > div,
#mk-coal #home .shift-story-transport,
#mk-coal #home .shift-story-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
#mk-coal #home .shift-story-meta { justify-content: space-between; }
#mk-coal #home .shift-story-meta > div {
  gap: .85em;
  color: var(--mk-muted);
  font: 550 .82rem/1.25 var(--mk-sans);
  font-variant-numeric: tabular-nums;
}
#mk-coal #home .shift-story-meta strong { color: var(--mk-accent); letter-spacing: .06em; text-transform: uppercase; }
#mk-coal #home .shift-story [data-shift-exit] {
  padding-inline: 10px;
  border-color: transparent;
  color: var(--mk-muted);
  background: transparent;
}
#mk-coal #home .shift-story-intro { margin: 0 0 clamp(10px, 1.8vh, 19px); }
#mk-coal #home .shift-story-intro h2 {
  margin: 0;
  color: var(--mk-text);
  font: 600 clamp(1.5rem, 2.3vw, 2.2rem)/1.08 var(--mk-sans);
  letter-spacing: -.035em;
}
#mk-coal #home .shift-story-intro p {
  max-width: 75ch;
  margin: .4em 0 0;
  color: var(--mk-muted);
  font: 480 clamp(.97rem, 1.3vw, 1.12rem)/1.38 var(--mk-sans);
}
#mk-coal #home .shift-story-footer { justify-content: space-between; margin-top: 10px; }
#mk-coal #home .shift-story-footer:has(.shift-story-result:not([hidden])) .shift-story-transport { display: none; }
#mk-coal #home .shift-story-dots { display: flex; align-items: center; gap: 6px; }
#mk-coal #home .shift-story-dots i { width: 8px; height: 8px; border-radius: 100%; border: 1px solid #86a0a4; }
#mk-coal #home .shift-story-dots i[aria-current="step"] { border-color: var(--mk-accent); background: var(--mk-accent); }
#mk-coal #home .shift-story [data-story-next], #mk-coal #home .shift-story-result a:first-child {
  border-color: var(--mk-accent); background: var(--mk-accent); color: var(--mk-deep);
}
#mk-coal #home .shift-story [data-story-next]:hover, #mk-coal #home .shift-story-result a:first-child:hover {
  color: var(--mk-deep); background: #ffdcaa;
}

@media (max-width: 730px) {
  #mk-coal #home[data-room-mode=arrival]:not([data-shift-active]) .room-entry {
    display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
    padding: 5px var(--entry-inset) 8px;
  }
  #mk-coal #home[data-room-mode=arrival] .arrival-tools > summary {
    position: static; max-width: none; margin: 0;
  }
  #mk-coal #home[data-room-mode=arrival] .room-entry > .motion { position: static; margin: 0 0 0 auto; }
  #mk-coal #home .shift-start { font-size: .875rem; padding-inline: 9px; }
  #mk-coal #home[data-shift-active] .arrival-panorama { grid-template-rows: minmax(78px, 1fr) auto; }
  #mk-coal #home[data-shift-active] .room-hero .window-scene {
    width: max(100%, 182cqh);
    left: 0;
    transform: translate(0, -51%);
  }
  #mk-coal #home .shift-story { padding: 4px clamp(12px, 4vw, 22px) 9px; }
  #mk-coal #home .shift-story-intro { margin-bottom: 11px; }
  #mk-coal #home .shift-story-intro h2 { font-size: clamp(1.32rem, 5.5vw, 1.8rem); }
  #mk-coal #home .shift-story-intro p { line-height: 1.27; }
  #mk-coal #home .shift-story-footer:has(.shift-story-result:not([hidden])) .shift-story-dots { display: none; }
  #mk-coal #home .shift-story-result {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 4px;
    text-align: center;
  }
  #mk-coal #home .shift-story-result :is(a, button) { padding-inline: 9px; font-size: .86rem; }
}
@media (min-width: 731px) and (max-width: 960px) {
  #mk-coal #home[data-room-mode=arrival] .room-entry { gap: 5px; }
  #mk-coal #home[data-room-mode=arrival] .room-entry > .motion { position: absolute; top: auto; bottom: calc(100% + 7px); right: 0; }
}
@media (min-width: 731px) and (max-aspect-ratio: 11/10) {
  #mk-coal #home[data-shift-active] .room-lens .window-scene {
    width: max(100%, 177.8cqh);
    left: 0;
    transform: translate(0, -50%);
  }
}
@media (min-width: 731px) and (max-height: 500px) {
  #mk-coal #home[data-shift-active] .arrival-panorama { grid-template-rows: 1fr; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); }
  #mk-coal #home[data-shift-active] .room-lens .window-scene { width: auto; height: 100%; left: 0; transform: translate(0, -50%); }
  #mk-coal #home .shift-story { padding: 2px 12px 6px; }
  #mk-coal #home .shift-story-intro { margin-bottom: 6px; }
  #mk-coal #home .shift-story-intro h2 { font-size: 1.4rem; }
  #mk-coal #home .shift-story-intro p { margin: 2px 0; font-size: .91rem; }
  #mk-coal #home .shift-story-footer { margin-top: 5px; }
  #mk-coal #home .shift-story-footer:has(.shift-story-result:not([hidden])) .shift-story-dots { display: none; }
  #mk-coal #home .shift-story-result :is(a, button) { padding-inline: 9px; font-size: .86rem; }
}

/* Frame the loading position, then pull back far enough to see the pit fleet. */
#mk-coal #home[data-shift-active]:is([data-story-view="0"],[data-story-view="2"]) .room-lens .window-scene {
 left:50%;top:50%;width:max(230%,190cqh);transform:translate(-27%,-64%);
}
#mk-coal #home[data-shift-active]:is([data-story-view="0"],[data-story-view="2"]) .room-table {transform:none}
@media (max-width:730px) {
 #mk-coal #home[data-shift-active]:is([data-story-view="0"],[data-story-view="2"]) .room-lens .window-scene {width:480%}
 #mk-coal #home[data-shift-active][data-story-view="1"] .room-lens .window-scene {
  left:50%;top:50%;width:130%;transform:translate(-38%,-60%);
 }
}

#mk-coal #home .story-callout {display:none;pointer-events:none}
#mk-coal #home[data-shift-active] .story-callout:not(:empty) {
 display:grid;width:max-content;max-width:min(30ch,calc(100% - 20px));
 padding:9px 13px;font-size:1rem;line-height:1.35;font-variant-numeric:tabular-nums;
}
/* A live region must already be in the accessibility tree before its first message. */
#mk-coal #home .story-callout:empty {
 display:block;width:1px;height:1px;padding:0;border:0;clip-path:inset(50%);
}
#mk-coal #home .story-callout.cab-message {border-radius:14px}
#mk-coal #home .story-callout strong {color:var(--mk-accent);font-size:.86rem}
