/* =========================================================
   THEME – Erdgrau / Braun + Orange Akzent
   (Nur Farben per Variablen – Layout bleibt wie im Original)
   ========================================================= */

:root {
  /* Grundflächen */
  --bg-dark:        #2f2a26; /* App-Hintergrund */
  --bg-darker:      #25211e; /* Editor-Overlay */
  --bg-mid:         #3c3631; /* Bars */
  --bg-mid-2:       #5a5047; /* Active / pressed */
  --bg-mid-3:       #3c3631; /* ehem. grün → neutralisiert */

  /* Karten / Panels */
  --card:           #f1ede6; /* ehem. #f4f4ee */
  --card-2:         #eef3f6;
  --card-3:         cornsilk; /* ehem. #f6f4c4cd → vereinheitlicht */
  --card-4:         #ededdf;
  --card-5:         #e4e1d3;
  --card-6:         #eeefeb;
  --card-7:         #f1ede6; /* ehem. #f6f4c4cd → vereinheitlicht */

  --panel:          #d7d1c8; /* ehem. #cecf9c */
  --bar:            #3c3631; /* ehem. #d6d78d */
  --panel-active:   #bfc087;

  /* Text */
  --text-main:      #1f1c19; /* ehem. #222 */
  --text-strong:    #111111;
  --text-muted:     #5f574f;
  --white:          #ffffff;
  --black:          #000000;

  /* Akzent (Buttons/Interaktion) */
  --accent:         #e67e22;
  --accent-hover:   #ff8c00;
  --accent-active:  #cc6e00;

  /* Linien */
  --border-soft:       #4a423b;
  --border-light:      #c9c6b8;
  --border-input:      #ccd6dd;
  --border-midlight:   #aaaaaa;
  --border-verylight:  #dddddd;
  --border-dashed:     #9a948a;

  /* Schatten */
  --shadow-med:      rgba(0,0,0,.2);
  --shadow-strong:   rgba(0,0,0,.25);
  --shadow-stronger: rgba(0,0,0,.35);
  --highlight:       rgba(255,255,255,0.4);

  --app-height: 100svh;
  --keyboard-inset: 0px;
}


/* =========================
   RESET / BASIS
   ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: monospace;
    font-size: 13pt;
  color: var(--text-main);             /* hellgrau */
  /* border: 1px solid red;
  min-height: fit-content; */

}

html, body {
    height: var(--app-height);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  background-color: var(--bg-mid-2);
    /* display: flex; */
    /* overflow: hidden; */
}


#inn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 100%;

    resize: none;

    padding: 10px 12px;

    line-height: 1.5;

    background: var(--card);
  font-size: 13pt;
    border: none;
    border-top: 1px solid var(--border-midlight);
}

#inn:focus {
    outline: none;
    background: var(--white);
}

#treeView {
    width: 100%;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
    padding: 12px;
    background: var(--card);
}

#treeView.tree-dim-mode {
    background: #000;
}

.tree-panel {
    display: block;
    gap: 12px;
}

.tree-data-panels {
    display: grid;
    gap: 12px;
}

.tree-view-3d {
    position: relative;
    min-height: 360px;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.tree-view-3d canvas,
.tree-view-3d .c3-label-renderer {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.tree-view-3d-hint {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    pointer-events: none;
}

.tree-view-3d-label,
.tree-view-3d-dim-label {
    font: 700 13px monospace;
    line-height: 1;
    white-space: nowrap;
}

.tree-view-3d-dim-label {
    padding: 3px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.82);
    border: 1px solid currentColor;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
}

.tree-dim-key {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
}

.tree-dim-key-title {
    font: 700 13px monospace;
    color: #fff;
}

.tree-dim-key-row {
    display: grid;
    grid-template-columns: minmax(58px, auto) 34px 1fr;
    gap: 8px;
    align-items: center;
    font: 700 13px monospace;
}

.tree-dim-key-points {
    white-space: nowrap;
}

.tree-dim-key-separator,
.tree-dim-key-axis {
    color: rgba(255,255,255,0.68);
}

.tree-dim-key-value {
    font-size: 15px;
}

.tree-dim-key-empty {
    color: rgba(255,255,255,0.68);
    font: 700 13px monospace;
}

.tree-svg {
    width: 100%;
    min-height: 260px;
    border: 1px solid var(--border-midlight);
    background: var(--white);
}

.tree-lines line {
    stroke: var(--border-midlight);
    stroke-width: 2;
}

.tree-node circle {
    fill: var(--card);
    stroke: var(--text-main);
    stroke-width: 2;
}

.tree-node text {
    font: 700 15px monospace;
    text-anchor: middle;
    fill: var(--text-main);
}

.tree-node .tree-count {
    font: 700 11px monospace;
    fill: var(--text-main);
}

.tree-distance-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.tree-dim-mode .tree-distance-table {
    background: #000;
    color: #fff;
}

.tree-distance-table th,
.tree-distance-table td {
    border: 1px solid var(--border-midlight);
    padding: 6px 8px;
    text-align: left;
}

.tree-distance-table th {
    background: var(--card);
}

.tree-empty {
    padding: 12px;
}

.tree-render-cross {
    width: 18px;
    height: 18px;
    position: relative;
}

.tree-render-cross::before,
.tree-render-cross::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 18px;
    background: var(--tree-point-color, var(--text-main));
    transform-origin: center;
}

