.interactive-slide-shell {
  width: 100%;
}

/* A wide activity may use the browser's available horizontal space without
   changing the normal notes-slide width anywhere else in the lesson. */
body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-layout="wide"]) #stage {
  max-width: min(1800px, calc(100vw - 24px));
  padding-inline: 12px;
}

body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-layout="wide"]) #slide-wrap {
  overflow: visible;
}

/* Interactive slides prioritize working space. On laptop and desktop screens,
   condense the parent lesson chrome into two shallow, single-line bars. */
@media (min-width: 900px) {
  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #topbar {
    height: 44px;
    padding: 5px 14px;
    gap: 10px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #topbar .brand {
    font-size: 15px;
    line-height: 1.1;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #topbar .brand small {
    display: none;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) .topbar-right {
    gap: 8px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) .save-status {
    max-width: 260px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #save-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #scorebar {
    top: 44px;
    padding: 5px 12px;
    grid-template-columns: auto minmax(0, 1fr) minmax(270px, auto) auto;
    gap: 8px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #prev-top {
    grid-column: 1;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #dots-top {
    grid-column: 2;
    gap: 4px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #progress-wrap {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
    gap: 7px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #progress-track {
    width: 74px;
    flex: 0 0 74px;
    height: 4px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #progress-text {
    font-size: 11px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #next-top {
    grid-column: 4;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) .navbtn {
    padding: 6px 11px;
    font-size: 12px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) .dot {
    width: 23px;
    height: 23px;
    font-size: 10px;
  }

  body:has(#interactive-host:not(.hidden) .interactive-slide-shell[data-compact-navigation="true"]) #stage {
    margin-top: 6px;
  }
}

.interactive-slide-frame {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 22px;
  background: #f7f9fb;
}

.interactive-slide-done {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #e8f7ef;
  color: #0b6b45;
  font-weight: 800;
}

@media (max-width: 760px) {
  .interactive-slide-frame {
    min-height: 1080px !important;
    border-radius: 14px;
  }
}

@supports not selector(body:has(*)) {
  .interactive-slide-shell[data-layout="wide"] {
    width: min(1800px, calc(100vw - 24px));
    margin-left: 50%;
    transform: translateX(-50%);
  }
}
