:root {
  color-scheme: dark;
  --page: #d8edf5;
  --cabinet: #79bfd8;
  --cabinet-dark: #3d8fb0;
  --panel: #090a0d;
  --panel-soft: #171a20;
  --panel-edge: #4f9fbe;
  --text: #edf5f7;
  --muted: #a9c9d2;
  --amber: #d9b65f;
  --button: #f0f6f8;
  --button-face: #2f5968;
  --button-edge: #d7f2fb;
  --danger: #d78d84;
  --type-weight: 650;
  --mono-font: "Courier New", Courier, monospace;
  --editor-font: "Courier New", "Nimbus Mono PS", "Liberation Mono", monospace;
  --ui-font: "Aptos Narrow", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  font-family: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.44), transparent 24%),
    var(--page);
  color: var(--text);
  font-family: var(--mono-font);
  font-weight: var(--type-weight);
}

button {
  position: relative;
  overflow: hidden;
  min-height: 1.65rem;
  padding: 2px 0.5em;
  border: 1px solid rgba(255,255,255,0.58);
  border-right-color: rgba(255,255,255,0.28);
  border-bottom-color: rgba(255,255,255,0.24);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,0.26), rgba(255,255,255,0.09)),
    rgba(121,191,216,0.48);
  color: var(--button);
  font: inherit;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -12px 18px rgba(51,126,153,0.34),
    0 3px 10px rgba(0,0,0,0.20);
}

input {
  font: inherit;
}

button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48%;
  border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,0.20);
  pointer-events: none;
}

button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120%;
  width: 80%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.38), transparent);
  transform: skewX(-18deg);
  transition: left 420ms ease;
  pointer-events: none;
}

button:hover:not(:disabled),
button:focus-visible {
  border-color: rgba(255,255,255,0.78);
  color: #ffffff;
  background:
    linear-gradient(rgba(255,255,255,0.32), rgba(255,255,255,0.10)),
    rgba(121,191,216,0.66);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -12px 18px rgba(51,126,153,0.28),
    0 4px 14px rgba(0,0,0,0.24),
    0 0 0 1px rgba(121,191,216,0.28);
}

button:hover:not(:disabled)::after,
button:focus-visible::after {
  left: 120%;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.app-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 2px;
  height: 100vh;
  min-height: 100vh;
  padding: 14px 14px 1px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.28), transparent 22%, rgba(0,0,0,0.12)),
    var(--cabinet);
}

.app-shell.has-message {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.toolbar,
.panel,
.message-strip {
  border: 2px solid var(--cabinet-dark);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 2px 8px rgba(0,0,0,0.35);
}

.dirty-flag {
  color: var(--amber);
  font-family: var(--ui-font);
  font-stretch: condensed;
}

.toolbar {
  display: grid;
  align-items: start;
  gap: 7px;
  padding: 8px 10px;
  background: linear-gradient(var(--panel-soft), var(--panel));
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px;
}

.toolbar-help-button {
  margin-left: auto;
}

.storage-row {
  align-items: center;
  justify-content: space-between;
}

.storage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.step-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.step-control input {
  width: 4.7rem;
  min-height: 1.65rem;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.58);
  border-right-color: rgba(255,255,255,0.28);
  border-bottom-color: rgba(255,255,255,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  outline: none;
}

.step-control input:focus {
  border-color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.22);
}

.after-stop-gap {
  margin-right: 36px;
}

.source-name-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f5fbff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
}

.source-name-control input {
  width: 12rem;
  min-height: 1.65rem;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,0.58);
  border-right-color: rgba(255,255,255,0.28);
  border-bottom-color: rgba(255,255,255,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 2px 8px rgba(0,0,0,0.16);
}

.source-name-control input:focus {
  border-color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.22);
}

