/* =========================================================
   ZeitRaum – Stylesheet
   Farben & Schriften zentral in :root anpassen.
   ========================================================= */

/* Schriften lokal einbinden (DSGVO: kein Google-CDN).
   Dateien z. B. über https://gwfh.mranftl.com/fonts laden
   und in assets/fonts/ ablegen. Fehlen sie, greifen die Fallbacks. */
@font-face { font-family: "Spectral"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/spectral-v15-latin-300.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/spectral-v15-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-v19-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/source-sans-3-v19-latin-600.woff2") format("woff2"); }

:root {
  /* Grundpalette */
  --paper:     #EEF0EB;  /* Kalkstein */
  --paper-2:   #E2E6DE;  /* abgesetzte Sektionen */
  --white:     #FBFBF8;
  --ink:       #1F2A2E;  /* Schiefer */
  --ink-soft:  #4B575B;
  --moss:      #4E5F4A;
  --moss-dark: #3B4938;
  --brass:     #9A7B3F;
  --line:      rgba(31, 42, 46, .16);

  /* Kalender */
  --free:       #EFD27C;
  --free-hover: #E6C25A;
  --free-ink:   #4A3A0C;
  --booked:     #9C3B3B;
  --booked-ink: #FFF6F4;

  --font-display: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --radius-s: 4px;
  --radius-m: 10px;
  --header-h: 92px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--moss-dark); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.22rem; color: var(--ink); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; }