.tree-render-cross::before {
    transform: translateX(-50%) rotate(45deg);
}

.tree-render-cross::after {
    transform: translateX(-50%) rotate(-45deg);
}

.tree-render-letter {
    color: var(--text-main);
    font: 700 14px monospace;
    line-height: 1;
    background: transparent;
    text-shadow:
        0 1px 0 var(--white),
        1px 0 0 var(--white),
        0 -1px 0 var(--white),
        -1px 0 0 var(--white);
}

.tree-render-dim-label {
    color: var(--text-main);
    font: 800 15px monospace;
    line-height: 1;
    pointer-events: none;
    text-shadow:
        0 1px 1px #000,
        1px 0 1px #000,
        0 -1px 1px #000,
        -1px 0 1px #000;
}

.tree-render-dim-text {
    display: inline-block;
    padding: 0;
    background: transparent;
    border: 0;
}

.tree-render-dim-text-vertical {
    transform: rotate(-90deg);
    transform-origin: center;
}




/* =========================
   OPTIONAL: DISABLED ICON
   ========================= */

#toolbar .ico:disabled {
    opacity: 0.4;
    cursor: default;
}





/* =========================
   OPTIONAL: MOBILE FEINSCHLIFF
   ========================= */

@media (max-width: 600px) {

    #toolbar .ico {
        width: 28px;
        height: 24px;
    }
}

.hidden {
  display: none;
}


/* Views liegen übereinander */
.view {
  position: absolute;
  inset: 0;
  display: none;
}




.buttons button {
  padding: 0px;

}

.center {
  display: grid;
  grid-template-columns: 1fr auto; /* portrait default */
  align-items: center;
  justify-items: center;
}


/* Button-Zeile */
.buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bar);
  margin: 0px;
}
.buttons button {
  margin: 0px;
  background-color:var(--bar);
}

#helpText {
  background-color: var(--bar);

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  padding: 1em;
  overflow-y: auto;
  white-space: pre-wrap;

  border-top: 1px solid var(--text-strong); /* klare Trennung vom oberen Grid */
}


#woodList, #woodOverview {
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-strong);
  background-color: var(--panel);

  padding: 1em;
  overflow-y: auto;
}
#woodOverview {
  margin-top: 2px;
}

#woodOverview .wood-report {
  white-space: normal;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  max-width: 980px;
  margin: 0 auto;
}

#woodOverview .wood-report h1,
#woodOverview .wood-report h2,
#woodOverview .wood-report h3,
#woodOverview .wood-report p {
  margin: 0 0 0.75rem;
}

#woodOverview .wood-report section {
  margin-top: 1.5rem;
}

#woodOverview .wood-report pre {
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--text-strong) 18%, transparent);
  background: var(--card);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#woodOverview .wood-report-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border-bottom: 1px solid color-mix(in srgb, var(--text-strong) 18%, transparent);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

#woodOverview .wood-report-preview {
  margin: 1rem 0;
}

#woodOverview .wood-report-preview img {
  display: block;
  width: min(320px, 100%);
  border: 1px solid color-mix(in srgb, var(--text-strong) 18%, transparent);
}

@media print {

  /* Seitenränder */
  @page {
    size: A4;
    margin: 15mm 15mm 20mm 15mm;
  }

  /* Alles unsichtbar machen */
  body * {
    visibility: hidden !important;
  }

  /* Holzliste wieder sichtbar */
  #woodList,
  #woodList * {
    visibility: visible !important;
  }

  /* Holzliste neu positionieren */
  #woodList {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;

    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    background: none !important;
    color: var(--black) !important;

    padding: 0;
    margin: 0;
  }
}


/* versteckt */
.hidden {
  display: none !important;
}

/* Editor nutzt dasselbe Grid, nur oben */
.editor-grid {
  border-top: none;
  border-bottom: 1px solid var(--border-soft); /* gleiche Linie, andere Seite */
}