.source-name-control input.program-name-highlight {
  border-color: rgba(255,223,77,0.95);
  background: rgba(255,223,77,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 0 2px rgba(255,223,77,0.34),
    0 2px 10px rgba(0,0,0,0.16);
}

.message-strip {
  padding: 8px 10px;
  background: #d9edf3;
  color: #17242a;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 1.8rem;
  padding: 0 12px 2px;
  color: #f5fbff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
}

.build-id {
  color: rgba(245,251,255,0.72);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.toolbar-auth-bar {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
  padding: 0;
  min-height: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.auth-identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-state {
  color: #ffffff;
}

.auth-login-link {
  color: #f5fbff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-login-link:hover,
.auth-login-link:focus-visible {
  color: var(--amber);
}

.auth-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5fbff;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0,0,0,0.42);
  white-space: nowrap;
  cursor: pointer;
}

.auth-user-chip:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.auth-user-menu-wrap {
  position: relative;
}

.auth-user-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  min-width: 7rem;
  padding: 4px;
  border: 1px solid rgba(121,191,216,0.72);
  border-radius: 5px;
  background: #111820;
  box-shadow: 0 5px 14px rgba(0,0,0,0.38);
}

.auth-user-menu a {
  display: block;
  padding: 5px 8px;
  border-radius: 3px;
  color: #f5fbff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  text-decoration: none;
}

.auth-user-menu a:hover,
.auth-user-menu a:focus-visible {
  background: rgba(121,191,216,0.28);
  outline: 0;
}

.auth-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace {
  display: grid;
  grid-template-rows:
    var(--workbench-height, minmax(320px, 1fr))
    8px
    var(--typewriter-height, minmax(150px, 2fr));
  min-height: 0;
  overflow: hidden;
}

.workbench {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.panel {
  min-width: 0;
  background: linear-gradient(var(--panel-soft), var(--panel));
}

.panel-heading,
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 2.2rem;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(121,191,216,0.38);
  color: #f3fbfd;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
}

.editor-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  position: relative;
  min-height: 0;
}

.editor-placeholder {
  position: absolute;
  top: 0.55rem;
  left: calc(76px + 10px);
  z-index: 5;
  color: rgba(237,245,247,0.34);
  font-family: var(--ui-font);
  font-size: 1.25rem;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
}

.editor-placeholder-help {
  display: block;
  margin-top: 0.65em;
}

.editor-placeholder[hidden] {
  display: none;
}

.line-editor {
  --editor-line-height: 21px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 1fr;
  overflow-y: auto;
  overflow-x: hidden;
  resize: vertical;
  height: 100%;
  min-height: 15rem;
  max-height: none;
  padding: 3px 0 10px;
  background: #07080a;
  font-family: var(--editor-font);
  font-size: 1.22rem;
  line-height: var(--editor-line-height);
}

.address-gutter {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  overflow: hidden;
  border-right: 1px solid rgba(121,191,216,0.26);
  background: #101217;
  color: var(--muted);
  text-align: right;
  cursor: pointer;
}

.gutter-line {
  position: relative;
  height: var(--editor-line-height);
  line-height: var(--editor-line-height);
  padding-left: 15px;
  padding-right: 8px;
  white-space: nowrap;
}

.gutter-comment {
  background: rgba(159,179,186,0.08);
}

.gutter-directive {
  background: rgba(121,191,216,0.12);
}

.gutter-data {
  font-style: italic;
}

.gutter-repair {
  background: rgba(215,141,132,0.24);
}

.gutter-error {
  background: rgba(215,141,132,0.36);
}

.gutter-active-error {
  background: rgba(214,65,57,0.88);
}

.gutter-secondary-error {
  background: rgba(219,151,59,0.72);
}

.gutter-breakpoint {
  color: #ffffff;
  background: rgba(214,65,57,0.66);
}

.gutter-breakpoint::before {
  content: "-";
  position: absolute;
  left: 4px;
  top: 0;
  color: #ffffff;
}

.gutter-execution {
  color: #ffffff;
  background: rgba(255,215,56,0.38);
  box-shadow: inset 5px 0 0 #ffdf4d;
}

.source-highlights {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.highlight-line {
  position: relative;
  height: var(--editor-line-height);
  line-height: var(--editor-line-height);
}

.highlight-data {
  background: #003600;
}

.highlight-data::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid rgba(54,132,84,0.54);
  pointer-events: none;
}

.highlight-active-error {
  background: rgba(214,65,57,0.28);
}

.highlight-secondary-error {
  background: rgba(219,151,59,0.20);
}

.highlight-execution {
  background: rgba(255,215,56,0.34);
}

.source-textarea {
  grid-column: 2;
  grid-row: 1;
  z-index: 3;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: #edf5f7;
  font: inherit;
  line-height: var(--editor-line-height);
  white-space: pre;
  outline: 0;
  font-weight: 650;
  cursor: text;
  resize: none;
  box-shadow: none;
}

