/* YNOT Buchung – Design-Tokens 1:1 aus www.ynot.training/style.css */

/* ─── Fonts (lokal) ─── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bebas-neue-latin-400-normal.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Marken- und Signalfarben: in beiden Themes gleich */
:root {
  --black:     #061424;
  --black-rgb: 6, 20, 36;
  --white:     #f5f5f5;
  --lime:      #c8ff00;
  --lime-rgb:  200, 255, 0;
  --lime-hover:#deff44;
  --danger:    #ff6b57;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;
}

/* ─── DUNKEL (Standard). Nav + Footer bleiben auch im hellen Theme dunkel. ─── */
:root,
.top, .foot {
  color-scheme: dark;
  --bg:          #061424;
  --bg-rgb:      6, 20, 36;
  --surface:     #061424;
  --raised:      #0b1d31;
  --hover-bg:    #0c1f34;
  --tile:        rgba(255,255,255,0.03);
  --field:       rgba(255,255,255,0.04);
  --text:        #f5f5f5;
  --text-strong: rgba(245,245,245,0.9);
  --text-soft:   rgba(245,245,245,0.75);
  --text-dim:    rgba(245,245,245,0.65);
  --muted:       #aaa;
  --border:      rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);
  --ghost-border:rgba(255,255,255,0.2);
  --accent-text: var(--lime);
  --icon:        var(--lime);
  --mark:        none;
  --tag-fg:      var(--lime);
  --tag-bg:      transparent;
  --tag-pad:     0;
  --hover-tint:  rgba(var(--lime-rgb),0.04);
  --link-hover:  var(--lime);
  --focus:       var(--lime);
  --seat-off:    rgba(255,255,255,0.12);
  --seat-on:     var(--lime);
  --danger-text: #ff8a7a;
  --shadow:      0 8px 30px rgba(0,0,0,0.35);
}
:root { --icon-sun: block; --icon-moon: none; }

/* ─── HELL ─── */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #f4f5f2;
  --bg-rgb:      244, 245, 242;
  --surface:     #f4f5f2;
  --raised:      #ffffff;
  --hover-bg:    #ffffff;
  --tile:        rgba(6,20,36,0.04);
  --field:       #ffffff;
  --text:        #061424;
  --text-strong: rgba(6,20,36,0.92);
  --text-soft:   rgba(6,20,36,0.78);
  --text-dim:    rgba(6,20,36,0.72);
  --muted:       #56606c;
  --border:      rgba(6,20,36,0.12);
  --border-strong: rgba(6,20,36,0.28);
  --ghost-border:rgba(6,20,36,0.3);
  --accent-text: var(--black);
  --icon:        var(--black);
  --mark:        linear-gradient(transparent 62%, rgba(var(--lime-rgb),0.9) 62%);
  --tag-fg:      var(--black);
  --tag-bg:      var(--lime);
  --tag-pad:     0.4em 0.7em;
  --hover-tint:  rgba(var(--lime-rgb),0.18);
  --link-hover:  var(--black);
  --focus:       var(--black);
  --seat-off:    rgba(6,20,36,0.12);
  --seat-on:     var(--black);
  --danger-text: #b3261e;
  --shadow:      0 8px 30px rgba(6,20,36,0.22);
  --icon-sun: none; --icon-moon: block;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg:          #f4f5f2;
    --bg-rgb:      244, 245, 242;
    --surface:     #f4f5f2;
    --raised:      #ffffff;
    --hover-bg:    #ffffff;
    --tile:        rgba(6,20,36,0.04);
    --field:       #ffffff;
    --text:        #061424;
    --text-strong: rgba(6,20,36,0.92);
    --text-soft:   rgba(6,20,36,0.78);
    --text-dim:    rgba(6,20,36,0.72);
    --muted:       #56606c;
    --border:      rgba(6,20,36,0.12);
    --border-strong: rgba(6,20,36,0.28);
    --ghost-border:rgba(6,20,36,0.3);
    --accent-text: var(--black);
    --icon:        var(--black);
    --mark:        linear-gradient(transparent 62%, rgba(var(--lime-rgb),0.9) 62%);
    --tag-fg:      var(--black);
    --tag-bg:      var(--lime);
    --tag-pad:     0.4em 0.7em;
    --hover-tint:  rgba(var(--lime-rgb),0.18);
    --link-hover:  var(--black);
    --focus:       var(--black);
    --seat-off:    rgba(6,20,36,0.12);
    --seat-on:     var(--black);
    --danger-text: #b3261e;
    --shadow:      0 8px 30px rgba(6,20,36,0.22);
    --icon-sun: none; --icon-moon: block;
  }
}