.editor-grid .cell:empty {
  cursor: default;
}
#innEditor {
  width: 100%;
  height: auto;
  inset: 0;
  scroll-margin-bottom: calc(var(--keyboard-inset) + 16px);
  background: var(--card);
  border-top: 1px solid var(--border-light);
}

#innEditor .cm-editor {
  width: 100%;
  height: 100%;
  background: var(--card);
}

#innEditor .cm-scroller {
  font-family: monospace;
  font-size: 13pt;
  line-height: 1.5;
}

#innEditor .cm-content {
  padding: 10px 12px;
}

.cm-c3-name {
  color: #005f73;
  font-weight: 700;
}

.cm-c3-disabled {
  color: #8a8a8a;
  text-decoration: line-through;
}

.cm-c3-command {
  color: #7b2cbf;
}

.cm-c3-parts {
  color: #006d77;
}

.cm-c3-part-code {
  color: #c2410c;
  font-weight: 700;
}

.cm-c3-material {
  color: #b85c00;
  font-weight: 700;
}

.cm-c3-number {
  color: #1b7f3a;
}

.cm-c3-link {
  color: #0b63ce;
}

.cm-c3-error-line {
  background: rgba(190, 24, 24, 0.12);
}

.cm-c3-error-text {
  text-decoration: underline wavy #be1818 1.5px;
  text-underline-offset: 3px;
}

.cm-tooltip.cm-tooltip-hover .cm-c3-help {
  max-width: 280px;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-family: monospace;
  font-size: 10pt;
  line-height: 1.35;
}

.cm-c3-color-completion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 150px;
  width: 100%;
  padding: 2px 7px 2px 5px;
  border-left: 4px solid var(--cm-c3-color-css, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cm-c3-color-css, transparent) 16%, transparent);
}

.cm-c3-color-swatch {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.cm-c3-color-swatch-large {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.cm-c3-color-code {
  min-width: 24px;
  font-weight: 700;
  font-family: monospace;
}

.cm-c3-color-name {
  font-weight: 600;
}

.cm-c3-inline-color {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.25em;
  vertical-align: -0.08em;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 1px 1px rgba(0, 0, 0, 0.18);
}

.cm-c3-color-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--text-main);
}

.cm-c3-color-palette {
  position: fixed;
  z-index: 10000;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 4px;
  max-height: min(320px, 42vh);
  overflow: auto;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.cm-c3-color-palette.hidden {
  display: none;
}

.cm-c3-color-palette-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 7px;
  background: color-mix(in srgb, var(--cm-c3-color-css, transparent) 14%, var(--card));
  border: 1px solid var(--border-light);
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
}

.cm-c3-color-palette-item:hover,
.cm-c3-color-palette-item.active {
  border-color: var(--text-main);
  background: color-mix(in srgb, var(--cm-c3-color-css, transparent) 28%, var(--card));
}

.cm-c3-color-palette-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.cm-c3-color-palette-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10pt;
  color: var(--text-main);
}




/* 🔽 Block-Editor scrollt */
/* #blockEditor div {
  font-size: 10pt;
  display: block;
  width: 90%;
  overflow-y: auto;
  padding: 12px;
} */

.editor-grid {
  height: 100vh;   /* oder 100% wenn bodyh/tml korrekt gesetzt */
}

.menu {
  position: absolute;
  bottom: 56px;              /* bleibt über dem Button-Footer */
  left: 8px;

  display: none;
  flex-direction: column;

  min-width: 220px;
  max-width: 280px;
  max-height: 55vh;

  background: var(--card);       /* passt zu inn / woodList */
  border: 1px solid var(--border-soft); /* gleiche Linie wie action-grid */
  border-radius: 10px;

  box-shadow:
    0 8px 20px var(--shadow-strong),
    inset 0 1px 0 var(--highlight);

  overflow-y: auto;

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  z-index: 200000;
}

.menu {
  display: none;
}

#helpMenu {
  display: none;
  position: fixed;
  left: 18px;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-inset) + 120px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  align-content: start;
  min-width: min(420px, calc(100vw - 16px));
  max-width: min(420px, calc(100vw - 16px));
  max-height: min(70vh, 560px);
  padding: 0;
  gap: 4px;
}

#helpMenu a,
#helpMenu .menu-action {
  min-height: 40px;
  padding: 10px 12px;
  text-decoration: none;

  display: flex;
  align-items: center;

  border-bottom: 1px solid var(--border-light);

  cursor: pointer;
}

#helpMenu .menu-action {
  width: auto;
  min-width: 0;
  background: var(--card);
  border: 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  justify-content: flex-start;
  text-align: left;
}