.source-textarea:focus {
  background: rgba(31,38,48,0.58);
  box-shadow: inset 3px 0 0 var(--amber);
}

.machine-panel {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: stretch;
  min-height: 0;
}

.machine-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border-right: 1px solid rgba(121,191,216,0.32);
  color: #ffffff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: pre-line;
}

.machine-readout {
  display: grid;
  align-content: center;
  gap: 4px 24px;
  margin: 0;
  padding: 9px 14px 9px 44px;
  font-family: var(--mono-font);
  font-stretch: normal;
}

.machine-line {
  display: grid;
  grid-template-columns: 14ch 26ch 13ch 24ch;
  gap: 28px;
  min-height: 1.35rem;
  color: #ffffff;
  font-weight: 700;
}

.machine-line:nth-child(2) {
  grid-template-columns: 22ch minmax(0, 1fr);
}

.machine-field {
  min-width: 0;
  white-space: nowrap;
}

.machine-line b {
  color: var(--muted);
}

.typewriter-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
  border-top-width: 8px;
  background:
    linear-gradient(180deg, rgba(121,191,216,0.18), rgba(121,191,216,0.02) 14px, rgba(121,191,216,0) 26px),
    linear-gradient(var(--panel-soft), var(--panel));
  box-shadow:
    0 -12px 0 rgba(121,191,216,0.22),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.workspace-splitter {
  position: relative;
  cursor: row-resize;
  touch-action: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.16)),
    rgba(61,143,176,0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.32);
}

.workspace-splitter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 2px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  box-shadow:
    0 -4px 0 rgba(255,255,255,0.16),
    0 4px 0 rgba(0,0,0,0.18);
}

.typewriter-panel > .panel-row {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    linear-gradient(var(--panel-soft), var(--panel));
}

.typewriter-scroll {
  display: block;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #06070a;
}

.typewriter-scroll:focus-visible {
  outline: 2px solid rgba(255, 223, 77, 0.9);
  outline-offset: -2px;
}

.typewriter-output {
  display: block;
  margin: 0;
  padding: 10px;
  background: #06070a;
  color: #f4fbf7;
  font-family: var(--mono-font);
  font-size: 0.92em;
  line-height: 1.07;
  white-space: pre-wrap;
  font-weight: 650;
}

.typewriter-entry {
  display: block;
  margin: -1.66em 0 0;
  padding: 0 10px 0 calc(10px + (var(--typewriter-prompt-chars, 0) * 1ch));
  background: transparent;
  border: 0;
  color: #f4fbf7;
  font-family: var(--mono-font);
  font-size: 0.92em;
  font-weight: 650;
  line-height: 1.07;
  min-height: 1.07em;
}

.typewriter-entry[hidden] {
  display: none;
}

.typewriter-entry-text {
  color: #ffffff;
  font-family: var(--mono-font);
  font-size: 1em;
  white-space: pre;
}

.typewriter-entry-cursor {
  display: inline-block;
  margin-left: -2px;
  transform: translateY(0.01em);
  color: #ffdf4d;
  font-size: 1em;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 223, 77, 0.42);
  animation: typewriter-cursor-blink 1s steps(1, end) infinite;
}

.typewriter-entry-cursor[hidden] {
  display: none;
}

@keyframes typewriter-cursor-blink {
  50% {
    opacity: 0;
  }
}

.popup {
  position: fixed;
  z-index: 100;
  inset: auto 16px 16px auto;
  width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  margin: 0;
  padding: 0;
  border: 2px solid var(--cabinet-dark);
  border-radius: 7px;
  background: linear-gradient(var(--panel-soft), var(--panel));
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.popup::backdrop {
  background: rgba(0,0,0,0.45);
}

.popup-memory-watches {
  inset: auto 80px 80px auto;
  width: min(760px, calc(100vw - 64px));
}

.popup-call-stack {
  inset: auto 48px 48px auto;
}

.popup-index-registers {
  inset: auto 32px 16px auto;
  width: min(760px, calc(100vw - 64px));
}

.popup-file-chooser {
  inset: 48px auto auto 50%;
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 96px);
  transform: translateX(-50%);
}

.popup form {
  margin: 0;
}

.popup-drag-handle {
  cursor: move;
  touch-action: none;
  user-select: none;
}