/* ─── Basis ─── */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--black); }
a { color: inherit; text-decoration: none; }
strong { color: var(--accent-text); background: var(--mark); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
strong.plain { color: inherit; background: none; font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 500; background: var(--lime); color: var(--black); padding: .75rem 1rem; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { color: var(--link-hover); }

/* ─── Navigation (immer dunkel, wie auf der Website) ─── */
.top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 2.5rem;
  padding: 1.1rem 3rem;
  background: rgba(var(--black-rgb), 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.top-logo { display: flex; align-items: center; gap: .9rem; }
.logo-img {
  display: block; aspect-ratio: 1167 / 391; background-color: var(--lime);
  -webkit-mask: url('/images/logo.svg') no-repeat center / contain;
  mask: url('/images/logo.svg') no-repeat center / contain;
}
.top-logo-mark.logo-img { height: 34px; }
.logo-text { font-family: var(--font-display); color: var(--lime); letter-spacing: .04em; line-height: 1; }
.top-logo-mark.logo-text { font-size: 2.1rem; }
.top-badge {
  font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--black); background: var(--lime); padding: .3em .6em;
}
.top-links { display: flex; gap: 2.2rem; margin-left: auto; }
.nav-link {
  font-size: .75rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 1rem; }
.testmode {
  font-size: .62rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--lime); border: 1px dashed rgba(var(--lime-rgb), .5); padding: .35em .6em;
}
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: none; border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--lime); border-color: var(--lime); }
.theme-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun  { display: var(--icon-sun); }
.theme-toggle .i-moon { display: var(--icon-moon); }
/* Icon-Variablen kommen von :root, nicht vom (immer dunklen) Nav-Scope */
.top { --icon-sun: inherit; --icon-moon: inherit; }

/* ─── Seitenrahmen ─── */
.wrap { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 4.5rem 3rem 6rem; }
.is-admin .wrap { max-width: 1180px; }

.page-head { margin-bottom: 2.5rem; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.tag {
  display: inline-block; font-size: .65rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tag-fg); background: var(--tag-bg); padding: var(--tag-pad); margin-bottom: 1rem;
}
.heading {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 6vw, 5.5rem); line-height: .95; letter-spacing: .03em; text-transform: uppercase;
}
.heading-detail { font-size: clamp(2.6rem, 5vw, 4.4rem); margin: .6rem 0 2.5rem; }
.heading-status { font-size: clamp(3rem, 7vw, 5.5rem); margin-bottom: 1.25rem; }
.sub-heading { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.25rem; }
.lead { font-size: 1.05rem; font-weight: 300; color: var(--text-dim); line-height: 1.8; max-width: 60ch; margin-top: 1.5rem; }
.page-head .lead { margin-top: 1.75rem; }
.divider { height: 1px; background: var(--border); margin: 0 0 3.5rem; }

.back {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 2.5rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
  transition: color .2s;
}
.back::before { content: ''; width: 18px; height: 1px; background: currentColor; transition: width .2s; }
.back:hover { color: var(--text); }
.back:hover::before { width: 26px; }
.back-bottom { margin: 3rem 0 0; }

