/* Gemeinsame Gestaltung. Bewusst ohne externe Schriften, damit beim Aufruf keine Daten an Dritte gehen. */
:root {
  --bg: #eef2f0;
  --surface: #ffffff;
  --ink: #12211d;
  --muted: #55665f;
  --line: #d3ddd8;
  --accent: #0e6b5a;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe9;
  --danger: #a3341b;
  --danger-soft: #f8e4de;
  --ok: #0e6b5a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1613; --surface: #15211d; --ink: #e6efeb; --muted: #93a59d; --line: #27382f;
    --accent: #4cc3a8; --accent-ink: #06211b; --accent-soft: #17362e; --danger: #f0907a; --danger-soft: #3a1e18; --ok: #4cc3a8;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: grid; gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; }
.btn { border: 0; background: var(--btn, var(--accent)); color: var(--btn-ink, var(--accent-ink)); padding: 10px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.inp { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 9px 11px; width: 100%; }
textarea.inp { min-height: 84px; resize: vertical; }
select.inp, input.inp.auto { width: auto; }
label.l { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
label.l .hint { font-weight: 400; color: var(--muted); }
label.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
label.chk input { margin-top: 3px; }
/* Regel-Formular in einem Sperr-Profil */
.sub { border-top: 1px solid var(--line); padding-top: 14px; }
.stack.tight { gap: 6px; }
.share summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.share[open] summary { margin-bottom: 12px; }
textarea.code { min-height: 0; resize: vertical; white-space: pre; overflow-x: auto; }
.swatch { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.pill + .pill, span + .pill { margin-left: 8px; }
.msg { border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.msg.err { background: var(--danger-soft); color: var(--danger); }
.msg.ok { background: var(--accent-soft); color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.foot { text-align: center; font-size: 13px; color: var(--muted); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Buchungsseite */
.booking { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; padding: 0; overflow: hidden; }
.booking.two { grid-template-columns: 260px minmax(0, 1fr); }
.pane { padding: 24px; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--line); }
.who span { display: block; } /* Firma, darunter der Name in eigener Zeile */
.portrait { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 12px 0 4px; border: 3px solid var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.firstinfo { margin-top: 14px; }
.meta { display: grid; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 14px; }
.meta b { color: var(--ink); font-weight: 600; }
.calHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.navBtn { border: 1px solid var(--line); background: transparent; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.navBtn:disabled { opacity: .35; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { text-align: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.day { aspect-ratio: 1; max-height: 52px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: default; font-variant-numeric: tabular-nums; }
.day.open { background: var(--accent-soft); color: var(--ink); font-weight: 600; cursor: pointer; }
.day.open:hover { outline: 1px solid var(--accent); }
.day.sel { background: var(--accent); color: var(--accent-ink); }
.day.today { box-shadow: inset 0 -3px 0 var(--accent); }
.slots { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.slot { border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 8px; padding: 9px 0; cursor: pointer; font-family: var(--mono); font-weight: 600; }
.slot:hover { background: var(--accent-soft); }
.summary { display: grid; gap: 6px; font-size: 14px; margin: 16px 0; }
.summary div { display: flex; gap: 10px; }
.summary .k { color: var(--muted); width: 90px; flex: none; }
.typeLink { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.typeLink:hover { border-color: var(--accent); }
.typeLink { border-left: 4px solid var(--accent); } /* Farbstreifen in der Farbe der Firma */
.typeLink strong { display: block; font-size: 16px; }
.group { padding-top: 6px; color: var(--ink); } /* Farben der Firma auch im Abschnitt der Startseite */
.group .foot { justify-content: flex-start; }

/* Verwaltung */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 3px; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tblwrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 4px 10px 8px 0; white-space: nowrap; }
table.t td { padding: 10px 10px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wd { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.wd:first-child { border-top: 0; }
.wd .ranges { display: grid; gap: 6px; }
.wd .rg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--ok); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 860px) {
  .booking, .booking.two { grid-template-columns: minmax(0, 1fr); }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .slots { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .wd { grid-template-columns: minmax(0, 1fr); }
}
/* Eingebettet auf einer Website: immer hell, durchsichtiger Hintergrund, wenig Rand */
html.embedded {
  --bg: transparent; --surface: #ffffff; --ink: #12211d; --muted: #55665f; --line: #d3ddd8;
  --accent: #0e6b5a; --accent-ink: #ffffff; --accent-soft: #dcefe9; --danger: #a3341b; --danger-soft: #f8e4de; --ok: #0e6b5a;
  color-scheme: light; background: transparent;
}
html.embedded body { background: transparent; padding: 2px 2px 8px; }
@media (prefers-reduced-motion: no-preference) {
  .slot, .day, .btn, .typeLink { transition: background-color .12s, color .12s, border-color .12s; }
}
