/* MS-DOS: eine virtuelle Zeichenfläche, keine responsiv umsortierten Seiten.
   80ch x 25 Zeilen werden nur als Ganzes auf den physischen Bildschirm skaliert.
   Die mitgelieferte Nouveau-IBM-Schrift bleibt die gemeinsame Metrik für Text und Bedienelemente. */
.terminal-display,
.terminal-subnav,
.terminal-hit,
.terminal-functions {
    display: none;
}
html[data-appearance="terminal"] .terminal-functions {
    display: contents;
}
html[data-appearance="terminal"] .terminal-functions button {
    display: block;
    position: absolute;
    top: 384px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #0000aa;
    color: #fff;
    font: 16px/16px "Nouveau IBM", monospace;
    text-align: left;
    white-space: nowrap;
    z-index: 3;
    cursor: pointer;
}
html[data-appearance="terminal"] .terminal-functions button:hover,
html[data-appearance="terminal"] .terminal-functions button:focus-visible {
    background: #00aaaa;
    color: #000;
    outline: 0;
}
.terminal-help:not([open]) {
    display: none;
}
html[data-appearance="terminal"] {
    --bg: #000;
    --surface: #aaa;
    --ink: #000;
    --muted: #000;
    --line: #000;
    --accent: #0000aa;
    --accent-soft: #aaa;
    --terminal-sx: 1;
    --terminal-sy: 1;
    --terminal-top: 0px;
    color-scheme: light;
}
html[data-appearance="terminal"] body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100dvh;
    min-height: 0 !important;
    overflow: hidden;
    background: #000 !important;
    color: #aaa;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] body > #container {
    display: block !important;
    position: fixed;
    left: 0;
    top: var(--terminal-top);
    width: 80ch;
    height: 400px;
    min-height: 0 !important;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: #0000aa;
    font: 16px/16px "Nouveau IBM", monospace;
    transform-origin: 0 0;
    transform: scale(var(--terminal-sx), var(--terminal-sy));
}
html[data-appearance="terminal"] .terminal-display {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 80ch;
    height: 400px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    font: 16px/16px "Nouveau IBM", monospace;
    letter-spacing: 0;
    white-space: pre;
    tab-size: 1;
    color: #aaa;
    background: #0000aa;
    outline: 0;
    font-synthesis: none;
}
html[data-appearance="terminal"] .sidebar,
html[data-appearance="terminal"] .workspace,
html[data-appearance="terminal"] .topbar,
html[data-appearance="terminal"] .top-actions,
html[data-appearance="terminal"] .settings-anchor {
    display: contents !important;
}
html[data-appearance="terminal"] #header,
html[data-appearance="terminal"] .nav-caption,
html[data-appearance="terminal"] .sidebar-note,
html[data-appearance="terminal"] #content,
html[data-appearance="terminal"] .topbar h1,
html[data-appearance="terminal"] #footer,
html[data-appearance="terminal"] .data-state,
html[data-appearance="terminal"] .header-install,
html[data-appearance="terminal"] #original-consumption,
html[data-appearance="terminal"] #original-info-toggle,
html[data-appearance="terminal"] .mobile-subnav,
html[data-appearance="terminal"] .desktop-subnav,
html[data-appearance="terminal"] .nav-more {
    display: none !important;
}
html[data-appearance="terminal"] .desktop-nav-group {
    display: contents;
}
html[data-appearance="terminal"] #navigation {
    display: flex !important;
    position: absolute !important;
    left: 2ch;
    top: 16px;
    bottom: auto;
    width: 52ch;
    height: 16px !important;
    margin: 0;
    padding: 0 !important;
    gap: 0;
    border: 0;
    background: #aaa;
    z-index: 2;
}
html[data-appearance="terminal"] #navigation a {
    display: block;
    position: static;
    width: 13ch;
    min-height: 16px !important;
    height: 16px;
    padding: 0 !important;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #aaa !important;
    color: #000 !important;
    box-shadow: none !important;
    text-decoration: none;
    text-align: left;
    font: 16px/16px "Nouveau IBM", monospace;
    letter-spacing: 0;
    transition: none;
}
html[data-appearance="terminal"] #navigation a .icon {
    display: none;
}
html[data-appearance="terminal"] #navigation a[href*="p=start"]::before {
    content: "F2 ";
}
html[data-appearance="terminal"] #navigation a[href*="p=c_spou"]::before {
    content: "F3 ";
}
html[data-appearance="terminal"] #navigation a[href*="p=c_reg"]::before {
    content: "F4 ";
}
html[data-appearance="terminal"] #navigation a[href*="p=statbox"]::before {
    content: "F5 ";
}
html[data-appearance="terminal"] #navigation a.active,
html[data-appearance="terminal"] #navigation a:hover,
html[data-appearance="terminal"] #navigation a:focus-visible {
    background: #00aaaa !important;
    outline: 0;
}
html[data-appearance="terminal"] #settings-button {
    display: block;
    position: absolute !important;
    left: 58ch;
    top: 16px;
    right: auto;
    width: 20ch;
    height: 16px;
    min-height: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #aaa;
    color: #000;
    box-shadow: none;
    font: 16px/16px "Nouveau IBM", monospace;
    text-align: left;
    z-index: 2;
    animation: none;
}
html[data-appearance="terminal"] #settings-button .icon,
html[data-appearance="terminal"] #settings-button::after {
    display: none;
}
html[data-appearance="terminal"] #settings-button::before {
    content: "F10 Einstellungen";
}
html[data-appearance="terminal"] #settings-button:hover,
html[data-appearance="terminal"] #settings-button:focus-visible {
    background: #00aaaa;
    outline: 0;
}
html[data-appearance="terminal"] .terminal-subnav {
    display: flex;
    position: absolute;
    left: 2ch;
    top: 64px;
    height: 16px;
    width: 76ch;
    gap: 2ch;
    z-index: 2;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-subnav a {
    color: #aaa;
    padding: 0;
    background: #0000aa;
    text-decoration: none;
    white-space: nowrap;
}
html[data-appearance="terminal"] .terminal-subnav a.active,
html[data-appearance="terminal"] .terminal-subnav a:hover,
html[data-appearance="terminal"] .terminal-subnav a:focus-visible {
    background: #00aaaa;
    color: #000;
    outline: 0;
}
html[data-appearance="terminal"] .terminal-hit {
    display: block;
    position: absolute;
    padding: 0;
    border: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: transparent;
    font: 16px/16px "Nouveau IBM", monospace;
    z-index: 1;
}
html[data-appearance="terminal"] .terminal-hit[hidden] {
    display: none !important;
}
html[data-appearance="terminal"] .terminal-hit:hover,
html[data-appearance="terminal"] .terminal-hit:focus-visible {
    outline: 1px dotted #ffff55;
    outline-offset: -1px;
}
html[data-appearance="terminal"] .dos-fg-3 {
    color: #00aaaa;
}
html[data-appearance="terminal"] .dos-fg-7 {
    color: #aaa;
}
html[data-appearance="terminal"] .dos-fg-8 {
    color: #555;
}
html[data-appearance="terminal"] .dos-fg-9 {
    color: #5555ff;
}
html[data-appearance="terminal"] .dos-fg-10 {
    color: #55ff55;
}
html[data-appearance="terminal"] .dos-fg-11 {
    color: #55ffff;
}
html[data-appearance="terminal"] .dos-fg-12 {
    color: #ff5555;
}
html[data-appearance="terminal"] .dos-fg-13 {
    color: #ff55ff;
}
html[data-appearance="terminal"] .dos-fg-14 {
    color: #ffff55;
}
html[data-appearance="terminal"] .dos-fg-15 {
    color: #fff;
}

/* DOS-Fenster verwenden weiterhin echte Dialoge und native Formulare. Damit bleiben Fokus,
   Escape, Passwort-/CSRF-Schutz und die bestehenden Speicheraktionen unverändert erreichbar.
   Die Transformation setzt diese Fenster auf dieselbe physische Zeichenmetrik wie den Bildschirm. */
html[data-appearance="terminal"] :is(.settings-dialog, .tile-dialog, .terminal-help) {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 64ch;
    max-width: none !important;
    height: auto;
    max-height: 352px !important;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 4px double #000;
    border-radius: 0 !important;
    background: #aaa !important;
    background-image: none !important;
    color: #000;
    box-shadow: 8px 8px 0 #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font: 16px/16px "Nouveau IBM", monospace;
    transform: translate(-50%, -50%) scale(var(--terminal-sx), var(--terminal-sy));
    transform-origin: center;
}
html[data-appearance="terminal"] :is(.settings-dialog, .tile-dialog, .terminal-help)::backdrop {
    background: transparent;
    backdrop-filter: none;
}
html[data-appearance="terminal"] :is(.settings-dialog, .tile-dialog, .terminal-help) * {
    font-family: "Nouveau IBM", monospace !important;
    font-size: 16px !important;
    line-height: 16px !important;
    letter-spacing: 0 !important;
    border-radius: 0 !important;
    text-shadow: none !important;
}
html[data-appearance="terminal"] :is(.settings-heading, .tile-dialog-header) {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 1ch;
    min-height: 32px;
    background: #aaa;
    color: #000;
    border: 0;
    border-bottom: 2px solid #000;
}
html[data-appearance="terminal"] :is(.settings-heading h2, .tile-dialog-header h2) {
    color: #000;
    font-weight: normal;
}
html[data-appearance="terminal"] .settings-view {
    padding: 0 1ch 16px;
}
html[data-appearance="terminal"] .settings-row,
html[data-appearance="terminal"] .settings-choice {
    padding: 8px 0;
    border: 0;
    gap: 1ch;
    align-items: center;
}
html[data-appearance="terminal"] .settings-row strong,
html[data-appearance="terminal"] .settings-choice strong {
    font-weight: normal;
}
html[data-appearance="terminal"] .settings-row small,
html[data-appearance="terminal"] .settings-choice small {
    display: none;
}
html[data-appearance="terminal"] .settings-status,
html[data-appearance="terminal"] .settings-intro {
    margin: 8px 0;
    color: #000;
}
html[data-appearance="terminal"] .settings-local {
    border-top: 2px solid #000;
    padding-top: 8px;
}
html[data-appearance="terminal"] .settings-local h3 {
    margin: 0 0 8px;
    font-weight: normal;
}
html[data-appearance="terminal"] .settings-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1ch;
    margin: 8px 0;
}
html[data-appearance="terminal"] input:not([type="hidden"]):not([type="checkbox"]),
html[data-appearance="terminal"] select {
    min-height: 16px;
    height: 24px;
    padding: 2px 1ch;
    color: #fff;
    background: #0000aa;
    border: 0;
    box-shadow: none;
    appearance: auto;
    min-width: 0;
}
/* Zwei DOS-Zeilen geben der 16-Pixel-Schrift und dem Auswahlpfeil Platz. */
html[data-appearance="terminal"] #settings-appearance {
    width: 20ch;
    max-width: 24ch;
    height: 32px;
    min-height: 32px;
    padding: 4px 1ch;
    border: 1px solid #000;
    line-height: 16px;
}
html[data-appearance="terminal"] input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000;
}
html[data-appearance="terminal"]
    :is(
        .button,
        .settings-save,
        .settings-disable,
        .settings-input-row button,
        .terminal-help button
    ) {
    min-height: 24px;
    padding: 4px 1ch;
    border: 0;
    color: #fff;
    background: #0000aa;
    box-shadow: 1ch 4px #555;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] :is(.settings-icon, .tile-close) {
    width: 3ch;
    height: 16px;
    min-width: 3ch;
    min-height: 16px;
    padding: 0;
    border: 0;
    background: #aaa;
    color: #000;
    font: 16px/16px "Nouveau IBM", monospace;
    box-shadow: none;
}
html[data-appearance="terminal"] .tile-dialog-shell {
    padding: 0;
}
html[data-appearance="terminal"] #tile-dialog-body,
html[data-appearance="terminal"] .tile-dialog-controls {
    padding: 8px 1ch;
    margin: 0;
}
html[data-appearance="terminal"] .tile-detail-list {
    display: block;
}
html[data-appearance="terminal"] .tile-detail-list > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1ch;
    padding: 4px 0;
    border: 0;
}
html[data-appearance="terminal"] .tile-detail-list dt {
    max-width: 58%;
    color: #000;
}
html[data-appearance="terminal"] .tile-detail-list dd {
    color: #000;
    font-weight: normal;
    text-align: right;
}
html[data-appearance="terminal"] .tile-detail-note {
    color: #000;
    margin: 8px 0 0;
}
html[data-appearance="terminal"] .settings-toast {
    position: absolute;
    left: 36ch;
    top: 32px;
    right: auto;
    width: 42ch;
    padding: 8px 1ch;
    border: 2px solid #000;
    background: #ffff55 !important;
    color: #000;
    border-radius: 0;
    box-shadow: 1ch 8px #000;
    backdrop-filter: none !important;
    font: 16px/16px "Nouveau IBM", monospace;
    z-index: 3;
}
html[data-appearance="terminal"] .settings-toast::before {
    display: none;
}
html[data-appearance="terminal"] .settings-toast strong {
    font-weight: normal;
}
html[data-appearance="terminal"] .terminal-help pre {
    margin: 0;
    padding: 16px 1ch;
    white-space: pre-wrap;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-help button {
    display: block;
    margin: 0 auto 16px;
}
html[data-appearance="terminal"] :is(button, a, input, select):focus-visible {
    outline: 1px dotted #000;
    outline-offset: -2px;
}
html[data-appearance="terminal"].terminal-form-view #content {
    display: block !important;
    position: absolute;
    left: 2ch;
    top: 80px;
    width: 76ch;
    height: 288px !important;
    overflow: auto !important;
    background: #aaa;
    color: #000;
    padding: 8px 1ch;
}
html[data-appearance="terminal"].terminal-form-view #content * {
    font-family: "Nouveau IBM", monospace !important;
    font-size: 16px !important;
    line-height: 16px !important;
}
html[data-appearance="terminal"].terminal-form-view .page-panel {
    padding: 0;
    border: 0;
    background: #aaa;
    box-shadow: none;
}