#helpMenu .menu-language {
  grid-column: 1 / -1;
}

#helpMenu .menu-action-highlight {
  background: #fff2cf;
  color: #5a3800;
  font-weight: 700;
}

#helpMenu .menu-action-highlight:hover {
  background: #ffe3a3;
}

#helpMenu .menu-action-help {
  background: #e9f7ff;
  color: #0f4963;
  font-weight: 700;
}

#helpMenu .menu-action-help:hover {
  background: #d4ecff;
}

#helpMenu .menu-action-app {
  background: #e8f2ff;
  color: #0f3a66;
  font-weight: 700;
}

#helpMenu .menu-action-app:hover {
  background: #d4e7ff;
}

#helpMenu .menu-action-alias {
  background: #eef8dd;
  color: #35530f;
  font-weight: 700;
}

#helpMenu .menu-action-alias:hover {
  background: #dff0bb;
}

#helpMenu .menu-action-program {
  background: #f5f1e8;
  color: #3e3527;
  font-weight: 700;
}

#helpMenu .menu-action-program:hover {
  background: #ebe2d2;
}

#helpMenu .menu-action-tutor {
  background: #e8f7ee;
  color: #17452a;
  font-weight: 700;
}

#helpMenu .menu-action-tutor:hover {
  background: #d4f0df;
}

#helpMenu .menu-divider {
  grid-column: 1 / -1;
  height: 1px;
  margin: 4px 8px;
  background: var(--border-light);
}

/* letzter Eintrag ohne Linie */
#helpMenu a:last-child {
  border-bottom: none;
}

#helpMenu a:hover,
#helpMenu .menu-action:hover {
  background: var(--panel);       /* wie woodOverview */
}

#helpMenu a:active,
#helpMenu .menu-action:active {
  background: var(--panel-active);
}

#helpMenu a {
  min-height: 40px;
}

#helpMenu .menu-language {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 10px;
  border-top: 1px solid var(--border-light);
}

#helpMenu .menu-language-label {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

#helpMenu .menu-language a {
  min-height: 32px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

#helpMenu .menu-language a.is-active {
  background: var(--accent);
  color: #fff;
}

.quick-help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  max-height: none;
  padding: 10px;
  display: none;
  overflow: hidden;
  pointer-events: none;
  z-index: 150000;
  color: var(--text-main);
  background: rgba(241, 237, 230, .34);
  border: 1px solid rgba(74, 66, 59, .16);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  backdrop-filter: blur(1px);
}

.quick-help-overlay.is-visible {
  display: block;
  pointer-events: none;
}

.quick-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 720px;
  margin: 0 0 6px;
}

.quick-help-overlay h2 {
  margin: 0 0 6px;
  font-size: 13px;
}

.quick-help-close {
  pointer-events: auto;
  padding: 4px 8px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--card);
  color: var(--text-main);
  cursor: pointer;
  font-size: 11px;
}

.quick-help-close:hover {
  background: var(--panel);
}

.quick-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  max-width: 720px;
}

.quick-help-section {
  min-width: 0;
}

.quick-help-section h3 {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.quick-help-overlay dl {
  margin: 0;
}

.quick-help-overlay div {
  margin: 0 0 3px;
}

.quick-help-overlay dt {
  display: inline;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff2cf;
  color: #5a3800;
  font-weight: 700;
}

.quick-help-overlay dd {
  display: inline;
  margin: 0;
}

.quick-help-overlay dd::after {
  content: "";
  display: block;
}

.quick-help-overlay .alias dt {
  background: #eef8dd;
  color: #35530f;
}

@media (max-width: 720px) {
  .quick-help-overlay {
    font-size: 10px;
  }
}

@media (max-width: 420px) {
  #helpMenu {
    grid-template-columns: 1fr;
    min-width: min(280px, calc(100vw - 16px));
    max-width: min(280px, calc(100vw - 16px));
  }
}

.action-grid {
  display: flex;
  gap: 0px;
  padding: 0px;
  background: var(--bar);
}

.action-grid > * {
  flex: 1 1 0;
  min-width: 0;
}

#slot0 .toolbar-menu-button {
  flex: 0 0 52px;
  min-width: 52px;
}

#slot0 .toolbar-history-button {
  flex: 0 0 56px;
  min-width: 56px;
}

.command-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.natural-change {
  position: relative;
  flex: 0 1 240px;
  min-width: 132px;
  border-left: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}

.natural-change input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
}

.natural-change input::placeholder {
  color: color-mix(in srgb, var(--accent) 70%, var(--text-muted));
}