/* ---------- Foto-Platzhalter ---------- */
.ph {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(78, 95, 74, .07) 14px 15px),
    var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  display: grid; place-items: center; overflow: hidden;
}
.ph::after {
  content: attr(data-label); font-size: .82rem; color: var(--ink-soft);
  background: var(--paper); padding: .3em .7em; border-radius: 2px; text-align: center; max-width: 85%;
}
.ph-tall { aspect-ratio: 3 / 4; }
.ph-portrait { aspect-ratio: 4 / 5; }
.ph-square { aspect-ratio: 1; }
.ph-wide { aspect-ratio: 16 / 9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 var(--font-body); padding: .95rem 1.5rem; border-radius: var(--radius-s);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--moss); color: var(--white); }
.btn-primary:hover { background: var(--moss-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn[disabled] { opacity: .55; cursor: wait; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: #fffefe;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand img { height: 60px; width: auto; }
.site-nav { display: flex; gap: clamp(.8rem, 2vw, 1.8rem); }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 1.1rem; padding: .3rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); border-bottom-color: var(--brass); }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: var(--ink); position: relative; transition: transform .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; } .nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 var(--section); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; grid-template-areas: "title media" "copy media";
  column-gap: clamp(2rem, 6vw, 5rem); align-items: end;
}
.hero-title {
  grid-area: title; margin: 0 0 2rem; font-weight: 300; line-height: .86;
  font-size: clamp(4.5rem, 14vw, 11rem); letter-spacing: -.035em;
  font-family: monospace;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-title span.small {display: inline; margin-left: -40px;}
.hero-raum { padding-left: .9em; color: var(--moss); position: relative; }
.hero-copy { grid-area: copy; max-width: 34rem; }
.hero-lead { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-media { grid-area: media; align-self: stretch; display: flex; align-items: end; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; grid-template-areas: "title" "media" "copy"; }
  .hero-media { margin-bottom: 2rem; }
  .hero-media .ph { aspect-ratio: 4 / 3; }
  .hero-title span.small {margin-left: -10px;}
}

/* ---------- Sektionen ---------- */
.section { padding: var(--section) 0; }
.section-alt { background: var(--paper-2); }
.section-alt .ph { background-color: var(--paper); }
.section-alt .ph::after { background: var(--paper-2); }
/* ---------- Video ---------- */
.section-video { background: var(--ink); }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; max-width: 1080px; margin: 0 auto;
  border-radius: var(--radius-m); overflow: hidden; background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.video-frame iframe,
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { object-fit: cover; }
.video-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.25rem; padding: 1.5rem; text-align: center;
  background: linear-gradient(to top, rgba(31, 42, 46, .85), rgba(31, 42, 46, .25) 60%);
}
.video-consent p { max-width: 34rem; margin: 0; color: var(--white); font-size: .9rem; line-height: 1.45; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.video-consent a { color: var(--white); }
.video-play {
  display: grid; place-items: center; width: clamp(64px, 10vw, 88px); aspect-ratio: 1; border: 0; border-radius: 50%;
  background: var(--white); color: var(--moss-dark); cursor: pointer; transition: transform .2s, background .2s;
}
.video-play svg { width: 42%; height: 42%; margin-left: 8%; fill: currentColor; }
.video-play:hover { transform: scale(1.06); background: var(--free); }
.video-play:focus-visible { outline: 3px solid var(--free); outline-offset: 4px; }
@media (max-width: 560px) {
  .video-consent { gap: .75rem; padding: 1rem; }
  .video-consent p { font-size: .78rem; }
}

.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); }
.sub-head { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* ---------- Kalender ---------- */
.calendar { background: var(--white); border-radius: var(--radius-m); padding: clamp(1rem, 3vw, 2.25rem); border: 1px solid var(--line); max-width: 860px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.cal-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.cal-nav {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--ink);
}
.cal-nav:hover:not([disabled]) { border-color: var(--ink); }
.cal-nav[disabled] { opacity: .3; cursor: default; }
.cal-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays span { text-align: center; font-size: .85rem; color: var(--ink-soft); padding-bottom: .4rem; }
.cal-day {
  aspect-ratio: 1 / .72; border: 0; border-radius: var(--radius-s); font: 600 1.05rem var(--font-body);
  display: flex; align-items: flex-start; justify-content: flex-start; padding: .45rem .55rem;
}
.cal-day.is-free { background: var(--free); color: var(--free-ink); cursor: pointer; transition: background-color .12s, transform .12s; }
.cal-day.is-free:hover { background: var(--free-hover); transform: translateY(-1px); }
.cal-day.is-booked { background: var(--booked); color: var(--booked-ink); cursor: not-allowed; }
/* Halbtags belegt: oben links = Vormittag, unten rechts = Nachmittag */
.cal-day.is-am, .cal-day.is-pm { cursor: pointer; transition: transform .12s, filter .12s; }
.cal-day.is-am { background: linear-gradient(to bottom right, var(--booked) 50%, var(--free) 50%); color: var(--booked-ink); }
.cal-day.is-pm { background: linear-gradient(to bottom right, var(--free) 50%, var(--booked) 50%); color: var(--free-ink); }
.cal-day.is-am:hover, .cal-day.is-pm:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cal-day.is-past { background: transparent; color: rgba(31, 42, 46, .3); font-weight: 400; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-day.is-empty { background: transparent; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; font-size: .92rem; color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: .5rem; }
.dot { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.dot-free { background: var(--free); } .dot-booked { background: var(--booked); }
.dot-am { background: linear-gradient(to bottom right, var(--booked) 50%, var(--free) 50%); }
.dot-pm { background: linear-gradient(to bottom right, var(--free) 50%, var(--booked) 50%); }
.modal-note { margin: 0 0 1.25rem; padding: .75rem 1rem; border-left: 4px solid var(--booked); background: rgba(156, 59, 59, .08); border-radius: var(--radius-s); }
.cal-error { margin-top: 1rem; color: var(--booked); }
.calendar.is-loading .cal-grid { opacity: .4; }
@media (max-width: 520px) {
  .cal-weekdays, .cal-grid { gap: 3px; }
  .cal-day { aspect-ratio: 1; font-size: .92rem; justify-content: center; align-items: center; padding: 0; }
  /* Zahl bleibt oben links, damit sie nicht auf der Farbgrenze steht */
  .cal-day.is-am, .cal-day.is-pm { justify-content: flex-start; align-items: flex-start; padding: .15rem .3rem; font-size: .8rem; }
}

/* ---------- Veranstaltungen ---------- */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); max-width: 960px; }
.event {
  display: grid; grid-template-columns: 7.5rem 1fr auto; gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0; border-bottom: 1px solid var(--line); align-items: start;
}
.event-date { font-family: var(--font-display); line-height: 1; }
.event-day { font-size: 3.2rem; font-weight: 300; display: block; }
.event-month { font-size: 1.05rem; display: block; margin-top: .3rem; }
.event-weekday { font-family: var(--font-body); font-size: .88rem; color: var(--ink-soft); display: block; margin-top: .35rem; }
.event-title { font-size: 1.6rem; margin: 0 0 .35rem; }
.event-meta { color: var(--brass); font-weight: 600; font-size: .95rem; margin-bottom: .7rem; }
.event-media { margin: 0 0 1rem; max-width: 34rem; }
.event-media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius-s); cursor: zoom-in; transition: opacity .15s;
}
.event-media img:hover { opacity: .9; }
.event-text { white-space: pre-line; color: var(--ink-soft); max-width: 38rem; margin: 0; }
.event-link { display: inline-block; margin-top: .8rem; }
.event-action { align-self: center; text-align: right; }
.event-full { font-size: .92rem; color: var(--booked); font-weight: 600; }
.event-spots { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: .5rem; }
.event-empty { padding: 2rem 0; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
@media (max-width: 720px) {
  .event { grid-template-columns: 4.5rem 1fr; }
  .event-day { font-size: 2.4rem; }
  .event-action { grid-column: 2; text-align: left; }
}

/* ---------- Formulare ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(1.25rem, 3vw, 2.25rem); }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 1rem; }
.field-narrow { flex: 0 0 11rem; }
@media (max-width: 560px) { .field-row { flex-direction: column; gap: 0; } .field-narrow { flex-basis: auto; } }
.field label, .legend-2, .subfields legend { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=time], input[type=number], select, textarea {
  font: inherit; color: var(--ink); background: var(--white); width: 100%;
  border: 1px solid rgba(31, 42, 46, .3); border-radius: var(--radius-s); padding: .7rem .8rem; min-height: 48px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(78, 95, 74, .2); }
.is-invalid { border-color: var(--booked) !important; box-shadow: 0 0 0 3px rgba(156, 59, 59, .15) !important; }
.form .subfields { background: var(--paper); border-radius: var(--radius-s); padding: 1rem 1.1rem .4rem; margin-bottom: 1.1rem; }
.subfields legend { float: left; width: 100%; margin-bottom: .6rem; }
.subfields legend + * { clear: both; }
.legend-2 { margin: .6rem 0 .5rem; clear: both; }
.check-group { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: .6rem; clear: both; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; margin-bottom: 1rem; cursor: pointer; }
.check-group .check { margin-bottom: .3rem; }
.check input { width: 20px; height: 20px; margin: .12rem 0 0; accent-color: var(--moss); flex-shrink: 0; }
.captcha { max-width: 22rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0 0 1rem; font-weight: 600; min-height: 0; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--booked); }
.form-status.is-ok { color: var(--moss); }
.form-note { background: var(--paper); padding: 1rem; border-radius: var(--radius-s); color: var(--ink-soft); }
.modal-body > .form-note { margin: 0 0 1.3rem; font-size: .95rem; }

/* ---------- Über ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-text { max-width: 36rem; }
.about-media { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: end; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem 2rem; margin: 2rem 0 0; }
.facts div { border-top: 1px solid var(--line); padding-top: .7rem; }
.facts dt { font-size: .88rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 10px; grid-auto-flow: dense; }
.gallery-item { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-s); overflow: hidden; }
.gallery-item .ph, .gallery-item img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.gallery-item img { transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.03); }
.gi-wide { grid-column: span 2; }
.gi-tall { grid-row: span 2; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } }

.prices { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.prices-intro p { color: var(--ink-soft); max-width: 26rem; }
.price-table { width: 100%; border-collapse: collapse; margin-top: clamp(3rem, 6vw, 4.5rem); }
.price-table th, .price-table td { padding: 1rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.price-table tr:first-child th, .price-table tr:first-child td { border-top: 1px solid var(--ink); }
.price-table th { text-align: left; font-weight: 400; }
.price-table th small { display: block; color: var(--ink-soft); font-size: .88rem; }
.price-table td { text-align: right; font-family: var(--font-display); font-size: 1.3rem; white-space: nowrap; padding-left: 1rem; }
@media (max-width: 820px) { .prices { grid-template-columns: 1fr; } .price-table { margin-top: 0; } }

/* ---------- Leistungen / Accordion ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 6rem); }
.services-intro { color: var(--ink-soft); max-width: 30rem; }
.accordion { border-top: 1px solid var(--ink); margin-top: 1.8rem; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details img {margin-bottom: 10px;}
.accordion summary {
  list-style: none; cursor: pointer; padding: 1.2rem 2.5rem 1.2rem 0; position: relative;
  font-family: var(--font-display); font-size: 1.4rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: 12px; height: 12px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.accordion details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.accordion summary:hover { color: var(--moss); }
.acc-body { padding: 0 0 1.5rem; color: var(--ink-soft); }
.acc-body .ph { margin-bottom: 1rem; }
.services-cta { margin-top: 2rem; }
@media (max-width: 820px) { .services { grid-template-columns: 1fr; } }

/* ---------- Kontakt & Footer ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact h2 { color: var(--white); }
.contact .lead { color: rgba(238, 240, 235, .8); max-width: 26rem; }
.contact a { color: var(--free); }
.contact a:hover { color: var(--white); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-data { font-style: normal; font-size: 1.08rem; }
.contact-data strong { font-weight: 600; }
.contact .ph { background-color: #2B373B; border-color: rgba(255, 255, 255, .12);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .05) 14px 15px); }
.contact .ph::after { background: var(--ink); color: rgba(238, 240, 235, .75); }
@media (max-width: 960px) { .contact-inner { grid-template-columns: 1fr 1fr; } .contact-map { grid-column: 1 / -1; } }
@media (max-width: 600px) { .contact-inner { grid-template-columns: 1fr; } }

.site-footer { background: var(--ink); color: rgba(238, 240, 235, .65); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 1.4rem; padding-bottom: 1.4rem; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1.5rem; }
.footer-inner a { color: rgba(238, 240, 235, .85); }

/* ---------- Dialoge ---------- */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(31, 42, 46, .6); backdrop-filter: blur(2px); }
.modal {
  width: min(640px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem);
  background: var(--white); border-radius: var(--radius-m); overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in .2s ease-out; }