/* Kategorie: Lime-Etikett wie .kurs-badge */
.cat {
  display: inline-block; align-self: flex-start;
  background: var(--lime); color: var(--black);
  font-size: .62rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  padding: .32rem .7rem;
}
.cat-sm { font-size: .56rem; padding: .22rem .5rem; }
.flag {
  display: inline-block; font-size: .58rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border-strong); padding: .18rem .45rem;
}
.flag-red { color: var(--danger-text); border-color: currentColor; }

/* ─── Terminliste ─── */
.month { margin-bottom: 4rem; }
.month-title {
  font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 1rem;
}
.event-list { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.event-row {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 96px 1fr auto; gap: 2.25rem; align-items: center;
  padding: 1.75rem 2rem 1.75rem 1.75rem;
  background: var(--bg);
  transition: background .3s;
}
.event-row::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--lime); transition: width .4s ease;
}
.event-row:hover { background: var(--hover-bg); }
.event-row:hover::after { width: 100%; }
.ev-date { display: grid; justify-items: start; line-height: 1; }
.ev-day {
  font-family: var(--font-display); font-size: 3.6rem; color: var(--accent-text);
  background: var(--mark); letter-spacing: .02em;
}
.ev-mon, .ev-wd { font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }
.ev-wd { margin-top: .2rem; font-weight: 400; }
.ev-main { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.ev-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.ev-meta { font-size: .95rem; color: var(--text-soft); }
.ev-place { font-size: .85rem; font-weight: 300; color: var(--muted); }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; text-align: right; }
.ev-price { font-family: var(--font-display); font-size: 2rem; line-height: 1; letter-spacing: .03em; }

