/* Kundenseite – alle Farben kommen aus den Einstellungen (CSS-Variablen, siehe applyTheme in lib.js) */
:root {
  --primary: #c8a45d; --on-primary: #111; --bg: #111; --surface: #1c1c1c; --text: #f4f1ea;
  --radius: 12px; --font-body: system-ui, sans-serif; --font-head: system-ui, sans-serif;
  --head-transform: none; --head-spacing: 0;
  --muted: color-mix(in srgb, var(--text) 62%, var(--bg));
  --line: color-mix(in srgb, var(--text) 16%, var(--bg));
  --free: #3fae6a; --busy: #c0504d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font-body); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--font-head); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.1rem; }
a { color: var(--primary); }
p { margin: 0 0 1em; }
.loading { text-align: center; padding: 4rem 1rem; color: var(--muted); }

.wrap { width: min(100% - 32px, 760px); margin-inline: auto; }
section { padding: 3rem 0; border-top: 1px solid var(--line); scroll-margin-top: 56px; }
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font: 700 1.15rem var(--font-head); text-transform: var(--head-transform); letter-spacing: var(--head-spacing); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .55em 1.3em; border: 2px solid var(--primary); border-radius: var(--radius);
  background: var(--primary); color: var(--on-primary); font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.danger { background: transparent; border-color: var(--busy); color: var(--busy); }
.btn.small { min-height: 36px; padding: .3em .9em; font-size: .92rem; }
.btn:focus-visible, .slot:focus-visible, .day:focus-visible, .svc:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 60%, white); outline-offset: 2px; }

.hero { padding: 4.5rem 0 3.5rem; border-top: 0; text-align: center; }
.hero .tag { color: var(--primary); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin-bottom: 1rem; }
.hero p.sub { color: var(--muted); font-size: 1.15rem; max-width: 34em; margin: 0 auto 1.6em; }

.cards { display: grid; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.service-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.service-row .meta { color: var(--muted); font-size: .92rem; }
.price { font-weight: 700; white-space: nowrap; }

/* Buchung */
.step { margin-top: 1.6rem; }
.step > h3 { display: flex; align-items: center; gap: .6em; }
.step > h3 .num { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--primary); color: var(--on-primary); font: 700 .9rem var(--font-body); }
.svc-list { display: grid; gap: 8px; }
.svc { text-align: left; width: 100%; background: var(--surface); color: inherit; border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; font: inherit; }
.svc[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.svc .meta { color: var(--muted); font-size: .9rem; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font-family: var(--font-head); }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0; }
.day { position: relative; aspect-ratio: 1; min-height: 40px; display: grid; place-items: center; border: 2px solid transparent; border-radius: calc(var(--radius) * .7); background: transparent; color: var(--text); font: 600 .95rem var(--font-body); cursor: pointer; padding: 0; }
.day.free { background: color-mix(in srgb, var(--free) 22%, var(--surface)); }
.day.full { background: color-mix(in srgb, var(--busy) 16%, var(--surface)); color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.day.closed, .day.past { color: color-mix(in srgb, var(--text) 30%, var(--bg)); cursor: default; }
.day[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.day.today::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { min-height: 44px; border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--free) 60%, var(--bg)); background: color-mix(in srgb, var(--free) 18%, var(--surface)); color: var(--text); font: 600 1rem var(--font-body); cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.slot:disabled { border-color: var(--line); background: var(--surface); color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: .7; }

form.details { display: grid; gap: 12px; }
label.field { display: grid; gap: 4px; font-size: .92rem; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], textarea { width: 100%; min-height: 46px; padding: .6em .8em; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 1rem var(--font-body); }
textarea { min-height: 84px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.summary { padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 50%, var(--bg)); }
.msg { padding: 10px 14px; border-radius: var(--radius); margin: 10px 0; }
.msg.error { background: color-mix(in srgb, var(--busy) 20%, var(--surface)); border: 1px solid var(--busy); }
.msg.ok { background: color-mix(in srgb, var(--free) 20%, var(--surface)); border: 1px solid var(--free); }
.fine { color: var(--muted); font-size: .85rem; }

.contact-list { display: grid; gap: 8px; margin-bottom: 1.4rem; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
.hours tr.today td { color: var(--primary); font-weight: 700; }
footer { padding: 2rem 0 3rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .9rem; }

/* Terminseite */
.ticket { text-align: center; padding: 2rem 1rem; }
.ticket .when { font: 700 1.5rem var(--font-head); margin: .2em 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 1.2rem; }
.badge { display: inline-block; padding: .2em .8em; border-radius: 99px; font-size: .85rem; font-weight: 700; background: var(--free); color: #fff; }
.badge.cancelled { background: var(--busy); }