/* VGA-Fenster: ausschließlich Terminal-Diagramme. Die Grafik hat 320x200 echte Pixel;
   CSS vergrößert sie ohne Interpolation. Die gesonderte 4:3-Fläche entspricht einem
   damaligen Monitor und verändert weder die DataTable noch die anderen Themes. */
.terminal-chart {
    display: none;
}
html[data-appearance="terminal"] .terminal-chart:not([hidden]) {
    display: grid;
    position: absolute;
    left: 2ch;
    top: 80px;
    width: 76ch;
    height: 288px;
    grid-template-columns: minmax(0, 1fr) 24ch;
    grid-template-rows: 32px minmax(0, 1fr) 32px;
    gap: 4px 1ch;
    color: #fff;
    background: #0000aa;
    font: 16px/16px "Nouveau IBM", monospace;
    z-index: 2;
}
html[data-appearance="terminal"] .terminal-chart-tools {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    gap: 1ch;
    min-width: 0;
}
html[data-appearance="terminal"] .terminal-chart-tools select {
    width: 18ch;
    max-width: none;
    height: 24px;
    min-height: 0;
    padding: 0;
    background: #aaa;
    color: #000;
    font: 12px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart-dates {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
html[data-appearance="terminal"] .terminal-chart-dates input {
    width: 16ch;
    height: 24px;
    min-height: 0;
    padding: 0;
    background: #aaa;
    color: #000;
    font: 12px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart button {
    min-height: 24px;
    height: 24px;
    padding: 0 1ch;
    border: 0;
    border-radius: 0;
    background: #aaa;
    color: #000;
    box-shadow: none;
    font: 16px/16px "Nouveau IBM", monospace;
    cursor: pointer;
}
html[data-appearance="terminal"] .terminal-vga-viewport {
    grid-column: 1;
    grid-row: 2/4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    background: #000;
    border: 1px solid #aaa;
    overflow: hidden;
}
html[data-appearance="terminal"] .terminal-vga-viewport canvas {
    display: block;
    max-width: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    touch-action: pinch-zoom;
    cursor: crosshair;
    outline-offset: -2px;
}
html[data-appearance="terminal"] .terminal-chart-readout {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    overflow: auto;
}
html[data-appearance="terminal"] .terminal-chart-readout h2 {
    margin: 0 0 8px;
    padding: 0;
    font: 16px/16px "Nouveau IBM", monospace;
    color: #fff;
}
html[data-appearance="terminal"] .terminal-chart-stamp {
    margin: 0 0 8px;
    color: #ffff55;
    font: 14px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart-readout dl {
    margin: 0;
    display: grid;
    gap: 4px;
}
html[data-appearance="terminal"] .terminal-chart-readout dl > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1ch;
    padding-left: 5px;
    border-left: 3px solid var(--channel-color);
    color: var(--channel-color);
    font: 12px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart-readout dt {
    overflow-wrap: anywhere;
}
html[data-appearance="terminal"] .terminal-chart-readout dd {
    margin: 0;
    white-space: nowrap;
    color: #fff;
}
html[data-appearance="terminal"] .terminal-chart-scrub {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
html[data-appearance="terminal"] .terminal-chart-scrub input[type="range"] {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 24px;
    padding: 0;
    accent-color: #00aaaa;
    background: #0000aa;
}
html[data-appearance="terminal"].terminal-chart-page .terminal-subnav {
    display: none;
}

/* DOS-Bedienung des Grafikfensters: Auswahllisten öffnen eigene Textfenster.
   Datumsfeld und Scrollbalken erhalten keinerlei Kalender-, Pillen- oder Rundoptik. */
html[data-appearance="terminal"] .terminal-chart-tools .terminal-chart-chooser {
    width: 18ch;
    height: 24px;
    padding: 0 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
    font: 12px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart-dates input[type="text"] {
    width: 12ch;
    height: 24px;
    padding: 0 4px;
    border: 1px solid #aaa;
    border-radius: 0;
    color: #fff;
    background: #0000aa;
    box-shadow: none;
    font: 14px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-chart-scrub input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    cursor: ew-resize;
}
html[data-appearance="terminal"]
    .terminal-chart-scrub
    input[type="range"]::-webkit-slider-runnable-track {
    height: 12px;
    border: 0;
    border-radius: 0;
    background: repeating-linear-gradient(90deg, #aaa 0 2px, #555 2px 3px);
}
html[data-appearance="terminal"] .terminal-chart-scrub input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 24px;
    margin-top: -6px;
    border: 2px solid #fff;
    border-radius: 0;
    background: #00aaaa;
    box-shadow: none;
}
html[data-appearance="terminal"] .terminal-chart-scrub input[type="range"]::-moz-range-track {
    height: 12px;
    border: 0;
    border-radius: 0;
    background: repeating-linear-gradient(90deg, #aaa 0 2px, #555 2px 3px);
}
html[data-appearance="terminal"] .terminal-chart-scrub input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 0;
    background: #00aaaa;
}
html[data-appearance="terminal"] .terminal-chart-choice {
    width: 34ch;
    padding: 8px 1ch;
}
html[data-appearance="terminal"] .terminal-chart-choice h2 {
    padding: 0;
    margin: 0 0 8px;
    font-weight: normal;
}
html[data-appearance="terminal"] .terminal-chart-choice .terminal-chart-options {
    display: grid;
    gap: 0;
    padding: 4px;
    border: 2px double #000;
    background: #aaa;
}
html[data-appearance="terminal"] .terminal-chart-choice .terminal-chart-options button {
    width: 100%;
    margin: 0;
    padding: 4px 1ch;
    min-height: 24px;
    color: #000;
    background: #aaa;
    box-shadow: none;
    text-align: left;
}
html[data-appearance="terminal"]
    .terminal-chart-choice
    .terminal-chart-options
    button[aria-pressed="true"],
html[data-appearance="terminal"] .terminal-chart-choice .terminal-chart-options button:focus {
    color: #fff;
    background: #0000aa;
    outline: 0;
}

/* Auch am Telefon bleibt der gesamte virtuelle Monitor 80x25 beziehungsweise im
   Hochformat 4:3. Nur innerhalb dieses Monitors wird von Text auf VGA umgeschaltet.
   Es gibt ausdrücklich keine unskalierte Telefon-Vollbildansicht. */
.terminal-chart-mobile-keys {
    display: none;
}
html[data-appearance="terminal"].terminal-chart-mobile
    :is(#navigation, #settings-button, .terminal-display, .terminal-functions, .terminal-subnav) {
    display: none !important;
}
html[data-appearance="terminal"].terminal-chart-mobile .terminal-chart:not([hidden]) {
    left: 0;
    top: 0;
    width: 80ch;
    height: 400px;
    display: block;
}
html[data-appearance="terminal"].terminal-chart-mobile .terminal-vga-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
html[data-appearance="terminal"].terminal-chart-mobile .terminal-chart-mobile-keys {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    z-index: 4;
    gap: 1ch;
    padding: 0 1ch;
    background: #aaa;
    color: #000;
}
html[data-appearance="terminal"].terminal-chart-mobile .terminal-chart-mobile-keys button {
    flex: 1;
    min-width: 0;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    font: 24px/32px "Nouveau IBM", monospace;
    background: #aaa;
    color: #000;
    cursor: default;
    box-shadow: none;
}
html[data-appearance="terminal"].terminal-chart-mobile .terminal-chart-mobile-keys button:active,
html[data-appearance="terminal"].terminal-chart-mobile
    .terminal-chart-mobile-keys
    button:focus-visible {
    background: #0000aa;
    color: #fff;
    outline: 0;
}
html[data-appearance="terminal"] :is(.terminal-chart-menu, .terminal-chart-values) {
    padding: 8px 1ch;
}
html[data-appearance="terminal"] :is(.terminal-chart-menu, .terminal-chart-values) h2 {
    margin: 0 0 8px;
    padding: 0;
    font-weight: normal;
}
html[data-appearance="terminal"] .terminal-chart-menu .terminal-chart-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}
html[data-appearance="terminal"] .terminal-chart-menu .terminal-chart-chooser {
    flex: 1;
    min-width: 14ch;
    margin: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 4px;
    background: #0000aa;
    color: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
html[data-appearance="terminal"] .terminal-chart-menu .terminal-chart-dates {
    width: 100%;
    margin: 0;
}
html[data-appearance="terminal"] .terminal-chart-menu .terminal-chart-dates input[type="text"] {
    flex: 1;
    width: 0;
    min-width: 0;
    height: 40px;
}
html[data-appearance="terminal"] .terminal-chart-menu .terminal-chart-dates button {
    min-width: 3ch;
    min-height: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    box-shadow: none;
}
html[data-appearance="terminal"] .terminal-chart-navigation {
    display: flex;
    gap: 4px;
    margin: 8px 0;
}
html[data-appearance="terminal"] .terminal-chart-navigation button {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 4px 0;
    box-shadow: none;
}
html[data-appearance="terminal"] .terminal-chart-values .terminal-chart-readout h2 {
    display: none;
}
html[data-appearance="terminal"] .terminal-chart-values .terminal-chart-readout dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
html[data-appearance="terminal"] .terminal-chart-values .terminal-chart-scrub {
    margin: 8px 0;
    min-height: 40px;
}
html[data-appearance="terminal"] .terminal-chart-values .terminal-chart-scrub button {
    margin: 0;
    padding: 0 1ch;
    box-shadow: none;
}
html[data-appearance="terminal"].terminal-chart-mobile
    :is(.terminal-chart-choice, .terminal-chart-menu, .terminal-chart-values) {
    width: 64ch;
}
html[data-appearance="terminal"].terminal-chart-mobile
    :is(.terminal-chart-choice, .terminal-chart-menu, .terminal-chart-values)
    * {
    font-size: 24px !important;
    line-height: 28px !important;
}
html[data-appearance="terminal"].terminal-chart-mobile
    .terminal-chart-choice
    .terminal-chart-options
    button {
    min-height: 40px;
    padding: 4px 1ch;
}
html[data-appearance="terminal"]
    :is(.terminal-chart, .terminal-chart-menu, .terminal-chart-values, .terminal-chart-choice)
    button {
    cursor: default;
}
html[data-appearance="terminal"]
    :is(.terminal-chart-menu, .terminal-chart-values, .terminal-chart-choice)::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}
html[data-appearance="terminal"]
    :is(
        .terminal-chart-menu,
        .terminal-chart-values,
        .terminal-chart-choice
    )::-webkit-scrollbar-track {
    background: #aaa;
    border: 1px solid #000;
}
html[data-appearance="terminal"]
    :is(
        .terminal-chart-menu,
        .terminal-chart-values,
        .terminal-chart-choice
    )::-webkit-scrollbar-thumb {
    border: 2px solid #000;
    border-radius: 0;
    background: #0000aa;
}

/* Ein einzelnes Zeichen im freien Textmodus-Feld vor F10 öffnet das Handbuch.
   Im VGA-Diagramm bleibt der virtuelle 80x25-Bildschirm ausschließlich dem Diagramm vorbehalten. */
html[data-appearance="terminal"] #help-button {
    display: block;
    position: absolute;
    left: 55ch;
    top: 16px;
    width: 3ch;
    height: 16px;
    min-height: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #aaa;
    color: #000;
    box-shadow: none;
    font: 16px/16px "Nouveau IBM", monospace;
    text-align: center;
    z-index: 2;
}
html[data-appearance="terminal"] #help-button:hover,
html[data-appearance="terminal"] #help-button:focus-visible {
    background: #00aaaa;
    outline: 0;
}
html[data-appearance="terminal"].terminal-chart-mobile #help-button {
    display: none !important;
}

/* Befehle liegen im DOS-Raster. Die Schaltflächen sind auch per Tab erreichbar. */
.terminal-overview-actions {
    display: none;
}
html[data-appearance="terminal"] .terminal-overview-actions {
    display: flex;
    position: absolute;
    left: 2ch;
    top: 64px;
    gap: 2ch;
    z-index: 2;
}
html[data-appearance="terminal"] .terminal-overview-actions button,
html[data-appearance="terminal"] #health-button {
    height: 16px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #0000aa;
    color: #ffff55;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .terminal-overview-actions button:is(:hover, :focus-visible),
html[data-appearance="terminal"] #health-button:is(:hover, :focus-visible) {
    background: #00aaaa;
    color: #000;
}
html[data-appearance="terminal"] .health-anchor {
    display: none;
}
html[data-appearance="terminal"] body.overview-page .health-anchor {
    display: block;
    position: absolute;
    left: 61ch;
    top: 64px;
    z-index: 4;
}
html[data-appearance="terminal"] #health-button {
    width: 17ch;
}
html[data-appearance="terminal"] #health-button::before {
    content: "F8 Betriebsstatus";
}
html[data-appearance="terminal"] #health-button .health-button-dot {
    display: none;
}
html[data-appearance="terminal"] .health-popover {
    width: 52ch;
    padding: 1ch;
    border: 4px double #000;
    border-radius: 0;
    background: #aaa;
    color: #000;
    box-shadow: 8px 8px #000;
    backdrop-filter: none;
}

