:root {
  color-scheme: only light;
}

html.live .transport {
  --mark-inset: max(0px, min(2.65rem, (100vw - 220px) / 2) - var(--page-pad) - 6.5px);
}

html.live .story-seek {
  width: calc(100% - 2 * var(--mark-inset));
  margin-inline: var(--mark-inset);
}

html.live .stops {
  margin-inline: calc(6.5px + var(--mark-inset));
  --lane: 0;
}

html.live .stops li::after {
  display: none;
}

html.live .stops a {
  inset-inline-start: 0;
}

html.live .stops a::before {
  inset-inline-start: 50%;
}

html.live .stops a[aria-current] {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 400px) {
  html:not(.live) .transport {
    padding-inline: clamp(0px, (100vw - 264px) / 2, var(--page-pad));
  }
  html:not(.live) .stops {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
  }
  html:not(.live) .stops a {
    min-width: 0;
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 650px) {
  html.live .stops a { padding-inline: 2px; font-size: .8rem; }
}

@media (max-width: 650px), (pointer: coarse) {
  .next-actions a { min-height: 44px; }
}

@media (pointer: coarse) {
  html.live .stops { --lane-step: 44px; }
}

html.live .field.static-finish .static-room img {
  max-block-size: 32svh;
  object-fit: contain;
}

html.live .transport-inner {
  grid-template-rows: auto minmax(44px, auto);
}

html.live .field[data-compact-room] #intro h1 {
  font-size: clamp(1.35rem, 6.2vw, 1.6rem);
  line-height: 1.18;
}

html.live .field[data-compact-room] #intro p {
  line-height: 1.45;
}

html.live .field[data-compact-room] #join h2 {
  font-size: clamp(1.38rem, 6vw, 1.8rem);
}

html.live .field[data-compact-room] :is(.intro-actions, .next-actions) {
  margin-top: .5rem;
}

html.live .field[data-room-banner] #intro h1 {
  font-size: clamp(1.45rem, 2.1vw, 2.5rem);
  line-height: 1.25;
}

html.live .field[data-room-banner] #intro p {
  line-height: 1.45;
}

html.live .field[data-room-banner]:not(.static-finish) #join {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 3rem);
}

html.live .field[data-room-banner] #join h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

html.live .field[data-room-banner] #join .next-actions {
  margin: 0;
}

@media (max-width: 1120px), (max-height: 740px) {
  /* Keep the link above the lamp's hit target while the room tilts. */
  html.live .field[data-room-banner]:has(.home-model-toggle:not([hidden])[aria-pressed="false"]) #intro[data-active] {
    z-index: 4;
  }

  html.live .field[data-room-banner] #intro .intro-actions {
    margin-block-start: .25rem;
  }

  .field[data-room-banner] #intro .copy-full { display: none; }
  .field[data-room-banner] #intro .copy-short { display: inline; }
}

.home-model-toggle {
  position: absolute;
  z-index: 4;
  left: var(--toggle-x);
  top: var(--toggle-y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.home-model-toggle[hidden],
html:not(.live) .home-model-toggle {
  display: none;
}

.home-model-toggle:focus-visible {
  outline-offset: -6px;
}

.home-model-toggle-icon {
  display: block;
  inline-size: 15px;
  block-size: 15px;
  border-radius: 4px;
  background: var(--paper);
}

.home-model-toggle[aria-pressed="true"] .home-model-toggle-icon,
.home-model-toggle:active .home-model-toggle-icon {
  color: white;
  background: var(--forest);
}

@media (hover: hover) {
  .home-model-toggle:hover:not([aria-pressed="true"]) .home-model-toggle-icon { background: #e6ebe4; }
}

.home-model-toggle[aria-pressed="true"] .home-model-toggle-lower-panel {
  transform: translateY(1.3px);
}

.chapter .copy-short { display: none; }

@media (max-width: 679px), (max-width: 979px) and (orientation: landscape) and (max-height: 540px) {
  .chapter .copy-full { display: none; }
  .chapter .copy-short { display: inline; }
  #packing .story-link { min-height: 44px; }
}

#advance[hidden], html.live #packing .pack-tip:not([data-feedback]) { display: none; }
.chapter-next {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; margin-block-start: .45rem; padding-inline: .8rem;
  border: 1px solid #80938a; border-radius: .5rem; color: var(--forest);
  background: var(--paper); font-size: .86rem; font-weight: 650; text-decoration: none;
}
.chapter-next:hover { background: #e4ebe4; }
#intro .intro-actions {
  justify-content: flex-start;
  gap: .45rem;
}
#intro .home-features { margin: 0; }
#intro .intro-actions :is(.home-features,.order-now) { white-space: nowrap; }
#packing .lab-note { margin-block: .6rem 0; }
#packing .chapter-next { margin-block-start: .55rem; }
#fasten-title { transition: color .22s ease; }
#fasten-title[data-complete], #fasten-title[data-complete] em { color: #147841; }
html.live .stops a {
  width: 44px; height: 38px; min-height: 38px; text-decoration: none;
  background: transparent; border-radius: 7px;
}
.stops a svg { flex: none; }
.stops a::before, html.live .stops a::before { display: none; }
html.live .stops a[aria-current] { color: var(--forest); background: #e2ebe1; }
html.live .stops a:is(:focus-visible,:hover) { outline-offset: -3px; background: #e2ebe1; }
.stops a::after {
  content: attr(data-stage-tooltip); display: none; position: absolute; z-index: 6;
  inset-block-end: calc(100% + 5px); inset-inline-start: 50%; transform: translateX(50%);
  padding: .28rem .44rem; border-radius: 5px; background: #202c25; color: white;
  font-size: .74rem; font-weight: 550; white-space: nowrap; pointer-events: none;
}
.stops a:focus-visible::after { display: block; }
@media (hover: hover) { .stops a:hover::after { display: block; } }
@media (pointer: coarse) {
  html.live .stops a { height:44px; min-height:44px; }
}
@media (max-width: 480px) {
  .stops a svg { width: 17px; height: 17px; }
  #intro .intro-actions .chapter-next, #intro .order-now { font-size: .8rem; padding-inline: .55rem; }
}
@media (prefers-reduced-motion: reduce) { #fasten-title { transition: none; } }