/* Plätze als Kästchen – vergeben = gefüllt */
.seats { display: inline-flex; flex-direction: column; gap: .45rem; align-items: inherit; }
.ev-side .seats { align-items: flex-end; }
.seat-boxes { display: inline-flex; gap: 3px; flex-wrap: wrap; max-width: 150px; }
.ev-side .seat-boxes { justify-content: flex-end; }
.seat-boxes i { width: 9px; height: 9px; background: var(--seat-off); }
.seat-boxes i.on { background: var(--seat-on); }
.seats-text { white-space: nowrap; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.seats.is-few .seats-text { color: var(--accent-text); background: var(--mark); }
.seats.is-full .seats-text { color: var(--muted); }

.empty { border: 1px solid var(--border); padding: 3rem; display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; color: var(--text-soft); }

/* ─── Termindetail ─── */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 4.5rem; align-items: start; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.facts > div { padding: 1.25rem 1.25rem 1.25rem 0; }
.facts dt { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.facts dd { font-size: .95rem; color: var(--text); line-height: 1.55; }
.facts-tight { margin: 1.5rem 0; }
.price-big { font-family: var(--font-display); font-size: 2.2rem !important; line-height: 1 !important; letter-spacing: .03em; }

/* Beschreibung aus dem Editor */
.prose { font-size: 1rem; font-weight: 300; color: var(--text-soft); line-height: 1.85; max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text); line-height: 1.05; margin-top: 1.8em;
}
.prose h2 { font-size: 2rem; } .prose h3 { font-size: 1.6rem; } .prose h4 { font-size: 1.3rem; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose ul li::marker { color: var(--accent-text); }
.prose blockquote { border-left: 2px solid var(--lime); padding-left: 1.25rem; color: var(--text); font-weight: 400; }
.prose img { max-width: 100%; height: auto; display: block; }
.prose img[style*="float: left"], .prose img[style*="float:left"] { margin: .3em 1.5em 1em 0; }
.prose img[style*="float: right"], .prose img[style*="float:right"] { margin: .3em 0 1em 1.5em; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.prose table tbody, .prose table thead { display: table; width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { font-weight: 600; color: var(--text); background: var(--tile); }

/* Buchungs-Panel */
.panel { border: 1px solid var(--border); background: var(--tile); padding: 2rem; }
.book { position: sticky; top: 6.5rem; }
.panel-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; margin-bottom: 1.5rem; }
.note { font-size: .88rem; font-weight: 300; color: var(--text-dim); line-height: 1.7; }
.note.small { font-size: .78rem; }
.panel .note + .form, .panel .note { margin-bottom: 1.25rem; }
.form .note { margin: 0; }

/* ─── Formulare ─── */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.label { font-size: .6rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.label em { font-style: normal; font-weight: 400; letter-spacing: .1em; text-transform: none; color: var(--muted); opacity: .8; margin-left: .3em; }
input, textarea, select { font: inherit; color: inherit; }
.field input, .field textarea, .num-input, .repeat-line input[type="date"] {
  width: 100%; background: var(--field); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 0;
  padding: .8rem .9rem; font-size: .95rem; font-weight: 400;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:hover, .field textarea:hover { border-color: var(--ghost-border); }
.field input:focus, .field textarea:focus, .num-input:focus, .repeat-line input:focus {
  outline: none; border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime);
}
:root[data-theme="light"] .field input:focus, :root[data-theme="light"] .field textarea:focus,
:root[data-theme="light"] .num-input:focus, :root[data-theme="light"] .repeat-line input:focus { border-color: var(--black); box-shadow: 0 0 0 1px var(--black); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .field input:focus, :root:not([data-theme="dark"]) .field textarea:focus,
  :root:not([data-theme="dark"]) .num-input:focus, :root:not([data-theme="dark"]) .repeat-line input:focus { border-color: var(--black); box-shadow: 0 0 0 1px var(--black); }
}
input[type="date"], input[type="time"] { min-height: 3rem; }
.field input:user-invalid, .field [aria-invalid="true"] { border-color: var(--danger-text); }
.field-error { font-size: .78rem; line-height: 1.45; color: var(--danger-text); }
.check.is-invalid span { color: var(--danger-text); }
.check + .field-error { margin-top: -.6rem; padding-left: calc(18px + .8rem); }

.check { display: flex; gap: .8rem; align-items: flex-start; font-size: .86rem; font-weight: 300; color: var(--text-soft); line-height: 1.6; cursor: pointer; }
.check input, .radio input { accent-color: var(--lime); width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; }
:root[data-theme="light"] .check input, :root[data-theme="light"] .radio input { accent-color: var(--black); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ─── Buttons (wie Website) ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: 1rem 2rem; min-height: 3.1rem;
  font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  cursor: pointer; border: none; border-radius: 0; transition: all .25s; text-align: center;
}
.btn-primary { background: var(--lime); color: var(--black); }
.btn-primary:hover { background: var(--lime-hover); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--ghost-border); }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger { background: transparent; color: var(--danger-text); border: 1px solid currentColor; }
.btn-danger:hover { background: var(--danger-text); color: var(--bg); }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem .9rem; min-height: 2.3rem; font-size: .64rem; letter-spacing: .14em; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Hinweise */
.alert { border-left: 2px solid var(--lime); background: var(--hover-tint); padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: .92rem; color: var(--text); }
.alert-error { border-left-color: var(--danger-text); background: rgba(255, 107, 87, .08); }
.alert ul { margin: .5rem 0 0 1.1rem; }

/* ─── Buchungsstatus ─── */
.booking { max-width: 720px; }
.booking .lead { margin: 0 0 2.5rem; }
.booking-title { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; line-height: 1; letter-spacing: .04em; text-transform: uppercase; margin-top: .8rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.actions form { margin: 0; }
.cancel { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.cancel summary, .rest summary { cursor: pointer; font-size: .72rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.cancel[open] summary { margin-bottom: 1rem; }
.cancel .note { margin-bottom: 1rem; }

.status {
  display: inline-block; font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: .28rem .55rem; border: 1px solid transparent; white-space: nowrap;
}
.s-paid { background: var(--lime); color: var(--black); }
.s-pending { color: var(--text); border-color: var(--icon); }
.s-waitlist { color: var(--text-soft); border-color: var(--border-strong); border-style: dashed; }
.s-expired, .s-cancelled { color: var(--muted); border-color: var(--border); }

/* ─── Admin: Tabellen ─── */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-size: .58rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 1.1rem; border-top: 1px solid var(--border); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: var(--hover-tint); }
.table .num { text-align: right; white-space: nowrap; }
.table .seats { align-items: flex-start; }
.row-link { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; }
.row-link:hover { color: var(--link-hover); }
.row-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
tr.is-dim td { opacity: .55; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline-block; margin: .15rem 0 .15rem .35rem; }
.note-inline { margin-top: .4rem; font-style: italic; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 3rem; }
.toolbar form { margin: 0; }
.rest { margin-top: 1.5rem; }
.rest[open] summary { margin-bottom: 1rem; }

/* ─── Admin: Terminformular ─── */
.event-form { border-top: 1px solid var(--border); }
.fs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; padding: 2.5rem 0; border-bottom: 1px solid var(--border); }
.fs-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1; color: var(--text); }
.fs-body { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }

.title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: end; }
.field-title input {
  font-family: var(--font-display); font-size: 2.1rem; letter-spacing: .04em; text-transform: uppercase;
  padding: .45rem .8rem; line-height: 1.1;
}
.field-title input::placeholder { text-transform: uppercase; }

/* Kategorie als Pille mit Dropdown */
.pill-select { position: relative; display: inline-flex; align-self: flex-start; }
.pill-select select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--lime); color: var(--black);
  border: 0; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  padding: .85rem 2.6rem .85rem 1.25rem; min-height: 3.1rem;
}
.pill-select::after {
  content: ''; position: absolute; right: 1.15rem; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid var(--black); border-bottom: 2px solid var(--black); transform: rotate(45deg); pointer-events: none;
}
.pill-select select:hover { background: var(--lime-hover); }
.pill-select select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.pill-select select option { background: var(--raised); color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; }
.pill-select-sm select { min-height: 2.6rem; padding: .6rem 2.3rem .6rem 1rem; font-size: .66rem; }
.pill-select-sm::after { right: 1rem; }

