:root {
  color-scheme: light;
  --paper: #f5efdF;
  --paper-deep: #eadfc7;
  --ink: #25221d;
  --muted: #6b6254;
  --line: #d3c5a9;
  --button: #fffaf0;
  --button-dark: #37302a;
  --active: #147f77;
  --active-2: #d79a2b;
  --ghost: #8aa6a1;
  --danger: #b75a48;
  --easy: #1f8a62;
  --medium: #c9942a;
  --hard: #b95b4c;
  --shadow: 0 18px 48px rgba(68, 52, 31, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(102, 84, 48, 0.045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(180deg, rgba(102, 84, 48, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--paper);
  color: var(--ink);
  font-size: 14pt;
}

button {
  color: inherit;
  font: inherit;
}

.shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(10px, 2vh, 22px) 0 22px;
}

.topbar,
.workspace,
.structure-panel {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.68);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(420px, 0.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
}

.identity {
  display: flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 14px;
}

.identity > div {
  min-width: 0;
}

.identity__photo {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: min(760px, 100%);
  font-size: 18pt;
  line-height: 1.08;
}

h2 {
  font-size: 24pt;
}

.nowrap {
  white-space: nowrap;
}

.current-layout {
  justify-self: start;
  width: min(100%, 900px);
  min-width: 0;
  text-align: center;
}

.current-layout .eyebrow {
  display: none;
}

.topbar-spacer {
  display: none;
}

.bellows {
  flex: 0 0 auto;
}

.map-stage {
  width: min(100%, clamp(225px, 22.5vw, 315px));
  margin: 0 0 0 auto;
}

.map-stage .bellows {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.bellows__button {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 244px;
  height: 62px;
  padding: 0 18px;
  border: 1px solid #baae94;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95), transparent 0 32%),
    linear-gradient(145deg, #fffdf8, #f4ead8);
  cursor: pointer;
  box-shadow:
    inset 1px 2px 4px rgba(255, 255, 255, 0.85),
    inset -2px -3px 6px rgba(121, 98, 61, 0.08),
    0 3px 0 rgba(116, 93, 55, 0.12),
    0 10px 18px rgba(70, 55, 31, 0.1);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  user-select: none;
}

.bellows__button.is-previewing {
  transform: translateY(2px);
  box-shadow: inset 0 3px 8px rgba(59, 51, 41, 0.16);
}

.bellows__button:hover {
  border-color: #9f895f;
}

.bellows__arrow {
  display: grid;
  place-items: center;
  width: 72px;
  height: 38px;
  border-radius: 999px;
  background: var(--button-dark);
  color: #fff7e8;
  font-size: 24pt;
  line-height: 1;
}

.bellows__label {
  display: block;
  font-size: 18pt;
  font-weight: 700;
  line-height: 1;
}

.bellows__sub {
  display: block;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 620;
  line-height: 1.05;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(390px, 0.42fr) minmax(0, 0.58fr);
  gap: 18px;
  padding: 12px 18px 18px;
  border-top: 0;
}

.map-zone {
  display: grid;
  align-content: start;
  justify-items: end;
  min-width: 0;
}

.map-head {
  display: block;
  width: min(100%, 420px);
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 12px;
}

.step-readout {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8eb;
  text-align: left;
}

.step-readout span,
.event-box small {
  display: block;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 620;
}

.step-readout strong {
  display: block;
  margin-top: 2px;
  font-size: 18pt;
}

.accordion-map {
  --bellows-tint: rgba(122, 90, 190, 0.14);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: start;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 12px);
  width: 100%;
  min-height: clamp(540px, 66vh, 690px);
  margin: 0;
  padding: clamp(14px, 2vw, 22px) clamp(44px, 4vw, 58px) clamp(18px, 2vw, 26px) clamp(5px, 1.63vw, 23px);
  border: 2px solid #3b3329;
  border-right-width: 26px;
  border-radius: 34px 0 0 34px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.92), transparent 0 19%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 72% 78%, rgba(236, 224, 200, 0.13), transparent 0 22%, rgba(236, 224, 200, 0) 34%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(248, 243, 232, 0.94)),
    repeating-linear-gradient(32deg, rgba(75, 63, 46, 0.018) 0 1px, transparent 1px 9px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.62),
    inset 10px 0 20px rgba(255, 255, 255, 0.35),
    inset -10px 0 26px rgba(53, 43, 31, 0.08);
}

.accordion-map.is-pull {
  --bellows-tint: rgba(57, 116, 210, 0.22);
}

.accordion-map.is-push {
  --bellows-tint: rgba(194, 83, 178, 0.14);
}

.accordion-map::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px 0 0 32px;
  background: var(--bellows-tint);
  pointer-events: none;
}