.modal > .form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.5rem 1.75rem 1rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.9rem; margin: 0; }
.modal-date { margin: .3rem 0 0; color: var(--brass); font-weight: 600; }
.modal-sub { margin: .15rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.modal-sub:empty { display: none; }
.modal-close {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.modal-close:hover { border-color: var(--ink); }
.modal-body { padding: 1.4rem 1.75rem .4rem; overflow-y: auto; }
.modal-foot { padding: 1rem 1.75rem 1.5rem; border-top: 1px solid var(--line); background: var(--white); }
.modal-foot .btn { width: 100%; }
.modal-success { padding: 2rem 1.75rem 2rem; }
.modal-success h3 { font-size: 1.7rem; }
.prose p, .prose ul { max-width: 60ch; }
.prose h3 { font-size: 1.3rem; margin: 1.9rem 0 .5rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { margin: 0 0 1em; padding-left: 1.25rem; }
.prose li { margin-bottom: .35em; }
.prose-meta { color: var(--ink-soft); font-size: .92rem; }
.modal-text .modal-body { padding-bottom: 1.5rem; }

.lightbox { background: transparent; max-width: 94vw; max-height: 94dvh; overflow: visible; }
.lightbox img { max-width: 94vw; max-height: 90dvh; object-fit: contain; border-radius: var(--radius-s); }
.lightbox .modal-close { position: absolute; top: -.5rem; right: -.5rem; z-index: 1; }
