/* Gestaltung nach der Oberfläche von operanda: dieselben Farben, Radien,
   Schriftstufen und Knöpfe (Werte aus deren style.css). Hell, ein Akzent. */
:root, :host {
  color-scheme: light;

  --grund: oklch(100% 0 0);
  --flaeche: oklch(98.4% 0.002 275);
  --flaeche-2: oklch(96.6% 0.003 275);
  --linie: oklch(92.4% 0.004 275);
  --linie-stark: oklch(87% 0.006 275);
  --text: oklch(24% 0.012 275);
  --text-leise: oklch(52% 0.010 275);
  --text-still: oklch(64% 0.008 275);

  --akzent: oklch(52% 0.14 275);
  --akzent-dunkel: oklch(45% 0.14 275);
  --akzent-hell: oklch(96.5% 0.022 275);
  --akzent-linie: oklch(89% 0.045 275);
  --auf-akzent: #fff;

  --laeuft: oklch(58% 0.105 155);
  --fehler: oklch(52% 0.17 28);

  --r-s: 6px;
  --r-m: 8px;
  --r-l: 12px;
  --zeit: .15s;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@supports not (color: oklch(50% 0 0)) {
  :root, :host {
    --grund: #fff; --flaeche: #fafafb; --flaeche-2: #f2f3f6; --linie: #e6e7ec; --linie-stark: #d5d7de;
    --text: #2b2c34; --text-leise: #6c6e7a; --text-still: #8b8d98;
    --akzent: #5b53c4; --akzent-dunkel: #4a43ad; --akzent-hell: #f1f0fc; --akzent-linie: #ddd9f5;
    --laeuft: #3f9161; --fehler: #b3341f;
  }
}

/* Eingebettet leitet sich alles aus Grund, Text, Akzent und Radius ab: eine Farbe
   reicht, und mit dunklem Grund und hellem Text stimmt auch der Rest. */
@supports (color: color-mix(in oklch, red, blue)) {
  :host .karte {
    --flaeche: color-mix(in oklch, var(--text) 2%, var(--grund));
    --flaeche-2: color-mix(in oklch, var(--text) 5%, var(--grund));
    --linie: color-mix(in oklch, var(--text) 9%, var(--grund));
    --linie-stark: color-mix(in oklch, var(--text) 16%, var(--grund));
    --text-leise: color-mix(in oklch, var(--text) 68%, var(--grund));
    --text-still: color-mix(in oklch, var(--text) 52%, var(--grund));
    --akzent-dunkel: color-mix(in oklch, var(--akzent) 85%, var(--text));
    --akzent-hell: color-mix(in oklch, var(--akzent) 9%, var(--grund));
    --akzent-linie: color-mix(in oklch, var(--akzent) 28%, var(--grund));
  }
}
:host .karte { --r-m: calc(var(--r-l) * .67); --r-s: calc(var(--r-l) * .5); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--flaeche);
}
/* :host ist der Platz auf einer fremden Seite (Shadow DOM, siehe app.js). Die
   schmale Ansicht richtet sich deshalb nach diesem Platz, nicht nach dem Fenster. */