.time-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.time-grid .field:nth-child(3) { padding-left: 1rem; border-left: 1px solid var(--border); }
.two-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 1rem; }

/* Segment-Schalter */
.seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-strong); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; padding: .75rem 1.3rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  transition: background .2s, color .2s;
}
.seg label + label span { border-left: 1px solid var(--border-strong); }
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -4px; }
.seg label:hover input:not(:checked) + span { color: var(--text); }

.repeat-box { display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem 1.5rem; background: var(--tile); border-left: 2px solid var(--lime); }
.repeat-line { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; font-size: .95rem; color: var(--text-soft); }
.repeat-word { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.num-input { width: 5.2rem !important; text-align: center; font-variant-numeric: tabular-nums; }
.repeat-line input[type="date"] { width: auto; }
.radio { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; min-width: 9.5rem; }
.radio input { margin: 0; }

.extras { border-top: 1px dashed var(--border-strong); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.extras-head h3 { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text); }
.extras-head p { margin-top: .25rem; }
#extraRows { display: flex; flex-direction: column; gap: .75rem; }
#extraRows:empty { display: none; }
.extra-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; }
.extra-row.is-new { animation: rowIn .3s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }
.icon-btn {
  width: 3rem; height: 3rem; background: none; border: 1px solid var(--border-strong); color: var(--muted);
  cursor: pointer; font-size: .9rem; transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--danger-text); border-color: var(--danger-text); }
.extras > .btn { align-self: flex-start; }
.extras > .btn span { font-size: 1.1rem; line-height: 0; }