.popup-drag-handle button {
  cursor: pointer;
}

.popup-body {
  min-height: 120px;
  padding: 14px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-stretch: condensed;
}

.popup-body-pre {
  overflow: auto;
  max-height: min(62vh, 34rem);
  color: #f4fbf7;
  background: #06070a;
  font-family: var(--mono-font);
  font-stretch: normal;
  white-space: pre;
}

.file-chooser-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px 14px;
  color: var(--text);
}

.file-chooser-head {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  padding-block: 6px;
  padding-inline: 12px;
}

.file-chooser-head > :first-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.file-chooser-query-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  color: var(--muted);
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
}

.file-chooser-query-field input {
  width: 12rem;
  max-width: 12rem;
  min-height: 1.9rem;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.58);
  border-right-color: rgba(255,255,255,0.28);
  border-bottom-color: rgba(255,255,255,0.24);
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-family: var(--ui-font);
  font-stretch: condensed;
  font-weight: 700;
  outline: none;
}

.file-chooser-query-field input:focus {
  border-color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.22);
}

.file-chooser-mode-row,
.file-chooser-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chooser-mode-row {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.file-chooser-mode-row button {
  white-space: nowrap;
}

.file-chooser-head > button[type="submit"] {
  flex: 0 0 auto;
}

.file-chooser-mode-row button,
.file-chooser-tabs button {
  min-height: 1.95rem;
  padding-inline: 0.8em;
}

.file-chooser-mode-row button.is-selected,
.file-chooser-tabs button.is-selected {
  border-color: rgba(255,255,255,0.92);
  background:
    linear-gradient(rgba(255,255,255,0.34), rgba(255,255,255,0.10)),
    rgba(121,191,216,0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -12px 18px rgba(51,126,153,0.28),
    0 4px 14px rgba(0,0,0,0.24),
    0 0 0 1px rgba(121,191,216,0.28);
}

.file-chooser-server-pane,
.file-chooser-local-pane {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.file-chooser-list {
  display: block;
  overflow: auto;
  max-height: min(46vh, 24rem);
  padding: 6px;
  border: 1px solid rgba(121,191,216,0.24);
  border-radius: 6px;
  background: #06070a;
  column-width: 26rem;
  column-gap: 10px;
  column-fill: auto;
}

.chooser-file-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 2rem;
  margin: 0 0 6px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #f4fbf7;
  text-align: left;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.chooser-file-stamp {
  flex: none;
  width: 16ch;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.78em;
  white-space: nowrap;
}

.chooser-file-row:hover,
.chooser-file-row:focus-visible {
  border-color: rgba(255,255,255,0.28);
  background: rgba(121,191,216,0.18);
}

.chooser-file-row.is-selected {
  border-color: rgba(255,223,77,0.72);
  background: rgba(255,223,77,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,223,77,0.16);
}

.chooser-file-path {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chooser-local-pane {
  padding: 8px 2px 2px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-stretch: condensed;
  line-height: 1.35;
}

.file-chooser-footer {
  min-height: 0;
  padding-block: 8px;
}

.file-chooser-selection {
  min-width: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-stretch: condensed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memory-watch-body {
  padding: 0;
}

.memory-watch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(121,191,216,0.28);
  color: var(--text);
}

.memory-watch-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.memory-watch-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memory-watch-range-separator {
  color: var(--muted);
  font-weight: 700;
}

.memory-watch-controls input {
  width: 5.6rem;
  padding: 2px 6px;
  border: 1px solid rgba(121,191,216,0.58);
  border-radius: 5px;
  background: #06070a;
  color: var(--text);
  font-family: var(--mono-font);
}

.memory-watch-output {
  min-height: 150px;
  margin: 0;
  padding: 14px;
}

@media (max-width: 820px) {
  .popup,
  .popup-call-stack,
  .popup-memory-watches,
  .popup-index-registers {
    inset: auto 16px 16px auto;
  }

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

  .app-shell.has-message {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .source-name-control input {
    width: 9rem;
  }

  .machine-panel {
    grid-template-columns: 86px 1fr;
  }

  .machine-status {
    min-height: 3rem;
  }

  .machine-readout {
    padding-left: 14px;
  }

  .machine-line,
  .machine-line:nth-child(2) {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .line-editor {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}