.accordion-map::after {
  content: "FUELLE";
  position: absolute;
  top: 50%;
  right: -26px;
  display: grid;
  place-items: center;
  width: 26px;
  height: min(260px, calc(100% - 88px));
  transform: translateY(-50%);
  color: #fff7e8;
  font-size: 14pt;
  font-weight: 700;
  letter-spacing: 0;
  text-orientation: upright;
  writing-mode: vertical-rl;
  z-index: 2;
}

.row {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(4px, 0.7vh, 7px);
}

.row:nth-child(1),
.row:nth-child(3) {
  padding-top: clamp(18px, 3.2vh, 32px);
}

.row__label {
  display: grid;
  place-items: center;
  width: 48px;
  height: 30px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-weight: 650;
}

.button-cell {
  --size: clamp(36px, min(3.75vw, 5.75vh), 54px);
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  min-height: var(--size);
  padding: 0;
  border: 2px solid #28231e;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 25%, #ffffff 0 22%, rgba(255, 255, 255, 0.82) 23% 34%, transparent 35%),
    linear-gradient(145deg, #fffdf6, #e9e2d3);
  color: var(--ink);
  cursor: pointer;
  font-size: 14pt;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.96),
    inset -3px -4px 7px rgba(118, 108, 91, 0.18),
    0 6px 0 rgba(84, 75, 64, 0.16),
    0 10px 16px rgba(55, 48, 42, 0.14);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button-cell::after {
  content: attr(data-pair);
  position: absolute;
  right: -7px;
  bottom: -6px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff8e8;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 650;
}

.button-cell.is-active {
  transform: scale(1.08);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.5) 0 20%, transparent 38%),
    linear-gradient(145deg, #1ba399, var(--active));
  color: #fffaf1;
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.28),
    inset -3px -4px 8px rgba(0, 49, 44, 0.28),
    0 0 0 5px rgba(20, 127, 119, 0.16),
    0 9px 20px rgba(20, 127, 119, 0.24);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.button-cell.is-root {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.55) 0 20%, transparent 38%),
    linear-gradient(145deg, #efb84a, var(--active-2));
  color: #211a12;
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.42),
    inset -3px -4px 8px rgba(118, 75, 20, 0.22),
    0 0 0 5px rgba(215, 154, 43, 0.22),
    0 10px 22px rgba(133, 86, 23, 0.2);
}

.button-cell.is-ghost {
  border-color: var(--ghost);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.42) 0 20%, transparent 38%),
    linear-gradient(145deg, rgba(27, 163, 153, 0.5), rgba(20, 127, 119, 0.5));
  color: #163f3b;
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.3),
    inset -3px -4px 8px rgba(0, 49, 44, 0.12),
    0 0 0 3px rgba(20, 127, 119, 0.11);
}

.button-cell.is-root-ghost {
  border-color: rgba(215, 154, 43, 0.72);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.45) 0 20%, transparent 38%),
    linear-gradient(145deg, rgba(239, 184, 74, 0.5), rgba(215, 154, 43, 0.5));
  color: #4a2d0c;
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.35),
    inset -3px -4px 8px rgba(118, 75, 20, 0.12),
    0 0 0 3px rgba(215, 154, 43, 0.14);
}

.button-cell.is-muted {
  opacity: 0.47;
}

.button-cell span {
  pointer-events: none;
}

.side-panel {
  display: grid;
  align-content: start;
  justify-self: start;
  gap: 18px;
  width: min(100%, 900px);
  min-width: 0;
}

@media (min-width: 1200px) {
  .side-panel {
    grid-template-columns: minmax(300px, 0.95fr) minmax(230px, 0.55fr);
    align-items: start;
    column-gap: 18px;
    row-gap: 14px;
  }

  .structure-card {
    grid-column: 2;
    grid-row: 1 / span 5;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    border-top: 0;
    padding-top: 0;
  }

  .step-status-card {
    border-top: 0;
    padding-top: 0;
  }
}