/* Vorschau der Termine */
.preview { display: flex; flex-direction: column; gap: .8rem; }
.preview:empty { display: none; }
.preview-head { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.preview-head b { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; color: var(--accent-text); background: var(--mark); font-weight: 400; margin-right: .35rem; vertical-align: -2px; }
.preview-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; }
.preview-list li { font-size: .78rem; padding: .35rem .6rem; border: 1px solid var(--border); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.preview-list li.is-extra { border-style: dashed; border-color: var(--border-strong); }
.preview-list li.more { border: 0; color: var(--muted); }
.preview-errors { color: var(--danger-text); font-size: .85rem; list-style: none; }

.scope-list { display: flex; flex-direction: column; gap: .8rem; }
.scope-list .radio { min-width: 0; font-size: .95rem; color: var(--text); }
.place { font-size: 1rem; color: var(--text); padding: .9rem 1rem; border: 1px solid var(--border); background: var(--tile); }
[data-show-when][hidden] { display: none !important; }

.submit-bar {
  position: sticky; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-end; gap: 2rem;
  padding: 1.1rem 0; margin-top: 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.submit-info { font-size: .85rem; color: var(--text-soft); }

/* ─── Editor (Jodit) an das Theme anpassen ─── */
.is-admin {
  --jd-color-background-default: var(--field);
  --jd-color-panel: var(--raised);
  --jd-color-text: var(--text);
  --jd-color-icon: var(--text);
  --jd-color-text-icons: var(--text);
  --jd-color-label: var(--muted);
  --jd-color-border: var(--border-strong);
  --jd-color-separator: var(--border);
  --jd-color-placeholder: var(--muted);
  --jd-color-background-light-gray: var(--tile);
  --jd-color-background-button-hover: var(--hover-tint);
  --jd-color-button-background-hover: var(--hover-tint);
  --jd-color-button-background-hover-opacity40: var(--hover-tint);
  --jd-color-button-background-hover-opacity60: var(--hover-tint);
  --jd-color-background-gray-hover: var(--hover-tint);
  --jd-color-background-selection: rgba(var(--lime-rgb), .35);
  --jd-color-border-selected: var(--lime);
  --jd-color-background-active: var(--lime);
  --jd-border-radius-default: 0;
  --jd-font-default: var(--font-body);
}
.jodit-container:not(.jodit_inline) { border-radius: 0 !important; border-color: var(--border-strong) !important; background: var(--field) !important; }
.jodit-container:not(.jodit_inline):focus-within { border-color: var(--focus) !important; box-shadow: 0 0 0 1px var(--focus); }
.jodit-toolbar__box:not(:empty) { background: var(--raised) !important; border-bottom-color: var(--border) !important; border-radius: 0 !important; }
.jodit-toolbar-button__button, .jodit-toolbar-button__trigger, .jodit-toolbar-select__button { color: var(--text) !important; }
.jodit-toolbar-button svg, .jodit-toolbar-button__trigger svg, .jodit-ui-button svg, .jodit-popup svg { fill: var(--text) !important; }
.jodit-toolbar-button_active .jodit-toolbar-button__button, .jodit-toolbar-button[aria-pressed="true"] .jodit-toolbar-button__button { background: var(--hover-tint) !important; }
.jodit-wysiwyg { color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.75; padding: 1.1rem 1.25rem !important; }
.jodit-wysiwyg h2, .jodit-wysiwyg h3, .jodit-wysiwyg h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; }
.jodit-wysiwyg h2 { font-size: 2rem; } .jodit-wysiwyg h3 { font-size: 1.6rem; } .jodit-wysiwyg h4 { font-size: 1.3rem; }
.jodit-wysiwyg a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; }
.jodit-wysiwyg table td, .jodit-wysiwyg table th { border: 1px solid var(--border-strong); padding: .5rem .7rem; }
.jodit-wysiwyg strong { background: none; color: inherit; }
.jodit-status-bar { background: var(--raised) !important; color: var(--muted) !important; border-top: 1px solid var(--border) !important; border-radius: 0 !important; }
.jodit-status-bar a { color: var(--muted) !important; }
.jodit-popup, .jodit-dialog__panel, .jodit-ui-list__dropdown { background: var(--raised) !important; color: var(--text) !important; border-radius: 0 !important; box-shadow: var(--shadow) !important; }
.jodit-dialog__header, .jodit-dialog__footer { border-color: var(--border) !important; }
.jodit-ui-input__input, .jodit-ui-text-area__input, .jodit-ui-select__input, .jodit-ui-input { background: var(--field) !important; color: var(--text) !important; border-color: var(--border-strong) !important; border-radius: 0 !important; }
.jodit-ui-button_variant_primary { background: var(--lime) !important; color: var(--black) !important; border-radius: 0 !important; }
.jodit-ui-button_variant_primary svg { fill: var(--black) !important; }
.jodit-ui-checkbox__input { accent-color: var(--lime); }
.jodit-placeholder { color: var(--muted) !important; }
.jodit-source__mirror { background: var(--raised) !important; color: var(--text) !important; }