.natural-change input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.natural-change-choices {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 58px);
  z-index: 30000;
  display: none;
  width: min(520px, calc(100vw - 24px));
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid var(--border-soft);
  background: var(--card);
  box-shadow: 0 12px 28px var(--shadow-stronger);
}

.natural-change-choices.is-visible {
  display: block;
}

.natural-change-choices-title {
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 700;
}

.natural-change-choices-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.natural-change-choices button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  color: var(--text-main);
  font: inherit;
  font-weight: 700;
}

.natural-change-choices button:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
}

.natural-change-choices .natural-change-choices-cancel {
  margin-top: 8px;
  background: transparent;
  color: var(--text-muted);
}

.command-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 48px 0 12px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--card);
  color: var(--text-main);
  font: inherit;
  outline: none;
}

.command-search input:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.command-search-voice {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
}

.command-search-voice:hover,
.command-search-voice:focus {
  background: var(--panel);
  color: var(--text-main);
}

.command-search-voice.is-listening {
  background: var(--accent);
  color: var(--accent-contrast);
}

.command-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200001;
  max-height: min(58vh, 420px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: 0 10px 24px var(--shadow-strong);
}

.command-search-group {
  position: sticky;
  top: 0;
  padding: 7px 10px;
  background: var(--panel);
  color: var(--text-muted);
  font-size: 10pt;
  font-weight: 700;
  z-index: 1;
}

.command-search-item {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  background: var(--card);
  color: var(--text-main);
  box-shadow: none;
  text-align: left;
}

.command-search-item:hover,
.command-search-item:focus,
.command-search-item.is-active {
  background: var(--panel);
}

.command-search-item.is-active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.command-search-item.is-active .command-search-type {
  background: var(--accent);
  color: var(--accent-contrast);
}

.command-search-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.command-search-type {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card-4);
  color: var(--text-muted);
  font-size: 9pt;
}

.command-search-detail {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 10pt;
}

.command-search-empty {
  padding: 12px;
  color: var(--text-muted);
}

.command-search-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-inset) + 122px);
  z-index: 300000;
  max-width: min(420px, calc(100vw - 24px));
  padding: 10px 12px;
  background: var(--text-main);
  color: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 20px var(--shadow-stronger);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .16s ease, transform .16s ease;
  text-align: center;
}

.command-search-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tutor-key-display {
  position: fixed;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-inset) + 132px);
  z-index: 300001;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card);
  color: var(--text-main);
  box-shadow: 0 10px 28px var(--shadow-stronger);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .16s ease, transform .16s ease;
}

.tutor-key-display.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tutor-key-caption {
  color: var(--text-muted);
  font-size: 10pt;
  font-weight: 700;
  white-space: nowrap;
}

.tutor-key-display kbd {
  min-width: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text-main);
  font: inherit;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.tutor-key-display.is-pressed kbd {
  border-bottom-width: 1px;
  transform: translateY(2px);
}

.tutor-key-display.is-important {
  background: var(--accent);
  color: var(--white);
}

.tutor-key-display.is-important .tutor-key-caption,
.tutor-key-display.is-important kbd {
  color: var(--white);
}

.tutor-key-display.is-important kbd {
  border-color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.18);
}

.toolbar-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  background: var(--card-4);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border-light);
  text-align: center;
  white-space: nowrap;
}

.top-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 28px;
  max-width: 100%;
  padding: 2px 8px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bar);
  color: var(--white);
  font-size: 10pt;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  position: relative;
  scrollbar-width: thin;
}

.top-status strong,
.top-status-home {
  flex: 0 0 auto;
  margin-right: 0;
  color: var(--accent);
  font-weight: 700;
}

.top-status-home {
  text-decoration: none;
}

.top-status span {
  color: var(--white);
  flex: 0 0 auto;
}

.top-status-main {
  flex: 0 0 auto;
}

.top-status-user-inline {
  color: color-mix(in srgb, var(--white) 86%, var(--accent));
}


.top-status-login,
.top-status-save,
.top-status-gallery,
.top-status-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--bar);
  color: var(--white);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.top-status-login:hover,
.top-status-save:hover,
.top-status-gallery:hover,
.top-status-logout:hover {
  background: var(--accent);
  color: var(--bar);
}

#toolbarUndo,
#toolbarRedo {
  white-space: nowrap;
}

#toolbarUndo:disabled,
#toolbarRedo:disabled {
  opacity: .45;
}

.corner-action-button {
  position: fixed;
  z-index: 20000;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px var(--shadow-stronger);
  font-size: 24pt;
  line-height: 1;
}

