/* Thème clair par défaut; le thème sombre suit le système, sauf choix explicite
   (data-theme sur <html>, conservé dans les préférences). */
:root {
  --bg: #eceef3;
  --dot: #d3d7e0;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --border: #e2e5eb;
  --text: #1f2330;
  --muted: #7a8194;
  --accent: #0aa8c9;
  --accent-soft: rgba(10, 168, 201, 0.12);
  --accent-ink: #087f99;
  --on-accent: #ffffff;
  --error: #d93b30;
  --bezel: #c9ccd3;
  --tip-bg: #1f2330;
  --tip-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --code-bg: #fbfcfd;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171c;
    --dot: #23262e;
    --surface: #1f222a;
    --surface-2: #282c35;
    --border: #2f333d;
    --text: #e6e8ec;
    --muted: #8d93a1;
    --accent: #22c3e6;
    --accent-soft: rgba(34, 195, 230, 0.14);
    --accent-ink: #4fd3ef;
    --on-accent: #06222b;
    --error: #ff8a80;
    --bezel: #33363e;
    --tip-bg: #000000;
    --tip-text: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --code-bg: #181a20;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #15171c;
  --dot: #23262e;
  --surface: #1f222a;
  --surface-2: #282c35;
  --border: #2f333d;
  --text: #e6e8ec;
  --muted: #8d93a1;
  --accent: #22c3e6;
  --accent-soft: rgba(34, 195, 230, 0.14);
  --accent-ink: #4fd3ef;
  --on-accent: #06222b;
  --error: #ff8a80;
  --bezel: #33363e;
  --tip-bg: #000000;
  --tip-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --code-bg: #181a20;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent-ink); }

svg.icon, svg.chev {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ disposition */

.app {
  --sb-width: 300px;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}
.app.collapsed { --sb-width: 76px; }

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  flex: none;
  width: var(--sb-width);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: width 0.2s ease;
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
}

/* ------------------------------------------------------------------ menu latéral */

.sb-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.logo svg { width: 26px; height: 26px; }

.sb-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; white-space: nowrap; }
.sb-title strong { font-size: 1rem; font-weight: 600; }
.sb-title span { color: var(--muted); font-size: 0.85rem; }

/* Bouton rond à cheval sur le bord du menu. */
.sb-collapse {
  position: absolute;
  top: 30px;
  right: -13px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow);
}
.sb-collapse:hover { color: var(--accent-ink); }
.sb-collapse svg { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 0.2s; }
.collapsed .sb-collapse svg { transform: none; }
.sidebar .sb-close { display: none; margin-left: auto; }

/* position: relative : les éléments en position absolue du menu (cases à cocher invisibles des
   interrupteurs) restent dans sa zone défilante; sinon ils allongeaient la page, et le menu,
   collant seulement dans son conteneur, partait avec le défilement. */
.nav { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 12px 16px; }

.nav-heading {
  margin: 16px 6px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 2px 0;
  padding: 0 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  text-align: left;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav-item .chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.15s; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(90deg); color: inherit; }
.nav-item .label { flex: 1; }