.control-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.control-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.segmented,
.root-grid,
.structure-grid {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented button,
.root-grid button,
.structure-grid button,
.transport button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #c8b894;
  border-radius: 7px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.95), transparent 0 32%),
    linear-gradient(145deg, #fffdf6, #f4ead8);
  cursor: pointer;
  font-weight: 650;
  box-shadow:
    inset 1px 2px 3px rgba(255, 255, 255, 0.82),
    inset -2px -3px 5px rgba(121, 98, 61, 0.08),
    0 2px 0 rgba(116, 93, 55, 0.12),
    0 7px 14px rgba(70, 55, 31, 0.08);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease, color 130ms ease;
}

.segmented button:hover,
.root-grid button:hover,
.structure-grid button:hover,
.transport button:hover {
  transform: translateY(-1px);
  border-color: #9f895f;
  box-shadow:
    inset 1px 2px 3px rgba(255, 255, 255, 0.9),
    inset -2px -3px 5px rgba(121, 98, 61, 0.1),
    0 3px 0 rgba(116, 93, 55, 0.14),
    0 10px 18px rgba(70, 55, 31, 0.12);
}

.segmented button:active,
.root-grid button:active,
.structure-grid button:active,
.transport button:active {
  transform: translateY(1px);
  box-shadow:
    inset 2px 3px 6px rgba(81, 66, 39, 0.13),
    0 1px 0 rgba(116, 93, 55, 0.1);
}

.segmented button.is-selected,
.root-grid button.is-selected,
.structure-grid button.is-selected {
  border-color: #2f6f68;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.88), transparent 0 33%),
    linear-gradient(145deg, #e7f8f3, #cae7df);
  color: #163f3b;
  box-shadow:
    inset 1px 2px 3px rgba(255, 255, 255, 0.75),
    inset -2px -3px 6px rgba(34, 112, 103, 0.12),
    0 0 0 2px rgba(47, 111, 104, 0.12),
    0 8px 18px rgba(32, 100, 91, 0.12);
}

.root-grid {
  grid-template-columns: repeat(auto-fit, minmax(64px, 84px));
  justify-content: start;
}

.root-grid button {
  position: relative;
  min-width: 0;
  padding: 0 16px;
}

.root-grid button::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--difficulty-dot, var(--line));
}

.root-grid button[data-difficulty="easy"] {
  --difficulty-dot: var(--easy);
}

.root-grid button[data-difficulty="medium"] {
  --difficulty-dot: var(--medium);
}

.root-grid button[data-difficulty="hard"] {
  --difficulty-dot: var(--hard);
}

.difficulty {
  margin-top: 10px;
  min-height: 30px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff8eb;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 650;
}

.difficulty.easy {
  color: var(--easy);
}

.difficulty.medium {
  color: var(--medium);
}

.difficulty.hard {
  color: var(--hard);
}

.event-box {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8eb;
}

.event-box span {
  display: block;
  margin-bottom: 5px;
  font-size: 24pt;
  font-weight: 700;
}

.transport-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 16px;
  border-top: 0;
}

.transport {
  display: flex;
  gap: 10px;
}

.transport button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  font-size: 24pt;
}

.transport button.play {
  width: 64px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.18), transparent 0 31%),
    linear-gradient(145deg, #4a4038, var(--button-dark));
  color: #fff8eb;
  border-color: #2d261f;
  box-shadow:
    inset 1px 2px 3px rgba(255, 255, 255, 0.13),
    inset -2px -3px 6px rgba(0, 0, 0, 0.24),
    0 3px 0 rgba(47, 39, 30, 0.26),
    0 10px 20px rgba(47, 39, 30, 0.18);
}

.transport button.reset,
.transport button.loop {
  width: auto;
  min-width: 92px;
  padding: 0 14px;
  font-size: 14pt;
}

.transport-card .transport {
  display: grid;
  grid-template-columns: 42px 54px 42px minmax(78px, 1fr) 70px;
  gap: 7px;
}

.transport-card .transport button {
  width: 100%;
  height: 40px;
  min-height: 40px;
  font-size: 18pt;
}

.transport-card .transport button.play {
  width: 100%;
}

.transport-card .transport button.reset,
.transport-card .transport button.loop {
  min-width: 0;
  padding: 0 10px;
  font-size: 14pt;
}