#centralReloadButton {
  position: absolute;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  right: 14px;
  bottom: 14px;
  width: 62px;
  height: 62px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px var(--shadow-stronger);
  font-size: 24pt;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

#centralReloadButton .central-reload-arrow {
  display: block;
  transform: translateY(-2px);
  line-height: 1;
}

#centralReloadButton .central-reload-label {
  display: none;
}

body[data-state="inn"] #centralReloadButton,
body.inn-editor-active #centralReloadButton {
  display: flex;
}

body.value-form-active #centralReloadButton {
  display: none !important;
}

@media (max-width: 700px) {
  #centralReloadButton {
    right: 12px;
    bottom: 12px;
    width: 54px;
    height: 54px;
    font-size: 22pt;
  }
}

.corner-action-button {
  font-size: 17pt;
}

#cornerMenuButton {
  left: 18px;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-inset) + 48px);
}

#toolbarUndo {
  left: 18px;
  top: calc(env(safe-area-inset-top) + 44px);
}

#toolbarRedo {
  right: 18px;
  top: calc(env(safe-area-inset-top) + 44px);
}

#cornerMenuButton {
  font-size: 24pt;
}

#centralReloadButton:hover {
  background: var(--accent-hover);
}

#centralReloadButton:active {
  background: var(--accent-active);
}

.corner-action-button:hover {
  background: var(--accent-hover);
}

.corner-action-button:active {
  background: var(--accent-active);
}

#randomStopButton {
  position: fixed;
  right: 20px;
  bottom: calc(env(safe-area-inset-bottom) + var(--keyboard-inset) + 72px);
  z-index: 20000;
  display: none;
  margin: 0;
  background: var(--card-3);
}
.canvas-hidden {
  visibility: hidden;
}
#woodOverview {
  overflow-wrap:break-word;
  overflow-y: auto;
  /* font-size: 9pt; */
}

.mat-row input,
.mat-row select {
  font-size: 13px;
  padding: 4px 6px;
}

.mat-s   { width: 80px; }
.mat-p,
.mat-pu  { width: 90px; }

.mat-l   { width: 70px; }
.mat-co  { width: 120px; }
.mat-color-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mat-color-picker {
  width: 36px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #666;
  border-radius: 4px;
  cursor: pointer;
}
.color-picker {
  position: relative;
  display: inline-block;
}

.color-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #666;
  cursor: pointer;
}

.color-menu {
  position: absolute;
  background: white;
  border: 1px solid #aaa;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  z-index: 1000;
}

.hidden {
  display: none;
}

.color-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px;
}

.color-item {
  flex-direction: row;
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: inherit;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid #333;
}
/* =========================================================
   BASIS – MUSS SEIN
   ========================================================= */

/* =========================================================
   APP BASIS
   ========================================================= */

#app {
  height: var(--app-height);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   SLOT 12 – Container für Slot 1 + Slot 2
   ========================================================= */

#slot12 {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
  max-width: 100%;
  max-height: 100%;     /* 🔑 harte Höhenbegrenzung */
  min-height: 0;
  overflow: auto;
}

/* =========================================================
   SLOT 1 & SLOT 2 – Grundlayout
   ========================================================= */

#slot1,
#slot2 {
  display: flex;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

/* =========================================================
   SLOT 1 – CANVAS
   ========================================================= */

/* =========================================================
   SLOT 2 – LINE BARS
   ========================================================= */

#slot2 {
  overflow: auto;
  min-height: 0;
}

body.keyboard-open[data-state="inn"] #slot1 {
  display: none !important;
}

body.keyboard-open[data-state="inn"] #slot2 {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* =========================================================
   LANDSCAPE
   ========================================================= */

@media (orientation: landscape) {

  #slot12 {
    flex-direction: row;
    align-items: stretch;
  }

  #slot1 {
    aspect-ratio: 1 / 1;
    height: 100%;
    max-height: 100%;        /* 🔑 darf Container nicht sprengen */
    flex: 0 0 min(100%, 100vh);
    min-width: 0;
    max-width: calc(100% - 164px);
  }

  #slot2 {
    min-width: 164px;
    flex: 1 1 164px;
    height: 100%;
    overflow: auto;
  }

  body[data-state="wood"] #slot1 {
    aspect-ratio: auto;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  body[data-state="wood"] #slot2 {
    display: none;
  }
}

/* =========================================================
   PORTRAIT
   ========================================================= */