.badge {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.sb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Menu réduit à une colonne d'icônes, avec une infobulle au survol. */
.collapsed .sb-header { justify-content: center; padding-inline: 0; }
/* Version, en bas du menu : alignée sur le logo et les titres de section (16 px du bord). */
.sb-version { margin: 0; padding: 8px 16px 14px; color: var(--muted); font-size: 0.8rem; }
.collapsed .sb-version { padding-inline: 0; text-align: center; }
.collapsed .sb-title,
.collapsed .nav-item .label,
.collapsed .nav-item .chev,
.collapsed .nav-panel,
.collapsed .sb-footer .label { display: none; }
.collapsed .nav-heading { height: 1px; margin: 12px 8px; background: var(--border); font-size: 0; }
.collapsed .nav-item { justify-content: center; padding: 0; }
.collapsed .nav-item[aria-expanded="true"] { background: transparent; color: var(--text); }
.collapsed .nav-item:hover { background: var(--accent-soft); color: var(--accent-ink); }
.collapsed .badge { position: absolute; top: 4px; right: 8px; min-width: 18px; padding: 0 5px; font-size: 0.68rem; }
.collapsed .sb-footer { justify-content: center; }

/* Infobulle (placée par main.js : le menu défile, elle déborderait de son cadre). */
.tooltip {
  position: fixed;
  z-index: 40;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--tip-bg);
  color: var(--tip-text);
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

/* ------------------------------------------------------------------ commandes */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  cursor: pointer;
}
button.secondary, .button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover:not(:disabled), .button.secondary:hover:not(.disabled) { border-color: var(--accent); }
button:disabled, select:disabled, .button.disabled { cursor: not-allowed; opacity: 0.5; }
.nav-item, .icon-button { border: 0; }
/* Infobulle des icônes (main.js) : au-dessus de tout, ne capte pas la souris. */
.hover-tip {
  position: fixed;
  z-index: 1000;
  max-width: 300px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
  font: 0.8rem/1.35 system-ui, sans-serif;
  white-space: pre-line;
  pointer-events: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover:not(:disabled) { background: var(--surface-2); color: var(--accent-ink); }
.icon-button.small { width: 30px; height: 30px; }
.icon-button.small svg { width: 17px; height: 17px; }
.icon-button.danger:hover:not(:disabled) { color: var(--error); }

button:focus-visible, .button:focus-within, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.segmented.four span { padding-inline: 2px; font-size: 0.82rem; }
.segmented.six span { padding-inline: 1px; font-size: 0.76rem; }
.repo-settings summary { color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.repo-settings[open] summary { margin-bottom: 8px; }
code { font: 0.8rem ui-monospace, Consolas, monospace; }

select, textarea, input[type="url"], input[type="search"] {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea {
  font: 0.9rem/1.4 ui-monospace, Consolas, monospace;
  resize: vertical;
}

.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { margin: 0; color: var(--muted); font-size: 0.82rem; }
/* Textes d'aide : repliés par défaut, « + » les déplie. */
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 600;
  line-height: 1;
}
.more[open] > summary::before { content: "−"; }
.more > summary:hover { color: var(--text); }
.more[open] > summary { margin-bottom: 4px; }
.small { font-size: 0.85rem; color: #a3a8b3; max-width: 32em; }
.error { color: var(--error); min-height: 1.5em; }

/* Interrupteur : une case à cocher dessinée comme un bouton à glissière. */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--border);
  transition: background 0.15s;
}
.switch .knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(16px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }

.segmented { flex-direction: row; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.segmented legend { width: 100%; padding: 0; margin-bottom: 4px; }
.segmented label { flex: 1; position: relative; }
/* Bouton radio invisible, posé sur son étiquette : le focus ne fait pas défiler ailleurs. */
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  padding: 6px 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}
.segmented label:first-of-type span { border-radius: 8px 0 0 8px; }
.segmented label:last-of-type span { border-radius: 0 8px 8px 0; }
.segmented label + label span { border-left: 0; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

.info-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.85rem;
}

.type-panel { display: flex; flex-direction: column; gap: 8px; }

table.keys { border-collapse: collapse; font-size: 0.85rem; }
table.keys th, table.keys td { text-align: left; padding: 3px 12px 3px 0; }
table.keys th { color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------------ lecteurs */

.drives { display: flex; flex-direction: column; gap: 8px; }
.modem-status { margin: 0 0 6px; font-size: 0.85rem; }
.modem-status.online { color: var(--accent-ink); font-weight: 600; }
.sub-heading { margin: 14px 0 6px; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
#hard-drives .drive-no { min-width: 2.4em; }
.drive {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.drive-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drive-no {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.drive-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 0.85rem ui-monospace, Consolas, monospace;
}
.drive-name.empty { color: var(--muted); }
.drive-name.modified::after { content: " • " attr(data-modified); color: var(--accent-ink); font-family: system-ui, sans-serif; }
.drive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.drive-actions .button, .drive-actions button.secondary { padding: 4px 10px; font-size: 0.85rem; }
.drive-error { color: var(--error); font-size: 0.82rem; }
.drive-error:empty { display: none; }

/* ------------------------------------------------------------------ bibliothèque */

.library { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lib-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.lib-item > svg { color: var(--accent-ink); }
.lib-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.lib-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 0.85rem ui-monospace, Consolas, monospace; }
.lib-sub { color: var(--muted); font-size: 0.75rem; }
.lib-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lib-actions button.secondary, .lib-actions select { width: auto; padding: 3px 9px; font-size: 0.82rem; }
.lib-actions .spacer { flex: 1; }
.lib-actions .place-row { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.lib-actions.one-line { flex-wrap: nowrap; }
.lib-actions.one-line .place-row { flex: 1 1 auto; }
.lib-actions.one-line .place-row select { flex: 1 1 auto; min-width: 0; text-overflow: ellipsis; }
.lib-actions.one-line .spacer { display: none; }
.lib-actions.one-line .icon-button { flex: none; }
/* Dépôt : fiche du fichier choisi dans la liste déroulante (hauteur bornée). */
#repo-select, #repo-cat, #repo-search { margin-bottom: 6px; }
#bbs-filter, #bbs-select { margin-bottom: 6px; }
#bbs-select { padding: 4px; }
#bbs-select option { padding: 2px 5px; border-radius: 4px; }
.repo-detail { min-height: 11.5rem; align-content: start; }
.repo-detail.empty { border-style: dashed; background: transparent; }
.repo-detail .lib-name { white-space: normal; }
.lib-about {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ------------------------------------------------------------------ zone principale */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 16px;
}
.toolbar h1 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.toolbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.menu-button { display: none; }
.toolbar-sep { width: 1px; height: 22px; background: var(--border); }

/* Choix de la langue : bouton compact (globe et code); la liste native, transparente,
   le recouvre et s'ouvre au clic avec les noms complets. */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-picker:hover { background: var(--surface-2); color: var(--accent-ink); }
.lang-picker:focus-within { outline: 2px solid var(--accent); }
.lang-picker svg { width: 18px; height: 18px; }
.lang-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.speed { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 5.5em; text-align: right; }
.with-icon svg { width: 17px; height: 17px; }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* L'écran garde le format 4:3 et tient dans la hauteur de la fenêtre. */
  --screen-width: min(100%, calc((100dvh - 190px) * 4 / 3), 1100px);
}
.stage > * { width: var(--screen-width); min-width: min(100%, 300px); }

.monitor {
  position: relative;
  padding: clamp(6px, 1.4vw, 14px);
  border-radius: 14px;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

/* 64 × 16 cases (1536 × 1152 pixels) affichées en 4:3, comme sur le moniteur d'origine.
   L'image de 384 × 192 de l'émulateur y est agrandie sans lissage par main.js. */
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: #000;
  outline: none;
}
canvas:focus-visible { box-shadow: 0 0 0 3px var(--accent); }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.85);
  color: #e8eaee;
  text-align: center;
}
.overlay p { margin: 0; }

/* Scripts bloqués (classe no-js laissée sur <html>) ou démarrage raté (js-failed) : seul le
   message qui explique comment autoriser le site reste sur l'écran. */
.js-required { display: none; }
.no-js .js-required, .js-failed .js-required {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 46em;
  text-align: left;
  font-size: clamp(0.72rem, 1.3vw, 0.9rem);
  line-height: 1.4;
}
.no-js .overlay, .js-failed .overlay { justify-content: flex-start; overflow-y: auto; }
.no-js .overlay > :not(.js-required), .js-failed .overlay > :not(.js-required) { display: none; }
.js-required strong { color: #ffd479; }
.overlay .error { color: #ff8a80; }

.drop-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 3px dashed var(--accent);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.1rem;
  pointer-events: none;
}

.now-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.now-info > svg { margin-top: 2px; color: var(--accent-ink); }
.now-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.now-text strong { font-weight: 600; }
.now-sub { color: var(--muted); font-size: 0.85rem; }
#now-lines p { margin: 4px 0 0; font-size: 0.9rem; }
#now-lines p.muted { color: var(--muted); font-size: 0.82rem; }
#now-lines p.rights a { color: var(--accent-ink); overflow-wrap: anywhere; }
/* Administration : actions sous la description, vignettes du test sur M1, M3 et M4. */
.now-admin { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.now-admin .admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.now-admin button.secondary, .now-admin select { padding: 4px 10px; font-size: 0.85rem; }
.now-admin select { width: auto; max-width: 100%; }
.now-admin .admin-models { display: inline-flex; gap: 8px; align-items: center; font-size: 0.85rem; }
.now-admin .admin-models label { display: inline-flex; gap: 3px; align-items: center; cursor: pointer; }
.now-admin .admin-badge { color: var(--accent-ink); font: 600 0.75rem system-ui, sans-serif; }
.test-shots { display: flex; flex-wrap: wrap; gap: 8px; }
.test-shots figure { margin: 0; text-align: center; font-size: 0.78rem; color: var(--muted); }
.test-shots img { display: block; width: 192px; max-width: 28vw; border: 1px solid var(--border); border-radius: 4px; image-rendering: pixelated; }
.admin-login { display: flex; flex-direction: column; gap: 6px; }
.admin-tools { display: flex; flex-direction: column; gap: 6px; }
.admin-heading { margin: 6px 0 0; font-weight: 600; font-size: 0.88rem; }

/* Barre des lecteurs, sous l'écran. */
/* Une seule ligne : les lecteurs garnis se partagent la largeur, les vides restent étroits;
   les textes trop longs sont coupés (l'infobulle les donne en entier). */
.drive-bar { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; }
.drive-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: 0.8rem ui-monospace, Consolas, monospace;
}
.drive-chip { flex: 1 1 0; min-width: 0; }
.drive-chip.empty { flex: 0 0 auto; }
.drive-chip:hover { border-color: var(--accent); }
.drive-chip .chip-main {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  padding: 4px 4px 4px 10px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.drive-chip .chip-main { flex: 1 1 auto; overflow: hidden; }
.drive-chip .chip-main > span, .drive-chip .chip-lines > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-chip .chip-lines { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 100%; }
.drive-chip.bare .chip-main { padding-right: 10px; }
.drive-chip .icon-button { flex: none; }
.drive-chip .icon-button { margin: 3px 3px 0 0; }
/* Disquette d'un autre format que celui du DOS du lecteur 0. */
.drive-chip.clash, .drive-chip.clash.active { border-color: var(--error); background: color-mix(in srgb, var(--error) 14%, var(--surface)); }
.drive-chip .clash-text { color: var(--error); font: 600 0.72rem system-ui, sans-serif; }
.drive-chip .no { color: var(--accent-ink); font-weight: 600; }
.drive-chip .file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive-chip.empty .file { color: var(--muted); }
.drive-chip .chip-head { display: flex; align-items: center; gap: 6px; }
.drive-chip.modified .chip-head::after { content: "●"; color: var(--accent); font-size: 0.7rem; }
.drive-chip .geo { color: var(--muted); font: 0.72rem system-ui, sans-serif; }
.drive-chip .access { color: var(--accent-ink); font: 600 0.72rem system-ui, sans-serif; }
button.danger { border: 1px solid var(--error); background: color-mix(in srgb, var(--error) 12%, var(--surface)); color: var(--error); }
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--error) 22%, var(--surface)); }
.drive-chip .dos { color: var(--muted); font: 0.72rem system-ui, sans-serif; }
.drive-chip .dos.system { color: var(--accent-ink); }
.drive-chip .chip-tools { display: flex; flex: none; }

/* Fenêtre des disquettes (formatage, fichiers). */
.dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 16px 18px; width: min(640px, 94vw); max-height: 90vh; }
.dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.dialog h2 { margin: 0 0 4px; font-size: 1.05rem; }
.dialog .hint { margin: 4px 0 10px; }
.dialog .field { margin-bottom: 10px; }
.dialog .warning { color: var(--error); font-size: 0.88rem; margin: 6px 0; }
/* Gestionnaire de fichiers (volumes ODS-2) */
.dialog.files { width: min(1040px, 96vw); height: min(780px, 92vh); max-height: 92vh; padding: 14px 16px; }
.dialog.files[open] { display: flex; flex-direction: column; }
.dialog.files-small { width: min(520px, 94vw); }
/* Mode de travail du gestionnaire, toujours visible dans l'en-tête. */
.files-mode { padding: 2px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.files-mode.vms { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.files-notice.vms .warning { color: var(--text); }
.files-notice.vms { padding: 6px 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); }
.files-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
.files-notice[hidden] { display: none; }
.files-notice .warning { flex: 1 1 20em; margin: 0; }
.files-small input[type=password] { width: 100%; }
.files-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.files-head h2 { margin: 0; }
.files-head select { width: auto; max-width: 16em; }
.files-head .spacer { flex: 1; }
#files-browse, #files-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#files-browse[hidden], #files-editor[hidden] { display: none; }
.files-path { margin: 8px 0 6px; font-size: 0.92rem; overflow-wrap: anywhere; }
.files-path code { margin-left: 8px; color: var(--muted); font: 0.84rem ui-monospace, Consolas, monospace; }
.files-path .crumb { padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--accent-ink); font: inherit; cursor: pointer; }
.files-path .crumb:hover { background: var(--accent-soft); }
.files-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.files-tools button { padding: 5px 9px; font-size: 0.85rem; }
.files-tools button:disabled { opacity: 0.45; cursor: default; }
.files-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0; }
.files-filter input[type=search] { width: 14em; max-width: 100%; }
.files-filter label.check { margin-top: 0; }
.files-list { flex: 1; min-height: 8rem; max-height: none; }
.files-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.files-table th { position: sticky; top: 0; z-index: 1; padding: 6px 8px; background: var(--surface-2); color: var(--muted); font-weight: 600; text-align: left; white-space: nowrap; }
.files-table td { padding: 3px 8px; border-top: 1px solid var(--border); white-space: nowrap; }
.files-table td.num, .files-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.files-table td.prot, .files-table td.owner, .files-table td.date { font: 0.82rem ui-monospace, Consolas, monospace; }
.files-table tr.selected td { background: var(--accent-soft); }
.files-table .file-name { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border: 0; background: none; color: var(--text); font: 0.86rem ui-monospace, Consolas, monospace; cursor: pointer; }
.files-table .file-name:hover { color: var(--accent-ink); text-decoration: underline; }
.files-table .file-name .icon { width: 15px; height: 15px; }
.files-table .badge { margin-left: 6px; padding: 1px 6px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 0.74rem; }
#files-empty { padding: 14px; }
/* Le texte trouvé par la recherche est surligné par une copie du texte placée sous
   l'éditeur (mêmes police, marges et tabulations, donc exactement alignée) : seuls ses
   surlignages se voient, le texte lui-même est celui de l'éditeur, dessiné par-dessus. */