:host { display: block; }
body, :host { container: buchung / inline-size; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: 23px; }
h2 { font-size: 16.5px; margin-bottom: 16px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Knöpfe */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 7px 14px;
  border: 1px solid var(--linie-stark); border-radius: var(--r-m);
  background: var(--grund); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 500; line-height: 1.25;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--zeit) ease-out, border-color var(--zeit) ease-out, color var(--zeit) ease-out, opacity var(--zeit) ease-out;
}
button:hover { background: var(--flaeche-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.senden { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.senden:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.senden:disabled:hover { background: var(--akzent); border-color: var(--akzent); }

/* ---------------------------------------------------------------- Felder */
label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 500; }
.haken { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.haken input { width: auto; min-height: 0; margin: 0; }
input, textarea, select {
  display: block; width: 100%; padding: 8px 12px;
  border: 1px solid var(--linie-stark); border-radius: var(--r-m);
  background: var(--grund); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 400; line-height: 1.4; min-height: 36px;
  transition: border-color var(--zeit) ease-out, box-shadow var(--zeit) ease-out;
}
input:hover, textarea:hover, select:hover { border-color: color-mix(in oklch, var(--linie-stark) 55%, var(--text)); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--akzent) 18%, transparent); }
textarea { resize: vertical; min-height: 72px; }
select { width: auto; cursor: pointer; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Karte */
.karte {
  width: min(900px, 100%);
  margin-inline: auto;
  /* Hier statt am body: am Platz auf einer fremden Seite gewänne deren Regel. */
  color: var(--text);
  font-family: var(--schrift);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: 296px 1fr;
  background: var(--grund);
  border: 1px solid var(--linie);
  border-radius: var(--r-l);
  overflow: hidden;
}
.karte.schmal { width: min(540px, 100%); grid-template-columns: 1fr; }
.seite { padding: 24px 22px; border-right: 1px solid var(--linie); display: grid; gap: 16px; align-content: start; }
.inhalt { padding: 24px 22px; min-height: 430px; }
.karte.schmal .inhalt { min-height: 0; }

.gastgeber { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.gastgeber::before {
  content: attr(data-initial);
  flex: none; width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--flaeche-2); border: 1px solid var(--linie);
  color: var(--text-leise); font-size: 13px; font-weight: 600;
}
.gastgeber.mit-bild::before { content: none; }
.gastgeber-text { display: grid; min-width: 0; line-height: 1.3; }
.gastgeber-text small { font-size: 13px; font-weight: 400; color: var(--text-leise); }
.gastgeber img { flex: none; width: 40px; height: 40px; border-radius: 999px; object-fit: cover; border: 1px solid var(--linie); }
.beschreibung, .hinweis { color: var(--text-leise); }
.klein { color: var(--text-leise); font-size: 13px; line-height: 1.5; }
.fehler { color: var(--fehler); font-size: 13.5px; }
.fehler a { color: inherit; font-weight: 600; }

.fakten { display: grid; gap: 12px; }
.fakten dt { font-size: 11px; color: var(--text-still); text-transform: uppercase; letter-spacing: .06em; }
.fakten dd + dd { margin-top: 6px; }
.fakten dt.abstand { margin-top: 10px; }
.zeilen { white-space: pre-line; }

/* Terminart: eine Auswahlliste wie in der Seitenleiste von operanda */
.arten { display: grid; gap: 2px; padding: 4px; border: 1px solid var(--linie); border-radius: var(--r-m); }
.arten button { justify-content: flex-start; border-color: transparent; border-radius: var(--r-s); font-weight: 400; min-height: 32px; padding: 6px 8px; white-space: normal; text-align: left; }
.arten button[aria-checked="true"] { background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 500; }

/* ---------------------------------------------------------------- Tag und Uhrzeit */
.wahl { display: grid; grid-template-columns: 1fr 168px; gap: 22px; }
.blaettern { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.blaettern strong { font-size: 15px; font-weight: 600; }
.blaettern strong::first-letter { text-transform: uppercase; }
.blaettern button { width: 34px; padding: 0; font-size: 16px; color: var(--text-leise); }
.tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.tage span { font-size: 11px; color: var(--text-still); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 4px; }
.tage button { aspect-ratio: 1; min-height: 0; padding: 0; border-color: transparent; background: none; }
.tage button:disabled { color: var(--text-still); opacity: .6; cursor: default; }
.tage button:not(:disabled) { background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 600; }
.tage button:not(:disabled):hover { border-color: var(--akzent-linie); }
.tage button[aria-pressed="true"], .tage button[aria-pressed="true"]:hover { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }

.zeiten { display: grid; gap: 6px; align-content: start; max-height: 372px; overflow-y: auto; padding: 0 4px 4px 0; }
.zeiten p { font-size: 13px; color: var(--text-leise); margin-bottom: 4px; }
.zeiten button:hover { background: var(--akzent-hell); border-color: var(--akzent-linie); color: var(--akzent-dunkel); }

/* ---------------------------------------------------------------- Formular und Abschluss */
.formular { display: grid; gap: 14px; max-width: 460px; }
.termin { padding: 10px 12px; background: var(--akzent-hell); border: 1px solid var(--akzent-linie); border-radius: var(--r-m); color: var(--akzent-dunkel); font-weight: 500; }
.knoepfe { display: flex; gap: 8px; }
.gaeste-block { display: grid; gap: 8px; justify-items: start; }
.gaeste { display: grid; gap: 8px; width: 100%; }
.gaeste:empty { display: none; }
.gast { display: flex; gap: 8px; }
.gast input { flex: 1; min-width: 0; }
.gast button { flex: none; width: 36px; padding: 0; color: var(--text-leise); }
.zustimmung { align-items: flex-start; font-size: 13px; line-height: 1.5; }
.zustimmung input { margin-top: 3px; flex: none; }
.zustimmung a { color: var(--akzent-dunkel); }
.fertig { display: grid; gap: 12px; align-content: start; max-width: 460px; }
.fertig h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.fertig h2::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--laeuft); }

@media (max-width: 792px) {
  body { padding: 0; place-items: start stretch; background: var(--grund); }
}
@container buchung (max-width: 760px) {
  .karte, .karte.schmal { width: 100%; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .seite { border-right: 0; border-bottom: 1px solid var(--linie); }
  .inhalt { min-height: 0; }
  .wahl { grid-template-columns: 1fr; }
  .zeiten { grid-template-columns: repeat(3, 1fr); max-height: none; padding: 0; }
  .zeiten p { grid-column: 1 / -1; }
  input, textarea, select { font-size: 16px; min-height: 44px; }
  button { min-height: 40px; }
  .tage button { min-height: 0; }
}

.alternative { display: grid; gap: 8px; }
.alternative-wahl { display: flex; gap: 8px; }
.alternative-wahl select:first-child { flex: 1; min-width: 0; }

/* Terminarten in Gruppen (Pakete): Überschrift je Gruppe, darunter Dauer und Preis. */
.arten.gruppiert { gap: 1px; }
.arten .gruppe { margin: 8px 8px 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-leise); }
.arten .gruppe:first-child { margin-top: 4px; }
.arten button.mit-meta { display: grid; gap: 1px; justify-items: start; padding: 7px 8px; }
.arten .art-meta { font-size: 12.5px; color: var(--text-leise); font-weight: 400; }
.arten button[aria-checked="true"] .art-meta { color: inherit; opacity: .8; }
.paket { margin-top: -6px; }
.knopf-link { display: inline-flex; align-items: center; justify-content: center; justify-self: start; min-height: 40px; padding: 0 18px; border-radius: var(--r-m); text-decoration: none; font-weight: 500; }