/* DOS-Status: neutrale Anzeige und Signalfarben ausschließlich aus der
   16-Farben-Palette. Runde Punkte und farbige Glüheffekte entfallen. */
html[data-appearance="terminal"] .health-popover :is(header, .health-row, .health-value) {
    color: #000;
    font: 16px/16px "Nouveau IBM", monospace;
}
html[data-appearance="terminal"] .health-popover header button {
    color: #fff;
    background: #0000aa;
    border-radius: 0;
    box-shadow: none;
}
html[data-appearance="terminal"] .health-popover .health-value::before {
    border-radius: 0;
    background: #555;
}
html[data-appearance="terminal"] .health-popover .health-value[data-state="ok"]::before {
    background: #00aa00;
}
html[data-appearance="terminal"] .health-popover .health-value[data-state="stale"]::before {
    background: #aa5500;
}
html[data-appearance="terminal"] .health-popover .health-value[data-state="error"]::before {
    background: #aa0000;
}
html[data-appearance="terminal"] #health-button[data-state="ok"] {
    color: #55ff55;
}
html[data-appearance="terminal"] #health-button[data-state="stale"] {
    color: #ffff55;
}
html[data-appearance="terminal"] #health-button[data-state="error"] {
    color: #ff5555;
}
html[data-appearance="terminal"] :is(button, a, input, select, summary):focus-visible {
    outline: 1px dotted #ffff55;
    outline-offset: -1px;
}
html[data-appearance="terminal"] :is(.settings-dialog, .tile-dialog, .terminal-help) {
    accent-color: #0000aa;
    scrollbar-color: #555 #aaa;
}

/* Zwei Statusspalten mit Platz für die vollständige Bezeichnung Brennerkontakt. */
html[data-appearance="terminal"] .health-popover .health-row {
    display: grid;
    grid-template-columns: 16ch minmax(0, 1fr);
    align-items: center;
    gap: 1ch;
    min-height: 2em;
}
html[data-appearance="terminal"] .health-popover .health-row > span {
    white-space: nowrap;
}
html[data-appearance="terminal"] .health-popover .health-value {
    justify-content: flex-end;
    overflow-wrap: anywhere;
}
