:root {
  color-scheme:dark;
  --bg:#0c1119;
  --panel:#151c27;
  --line:#ffffff1c;
  --muted:#9ca9bb;
  --text:#f2f5fa;
  --amber:#ffbd59;
  --mint:#7ce4c4;
  --radius:14px;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
}
[hidden] {
  display:none!important;
}
button,a,summary {
  -webkit-tap-highlight-color:transparent;
}
button,summary {
  font:inherit;
  cursor:pointer;
}
button:disabled {
  opacity:.5;
  cursor:default;
}
a {
  color:inherit;
}
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline:3px solid var(--mint);
  outline-offset:4px;
}
button {
  color:inherit;
}
button:active:not(:disabled) {
  transform:translateY(1px);
}
.topbar {
  height:82px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 3.5vw;
  gap:20px;
}
.brand {
  display:flex;
  align-items:center;
  gap:9px;
  text-decoration:none;
  font-weight:750;
  font-size:27px;
  letter-spacing:-1.1px;
}
.brandmark {
  display:grid;
  place-items:center;
  background:var(--amber);
  color:var(--bg);
  font-family:Georgia,serif;
  font-style:italic;
  font-size:31px;
  height:32px;
  width:32px;
  border-radius:9px;
  line-height:1;
}
.lab {
  font-size:11px;
  letter-spacing:1.5px;
  color:var(--muted);
  font-weight:600;
  margin-left:18px;
  border-left:1px solid var(--line);
  padding-left:20px;
}
.connection {
  display:flex;
  align-items:center;
  gap:22px;
  font-size:13px;
  color:var(--muted);
}
#transport.online {
  color:var(--mint);
}
.room-label {
  font-size:12px;
  letter-spacing:1px;
}
.room-label b {
  color:var(--text);
  font-size:14px;
  margin-left:6px;
}
main {
  max-width:1700px;
  margin:auto;
  padding:32px 3.5vw 0;
}
.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:30px;
  margin-bottom:28px;
}
.eyebrow {
  font-size:11px;
  font-weight:700;
  letter-spacing:2.4px;
  color:var(--amber);
  margin:0 0 12px;
}
h1 {
  font-size:clamp(28px,3.05vw,49px);
  font-weight:570;
  letter-spacing:-1.7px;
  margin:0 0 12px;
  line-height:1.13;
}
.lede {
  color:var(--muted);
  font-size:16px;
  margin:0;
  line-height:1.6;
}
.metrics {
  display:flex;
  align-items:center;
  gap:30px;
  flex-shrink:0;
}
.metrics>div,.timer {
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-start;
}
.metrics strong {
  font-size:34px;
  font-weight:550;
  letter-spacing:-1px;
  font-variant-numeric:tabular-nums;
}
.metrics span {
  color:var(--muted);
  font-size:12px;
}
.timer {
  border:1px solid var(--line);
  padding:12px 18px;
  background:var(--panel);
  border-radius:12px;
  min-width:139px;
}
.timer.running {
  border-color:var(--amber);
}
.timer.running strong {
  color:var(--amber);
}
.scene-shell {
  position:relative;
}
.scene {
  position:relative;
  aspect-ratio:16/9;
  width:100%;
  overflow:hidden;
  border-radius:var(--radius);
  background:var(--panel);
  isolation:isolate;
}
.scene img {
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  user-select:none;
}
.scene canvas,.boxes,.pins {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}
.scene canvas {
  z-index:1;
  opacity:.95;
}
.boxes {
  z-index:2;
}
.pins {
  z-index:3;
}
.scene-badge {
  z-index:3;
  position:absolute;
  top:20px;
  left:20px;
  background:#0c1119db;
  border:1px solid #ffffff25;
  box-shadow:0 4px 20px #0003;
  padding:10px 13px;
  font-size:11px;
  letter-spacing:1.4px;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:9px;
  pointer-events:none;
}
.live-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--mint);
  box-shadow:0 0 8px #7ce4c477;
}
.scene-caption {
  z-index:3;
  position:absolute;
  bottom:20px;
  left:20px;
  color:white;
  font-size:14px;
  background:#0c1119c9;
  border-radius:6px;
  padding:10px 14px;
  pointer-events:none;
}
.join-panel {
  position:absolute;
  top:20px;
  right:20px;
  width:208px;
  background:#101722f5;
  border:1px solid #ffffff30;
  box-shadow:0 8px 35px #0004;
  border-radius:12px;
  overflow:hidden;
  z-index:200;
}
.join-toggle {
  border:0;
  background:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:650;
  font-size:14px;
  width:100%;
  padding:14px 16px;
}
.join-toggle span {
  font-size:20px;
  color:var(--muted);
}
#joinContent {
  padding:0 14px 14px;
  text-align:center;
}
#qr {
  background:white;
  padding:2px;
  border-radius:6px;
  line-height:0;
}
#qr svg {
  width:100%;
  height:auto;
}
#joinContent p {
  font-size:11px;
  color:var(--muted);
  margin:12px 0;
}
#joinLink {
  display:block;
  font-size:14px;
  color:var(--amber);
  text-underline-offset:3px;
}
.join-actions {
  display:flex;
  gap:6px;
  margin-top:14px;
}
.join-actions button {
  background:#ffffff09;
  border:1px solid var(--line);
  font-size:11px;
  padding:8px 4px;
  flex:1;
  border-radius:5px;
}
.join-note {
  display:block;
  margin-top:12px;
  color:var(--muted);
  font-size:10px;
}
#joinContent .local-warning {
  color:var(--amber);
  line-height:1.5;
  font-size:11px;
  margin-bottom:0;
}
.controlbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px 0;
}
.heat-key {
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}
.heat-swatch {
  height:7px;
  width:51px;
  background:linear-gradient(90deg,#22d7e5,#ffe468,#ff5d35);
  border-radius:10px;
}
.controls {
  display:flex;
  align-items:center;
  gap:9px;
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 17px;
  border-radius:8px;
  border:1px solid var(--line);
  font-size:13px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
  background:var(--panel);
}
.button.primary {
  background:var(--amber);
  border-color:var(--amber);
  color:#19170f;
}
.button.primary.revealed {
  background:#7ce4c4;
  color:#0c1119;
  border-color:var(--mint);
}
.button.secondary:hover:not(:disabled) {
  background:#222d3c;
}
.button.quiet {
  background:transparent;
  color:var(--muted);
}
.reset-menu {
  position:relative;
  z-index:210;
}
.reset-menu summary {
  list-style:none;
}
.reset-menu summary::-webkit-details-marker {
  display:none;
}
.reset-menu[open]>div {
  display:flex;
  flex-direction:column;
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:8px;
  min-width:190px;
  padding:6px;
  box-shadow:0 10px 30px #0006;
}
.reset-menu button {
  background:none;
  border:0;
  text-align:left;
  padding:12px;
  font-size:13px;
  border-radius:4px;
}
.reset-menu button:hover {
  background:#ffffff0a;
}
footer {
  border-top:1px solid var(--line);
  padding:20px 0 24px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:var(--muted);
  font-size:11px;
}
.results {
  padding:22px 0 30px;
}
.results-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:40px;
  margin:0 0 22px;
}
.results h2 {
  font-size:27px;
  letter-spacing:-.7px;
  font-weight:550;
  margin:0;
}
.results-heading>p {
  font-size:13px;
  color:var(--muted);
  max-width:310px;
  line-height:1.6;
  margin:0;
}
.hazard-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.hazard-card {
  padding:20px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#131b26;
}
.hazard-card-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.difficulty {
  font-size:10px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--amber);
}
.difficulty.subtle {
  color:var(--mint);
}
.hazard-card-top strong {
  font-size:24px;
  font-weight:500;
  font-variant-numeric:tabular-nums;
}
.hazard-card h3 {
  font-size:14px;
  font-weight:550;
  line-height:1.5;
  min-height:63px;
  margin:13px 0 16px;
}
.bar-track {
  background:#ffffff0d;
  height:4px;
  border-radius:10px;
  overflow:hidden;
}
.bar-track>div {
  background:var(--amber);
  height:100%;
  transition:width .3s;
}
.hazard-card p {
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
}
.hazard-card p.hazard-why {
  font-size:12px;
  line-height:1.6;
  margin-bottom:0;
}
.method-note {
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
  margin:20px 0 0;
}
.hazard-box {
  position:absolute;
  border:2px solid var(--amber);
  background:#ffbd590a;
  box-shadow:0 0 12px #ffbd5940;
}
.hazard-box>span {
  position:absolute;
  left:-2px;
  top:-23px;
  background:var(--amber);
  color:#101722;
  padding:3px 6px;
  font-size:11px;
  font-weight:750;
  white-space:nowrap;
  border-radius:3px 3px 0 0;
}
.hazard-box.spotted {
  border-color:var(--mint);
  background:#7ce4c40b;
}
.hazard-box.spotted>span {
  background:var(--mint);
}
.toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  padding:14px 22px;
  border:1px solid #ffffff30;
  background:#253245;
  color:white;
  border-radius:10px;
  z-index:999;
  box-shadow:0 6px 30px #0006;
  font-size:14px;
  max-width:90vw;
  overflow-wrap:anywhere;
}
.phone-main {
  max-width:950px;
  padding:28px 20px 35px;
}
.phone-intro h1 {
  font-size:36px;
  letter-spacing:-1.1px;
}
.phone-intro>p:not(.eyebrow) {
  font-size:16px;
  color:var(--muted);
  line-height:1.6;
  max-width:650px;
}
.phone-round {
  display:flex;
  justify-content:space-between;
  gap:14px;
  font-size:13px;
  padding:14px 0;
  color:var(--muted);
}
#phoneProgress {
  color:var(--amber);
  font-weight:650;
}
.phone-scene {
  border-radius:8px;
  cursor:crosshair;
  touch-action:manipulation;
}
.phone-scene.locked {
  cursor:default;
}
.pin {
  position:absolute;
  transform:translate(-50%,-50%);
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:2px solid white;
  background:#15202deb;
  box-shadow:0 2px 8px #0007;
  color:white;
  font-weight:750;
  font-size:12px;
}
.pin.hit {
  background:var(--mint);
  color:#0c1119;
  border-color:#fff;
}
.pin.miss {
  background:#b56430;
}
.phone-tools {
  display:flex;
  gap:12px;
  justify-content:center;
  margin:22px 0 15px;
}
.phone-hint {
  text-align:center;
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
  margin:10px 0 30px;
}
#personalResults {
  border-top:1px solid var(--line);
  padding-top:25px;
}
#personalResults h2 {
  font-size:28px;
  font-weight:550;
  letter-spacing:-.7px;
}
.personal-list {
  display:grid;
  gap:10px;
}
.personal-item {
  padding:17px;
  background:var(--panel);
  border:1px solid var(--line);
  border-left:3px solid var(--amber);
  border-radius:6px;
}
.personal-item.spotted {
  border-left-color:var(--mint);
}
.personal-item strong {
  font-size:14px;
  line-height:1.5;
  font-weight:600;
}
.personal-item p {
  margin:8px 0 0;
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
}
.keyboard-cursor {
  position:absolute;
  width:22px;
  height:22px;
  border:2px solid white;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#0005;
  pointer-events:none;
}
@media(min-width:1500px) {
  .scene-shell {
    max-width:min(1450px,calc((100vh - 310px)*16/9));
    margin:auto;
  }
  .scene {
    width:100%;
    margin:auto;
  }
  .join-panel {
    right:20px;
  }
}
@media(max-width:1100px) {
  .intro {
    align-items:flex-start;
  }
  .metrics {
    gap:18px;
  }
  .metrics strong {
    font-size:28px;
  }
  .timer {
    min-width:115px;
    padding:10px 13px;
  }
  .controls {
    gap:7px;
  }
  .button {
    padding:12px;
    font-size:12px;
  }
  .heat-key {
    font-size:11px;
  }
  .hazard-grid {
    grid-template-columns:repeat(2,1fr);
  }
  .hazard-card h3 {
    min-height:42px;
  }
  .join-panel {
    width:174px;
    top:14px;
    right:14px;
  }
  .join-toggle {
    padding:10px 12px;
  }
  #joinContent {
    padding:0 12px 12px;
  }
  .join-actions button {
    font-size:10px;
  }
  .join-note {
    font-size:9px;
  }
  .scene-badge {
    top:14px;
    left:14px;
  }
  .scene-caption {
    bottom:14px;
    left:14px;
  }
}
@media(max-width:780px) {
  .topbar {
    height:66px;
    padding:0 20px;
  }
  .brand {
    font-size:24px;
  }
  .lab {
    display:none;
  }
  .connection {
    gap:10px;
    font-size:11px;
  }
  .room-label {
    font-size:10px;
  }
  .room-label b {
    font-size:11px;
  }
  main {
    padding:24px 20px 0;
  }
  .intro {
    display:block;
    margin-bottom:20px;
  }
  h1 {
    font-size:34px;
  }
  .lede {
    font-size:14px;
  }
  .metrics {
    margin-top:22px;
    justify-content:space-between;
    gap:15px;
  }
  .metrics strong {
    font-size:29px;
  }
  .metrics span {
    font-size:11px;
  }
  .timer {
    flex-direction:row;
    align-items:center;
    min-width:0;
    gap:13px;
  }
  .timer span {
    max-width:65px;
    line-height:1.4;
    text-align:left;
  }
  .scene-shell {
    display:flex;
    flex-direction:column;
    gap:15px;
  }
  .join-panel {
    position:static;
    width:100%;
  }
  .join-toggle {
    padding:10px 14px;
  }
  #joinContent {
    display:grid;
    grid-template-columns:115px 1fr;
    column-gap:20px;
    text-align:left;
    padding:0 14px 14px;
  }
  #qr {
    grid-column:1;
    grid-row:1/6;
  }
  #joinContent p {
    margin:4px 0;
  }
  .join-actions {
    margin-top:8px;
  }
  .join-note {
    margin-top:8px;
  }
  .join-actions button {
    font-size:11px;
  }
  #joinContent .local-warning {
    grid-column:1/-1;
    margin-top:12px;
  }
  .scene-badge {
    padding:7px 9px;
    font-size:9px;
    top:10px;
    left:10px;
  }
  .scene-caption {
    padding:7px 9px;
    font-size:11px;
    bottom:10px;
    left:10px;
  }
  .controlbar {
    flex-direction:column;
    align-items:stretch;
    padding:20px 0;
  }
  .heat-key {
    justify-content:center;
  }
  .controls {
    flex-wrap:wrap;
    justify-content:center;
  }
  .button {
    font-size:12px;
    padding:12px 15px;
  }
  .results-heading {
    display:block;
  }
  .results-heading>p {
    margin-top:15px;
    max-width:none;
  }
  .hazard-card {
    padding:16px;
  }
  .results h2 {
    font-size:25px;
  }
  footer {
    font-size:10px;
    flex-direction:column;
    gap:9px;
  }
  .hazard-box>span {
    font-size:9px;
    top:-19px;
    padding:2px 4px;
  }
  .phone-main {
    padding:24px 16px 30px;
  }
  .phone-main .scene {
    width:calc(100% + 32px);
    margin-left:-16px;
    border-radius:0;
  }
  .phone-intro h1 {
    font-size:34px;
  }
  .phone-main .phone-scene {
    max-height:none;
  }
  .phone-main .topbar {
    padding:0 16px;
  }
}
@media(max-width:400px) {
  .connection {
    font-size:10px;
    gap:6px;
  }
  .brand {
    font-size:22px;
    gap:7px;
  }
  .brandmark {
    height:27px;
    width:27px;
    font-size:27px;
  }
  .hazard-grid {
    grid-template-columns:1fr;
  }
  .hazard-card h3 {
    min-height:0;
  }
  .controls>.primary {
    order:-1;
    width:100%;
  }
  .phone-tools .button {
    padding:12px 18px;
  }
}
/* After the reveal, keep the scene overlays off the hazard boxes: the collapsed join panel would cover A07
   and the bottom caption would cover A01/A03. */
@media(min-width:781px) {
  .scene-shell.revealed .join-panel {
    top:auto;
    bottom:20px;
  }
}
@media(min-width:1200px) {
  .scene-shell.revealed .scene-caption {
    top:20px;
    bottom:auto;
    left:50%;
    transform:translateX(-50%);
    white-space:nowrap;
  }
}
@media(max-width:1199px) {
  .scene-shell.revealed .scene-caption {
    display:none;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}
