:root {
  color-scheme: dark;
  --bg: #101718;
  --panel: #182122;
  --line: #34413f;
  --gold: #d8bc88;
  --text: #e9e8df;
  --muted: #a7b3ad;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  background: #202c2c;
  color: var(--text);
  border: 1px solid #52625a;
  border-radius: 5px;
  padding: 10px 15px;
}
button {
  cursor: pointer;
}
button:hover {
  background: #34453f;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.primary {
  background: var(--gold);
  color: #182220;
  border-color: var(--gold);
  font-weight: 650;
}
.primary:hover {
  background: #eed3a5;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  margin: auto;
  padding: 25px 42px;
  border-bottom: 1px solid var(--line);
}
.brand {
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
}
.brand b {
  font-size: 20px;
  color: var(--gold);
  margin-right: 10px;
}
nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 34px 42px 60px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 25px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-size: 10px;
  margin: 0 0 10px;
}
h1 {
  font:
    normal clamp(30px, 3.3vw, 48px) / 1.1 Georgia,
    serif;
  margin: 0;
}
h1 em {
  color: #b5c9bd;
}
p.sub {
  max-width: 440px;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}
.tag {
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.stage-wrap {
  position: relative;
  border: 1px solid #465047;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 80px #0005;
}
.start-card {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #07100a20, #07100ac9);
}
.start-card[hidden] {
  display: none;
}
.start-inner {
  text-align: center;
  padding: 30px;
  max-width: 500px;
}
.start-inner h2 {
  font: normal clamp(36px, 5vw, 68px) / 1.1 Georgia;
  margin: 14px 0 22px;
}
.start-inner p {
  color: #e2e4d7;
}
.start-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.transport {
  padding: 15px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #172020;
  flex-wrap: wrap;
}
.transport button {
  padding: 8px 13px;
}
.status {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.volume {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
input[type="range"] {
  accent-color: var(--gold);
  width: 85px;
}
.chapters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 30px;
}
.chapter {
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-color: var(--line);
  background: transparent;
}
.chapter img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  opacity: 0.55;
  display: block;
}
.chapter span {
  display: block;
  padding: 11px 13px;
  font-size: 12px;
}
.chapter.active {
  border-color: var(--gold);
}
.chapter.active img {
  opacity: 1;
}
.chapter small {
  color: var(--gold);
  margin-right: 9px;
}
.bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  color: var(--muted);
  font-size: 12px;
}
.bottom h3 {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text);
}
details {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
summary {
  cursor: pointer;
  color: var(--text);
}
.audio-alert {
  padding: 12px 20px;
  background: #4b3825;
  color: #fff;
}
.audio-alert[hidden] {
  display: none;
}
.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.lab-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
}
.lab-panel h2 {
  font: normal 25px Georgia;
  margin: 0 0 18px;
}
.lab-panel label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.lab-panel select {
  width: 100%;
}
.lab-panel input[type="number"] {
  width: 100%;
  background: #101718;
  border: 1px solid #52625a;
  color: var(--text);
  padding: 8px;
  border-radius: 4px;
}
.lab-panel label.check {
  display: flex;
  align-items: center;
}
.lab-panel .primary {
  width: 100%;
  margin-top: 16px;
}
.lab-panel p {
  font-size: 11px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  overflow: auto;
  font:
    11px/1.65 ui-monospace,
    monospace;
  color: #b8cbbd;
  max-height: 240px;
}
.lab-grid .story-diorama {
  min-height: 470px;
}
.lab-grid .sd-text {
  font-size: 27px;
}
.lab-grid .sd-window {
  max-height: 135px;
}
.lab-grid .chapters {
  gap: 7px;
}
.lab-grid .chapter img {
  height: 65px;
}
.lab-grid .chapter span {
  font-size: 10px;
  padding: 9px;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .lab-grid {
    grid-template-columns: 1fr;
  }
  .lab-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .lab-panel h2,
  .lab-panel p,
  .lab-panel button,
  .lab-panel details {
    grid-column: 1/-1;
  }
  .intro .tag {
    display: none;
  }
}
@media (max-width: 600px) {
  header {
    padding: 20px;
    align-items: start;
  }
  nav {
    gap: 12px;
    font-size: 10px;
  }
  main {
    padding: 28px 16px;
  }
  .intro {
    display: block;
  }
  .bottom {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .transport {
    padding: 12px;
    gap: 8px;
  }
  .status {
    width: 100%;
    margin: 0;
  }
  .chapters {
    gap: 7px;
  }
  .chapter img {
    height: 60px;
  }
  .chapter span {
    font-size: 10px;
    padding: 8px;
  }
  .chapter small {
    display: none;
  }
  .volume input {
    width: 65px;
  }
  .lab-grid .sd-text {
    font-size: 25px;
  }
  .lab-panel {
    padding: 18px;
  }
  .tag {
    display: none;
  }
}

/* Host-owned controls may be independently removed from this demonstration. */
[hidden] {
  display: none !important;
}
.lab-panel input[type="text"] {
  width: 100%;
  padding: 8px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #52625a;
  border-radius: 4px;
}
/* Embedded players must not impose their aspect-ratio minimum on grid tracks. */
.lab-grid > *,
.lab-panel label {
  min-width: 0;
}
@media (max-width: 900px) {
  .lab-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
