
#einst-inhalt .adm-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
}

#einst-inhalt .adm-field-row .adm-field { flex: 0 0 auto; }
#einst-inhalt .adm-field input[type="number"] { max-width: 168px; }
.einst-zimmer .adm-field input[type="number"] { max-width: 104px; }

/* Der Knopf braucht Luft nach oben, sonst klebt er am Text darueber. */
#einst-inhalt .adm-box > .adm-btn { margin-top: 14px; }

@media (max-width: 490px) {
  #einst-inhalt .adm-field-row .adm-field { flex: 1 1 100%; }
  #einst-inhalt .adm-field input[type="number"] { max-width: none; }
}

/* --- Einzelne Tische, die anders sind ------------------------------------ */
.einst-auf { margin: 12px 0; }

.einst-auf > summary {
  /* 44 sind Hausregel, auch fuer eine Zeile, die man antippt. */
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--vr-font-display, Georgia, serif);
  font-size: var(--vr-text-md, 1.125rem);
  color: var(--vr-burgund, #306100);
}

.einst-auf > summary:focus-visible { outline: 3px solid var(--vr-gold, #5A8F1F); outline-offset: 2px; }

.einst-tische {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.einst-tisch { display: flex; align-items: center; gap: 8px; }

.einst-tisch label {
  flex: 0 0 auto;
  font-size: var(--vr-text-sm, 0.875rem);
  color: var(--vr-text-muted, #4B5645);
}

.einst-tisch input {
  width: 100%;
  min-width: 62px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--vr-linie-soft, #E6DFCF);
  border-radius: var(--vr-radius-sm, 4px);
  background: var(--vr-weiss, #FFFDF9);
  font-family: inherit;
  /* 16px, sonst zoomt iOS beim Antippen. */
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--vr-text-dunkel, #17210F);
}

.einst-tisch input:focus-visible { outline: 3px solid var(--vr-gold, #5A8F1F); outline-offset: 2px; }

/* --- Zimmer -------------------------------------------------------------- */
.einst-zimmer-liste { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }

.einst-zimmer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--vr-linie-soft, #E6DFCF);
  border-left: 3px solid var(--vr-gold, #5A8F1F);
  border-radius: var(--vr-radius-sm, 4px);
  background: var(--vr-papier, #FCF8F1);
}

.einst-nr {
  flex: 0 0 auto;
  align-self: center;
  min-width: 26px;
  font-family: var(--vr-font-display, Georgia, serif);
  font-size: var(--vr-text-md, 1.125rem);
  color: var(--vr-text-muted, #4B5645);
}

.einst-weit { flex: 1 1 auto; }

.einst-weg {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--vr-linie-soft, #E6DFCF);
  border-radius: 9999px;
  background: transparent;
  font-family: inherit;
  font-size: var(--vr-text-sm, 0.875rem);
  color: var(--vr-burgund, #306100);
  cursor: pointer;
}

.einst-weg:hover:not(:disabled) { border-color: var(--vr-burgund, #306100); }
.einst-weg:focus-visible { outline: 3px solid var(--vr-gold, #5A8F1F); outline-offset: 2px; }
.einst-weg:disabled { opacity: 0.5; cursor: default; }

/* --- Welche Bereiche dieses Haus hat ------------------------------------- */
.einst-module {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.einst-modul {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: var(--vr-radius-sm, 4px);
  cursor: pointer;
}

.einst-modul:hover { background: var(--vr-creme-tief, #F2ECE0); }
.einst-modul input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--vr-burgund, #306100); }

/* --- Meldungen ----------------------------------------------------------- */
.einst-hinweis {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--vr-radius-sm, 4px);
  background: var(--vr-creme-tief, #F2ECE0);
  font-size: var(--vr-text-sm, 0.875rem);
  line-height: 1.5;
  color: var(--vr-text-muted, #4B5645);
}

.einst-hinweis--info { border-left: 3px solid var(--vr-gold, #5A8F1F); }
.einst-hinweis--fehler { background: #F6E3E5; color: var(--vr-burgund, #306100); font-weight: 600; }
.einst-hinweis--gut { background: #E4EFE2; color: #2F5B2A; font-weight: 600; }

/* --- Dunkelfassung, dieselben Werte wie in den uebrigen Reitern ---------- */
html[data-theme="dark"] .einst-zimmer,
html[data-theme="dark"] .einst-tisch input,
html[data-theme="dark"] .einst-hinweis {
  background: #232720;
  border-color: #3B4534;
  color: #F5EFE0;
}

html[data-theme="dark"] .einst-auf > summary { color: #B5E26B; }
html[data-theme="dark"] .einst-nr,
html[data-theme="dark"] .einst-tisch label { color: #9FAF94; }
html[data-theme="dark"] .einst-weg { border-color: #3B4534; color: #B5E26B; }
html[data-theme="dark"] .einst-modul:hover { background: #272F22; }
html[data-theme="dark"] .einst-hinweis--fehler { background: #3A2225; color: #E8A0AC; }
html[data-theme="dark"] .einst-hinweis--gut { background: #22301F; color: #A8D3A0; }

/* --- Schmale Schirme. Nur die drei Breakpunkte, die im Haus gelten. ------ */
@media (max-width: 768px) {
  .einst-zimmer { align-items: stretch; flex-wrap: wrap; }
  .einst-weit { flex: 1 1 100%; }
}

@media (max-width: 490px) {
  .einst-zimmer { flex-direction: column; align-items: stretch; }
  .einst-nr { align-self: flex-start; }
  .einst-weg { width: 100%; }
  .einst-tische { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