@media (orientation: portrait) {

  #slot12 {
    flex-direction: column;
  }

  #slot1 {
    aspect-ratio: 1 / 1;
    width: 100%;
    flex: 0 0 min(100vw, calc(100% - 96px));
    max-height: calc(100% - 96px); /* 🔒 Slot2 bleibt sichtbar */
    align-self: center;
  }

  #slot2 {
    flex: 1 1 96px;
    min-height: 96px;
    width: 100%;
    overflow: auto;
  }

  body[data-state="wood"] #slot1 {
    aspect-ratio: auto;
    flex: 1 1 auto;
    max-height: 100%;
  }

  body[data-state="wood"] #slot2 {
    display: none;
  }
}

/* =========================================================
   OPTIONAL DEBUG (bei Bedarf kurz aktivieren)
   ========================================================= */

/*
#slot12 { outline: 2px solid red; }
#slot1  { outline: 2px solid lime; }
#slot2  { outline: 2px solid cyan; }
*/

/* =========================
   MATERIAL LIST
   ========================= */

#materialList {
  display: flex;
  flex-direction: column;
  gap: 14px;              /* ✨ Abstand zwischen Materialien */
  overflow-y: auto;
}

#projectEditor {
  overflow-y: auto;
}
/* =========================
   MATERIAL ROW
   ========================= */
   .mat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 6px 8px;
  background: var(--card-2);
  border-radius: 8px;

  align-items: stretch;
}

.mat-edit-toggle {
  align-self: flex-start;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  font: inherit;
}

.mat-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, max-content));
  gap: 8px;
  align-items: end;
  justify-content: start;
}

.mat-form[hidden] {
  display: none;
}

.mat-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.mat-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: max-content;
}

.mat-field input {
  width: 7rem;
  max-width: 100%;
}

.mat-field .mat-s,
.mat-field .mat-p,
.mat-field .mat-pu {
  display: block;
  width: 6.5rem;
}

.mat-color-field {
  display: grid;
  grid-template-columns: 44px 9.5rem;
  gap: 6px;
  align-items: center;
}

.mat-color-field .mat-color-picker {
  width: 44px;
  min-width: 44px;
}

.mat-color-field .mat-co {
  width: 9.5rem;
  min-width: 0;
}

.mat-btn {
  width: 44px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--card);
  padding: 0;
  cursor: pointer;
}
/* Container wie deine Material-Zeilen (farbig, rund) */
.newmat-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 8px;
  background: var(--card-2);
  border-radius: 10px;
}

/* obere Buttonleiste */
.newmat-topbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Formularzeile: Elemente dürfen umbrechen, aber bleiben in einem Container */
.newmat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, max-content));
  gap: 8px;
  align-items: center;
  justify-content: start;

  padding: 8px;
  background: var(--card-3);
  border-radius: 10px;
  border: 1px solid var(--border-input);
}

/* Inputs */
.newmat-row input,
.newmat-row select {
  width: 7rem;
  min-width: 0;
}

/* Vorschau-Gruppe bleibt zusammen */
.newmat-previewgrp {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Vorschau-Button */
.newmat-colorbtn,
.newmat-colorpicker {
  width: 44px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--card);
  padding: 0;
  cursor: pointer;
}

.newmat-co {
  width: 9.5rem;
  min-width: 0;
}

.newmat-p,
.newmat-pu {
  width: 6.5rem;
  min-width: 0;
}

/* kleine Buttons */
.newmat-row button,
.newmat-topbar button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Hinweistext */
.newmat-hint {
  font-size: 12px;
  opacity: 0.75;
}

.cmd-add-btn {
  margin-top: 12px;
  padding: 8px 12px;

  font-family: ui-monospace, monospace;
  font-size: 13px;

  background: var(--card-4);
  border: 1px dashed var(--border-dashed);
  border-radius: 6px;

  cursor: pointer;
}

.cmd-add-btn:hover {
  background: var(--card-5);
}

button {
  margin: 2px;
  background: var(--card-7);
  box-shadow:
    0 2px 4px var(--shadow-strong),
    0 1px 3px var(--shadow-stronger);
}

/* =========================================================
   THEME OVERRIDES (nur Farben)
   ========================================================= */



.row,    button {
  display: flex;
  flex-direction: column;   /* Label oben */
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-med);
  background-color: var(--card-3);
}
.rowfl  {
display: flex;;
}

.row {
  background-color: var(--card-2);
}

.row label {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border: 1px dashed var(--border-dashed);
  border-radius: 8px;
  background: transparent;
  box-shadow:
    0 2px 4px var(--shadow-strong),
    0 1px 3px var(--shadow-stronger);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: pre-wrap;  /* Zeilenumbrüche bleiben erhalten */
}