.transport button.loop.is-selected {
  border-color: #2f6f68;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.88), transparent 0 33%),
    linear-gradient(145deg, #e7f8f3, #cae7df);
  color: #163f3b;
  box-shadow:
    inset 1px 2px 3px rgba(255, 255, 255, 0.75),
    inset -2px -3px 6px rgba(34, 112, 103, 0.12),
    0 0 0 2px rgba(47, 111, 104, 0.12),
    0 8px 18px rgba(32, 100, 91, 0.12);
}

.transport-card .speed {
  justify-content: flex-start;
  margin-top: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 248, 235, 0.72);
}

.transport-card .segmented--speed {
  width: 246px;
}

.speed {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14pt;
  font-weight: 650;
}

.segmented--speed {
  width: 246px;
}

.segmented--speed button {
  min-height: 42px;
  padding: 0 16px;
}

.structure-panel {
  padding: 12px 16px 14px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.structure-grid {
  grid-template-columns: repeat(7, minmax(104px, 1fr));
}

.structure-grid button {
  padding: 0 10px;
  font-size: 14pt;
}

.structure-card .structure-grid {
  grid-template-columns: 200px;
  justify-content: start;
  gap: 6px;
}

.structure-card .structure-grid button {
  min-height: 32px;
  padding: 0 14px;
}

@media (min-width: 1500px) and (min-height: 900px) {
  .button-cell {
    --size: clamp(40px, min(2.45vw, 4.4vh), 48px);
  }

  .accordion-map {
    min-height: min(640px, calc(100vh - 398px));
  }
}

@media (min-width: 1200px) and (min-height: 900px) {
  body {
    height: 100vh;
    overflow: hidden;
  }

  .shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    padding: 8px 0;
  }

  .topbar {
    min-height: 54px;
    padding: 7px 14px;
  }

  .identity__photo {
    width: 52px;
    height: 36px;
  }

  h1 {
    font-size: 18pt;
  }

  h2 {
    font-size: 24pt;
  }

  .current-layout .eyebrow {
    font-size: 14pt;
  }

  .workspace {
    grid-template-columns: minmax(390px, 0.42fr) minmax(0, 0.58fr);
    min-height: 0;
    gap: 18px;
    padding: 8px 18px 12px;
  }

  .map-zone {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    align-content: start;
    min-height: 0;
  }

  .map-head {
    margin-bottom: 8px;
  }

  .step-readout {
    padding: 8px 10px;
  }

  .map-stage {
    align-self: stretch;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .map-stage .bellows {
    margin-bottom: 6px;
  }

  .bellows__button {
    height: 64px;
  }

  .bellows__arrow {
    width: 58px;
    height: 30px;
    font-size: 24pt;
  }

  .accordion-map {
    align-self: stretch;
    min-height: 0;
    height: 100%;
    max-height: 650px;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .row {
    gap: 1px;
  }

  .row:nth-child(1),
  .row:nth-child(3) {
    padding-top: 14px;
  }

  .row__label {
    height: 22px;
    margin-bottom: 0;
  }

  .button-cell {
    --size: clamp(38px, min(2.45vw, 4.55vh), 48px);
    font-size: 14pt;
  }

  .side-panel {
    column-gap: 22px;
    row-gap: 12px;
    overflow: hidden;
  }

  .control-block {
    padding-top: 10px;
  }

  .event-box {
    min-height: 62px;
    padding: 10px 12px;
  }

  .transport-panel {
    gap: 14px;
    padding: 7px 16px;
  }

  .transport button {
    height: 38px;
    min-height: 38px;
  }

  .structure-card .structure-grid {
    gap: 6px;
    grid-template-columns: 200px;
  }

  .structure-card .structure-grid button {
    min-height: 32px;
  }
}

@media (max-height: 820px) and (min-width: 901px) {
  .shell {
    padding: 6px 0 10px;
  }

  .topbar {
    min-height: 64px;
    padding: 8px 16px;
  }

  .identity__photo {
    width: 60px;
    height: 42px;
  }

  h1 {
    font-size: 18pt;
  }

  h2 {
    font-size: 24pt;
  }

  .bellows__button {
    height: 64px;
  }

  .bellows__arrow {
    width: 58px;
    height: 30px;
    font-size: 24pt;
  }

  .workspace {
    gap: 10px;
    padding: 8px 12px 12px;
  }

  .map-head {
    margin-bottom: 8px;
  }

  .step-readout {
    padding: 8px 10px;
  }

  .accordion-map {
    min-height: 454px;
    padding: 10px clamp(40px, 3vw, 46px) 12px clamp(4px, 1.23vw, 16px);
  }

  .row {
    gap: 2px;
  }

  .row:nth-child(1),
  .row:nth-child(3) {
    padding-top: 14px;
  }

  .row__label {
    width: 38px;
    height: 22px;
    margin-bottom: 0;
  }

  .button-cell {
    --size: clamp(34px, min(3.2vw, 5vh), 39px);
    font-size: 14pt;
  }

  .button-cell::after {
    min-width: 16px;
    height: 16px;
    right: -5px;
    bottom: -4px;
    font-size: 14pt;
  }

  .side-panel {
    gap: 12px;
  }

  .control-block {
    padding-top: 10px;
  }

  .segmented button,
  .root-grid button,
  .structure-grid button,
  .transport button {
    min-height: 32px;
  }

  .event-box {
    min-height: 62px;
    padding: 10px 12px;
  }

  .transport-panel {
    padding: 6px 16px;
  }

  .transport button {
    height: 36px;
    min-height: 36px;
  }

  .structure-panel {
    padding: 6px 14px 8px;
  }

  .structure-grid button {
    font-size: 14pt;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .structure-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 258px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 258px;
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .structure-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .accordion-map {
    min-height: 600px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: 100%;
    max-width: 620px;
    padding: 10px 9px 14px;
  }

  .topbar,
  .transport-panel {
    align-items: stretch;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .identity,
  .current-layout {
    justify-self: stretch;
  }

  .identity {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: center;
  }

  .identity > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .identity .eyebrow,
  .identity h1 {
    width: 100%;
    max-width: 440px;
    margin-right: auto;
    margin-left: auto;
    white-space: normal;
  }

  .identity__photo {
    width: 52px;
    height: 38px;
  }

  .nowrap {
    white-space: normal;
  }

  h1 {
    font-size: 14pt;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 18pt;
  }

  .current-layout {
    text-align: left;
  }

  .topbar-spacer {
    display: none;
  }

  .bellows__button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    height: 56px;
    gap: 10px;
    padding: 0 12px;
  }

  .bellows__arrow {
    width: 56px;
    height: 32px;
  }

  .workspace {
    gap: 14px;
    padding: 10px;
  }

  .map-head {
    align-items: stretch;
    flex-direction: column;
  }

  .map-zone {
    justify-items: center;
  }

  .map-stage {
    width: min(100%, 285px);
    margin: 0 auto;
  }

  .step-readout {
    text-align: left;
  }

  .accordion-map {
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    gap: 5px;
    min-height: 560px;
    padding: 14px 40px 18px 4px;
    border-radius: 22px 0 0 22px;
  }

  .row:nth-child(1),
  .row:nth-child(3) {
    padding-top: 24px;
  }

  .button-cell {
    --size: clamp(38px, 11.5vw, 48px);
    font-size: 14pt;
  }

  .button-cell::after {
    display: none;
  }

  .side-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .structure-card .structure-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 7px;
  }

  .structure-card .structure-grid button {
    min-height: 40px;
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 5px 6px 10px;
  }

  .topbar,
  .workspace {
    width: 374px;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    border-radius: 7px;
  }

  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .eyebrow {
    margin-bottom: 4px;
  }

  .current-layout {
    text-align: center;
  }

  .identity .eyebrow,
  .identity h1 {
    max-width: 310px;
  }

  .workspace {
    padding: 8px 6px 10px;
  }

  .map-stage {
    width: min(100%, 278px);
  }

  .accordion-map {
    min-height: 552px;
    padding: 12px 38px 16px 3px;
  }

  .button-cell {
    --size: clamp(37px, 10.6vw, 43px);
  }

  .segmented,
  .root-grid,
  .structure-grid {
    gap: 7px;
  }

  .segmented button,
  .root-grid button,
  .structure-grid button,
  .transport button {
    min-height: 40px;
  }

  .root-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .root-grid button {
    padding: 0 10px;
  }

  .transport-card .transport {
    grid-template-columns: 38px 46px 38px minmax(78px, 1fr) 56px;
    gap: 6px;
  }

  .transport-card .speed {
    width: 100%;
  }

  .transport-card .segmented--speed,
  .segmented--speed {
    width: 100%;
  }

  .speed {
    gap: 10px;
  }
}