.files-text-wrap { position: relative; flex: 1; min-height: 10rem; display: flex; overflow: hidden; border-radius: 8px; background: #000; }
.files-back { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.files-back > div { padding: 8px 10px; border: 1px solid transparent; color: transparent; white-space: pre; tab-size: 8;
  font: 0.86rem/1.35 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace; will-change: transform; }
.files-back mark { color: transparent; background: #24507f; border-radius: 2px; }
.files-back mark.cur { background: #1e90ff; box-shadow: 0 0 0 1px #7cc0ff; }
.files-text::selection { background: #1e90ff; color: #fff; }
.files-text { flex: 1; min-height: 10rem; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  position: relative; background: transparent; color: #d8d8d8; font: 0.86rem/1.35 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace; resize: none; white-space: pre; tab-size: 8; }
/* Barre de défilement de l'éditeur : toujours là, large et contrastée, pour voir où l'on
   est dans un long fichier. */
.files-text { text-transform: none; overflow: scroll; scrollbar-width: auto; scrollbar-color: #9aa3b2 #1b1e26; scrollbar-gutter: stable; }
.files-text::-webkit-scrollbar { width: 16px; height: 16px; }
.files-text::-webkit-scrollbar-track { background: #1b1e26; }
.files-text::-webkit-scrollbar-thumb { background: #9aa3b2; border: 3px solid #1b1e26; border-radius: 8px; min-height: 40px; }
.files-text::-webkit-scrollbar-thumb:hover { background: #c5ccd8; }
.files-text::-webkit-scrollbar-corner { background: #1b1e26; }
.files-find { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.files-find input[type=search] { width: 18em; max-width: 100%; }
.files-find .spacer { flex: 1; }
.files-find .icon { width: 15px; height: 15px; }
.files-find .icon-down { transform: rotate(180deg); }
.files-status { min-height: 1.3em; margin: 8px 0 0; }
.files-status.error { color: var(--error); }
.props-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0 10px; font-size: 0.86rem; }
.props-facts dt { color: var(--muted); }
.props-facts dd { margin: 0; overflow-wrap: anywhere; }
.prot-table { border-collapse: collapse; font-size: 0.86rem; }
.prot-table th, .prot-table td { padding: 3px 12px 3px 0; text-align: center; font-weight: 500; }
.prot-table tbody th { text-align: left; }
.props-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.props-row .field { flex: 0 1 auto; }
.props-row input, .props-row select { width: 8em; }
.files-small input[type=text] { width: 100%; }

.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.dialog-actions .spacer { flex: 1; }
.dialog-actions select { width: auto; }
.files-scroll { max-height: 48vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.files-table { width: 100%; border-collapse: collapse; font: 0.85rem ui-monospace, Consolas, monospace; }
.files-table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font: 600 0.78rem system-ui, sans-serif; }
.files-table th, .files-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); }
.files-table td.size { text-align: right; }
.files-table tr.system td { color: var(--muted); }
.files-table label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
/* Aide-mémoire : commandes par sujet; un clic tape la commande. */
.cheat-sections { max-height: 58vh; overflow: auto; padding-right: 4px; }
.cheat-sections h3 { margin: 12px 0 4px; font-size: 0.92rem; color: var(--accent-ink); }
.cheat-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--border); }
.cheat-row button.cheat-cmd { justify-self: start; max-width: 100%; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--text); font: 0.84rem ui-monospace, Consolas, monospace; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.cheat-row button.cheat-cmd:hover { border-color: var(--accent); }
.cheat-row .cheat-desc { color: var(--muted); font-size: 0.84rem; }
@media (max-width: 640px) { .cheat-row { grid-template-columns: 1fr; gap: 2px; } }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.history-list code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 0.88rem ui-monospace, Consolas, monospace; }
.history-list button.secondary { padding: 2px 8px; font-size: 0.8rem; }
.drive-chip.active { border-color: var(--accent); background: var(--accent-soft); }
/* Cassette : la partie lue se remplit de gauche à droite. */
.drive-chip.tape, .drive-chip.tape.active { background: linear-gradient(to right, color-mix(in srgb, var(--accent) 22%, var(--surface)) var(--progress), var(--surface) var(--progress)); }

.status { min-height: 1.4em; margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; }
.status.error { color: var(--error); }

/* ------------------------------------------------------------------ atelier d'assemblage */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#ide-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }

/* Ordinateur : l'éditeur à gauche, l'écran et les registres à droite. */
.ide-mode .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 38%);
  gap: 18px;
  align-items: start;
}
.ide-mode .stage { --screen-width: 100%; position: sticky; top: 8px; }
/* La fiche du programme cède sa place aux registres : le programme, c'est le source édité. */
.ide-mode .now-info { display: none; }
@media (max-width: 1100px) {
  .ide-mode .workspace { grid-template-columns: minmax(0, 1fr); }
  .ide-mode .stage { position: static; }
}

.ide { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ide-bar, .ide-more, .ide-debugbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ide-gap { flex: 1; }
.ide-bar button, .ide-more button, .ide-more .button, .ide-debugbar button { padding: 6px 12px; font-size: 0.88rem; }
.ide-name {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font: 0.9rem ui-monospace, Consolas, monospace;
}
.ide-name input {
  width: 8.5ch;
  padding: 6px 2px 6px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
  outline: none;
}
.ide-name span { padding-right: 8px; color: var(--muted); }
.ide-name:focus-within { outline: 2px solid var(--accent); }
.ide-drive { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ide-drive select { width: auto; padding: 5px 6px; font: 0.9rem ui-monospace, Consolas, monospace; }

.ide-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.ide-files .hint { flex-basis: 100%; }
.ide-file { gap: 10px; padding: 4px 10px; font-size: 0.85rem; }
.ide-file span { color: var(--muted); font-size: 0.78rem; }

/* Éditeur : une zone de texte transparente sur la coloration, numéros de ligne à gauche. */
.editor {
  --code-font: 0.86rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  position: relative;
  display: flex;
  height: clamp(280px, calc(100dvh - 380px), 900px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}
.gutter-wrap { flex: none; overflow: hidden; border-right: 1px solid var(--border); background: var(--surface-2); }
.gutter { padding: 10px 0; font: var(--code-font); color: var(--muted); text-align: right; user-select: none; }
.gl { position: relative; min-width: 3.4em; padding: 0 8px 0 18px; cursor: pointer; }
.gl:hover { color: var(--text); }
.gl.bp::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5484d;
  transform: translateY(-50%);
}
.gl.error { color: var(--error); font-weight: 700; }
.gl.warn { color: #d69e00; font-weight: 700; }
.gl.cur { background: var(--accent-soft); color: var(--accent-ink); }
.code-area { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.code-highlight, .code-input {
  margin: 0;
  padding: 10px 12px;
  font: var(--code-font);
  letter-spacing: 0;
  tab-size: 8;
  white-space: pre;
}
.code-highlight { position: absolute; top: 0; left: 0; min-width: 100%; color: var(--text); pointer-events: none; }
.hl-line { min-height: 1.5em; }
.hl-line.error { background: rgba(229, 72, 77, 0.14); }
.hl-line.warn { background: rgba(214, 158, 0, 0.12); }
.hl-line.cur { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  caret-color: var(--text);
  text-transform: none;
  resize: none;
  overflow: auto;
  outline: none;
}
.code-input::selection { background: rgba(110, 168, 255, 0.35); color: transparent; }
.tk-comment { color: var(--muted); font-style: italic; }
.tk-label { color: #c2410c; font-weight: 600; }
.tk-op { color: var(--accent-ink); font-weight: 600; }
.tk-dir { color: #7c3aed; font-weight: 600; }
.tk-reg { color: #0f766e; }
.tk-num { color: #b45309; }
.tk-string { color: #15803d; }
.tk-svc { color: #db2777; }
:root[data-theme="dark"] .tk-label { color: #fb923c; }
:root[data-theme="dark"] .tk-dir { color: #c4b5fd; }
:root[data-theme="dark"] .tk-reg { color: #5eead4; }
:root[data-theme="dark"] .tk-num { color: #fbbf24; }
:root[data-theme="dark"] .tk-string { color: #86efac; }
:root[data-theme="dark"] .tk-svc { color: #f9a8d4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tk-label { color: #fb923c; }
  :root:not([data-theme="light"]) .tk-dir { color: #c4b5fd; }
  :root:not([data-theme="light"]) .tk-reg { color: #5eead4; }
  :root:not([data-theme="light"]) .tk-num { color: #fbbf24; }
  :root:not([data-theme="light"]) .tk-string { color: #86efac; }
  :root:not([data-theme="light"]) .tk-svc { color: #f9a8d4; }
}

.ide-output { display: flex; flex-direction: column; gap: 6px; }
.ide-summary { margin: 0; font-size: 0.9rem; min-height: 1.4em; }
.ide-summary.ok { color: #15803d; }
.ide-summary.error { color: var(--error); font-weight: 600; }
.ide-messages { display: flex; flex-direction: column; gap: 4px; max-height: 220px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.ide-messages li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 10px;
  border-left: 3px solid var(--error);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.86rem;
}
.ide-messages li.warn { border-left-color: #d69e00; }
.ide-line { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 600; text-decoration: underline; }
.ide-msg { flex: 1; min-width: 12em; }
.ide-fix { gap: 8px; padding: 3px 9px; font-size: 0.8rem; }
.ide-fix code { color: var(--accent-ink); white-space: pre; }

.ide-help summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.ide-help .hint { margin: 8px 0; }
.svc-table { border-collapse: collapse; font-size: 0.84rem; }
.svc-table td { padding: 3px 12px 3px 0; vertical-align: top; }
.svc-table .mono { font-family: ui-monospace, Consolas, monospace; }
.svc-ldos, .svc-rom { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.linklike { padding: 0; border: 0; background: none; color: var(--accent-ink); font: 600 0.84rem ui-monospace, Consolas, monospace; }

.ide-regs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.ide-state { margin: 0; color: var(--muted); font-size: 0.86rem; min-height: 1.3em; }
.reg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.reg { display: flex; justify-content: space-between; gap: 4px; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); font-size: 0.82rem; }
.reg span { color: var(--muted); }
.reg code { font: 0.86rem ui-monospace, Consolas, monospace; }
.reg.changed { background: var(--accent-soft); }
.reg.changed code { color: var(--accent-ink); font-weight: 700; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; }
.flag { padding: 1px 8px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font: 0.78rem ui-monospace, Consolas, monospace; }
.flag.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.mem { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; }
.mem div { display: flex; gap: 8px; }
.mem span { min-width: 4.5em; color: var(--muted); }
.mem code { font: 0.82rem ui-monospace, Consolas, monospace; }

/* Champ invisible qui fait apparaître le clavier virtuel d'une tablette. 16px : sinon
   iOS agrandit la page quand il reçoit le focus. */
#touch-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  resize: none;
  font-size: 16px;
  pointer-events: none;
}

/* Touches spéciales, seulement sur un écran tactile (une tablette n'a pas Échap ni Origine). */
.touch-keys { display: none; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
@media (any-pointer: coarse) {
  .touch-keys { display: flex; }
}
.touch-keys button { min-width: 3em; padding: 10px 12px; touch-action: manipulation; user-select: none; }
.touch-keys button.active { background: var(--accent); color: var(--on-accent); }

/* Thème : le bouton montre la lune en clair et le soleil en sombre. */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ------------------------------------------------------------------ téléphone */

/* Le menu devient un tiroir qui glisse par-dessus l'écran. */
@media (max-width: 760px) {
  .app { --sb-width: min(320px, 88vw); }
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .app.drawer-open .sidebar { transform: none; }
  .backdrop {
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(0, 0, 0, 0.45);
  }
  .sb-collapse { display: none; }
  .sidebar .sb-close { display: inline-grid; }
  /* (Dans le tiroir, le menu est toujours déplié : main.js n'y met pas .collapsed.) */

  .content { padding: 8px 10px 16px; }
  .toolbar { margin-bottom: 8px; gap: 4px; }
  .toolbar h1 { min-width: 0; overflow: hidden; font-size: 0.95rem; white-space: nowrap; text-overflow: ellipsis; }
  .toolbar-actions { gap: 2px; }
  .menu-button { display: inline-grid; }
  .speed, .toolbar-sep, .switch.compact [data-i18n] { display: none; }
  .switch.compact { margin-right: 6px; }
  .toolbar .with-icon span { display: none; }
  .toolbar .with-icon { padding: 7px 9px; }
  .lang-picker { padding: 0 5px; }
  .stage { --screen-width: 100%; }
  .monitor { border-radius: 10px; }
}

/* État de la machine : deux boutons et deux icônes sur une ligne. */
.state-box .row { flex-wrap: nowrap; align-items: center; gap: 6px; }
.state-box .row .secondary { padding-inline: 10px; }
.state-box label.icon-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Dépôt : légende des symboles de la liste des disquettes. */
.repo-legend { margin: 4px 0 0; font-size: 0.8rem; white-space: pre-line; }

/* ---------------------------------------------------------------- VAX : terminal de la console */

/* Le cadre épouse le terminal (80 × 24, taille de police choisie) au lieu du format 4:3. */
.stage > .terminal-monitor {
  width: auto;
  max-width: 100%;
  min-width: min(100%, 300px);
}
.terminal {
  min-height: 12rem;
  padding: 10px 12px;
  border-radius: 6px;
  background: #000;
  /* Fenêtre étroite : le cadre défile de côté. Jamais de haut en bas : c'est la barre de
     xterm (son historique) qui sert, et une deuxième barre la doublerait. */
  overflow-x: auto;
  overflow-y: hidden;
}
/* La barre de défilement de xterm se pose sur le bord droit du terminal : on lui réserve
   une marge, sinon elle couvre les dernières colonnes du texte. */
/* Largeur du contenu : en fenêtre étroite, la barre reste à droite de la 80e colonne (et
   le cadre défile de côté) au lieu de se poser au milieu du texte. */
.terminal .xterm { outline: none; width: max-content; padding-right: 16px; }
.terminal .xterm .xterm-viewport { scrollbar-width: thin; scrollbar-color: #666 #000; }
/* Écran graphique de la VAXstation (QVSS, 1024 × 864) : réduit à la largeur disponible. */
.vax-screen { display: block; width: min(1024px, 100%); height: auto; aspect-ratio: 1024 / 864; border-radius: 6px; background: #000;
  outline: none; cursor: none; touch-action: none; }
.vax-screen[hidden] { display: none; }
/* Système arrêté (console >>>) : écran éteint, l'image reste en mémoire. */
.vax-screen.blank { filter: brightness(0); }
.vax-screen:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; object-fit: contain; border-radius: 0; box-shadow: none; }
.vax-screen:focus { box-shadow: 0 0 0 2px var(--accent); }
.terminal .xterm:focus-within { box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.stage > .status { width: auto; max-width: 100%; }

/* Barre de touches à l'écran (téléphone, tablette) : Ctrl, Esc, flèches, PF1-PF4. */
.stage > .key-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: auto; max-width: 100%; margin-top: 10px; }
.stage > .key-bar[hidden] { display: none; }
.key-bar button { min-width: 44px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: 0.9rem ui-monospace, Consolas, monospace; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.key-bar button:active { background: var(--accent-soft); }
.key-bar button.armed { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.key-bar .gap { width: 8px; }
label.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.88rem; }
.overlay[hidden] { display: none; }

/* ---------------------------------------------------------------- VAX : disques */
.disk-units { display: flex; flex-direction: column; gap: 10px; }
.disk-unit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.disk-unit .row { flex-wrap: wrap; align-items: center; gap: 6px; }
.disk-unit select { flex: 1; min-width: 6em; }
.disk-unit .hint { overflow-wrap: anywhere; }
.local-disks { display: flex; flex-direction: column; gap: 8px; }
.local-disk .row { flex-wrap: wrap; gap: 4px; }
.local-disk button { padding: 4px 8px; font-size: 0.8rem; }

/* Dépôt : fiche du fichier choisi */
.repo-detail { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.repo-detail:empty { display: none; }
.repo-detail .row { align-items: center; flex-wrap: wrap; }
.repo-detail .hint.small { font-size: 0.75rem; }
#repo-select { width: 100%; }
#panel-install > button { align-self: flex-start; }

/* Automatisation en cours (Init from Web, Install TCP/IP) */
.pilot { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; padding: 8px 12px;
  border: 1px solid var(--accent, #2bb3c0); border-radius: 8px; font-size: 0.88rem; }
.pilot[hidden] { display: none; }
.pilot span { flex: 1; }
.pilot.locked { border-color: var(--error, #d9534f); }

a.icon-button { display: inline-flex; align-items: center; justify-content: center; color: inherit; }

/* Turbo actif */
#turbo.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

/* Onglets Console / Telnet au-dessus du terminal */
.term-tabs { display: flex; align-items: center; gap: 6px; width: var(--screen-width, 100%); max-width: 100%;
  margin: 0 auto 6px; flex-wrap: wrap; }
.term-tab { padding: 5px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.88rem; cursor: pointer; }
.term-tab.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.telnet-status { flex: 1; min-width: 8em; margin-left: 6px; color: var(--muted); font-size: 0.85rem; }
.small-button { padding: 4px 10px; font-size: 0.85rem; }
.terminal[hidden] { display: none; }
/* Onglet Telnet : le message « VAX éteint » de la console ne couvre pas le terminal telnet. */
.overlay.behind { display: none; }

/* Comptes OpenVMS (accounts.js) : même cadre que le gestionnaire de fichiers. */
.acc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 6px; border-bottom: 1px solid var(--border); }
.acc-tab { padding: 6px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: none; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; }
.acc-tab[aria-selected="true"] { border-color: var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; }
.acc-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.acc-pane[hidden] { display: none; }
.acc-pane .files-table td.mono { font: 0.82rem ui-monospace, Consolas, monospace; }
.acc-editor-title { margin: 4px 0 8px; font-size: 1rem; }
.acc-form { flex: 1; min-height: 0; overflow: auto; padding-right: 4px; }
.acc-section { margin: 0 0 8px; border: 1px solid var(--border); border-radius: 8px; }
.acc-section > summary { padding: 6px 10px; font-weight: 600; cursor: pointer; }
.acc-section-body { padding: 4px 12px 12px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 8px 14px; }
.acc-grid.quotas { grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); }
.acc-grid .field input, .acc-ask-fields .field input, .acc-ask-fields select { width: 100%; }
.acc-grid .field small, .acc-ask-fields small { font-size: 0.76rem; }
.acc-checks { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.acc-checks label.check { margin-top: 4px; font: 0.82rem ui-monospace, Consolas, monospace; }
.acc-hours-wrap { overflow-x: auto; }
.acc-hours { border-collapse: collapse; font-size: 0.74rem; }
.acc-hours th, .acc-hours td { padding: 0 1px; text-align: center; }
.acc-hours th.hour { min-width: 1.35em; color: var(--muted); font-weight: 400; }
.acc-hours td.gap { padding-left: 10px; }
.acc-hours input { margin: 0; }
.acc-hours .link, .link { padding: 0 6px 0 0; border: 0; background: none; color: var(--accent-ink); font: 600 0.78rem ui-monospace, Consolas, monospace; cursor: pointer; }
.acc-priv-wrap { max-height: 22rem; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.acc-privs td, .acc-privs th { text-align: left; }
.acc-rights { margin: 0 0 8px; padding-left: 1.2em; font-size: 0.86rem; }
.acc-rights li { margin: 3px 0; }
.acc-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.acc-inline select { width: auto; max-width: 20em; }
.acc-ask-fields { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.acc-ask-fields fieldset { margin: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; }
.acc-cmdline { display: flex; align-items: center; gap: 6px; }
.acc-cmdline code { font: 600 0.9rem ui-monospace, Consolas, monospace; }
.acc-cmdline input { flex: 1; min-width: 8em; font: 0.9rem ui-monospace, Consolas, monospace; }
.acc-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0; }
.acc-example { padding: 2px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font: 0.76rem ui-monospace, Consolas, monospace; cursor: pointer; }
.acc-output { flex: 1; min-height: 8rem; margin: 0; padding: 8px 10px; overflow: auto; border-radius: 8px; background: #000; color: #d8d8d8; font: 0.8rem/1.3 ui-monospace, Consolas, monospace; white-space: pre; }
.acc-privs th .acc-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.acc-login-open { margin-top: 10px; }
#acc-login .files-text-wrap { min-height: 14rem; }
.files-table .badge.warn { background: var(--error); color: #fff; }
#acc-sec .acc-cmdline select { flex: 0 1 18em; width: auto; min-width: 8em; }
#acc-sec .acc-cmdline input { flex: 1 1 18em; }

/* ================================================================ IBM System/370 */

.logo370 {
  font: 800 0.8rem/1 ui-monospace, Consolas, monospace;
  letter-spacing: -0.02em;
}
.mono { font-family: ui-monospace, "DejaVu Sans Mono", Consolas, monospace; }

/* Le cadre épouse l'écran 3270 ou la console. */
.stage > .op-panel, .stage > .term-tabs { width: min(100%, 1100px); }
.stage > .terminal-monitor { width: min(100%, 1100px); }
.terminal-monitor { min-height: 18rem; }

/* Pupitre de l'opérateur, d'après le System/370 modèle 148. */
.op-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  margin-bottom: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #2b2f38;
  color: #d8dbe2;
  box-shadow: var(--shadow);
}
.op-caption {
  display: block;
  margin-bottom: 6px;
  padding: 1px 10px;
  border-radius: 2px;
  background: #b9bec8;
  color: #2b2f38;
  font: 700 0.68rem/1.4 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
}
.dials { display: flex; gap: 10px; justify-content: center; }
.dial {
  --angle: 0deg;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 3px solid #e7dcc0;
  border-radius: 50%;
  background: repeating-conic-gradient(#d9cba5 0 6deg, #efe4c6 6deg 12deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 0 7px #f1e8cf;
  cursor: pointer;
}
.dial::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 2px;
  height: 9px;
  background: #3a2f1c;
  transform-origin: 50% 19px;
  transform: translateX(-50%) rotate(var(--angle));
}
.dial span {
  position: absolute;
  inset: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2b2f38;
  color: #fff;
  font: 700 0.9rem ui-monospace, Consolas, monospace;
}
.dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.op-lights { display: flex; gap: 14px; }
.light {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font: 700 0.68rem system-ui, sans-serif;
  letter-spacing: 0.05em;
}
.light i {
  width: 22px;
  height: 22px;
  border: 3px solid #c7c9ce;
  border-radius: 50%;
  background: #5a1f1f;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
#lt-sys i { background: #4b4d52; }
.light.on i { background: #ff4a3d; box-shadow: 0 0 10px #ff4a3d, inset 0 -2px 4px rgba(0, 0, 0, 0.3); }
#lt-sys.on i { background: #f2f2f2; box-shadow: 0 0 10px #ffffff; }
#lt-man.on i { background: #ff9a2e; box-shadow: 0 0 10px #ff9a2e; }
.op-psw { min-width: 11rem; }
#psw { font-size: 0.92rem; color: #9ee6a8; }
.op-buttons { display: flex; gap: 10px; }
.op-btn {
  min-width: 76px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font: 700 0.78rem system-ui, sans-serif;
  letter-spacing: 0.06em;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.op-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.op-btn:disabled { opacity: 0.45; cursor: default; }
.op-btn.red { background: #d22f27; }
.op-btn.blue { background: #2e8fd0; }
.op-btn.grey { background: #7b808a; }

/* Onglets : nouveautés dans un onglet caché. */
.term-tab.news::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.small-select { margin-left: 8px; padding: 5px 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600; }
.small-select option { background: var(--surface); color: var(--text); font-weight: 400; }

/* Console de l'opérateur (3215). */
.console370 {
  display: flex;
  flex-direction: column;
  height: min(70dvh, 46rem);
  border-radius: 6px;
  background: #000;
}
.console-out, .printer-out {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  color: #9ef0a0;
  font: var(--term-font-size, 16px)/1.3 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace;
  white-space: pre;
}
/* Imprimante : papier en continu (images/paper-*.png, tirées de la photo d'un listage :
   bandes bleues et grises d'un demi-pouce, perforations d'entraînement). Chaque feuille
   (saut de page) est un bloc qui porte son papier : le texte et le papier défilent ensemble. */
.printer-out {
  --lh: calc(var(--term-font-size, 16px) * 1.3); /* une ligne imprimée; trois par bande */
  --tile: calc(var(--lh) * 6);                     /* deux bandes, deux perforations */
  --margin: calc(var(--tile) * 104 / 147);         /* bande des perforations (proportions de l'image) */
  height: min(70dvh, 46rem);
  padding: 12px;
  border-radius: 6px;
  background: #55595c;
  line-height: var(--lh);
  color: #1d1d1d;
}
.printer-out .page {
  box-sizing: border-box;
  width: max-content;
  min-width: calc(132ch + 2 * var(--margin) + 2ch);
  height: calc(66 * var(--lh));                 /* 11 pouces : 66 lignes, 11 tuiles */
  margin: 0 auto 10px;
  /* marges du haut (3 lignes) et du bas (2 lignes) : 61 lignes imprimées (PAGE_LINES) */
  padding: calc(3 * var(--lh)) calc(var(--margin) + 1ch) calc(2 * var(--lh));
  overflow: hidden;
  background:
    url(images/paper-left.png) left top / var(--margin) var(--tile) repeat-y,
    url(images/paper-right.png) right top / var(--margin) var(--tile) repeat-y,
    url(images/paper-band.png) left top / 100% var(--tile) repeat-y,
    #e2e6e8;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.45);
}
.printer-out .page { position: relative; }
/* Fine bordure de la zone imprimable (132 colonnes, 61 lignes), un peu en dehors du texte. */
.printer-out .page::before {
  content: '';
  position: absolute;
  inset: calc(2.75 * var(--lh)) calc(var(--margin) + 0.4ch) calc(1.75 * var(--lh));
  border: 1px solid rgb(120 150 175 / 0.45);
  pointer-events: none;
}
.printer-out .page:last-child { margin-bottom: 0; }
#printer-fit[aria-pressed="true"], #term-fit[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.console-in {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #222;
}
.console-in .prompt { color: #ffd479; font: 700 1rem ui-monospace, monospace; }
.console-in input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #0d0d0d;
  color: #fff;
  font: var(--term-font-size, 16px) "DejaVu Sans Mono", Consolas, monospace;
  text-transform: uppercase;
}

/* Écran 3270 : dessiné par main.js à la taille de la police. */
canvas.screen3270 {
  width: auto;
  aspect-ratio: auto;
  margin: 0 auto;
  max-width: 100%;
}
/* Écran à la police choisie (non ajusté) : le cadre défile. */
.terminal-monitor.term-scroll { overflow-x: auto; }
.terminal-monitor.term-scroll canvas.screen3270 { max-width: none; }
/* Saisie des tablettes : champ invisible sous l'écran 3270, qui fait sortir le clavier
   virtuel (une toile n'en fait pas sortir). 16 px : Safari n'agrandit pas la page. */
.term-input {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0;
  opacity: 0; resize: none; overflow: hidden; pointer-events: none;
  font-size: 16px; color: transparent; caret-color: transparent; background: transparent;
}

/* Volumes, dépôt, lecteur de cartes. */
.vol-list { margin: 6px 0; padding: 0; list-style: none; font-size: 0.85rem; }
.vol-list li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.vol-list li .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Volumes lus sur place (dossier de Hercules) : marque et état. */
.vol-list li.mounted .mono { color: var(--accent-ink); }
.vol-list li.mounted.need .mono { color: var(--text-dim, #888); font-style: italic; }
.icon-button.small { width: 28px; height: 28px; }
/* Enregistrer la sortie de l'imprimante : icône et format (TXT, PDF). */
.icon-button.small.prt-save { width: auto; padding: 0 6px; gap: 3px; font-size: 0.72rem; font-weight: 600; }
.depot-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.depot-card p { margin: 0; }
.depot-list { display: flex; flex-direction: column; gap: 10px; }
.progress { position: relative; height: 26px; margin-top: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--accent-soft); border-right: 2px solid var(--accent); transition: width 0.2s; }
.progress .text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.78rem; }
.small { font-size: 0.78rem; }
textarea.jcl { width: 100%; resize: vertical; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); color: var(--text); font-size: 0.78rem; white-space: pre; }
.row.wrap { flex-wrap: wrap; }
.key3270 button.wide { min-width: 76px; }
.console-in input::placeholder { text-transform: none; color: #6b7280; }

/* Aide-mémoire (memo.js) */
.dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 16px 18px; }
.dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.dialog.memo { width: min(980px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-width: none; max-height: none; padding: 14px 16px; }
.dialog.memo[open] { display: flex; flex-direction: column; }
.memo-head { display: flex; align-items: center; gap: 8px; }
.memo-head h2 { flex: 1; margin: 0; font-size: 1.05rem; }
.memo-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; border-bottom: 1px solid var(--border); }
.memo-tab { padding: 6px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: none; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; }
.memo-tab[aria-selected="true"] { border-color: var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; }
.memo-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 4px 8px 0; font-size: 0.9rem; line-height: 1.45; }
.memo-pane h3 { margin: 16px 0 6px; font-size: 0.95rem; color: var(--accent-ink); }
.memo-pane p, .memo-pane ul, .memo-pane ol { margin: 8px 0; }
.memo-pane li { margin: 3px 0; }
.memo-pane code { padding: 0 3px; border-radius: 4px; background: var(--surface-2); }
.memo-table { overflow-x: auto; }
.memo-table table { width: 100%; border-collapse: collapse; }
.memo-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.82rem; border-bottom: 1px solid var(--border); padding: 4px 10px 4px 0; }
.memo-table td { padding: 4px 10px 4px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.memo-table td.mono { font: 0.84rem ui-monospace, Consolas, monospace; white-space: nowrap; }
.memo-code { margin: 8px 0; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); }
.memo-code pre { margin: 0; padding: 10px 12px; overflow-x: auto; font: 0.8rem/1.35 ui-monospace, Consolas, monospace; }
.memo-code-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .dialog.memo { width: 100vw; height: 100dvh; border-radius: 0; padding: 10px 12px; }
  .memo-table td.mono { white-space: normal; overflow-wrap: anywhere; }
}

/* Gestionnaire de volumes (volumes.js) */
.dialog.vm { width: min(1100px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px)); max-width: none; max-height: none; padding: 14px 16px; }
.dialog.vm[open] { display: flex; flex-direction: column; }
.vm-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.vm-field { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; color: var(--muted); }
.vm-field.grow { flex: 1; min-width: 12em; }
.vm-field select, .vm-field input { font-size: 0.9rem; }
.vm-info { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); }
.vm-mode { color: var(--accent-ink); }
.vm-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 4px; font: 0.88rem ui-monospace, Consolas, monospace; }
.vm-crumb { padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--accent-ink); font: inherit; cursor: pointer; }
.vm-crumb:hover { background: var(--accent-soft); }
.vm-crumb.current { color: var(--text); cursor: default; }
.vm-sep { color: var(--muted); }
.vm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; }
.vm-pane { flex: 1; min-height: 0; overflow: auto; }
.vm-pane[hidden] { display: none; }
.vm-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.vm-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vm-table td { padding: 4px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vm-table td.mono { font: 0.84rem ui-monospace, Consolas, monospace; }
.vm-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.vm-table tr.vm-open { cursor: pointer; }
.vm-table tr.vm-open:hover, .vm-table tr.vm-open:focus { background: var(--accent-soft); outline: none; }
.vm-viewer { display: flex; flex-direction: column; overflow: hidden; }
.vm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.vm-tools .grow { flex: 1; }
.vm-seg { display: inline-flex; gap: 0; }
.vm-seg button { border-radius: 0; }
.vm-seg button:first-child { border-radius: 6px 0 0 6px; }
.vm-seg button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.vm-seg button[aria-pressed="true"] { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.vm-viewer .hint { margin: 6px 10px 0; }
.vm-text { flex: 1; min-height: 0; margin: 6px 0 0; padding: 8px 12px; overflow: auto; background: var(--code-bg); font: 0.82rem/1.35 ui-monospace, Consolas, monospace; white-space: pre; }
.vm-foot { display: flex; gap: 12px; align-items: baseline; margin: 6px 0 0; min-height: 1.4em; font-size: 0.85rem; }
.vm-status { flex: 1; text-align: right; color: var(--muted); }
.vm-status.error { color: var(--error); }
@media (max-width: 640px) {
  .dialog.vm { width: 100vw; height: 100dvh; border-radius: 0; padding: 10px 12px; }
}
.vm-list { display: flex; flex-direction: column; overflow: hidden; }
.vm-list .vm-tools { flex: none; }
.vm-scroll { flex: 1; min-height: 0; overflow: auto; }
.vm-table td.vm-actions { width: 1%; padding: 0 4px; text-align: right; }
.vm-table td.vm-actions .icon-button { width: 28px; height: 28px; }
.vm-table td.vm-actions .icon { width: 16px; height: 16px; }
.vm-tools .hint { margin: 0; flex: 1 1 20em; }
.vm-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.vm-inline input, .vm-inline select { font-size: 0.85rem; padding: 3px 6px; }
.vm-inline input { width: 7em; }
.vm-edit { resize: none; border: 0; outline: none; color: var(--text); width: 100%; tab-size: 8; }
.vm-edit:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
#vm-edit-info.error { color: var(--error); }
/* Sortie des travaux : police de l'imprimante IBM 1403 (www/fonts, voir NOTICE). */
@font-face { font-family: 'IBM 1403'; src: url('fonts/IBM140310Pitch-Regular.otf') format('opentype'); font-display: swap; }
/* Écran 3270 d'époque : police 3270 (www/fonts, voir NOTICE), coins arrondis du tube. */
@font-face { font-family: 'IBM 3270'; src: url('fonts/3270-Regular.woff') format('woff'); font-display: swap; }
.screen3270.vintage { border-radius: 18px; }
.vm-1403 { font-family: 'IBM 1403', ui-monospace, Consolas, monospace; font-size: 0.9rem; line-height: 1.25; }
.vm-jobbar { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 0.85rem; }
.vm-jobbar span { flex: 1; }
.vm-jobbar.error { border-color: var(--error); color: var(--error); }
.vm-foot { flex-wrap: wrap; }
.vm-settings { flex-basis: 100%; font-size: 0.85rem; }
.vm-settings summary { cursor: pointer; color: var(--muted); }
.vm-settings[open] { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.vm-settings[open] summary { flex-basis: 100%; }
.vm-settings .hint { flex-basis: 100%; margin: 0; }
.dialog.vm-new { width: min(560px, calc(100vw - 32px)); }
.dialog.vm-new h2 { margin: 0 0 4px; font-size: 1.05rem; }
.dialog.vm-new .field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-size: 0.85rem; color: var(--muted); }
.dialog.vm-new .field input, .dialog.vm-new .field select { font-size: 0.9rem; }
.vm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
@media (max-width: 640px) { .vm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.dialog-actions .grow { flex: 1; }
.dialog .error { color: var(--error); }
.vm-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .vm-grid.three { grid-template-columns: 1fr; } }
.dialog input[type="text"], .dialog input[type="number"], .dialog input[type="password"], .dialog select, .vm-settings input {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.dialog input:focus, .dialog select:focus, .vm-settings input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.vm-pathbar { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.vm-pathbar .vm-path { margin: 0; }
.icon-back { transform: rotate(180deg); }
/* Voyants d'activité des entrées-sorties (disques, imprimantes, lecteur, perforatrice). */
.op-io { gap: 10px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.light.io i { width: 16px; height: 16px; border-width: 2px; background: #3a2c12; }
.light.io.on i { background: #ffb22e; box-shadow: 0 0 8px #ffb22e, inset 0 -2px 3px rgba(0, 0, 0, 0.25); }
.light.io { font-size: 0.62rem; }
/* Plein écran des terminaux : l'écran et les touches 3270 seulement, police à la taille de l'écran. */
.stage.full { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 8px; background: #000; }
.stage.full > .op-panel, .stage.full > .term-tabs, .stage.full > .status { display: none; }
.stage.full > .terminal-monitor { flex: 1; width: 100%; max-width: none; min-height: 0; margin: 0; border: 0; border-radius: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.stage.full > .key-bar { flex: none; }
.full-exit { position: absolute; top: 8px; right: 8px; z-index: 2; opacity: 0.45; color: #fff; background: rgba(255, 255, 255, 0.08); }
.full-exit:hover, .full-exit:focus-visible { opacity: 1; }
#full-button { margin-left: auto; }
/* Imprimante 2 (00F) : police de l'IBM 1403 (www/fonts, voir NOTICE). */
.printer-out.font-1403 { font-family: 'IBM 1403', ui-monospace, Consolas, monospace; letter-spacing: 0; }
/* Fenêtre de l'arrêt propre. */
.dialog.sd { width: min(520px, calc(100vw - 32px)); }
.dialog.sd h2 { margin: 0 0 6px; font-size: 1.05rem; }
.sd-warning { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 178, 46, 0.15); color: var(--text); font-size: 0.9rem; }
.sd-steps { margin: 0; padding-left: 0; list-style: none; font-size: 0.92rem; }
.sd-steps li { position: relative; padding: 5px 0 5px 28px; color: var(--muted); }
.sd-steps li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 12px; height: 12px; border: 2px solid var(--border); border-radius: 50%; }
.sd-steps li.active { color: var(--text); font-weight: 600; }
.sd-steps li.active::before { border-color: var(--accent); border-top-color: transparent; animation: sd-spin 0.9s linear infinite; }
.sd-steps li.done { color: var(--text); }
.sd-steps li.done::before { content: '✓'; border: 0; top: 3px; left: 3px; width: auto; height: auto; color: #2ea043; font-weight: 700; }
@keyframes sd-spin { to { transform: rotate(360deg); } }
.sd-result { margin: 10px 0 0; font-weight: 600; }
.sd-result.ok { color: #2ea043; }
.sd-result.error { color: var(--error); }
/* Session suspendue (mise en veille). */
.ss-progress { display: block; width: 100%; height: 10px; margin: 6px 0 0; accent-color: var(--accent); }
.ss-progress[hidden] { display: none; }
.dialog.ss #ss-text { margin: 0 0 6px; white-space: pre-line; }
/* Session suspendue : écrans assombris (le système ne tourne plus), étiquette au centre. */
.monitor.suspended > :not(.overlay) { filter: brightness(0.35) grayscale(0.7); transition: filter 0.3s; }
.term-tabs.suspended { opacity: 0.5; transition: opacity 0.3s; }
.monitor.suspended::after {
  content: attr(data-ss-label);
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  padding: 10px 18px; border-radius: 10px; pointer-events: none;
  background: rgba(0, 0, 0, 0.75); color: #e8eaee; font-weight: 600; text-align: center;
}
/* Configuration Hercules (menu Machine, fenêtre d'import). */
.hc-box { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.hc-box .hint { margin: 0 0 6px; }
.dialog.hc { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.dialog.hc[open] { display: flex; flex-direction: column; }
.dialog.hc h2 { margin: 0 0 6px; font-size: 1.05rem; }
.hc-body { flex: 1; min-height: 0; overflow: auto; font-size: 0.9rem; }
.hc-body h3 { margin: 12px 0 4px; font-size: 0.92rem; color: var(--accent-ink); }
.hc-body ul { margin: 0; padding-left: 20px; }
.hc-body li { margin: 2px 0; }
.hc-ignored { max-height: 14rem; overflow: auto; font-size: 0.78rem; background: var(--code-bg); padding: 6px 8px; border-radius: 6px; }
/* Perforatrice (punch.js) : fenêtre, éditeur et carte de 80 colonnes (SVG). */
.dialog.kp { width: min(1320px, calc(100vw - 24px)); height: calc(100vh - 24px); max-width: none; max-height: none; padding: 12px 14px; }
.dialog.kp[open] { display: flex; flex-direction: column; }
.kp-head { gap: 12px; }
.kp-head h2 { flex: none; }
.kp-name { flex: 0 1 26rem; min-width: 8rem; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.kp-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.kp-side { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 8px; }
.kp-side-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); }
.kp-lib { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 8px; font-size: 0.86rem; }
.kp-lib h3 { margin: 10px 0 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.kp-lib ul { margin: 0; padding: 0; list-style: none; }
.kp-lib li { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.kp-lib li.active { background: var(--accent-soft); }
.kp-lib-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 6px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.kp-lib-open:hover { background: var(--surface-2); }
.kp-lib-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.kp-lib-meta { font-size: 0.75rem; color: var(--muted); }
.kp-work { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.kp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kp-tools .grow { flex: 1; }
.kp-editor { flex: 1 1 0; min-height: 7rem; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--code-bg); }
.kp-ruler { flex: none; overflow: hidden; white-space: pre; padding: 4px 10px 2px; font: 0.86rem/1.4 ui-monospace, Consolas, monospace; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.kp-edit { flex: 1; min-height: 0; resize: none; border: 0; outline: none; padding: 4px 10px; background: transparent; color: var(--text); font: 0.86rem/1.4 ui-monospace, Consolas, monospace; white-space: pre; overflow: auto; tab-size: 8; }
.kp-card-box { position: relative; flex: none; display: flex; justify-content: center; padding: 10px; border-radius: 10px; background: #2c2f36; overflow: hidden; outline: none; }
.kp-card-box:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.kp-card-host { width: 100%; max-width: 1180px; }
.kp-svg { display: block; width: 100%; height: auto; max-height: 40vh; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); transition: transform 0.45s ease-in, opacity 0.45s ease-in; }
.kp-card-box.feeding .kp-svg { transform: translateX(-115%); opacity: 0; }
.kp-card { fill: #f1e6c4; stroke: #cdbb8d; stroke-width: 2; }
.kp-stripe { fill: none; }
.kp-job .kp-stripe { fill: #c75a6c; }
.kp-digit { font: 600 22px 'DejaVu Sans Mono', 'Cascadia Mono', Consolas, monospace; fill: #6f5a37; text-anchor: middle; }
.kp-colno { font: 600 9.5px 'DejaVu Sans Mono', Consolas, monospace; fill: #8b754e; text-anchor: middle; }
.kp-char { font: 700 27px 'DejaVu Sans Mono', 'Cascadia Mono', Consolas, monospace; fill: #17150f; text-anchor: middle; }
.kp-rule { stroke: rgba(139, 105, 60, 0.45); stroke-width: 1.5; stroke-dasharray: 6 6; }
.kp-brand { font: 700 15px system-ui, sans-serif; fill: #a08a5f; letter-spacing: 0.12em; text-anchor: middle; }
.kp-hole { fill: #23262d; }
.kp-cursor { fill: rgba(10, 168, 201, 0.16); stroke: rgba(10, 168, 201, 0.55); stroke-width: 1.5; }
.kp-blank .kp-text { display: none; }
.kp-preview { display: none; position: absolute; top: 14px; right: 18px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #ffd28a; font-size: 0.8rem; }
.kp-card-box.preview .kp-preview { display: block; }
.kp-card-box.preview .kp-hole { fill: rgba(35, 38, 45, 0.28); }
.kp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kp-nav input[type="range"] { flex: 1 1 10rem; min-width: 6rem; }
.kp-flip .icon { transform: rotate(180deg); }
.kp-dirty { padding: 2px 8px; border-radius: 6px; background: rgba(255, 178, 46, 0.18); font-size: 0.82rem; }
.kp-status { margin: 0; min-height: 1.3em; font-size: 0.86rem; color: var(--muted); }
.kp-status.ok { color: #2ea043; }
.kp-status.error { color: var(--error); }
@media (max-width: 820px) {
  .kp-main { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .kp-side { max-height: 11rem; }
  .dialog.kp { width: 100vw; height: 100dvh; border-radius: 0; padding: 8px; }
}
.kp-main > *, .kp-work > *, .kp-editor { min-width: 0; }
.kp-card-box { max-width: 100%; }
@media (max-width: 820px) {
  .kp-tools .grow { flex-basis: 100%; height: 0; }
  .kp-tools > button.with-icon { flex: 1 1 auto; }
  .kp-svg { max-height: none; }
}

/* Onglet Moniteur : événements de l'émulateur, horodatés. */
.events-out {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  /* Fond noir dans les deux thèmes (comme le Journal) : couleurs faites pour lui. */
  border-radius: 6px;
  background: #000;
  color: #c8d8f0;
  font: calc(var(--term-font-size, 16px) * 0.85)/1.4 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace;
  /* Un événement par ligne; les longues lignes défilent à l'horizontale. Hauteur bornée
     (comme l'imprimante) : les événements défilent à la verticale. */
  white-space: pre;
  height: min(70dvh, 46rem);
  overflow: auto;
}
.events-out > div { width: max-content; min-width: 100%; }
/* Onglet Journal : écrans des terminaux à la suite, en texte ordinaire (sélection). */
.journal-out {
  margin: 0;
  padding: 10px 12px;
  height: min(70dvh, 46rem);
  overflow: auto;
  border-radius: 6px;
  background: #000;
  color: #9ef0a0;
  font: calc(var(--term-font-size, 16px) * 0.85)/1.3 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace;
  white-space: pre;
  user-select: text;
}
.events-out .ev-time { color: #7f8ea8; }
.events-out .ev-error { color: #ff8080; }
.events-out .ev-ok { color: #9ef0a0; }
.events-out .ev-warn { color: #f0d070; }

/* Import Hercules : volumes absents lus sur place ou copiés. */
.hc-mode { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 8px 0 0; font-size: 0.88rem; }
.hc-mode .radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.hc-mode .radio input { position: static; opacity: 1; width: auto; height: auto; margin: 0; }
/* Toucher hors du terminal (PF7, PF8, PF3) : la touche envoyée, brièvement. */
main.content, .stage { touch-action: manipulation; }
.tap-key {
  position: fixed; z-index: 1000; transform: translate(-50%, -120%); pointer-events: none;
  padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.8); color: #e8eaee;
  font: 600 0.95rem ui-monospace, Consolas, monospace; animation: tap-key 0.6s ease-out forwards;
}
@keyframes tap-key { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, -180%); } }
/* Questions de l'opérateur en attente. */
.qa-button { border-color: var(--accent); color: var(--accent); }
.qa-button:not([hidden]) { animation: qa-pulse 1.6s ease-in-out infinite; }
@keyframes qa-pulse { 50% { box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25); } }
.dialog.qa { width: min(680px, calc(100vw - 32px)); }
.qa-list { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; }
.qa-item { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.qa-text { font-family: ui-monospace, Consolas, monospace; font-size: 0.88rem; white-space: pre-wrap; margin-bottom: 6px; }
.qa-row { gap: 6px; }
.qa-row input { flex: 1; min-width: 0; }
/* Recherche dans la console et le journal. */
.find-box { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.find-box[hidden] { display: none; }
.find-box input { width: 11rem; padding: 3px 8px; font-size: 0.85rem; }
.find-count { min-width: 3.2rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.find-filter { width: auto; min-width: max-content; padding: 0 8px; font-size: 0.8rem; }
.find-filter.active { background: var(--accent); color: #000; }
::highlight(find) { background-color: rgba(255, 196, 0, 0.35); }
::highlight(find-cur) { background-color: #ff9d00; color: #000; }
/* Bandes : dérouleurs (bande montée, demande du système, montage). */
.tape-units { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tape-unit { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; }
.tape-unit .row { margin-top: 6px; align-items: center; gap: 6px; }
.tape-request { color: var(--accent); }

/* Mode « machine distante » (remote.js) : fenêtre du mot de passe, onglet Machine. */
.dialog.remote-login { width: min(420px, 94vw); }
.remote-login input { width: 100%; }
.remote-machine {
  height: min(70dvh, 46rem);
  overflow: auto;
  padding: 2px 2px 12px;
  font-size: 0.9rem;
}
.rm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.rm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.rm-card h3, .remote-machine .rm-h { margin: 0 0 8px; font-size: 0.95rem; }
.remote-machine .rm-h { margin: 18px 0 8px; }
.rm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0; }
.rm-facts dt { color: var(--muted); }
.rm-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rm-run { color: #2e9d57; }
.rm-wait { color: #c98a0a; }
.rm-table { border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rm-table th, .rm-table td { padding: 4px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rm-table th { color: var(--muted); font-weight: 600; background: var(--surface-2); }
.rm-table tr:last-child td { border-bottom: 0; }
.rm-table td:first-child, .rm-vols td:nth-child(4) { font-family: "DejaVu Sans Mono", Consolas, monospace; }
.rm-devs td:last-child { white-space: normal; overflow-wrap: anywhere; color: var(--muted); }
.rm-row { display: flex; align-items: baseline; gap: 12px; }
.rm-row .rm-h { flex: 1; }
.rm-config {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #000;
  color: #9ef0a0;
  font: 0.85rem/1.35 "DejaVu Sans Mono", "Cascadia Mono", Consolas, monospace;
  white-space: pre;
  overflow: auto;
  user-select: text;
}
@media (max-width: 700px) {
  .rm-table { display: block; overflow-x: auto; }
}