/* ─── Zahlarten ─── */
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pay-choice { border: 0; display: flex; flex-direction: column; gap: .6rem; margin: .2rem 0 0; }
.pay-choice legend { margin-bottom: .5rem; }
.pay-opt {
  display: flex; gap: .8rem; align-items: flex-start; cursor: pointer;
  padding: .85rem 1rem; border: 1px solid var(--border-strong); transition: border-color .2s, background .2s;
}
.pay-opt:hover { border-color: var(--ghost-border); }
.pay-opt:has(input:checked) { border-color: var(--icon); background: var(--hover-tint); }
.pay-opt input { accent-color: var(--lime); width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; }
:root[data-theme="light"] .pay-opt input { accent-color: var(--black); }
.pay-opt span { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; color: var(--text); }
.pay-opt em { font-style: normal; font-size: .8rem; font-weight: 300; color: var(--text-dim); line-height: 1.55; }
.bank { border: 1px solid var(--border); padding: 1.25rem 1.4rem; margin: 0 0 1.5rem; }
.bank dl { display: grid; gap: .45rem; margin: .7rem 0 1rem; }
.bank dl div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; }
.bank dt { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-top: .2rem; }
.bank dd { font-size: .95rem; color: var(--text); word-break: break-word; }
.mono-ish { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.s-onsite { color: var(--text); border-color: var(--border-strong); }
.s-noshow { color: var(--danger-text); border-color: currentColor; }
.danger-text { color: var(--danger-text); }
tr.is-overdue td { background: rgba(255, 107, 87, .06); }
.overdue-list { margin: .6rem 0 0 1.1rem; }
.overdue-list li + li { margin-top: .25rem; }
@media (max-width: 480px) {
  .name-row { grid-template-columns: 1fr; }
  .bank dl div { grid-template-columns: 1fr; gap: .1rem; }
}

/* ─── Online-Kurse ─── */
.ev-thumb { width: 96px; height: 96px; background: var(--tile) center / cover no-repeat; border: 1px solid var(--border); }
.ev-day-sm { font-size: 2.4rem; }
.event-row.is-online .seats-text { color: var(--accent-text); background: var(--mark); }
.detail-image { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; margin: 0 0 2.5rem; border: 1px solid var(--border); }
.pill-static {
  display: inline-flex; align-items: center; align-self: flex-start; min-height: 3.1rem;
  padding: 0 1.25rem; border-radius: 999px; background: var(--lime); color: var(--black);
  font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.sub-heading-gap { margin-top: 4.5rem; }

/* ─── Abgesagte Termine ─── */
.cancelled-badge {
  display: inline-block; align-self: flex-start;
  font-size: .62rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--danger-text); border: 1px solid currentColor; padding: .3rem .65rem;
}
.event-row.is-cancelled { background: var(--bg); }
.event-row.is-cancelled .ev-date, .event-row.is-cancelled .ev-title,
.event-row.is-cancelled .ev-meta, .event-row.is-cancelled .cat { opacity: .45; }
.event-row.is-cancelled .ev-title { text-decoration: line-through; text-decoration-thickness: 2px; }
.event-row.is-cancelled .ev-day { background: none; }
.event-row.is-cancelled:hover::after { background: var(--danger-text); }
.ev-note { font-size: .85rem; color: var(--danger-text); }
.detail-main.is-cancelled .heading { opacity: .5; text-decoration: line-through; text-decoration-thickness: 3px; }
.detail-main.is-cancelled .facts { opacity: .7; }
.lead-tight { margin: 0 0 2rem; }
.inline-form { display: inline-block; margin: .6rem 0 0; }
.alert .inline-form { display: block; }

/* ─── Dialoge ─── */
.dlg {
  margin: auto; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  background: var(--raised); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); padding: 0;
}
.dlg::backdrop { background: rgba(var(--black-rgb), .7); backdrop-filter: blur(3px); }
.dlg form { display: flex; flex-direction: column; gap: 1.4rem; padding: 2rem; }
.dlg-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.dlg .note { margin: 0; }
.dlg .scope-list { gap: .7rem; }
.dlg .scope-list .label { margin-bottom: .1rem; }
.dlg .radio em { font-style: normal; font-size: .82rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid var(--border); }
.dlg[open] { animation: dlgIn .2s ease; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px); } }

