.light-maze {
  container: light-maze / inline-size;
  color: #19374a;
}
.light-maze-intro { margin: 0 0 .85rem; }
.escape-card .light-maze-intro h3 { margin: 0 0 .35rem; font-size: clamp(1.45rem, 2.25vw, 2rem); line-height: 1.15; }
.light-maze-intro p { max-width: 70ch; line-height: 1.45; }
.light-maze-board {
  --feed-color: #ff8378;
  overflow: hidden;
  border: 1px solid #2c435c;
  border-radius: .65rem;
  background: #192b40;
  color: #f6fafb;
}
.maze-telemetry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .6rem .95rem;
  background: #22354b;
  border-bottom: 1px solid #405671;
  color: #d6e3ec;
  font-size: .875rem;
  line-height: 1.3;
}
.maze-telemetry [data-room-progress] { font-weight: 700; color: #fff2bc; font-variant-numeric: tabular-nums; }
.maze-feed { display: inline-flex; align-items: center; gap: .32rem; flex-wrap: wrap; }
.maze-feed i {
  width: .68rem; height: .68rem;
  border: 1px solid #b9c9d6; border-radius: 50%; background: var(--feed-color);
}
.maze-feed strong { color: #fff; font-size: inherit; }
.maze-floorplan { display: block; width: 100%; height: auto; background: #182b41; }
.maze-floor { fill: url(#maze-floortiles); }
.maze-room-glow { fill: var(--room-color); opacity: .13; }
.maze-chamber.active-room .maze-room-glow { fill: var(--feed-color); opacity: .27; }
.maze-chamber.feed-dark .maze-room-glow, .maze-chamber.cleared-room .maze-room-glow { opacity: 0; }
.maze-wall { fill: none; stroke: #64748e; stroke-width: 4; stroke-linejoin: round; }
.maze-inset { fill: none; stroke: #75879d; stroke-width: 2; opacity: .65; }
.maze-room-traces { stroke: #54708b; }
.maze-room-number { fill: #b9cada; font: 700 18px/1 "DM Sans",sans-serif; }
.maze-door { stroke: var(--room-color); }
.maze-camera-light { fill: #f68780; }
.maze-camera-cone { fill: var(--room-color); opacity: .36; transition: opacity .18s ease-out; }
.maze-check { opacity: 0; }
.maze-check circle { fill: #1c4d4e; stroke: #9ee5cd; stroke-width: 1.5; }
.maze-check path { fill: none; stroke: #b2f2d7; stroke-width: 2; }
.maze-exit text { fill: #c4e7dc; font: 700 13px/1 "DM Sans",sans-serif; }
.maze-chamber.active-room .maze-wall { stroke: var(--room-color); }
.maze-chamber.active-room .maze-room-number { fill: #fff4db; }
.maze-chamber.active-room .maze-camera-cone { opacity: .74; fill: var(--feed-color); }
.maze-chamber.active-room.feed-dark .maze-camera-cone, .maze-chamber.cleared-room .maze-camera-cone { opacity: 0; }
.maze-chamber.cleared-room .maze-door { opacity: 0; }
.maze-chamber.cleared-room .maze-wall { stroke: #72a99f; }
.maze-chamber.cleared-room .maze-camera-light, .maze-chamber.feed-dark .maze-camera-light { fill: #2b3848; }
.maze-chamber.cleared-room .maze-check { opacity: 1; }
.maze-controls {
  min-width: 0;
  padding: .8rem .95rem;
  border-top: 1px solid #405671;
  background: #22354b;
}
.maze-command { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; margin: 0 0 .55rem; }
.maze-command strong { color: #f9faf2; font-size: 1.075rem; }
.maze-command [data-switch-count] { color: #c9dbe5; font-size: .875rem; }
.maze-inputs, .maze-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.light-maze button { min-height: 2.75rem; border-radius: .4rem; font: 700 .95rem/1.2 "DM Sans",sans-serif; cursor: pointer; }
.maze-filters button { display: inline-flex; align-items: center; justify-content: center; gap: .32rem; padding: .4rem .66rem; color: #f0f6f9; background: #2c4158; border: 1px solid #8296ae; }
.maze-filters button i { width: .72rem; height: .72rem; border-radius: 50%; border: 1px solid #ffffff70; background: var(--channel); }
.maze-filters button[data-mask="4"] { --channel: #ff827a; }
.maze-filters button[data-mask="2"] { --channel: #61ddaa; }
.maze-filters button[data-mask="1"] { --channel: #80abff; }
.maze-filters button[aria-pressed="true"] { background: #ecf3f6; color: #182c41; border-color: #ecf3f6; }
.maze-filters button[aria-pressed="true"] i { border: 2px solid #25354b; background: linear-gradient(135deg, var(--channel) 42%, #25354b 43% 60%, var(--channel) 61%); }
.maze-filters button:disabled, .maze-action[aria-disabled="true"] { cursor: default; }
.light-maze .maze-action { border: 1px solid #ffdb85; padding: .5rem .95rem; margin-inline-start: .2rem; background: #ffdb85; color: #192d42; }
.light-maze .maze-action[aria-disabled="true"] { background: #d3c092; border-color: #d3c092; }
.escape-card .light-maze :is(button,summary):focus-visible { outline: 3px solid #a2f1f0; outline-offset: 2px; }
.escape-card .maze-feedback { margin: .62rem 0 0; color: #e4edf2; font-size: .94rem; line-height: 1.4; }
.maze-clue { margin-top: .3rem; }
.maze-clue summary { display: inline-block; color: #a7e3e4; font: 650 .875rem/1.4 "DM Sans",sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: .17em; }
.maze-clue summary::after, .maze-clue[open] summary::after { content: none; }
.maze-clue summary::-webkit-details-marker { display: none; }
.escape-card .maze-clue p { margin: .25rem 0 0; color: #c9e1e5; font-size: .94rem; line-height: 1.4; }
.maze-complete .maze-command strong { color: #ffe39a; }
.maze-complete .maze-filters { display: none; }
.maze-complete .maze-action { margin-inline-start: 0; }
@container light-maze (min-width: 54rem) {
  .light-maze-board { display: grid; grid-template-columns: minmax(0,1.58fr) minmax(0,1fr); align-items: stretch; }
  .maze-telemetry { grid-column: 1/-1; }
  .maze-floorplan { height: 100%; min-height: 11rem; }
  .maze-controls { border-top: 0; border-inline-start: 1px solid #405671; align-content: center; }
}
@container light-maze (max-width: 27rem) {
  .maze-telemetry { padding: .55rem .72rem; }
  .maze-controls { padding: .7rem; }
  .maze-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .maze-filters button { padding-inline: .3rem; }
  .light-maze .maze-action { margin: .12rem 0 0; }
  .maze-complete .maze-filters { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .maze-camera-cone { transition: none; }
}