.mat-label,
.newmat-hint {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px dashed var(--border-dashed);
  border-radius: 8px;
  background: transparent;
  box-shadow:
    0 2px 4px var(--shadow-strong),
    0 1px 3px var(--shadow-stronger);
  font-size: 0.8rem;
  font-weight: 600;
}

.field-wrap {
  display: flex;            /* Input + Help nebeneinander */
  align-items: center;
  gap: 8px;
}

.field-wrap input {
  flex: 1;                  /* Input nimmt restliche Breite */
  padding: 6px 8px;
}

.field-wrap button {
  padding: 6px 10px;
  cursor: pointer;
}
.random-box{
  position:fixed;
  right:20px;
  top:80px;
  width:200px;
  padding:12px;
  background:#eee;
  border-radius:6px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.random-box.hidden{
  display:none;
}


.range{
  display:flex;
  gap:6px;
}

.range input{
  width:70px;
}

#slot0.action-grid,
#slot3.action-grid {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--bar);
}

#slot0.action-grid > button,
#slot3.action-grid > button {
  flex: 1 1 96px;
  min-width: 88px;
  max-width: 190px;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--card);
  color: var(--text-main);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#slot0.action-grid > button[hidden],
#slot3.action-grid > button[hidden] {
  display: none;
}

#slot0.action-grid > button:first-child,
#slot3.action-grid > button:first-child {
  border-left: 0;
}

#slot0.action-grid > button:hover,
#slot3.action-grid > button:hover {
  background: var(--card-5);
}

#slot0.action-grid > button:active,
#slot3.action-grid > button:active {
  background: var(--card-7);
}

#slot0 .toolbar-menu-button {
  flex: 0 0 clamp(52px, 14vw, 88px);
  min-width: 52px;
}

#slot0 .toolbar-history-button {
  flex: 0 0 clamp(64px, 18vw, 84px);
  min-width: 64px;
}

#slot0 .toolbar-layout-button {
  flex: 0 0 clamp(112px, 22vw, 168px);
  min-width: 104px;
}

#slot0 .toolbar-layout-button[aria-pressed="true"] {
  background: var(--panel-active);
}

#slot0 .toolbar-inline-menu-button {
  flex: 0 1 96px;
  min-width: 72px;
}
@media (max-width: 720px) {
  #slot0.action-grid {
    overflow: hidden;
  }

  #slot0 .command-search,
  #slot0 .natural-change {
    display: none !important;
  }

  #slot0 .toolbar-inline-menu-button {
    flex-basis: 84px;
    min-width: 0;
  }

  #slot0.action-grid > button,
  #slot3.action-grid > button,
  #slot0 .toolbar-menu-button,
  #slot0 .toolbar-history-button,
  #slot0 .toolbar-layout-button {
    min-width: 0;
  }
}

body[data-layout="view"] #slot1,
body[data-layout="editor"] #slot2 {
  aspect-ratio: auto;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

body[data-layout="view"] #slot2,
body[data-layout="editor"] #slot1 {
  display: none !important;
}

body[data-layout="view"] #centralReloadButton {
  display: none !important;
}

body[data-layout="view"] #canvas {
  display: block !important;
}

#sceneEditOverlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  pointer-events: none;
}

.scene-edit-hint {
  max-width: min(520px, calc(100% - 76px));
  padding: 7px 10px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  background: rgba(255,255,255,.92);
  color: var(--text-main);
  font: 700 12px monospace;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.scene-add-korpus {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, black);
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font: 800 24px monospace;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 3px 12px rgba(0,0,0,.26);
}

.scene-add-korpus:hover {
  background: var(--accent-hover);
}

@media (orientation: landscape) {
  body[data-layout="view"] #slot1,
  body[data-layout="editor"] #slot2 {
    flex-basis: auto;
    max-width: none;
  }
}

@media (orientation: portrait) {
  body[data-layout="view"] #slot1,
  body[data-layout="editor"] #slot2 {
    flex-basis: auto;
    align-self: stretch;
  }
}

/* Compact 3D preview while value forms are open */
body.value-form-active #slot12 {
  overflow: hidden;
}

@media (max-width: 720px) {
  body.value-form-active #slot1 {
    display: none !important;
  }

  body.value-form-active #slot2 {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}

@media (orientation: landscape) {
  body.value-form-active #slot1 {
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    min-width: 0;
  }

  body.value-form-active #slot2 {
    flex: 1 1 75%;
    min-width: 0;
  }
}

@media (orientation: portrait) {
  body.value-form-active #slot1 {
    flex: 0 0 25%;
    max-height: 25%;
    min-height: 0;
  }

  body.value-form-active #slot2 {
    flex: 1 1 75%;
    min-height: 0;
  }
}