/* ─── Footer (immer dunkel) ─── */
.foot {
  background: var(--bg); color: var(--text);
  padding: 2.5rem 3rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.foot-logo.logo-img { height: 28px; opacity: .8; }
.foot-logo.logo-text { font-size: 1.7rem; opacity: .8; }
.foot-copy { font-size: .7rem; letter-spacing: .1em; color: var(--muted); }
.foot-links { display: flex; gap: 2rem; }
.foot-links a { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.foot-links a:hover { color: var(--text); }

/* ─── Responsiv ─── */
@media (max-width: 1000px) {
  .detail { grid-template-columns: 1fr; gap: 3rem; }
  .book { position: static; }
  .fs { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 900px) {
  .top { padding: .9rem 1.5rem; gap: 1rem; }
  .top-links { gap: 1.2rem; }
  .nav-link { font-size: .64rem; letter-spacing: .12em; }
  .wrap { padding: 3rem 1.5rem 5rem; }
  .foot { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
  .time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .time-grid .field:nth-child(3) { padding-left: 0; border-left: 0; }
  .extra-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
  .extra-row .icon-btn { grid-column: 1 / -1; width: 100%; height: 2.4rem; }
}
@media (max-width: 640px) {
  .top-links .nav-link:first-child { display: none; }
  .is-admin .top-links { display: none; }
  .testmode { display: none; }
  .page-head-row { flex-direction: column; align-items: flex-start; }
  .event-row { grid-template-columns: 64px 1fr; gap: 1.1rem 1.25rem; padding: 1.4rem 1.25rem; }
  .ev-day { font-size: 2.8rem; }
  .ev-thumb { width: 64px; height: 64px; }
  .ev-day-sm { font-size: 1.8rem; }
  .ev-title { font-size: 1.65rem; }
  .ev-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .ev-side .seats { align-items: flex-end; }
  .ev-price { font-size: 1.6rem; }
  .panel { padding: 1.5rem; }
  .title-row { grid-template-columns: 1fr; }
  .field-title input { font-size: 1.7rem; }
  .two-grid { grid-template-columns: 1fr 1fr; }
  .radio { min-width: 0; }
  .submit-bar { justify-content: space-between; gap: 1rem; }
  .row-actions { white-space: normal; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
