/* ═══════════════════════════════════════════════════════════════════════════
   Papier & Tusche — the shared design system.
   Warm paper, dark ink, hairline rules, one ochre accent. Square corners and
   flat surfaces throughout: nothing glows, nothing floats.
   The PDF and PNG card exports use the same palette (server/utils/theme.js).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Jede Palette liefert zwei Sätze: die hellen Werte unter den normalen Namen,
   die dunklen unter --d-*. Welcher Satz gilt, entscheidet allein der Block
   "Dunkle Fassung anwenden" weiter unten. Dadurch steht jede Farbe genau
   einmal, und eine neue Palette braucht keine Logik, nur Werte. */
:root {
  /* Hell */
  --paper:         #F7F4EE;
  --paper-raised:  #FFFDF8;
  --paper-sunk:    #F0ECE3;
  --ink:           #1C1B19;
  --ink-soft:      #413C34;
  --ink-muted:     #6B665E;
  --hairline:      #D8D1C4;
  --hairline-firm: #C0B7A5;
  --accent:        #B4652A;
  --accent-wash:   rgba(180, 101, 42, .09);
  --danger:        #A5342A;
  --ok:            #4C6B50;

  /* Dunkel */
  --d-paper:         #171614;
  --d-paper-raised:  #201E1A;
  --d-paper-sunk:    #121110;
  --d-ink:           #F2EDE3;
  --d-ink-soft:      #D6CEC1;
  --d-ink-muted:     #948C7E;
  --d-hairline:      #34302A;
  --d-hairline-firm: #494339;
  --d-accent:        #D68B4A;
  --d-accent-wash:   rgba(214, 139, 74, .12);
  --d-danger:        #D9705F;
  --d-ok:            #8FB795;
  --d-shadow-sheet: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --condensed: 'Oswald', 'Arial Narrow', 'Liberation Sans Narrow', sans-serif;

  /* Roles, not families. A style swaps these three; the rest of the stylesheet
     never names a typeface directly. */
  --font-display: var(--serif);
  --font-body: var(--serif);
  --font-ui: var(--sans);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --shadow-sheet: 0 1px 2px rgba(28, 27, 25, .04), 0 8px 24px rgba(28, 27, 25, .05);
  /* Strength of the plan ruling in the masthead — the one knob a colour world
     turns besides the palette itself. */
  --grid-opacity: .035;
}

/* ── Dunkle Fassung anwenden ──────────────────────────────────────────────────
   Zwei Auslöser, ein und dieselbe Zuordnung:

     data-appearance="auto"   folgt der Einstellung des Geräts (Grundzustand)
     data-appearance="light"  bleibt hell, auch auf einem dunkel gestellten Gerät
     data-appearance="dark"   bleibt dunkel, auch auf einem hell gestellten

   Die Auswahl steht im Admin und gilt für alle Paletten gleichermaßen. Die
   Zuordnung ist bewusst allgemein gehalten — sie kennt keine einzige Palette. */

@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) {
    --paper:         var(--d-paper);
    --paper-raised:  var(--d-paper-raised);
    --paper-sunk:    var(--d-paper-sunk);
    --ink:           var(--d-ink);
    --ink-soft:      var(--d-ink-soft);
    --ink-muted:     var(--d-ink-muted);
    --hairline:      var(--d-hairline);
    --hairline-firm: var(--d-hairline-firm);
    --accent:        var(--d-accent);
    --accent-wash:   var(--d-accent-wash);
    --danger:        var(--d-danger);
    --ok:            var(--d-ok);
    --shadow-sheet:  var(--d-shadow-sheet);
  }
}

:root[data-appearance="dark"] {
  --paper:         var(--d-paper);
  --paper-raised:  var(--d-paper-raised);
  --paper-sunk:    var(--d-paper-sunk);
  --ink:           var(--d-ink);
  --ink-soft:      var(--d-ink-soft);
  --ink-muted:     var(--d-ink-muted);
  --hairline:      var(--d-hairline);
  --hairline-firm: var(--d-hairline-firm);
  --accent:        var(--d-accent);
  --accent-wash:   var(--d-accent-wash);
  --danger:        var(--d-danger);
  --ok:            var(--d-ok);
  --shadow-sheet:  var(--d-shadow-sheet);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
svg { display: block; }

/* Icons are drawn with <use>. An <svg> without explicit dimensions falls back
   to 300 × 150 px and tears the layout apart, so every unsized icon gets a
   sensible default; the component rules below override it where needed.
   The hidden sprite carries width="0" and is deliberately left alone. */
svg:not([width]) { width: 1rem; height: 1rem; flex: 0 0 auto; }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Layout primitives ─────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule { height: 1px; background: var(--hairline); border: 0; }
.rule-accent { width: 3.25rem; height: 2px; background: var(--accent); border: 0; }

/* Small letterspaced annotations, like the notes on a technical drawing. */
.label {
  font-family: var(--font-ui);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.label-num { color: var(--accent); }

/* ── Typography ────────────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.015em;
  color: var(--ink);
}
.prose {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8125rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-firm);
}
.btn-quiet:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); border-color: var(--danger); }

.btn-sm { padding: .4375rem .875rem; font-size: .8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn svg { width: 1rem; height: 1rem; stroke-width: 1.6; }

/* Text link with an underline that grows on hover. */
.link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  white-space: nowrap;
  font-size: .9375rem;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-firm);
  padding-bottom: 2px;
  transition: border-color .15s ease, color .15s ease;
}
.link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Masthead ──────────────────────────────────────────────────────────────── */
.masthead {
  position: relative;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

/* The only nod to the building-site theme: faint plan-paper ruling. */
.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  color: var(--ink);
  opacity: var(--grid-opacity);
  pointer-events: none;
}

.masthead-inner {
  position: relative;
  /* padding-block only — the horizontal padding comes from .wrap and must not
     be overwritten by a shorthand, or the headline sits on the screen edge. */
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem);
}

.masthead-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}
.masthead-meta .rule { flex: 1; }

.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 15vw, 9rem);
  font-weight: 400;
  /* Nicht unter 1: Beim Umbruch braucht das Ü mehr Platz über der Grundlinie
     (Newsreader .91em, Oswald sogar 1.04em als Versal) als ein knapper
     Durchschuss hergibt — die Punkte landen sonst in der Zeile darüber.
     Bei einzeiligen Überschriften kostet das nichts. */
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.masthead-sub {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 4vw, 1.875rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.2;
}
.masthead-lead {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 30rem;
  margin-top: 1.75rem;
}
.masthead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

/* ── Landing: die Auswahl vor Gästebuch und Karte ──────────────────────────── */
.landing {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 6rem);
  min-height: calc(100dvh - 6rem);
  overflow: hidden;
}
.landing::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  color: var(--ink);
  opacity: var(--grid-opacity);
  pointer-events: none;
}
.landing-inner {
  position: relative;
  padding-block: clamp(3rem, 10vw, 5rem);
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 13vw, 6.5rem);
  font-weight: 400;
  line-height: 1;   /* Umlaute beim Umbruch, siehe .masthead-title */
  letter-spacing: -.03em;
  margin-bottom: .375rem;
  overflow-wrap: break-word;
  hyphens: auto;
}
.landing-sub {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 3.5vw, 1.5rem);
  font-style: italic;
  color: var(--ink-soft);
}
.landing-lead {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink-soft);
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
}

/* Große Ziele — die Seite wird am Tisch auf dem Handy angetippt. */
.choices {
  display: grid;
  gap: .75rem;
  margin-top: 1.25rem;
}
.choice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.375rem 1.25rem;
  background: var(--paper-raised);
  border: 1px solid var(--hairline-firm);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.choice:hover, .choice:focus-visible {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.choice:active { transform: translateY(1px); }

.choice-num { align-self: start; padding-top: .2rem; }
.choice-body { min-width: 0; }
.choice-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin-bottom: .1875rem;
}
.choice-desc {
  display: block;
  font-size: .9375rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.choice-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink-muted);
  transition: color .15s ease, transform .15s ease;
}
.choice:hover .choice-arrow { color: var(--accent); transform: translateX(3px); }

/* ── Zurück zur Auswahl ────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  color: var(--ink-muted);
  transition: color .15s ease;
  flex: 0 0 auto;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: .875rem; height: .875rem; stroke-width: 1.8; }

/* ── Getränkekarte ─────────────────────────────────────────────────────────── */
.menu-section + .menu-section { margin-top: clamp(2rem, 5vw, 3rem); }

.menu-list { list-style: none; }
.menu-item {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .6875rem 0;
  border-bottom: 1px solid var(--hairline);
}
.menu-item:last-child { border-bottom: 0; }
.menu-name {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--ink);
}
.menu-note {
  margin-left: auto;
  text-align: right;
  font-size: .875rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── Merkmalsliste der Startseite ──────────────────────────────────────────── */
.features { list-style: none; }
.feature {
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--hairline);
}
.feature:last-child { border-bottom: 0; }
.feature-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: .25rem;
}
.feature-text {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ── Rechtstexte ───────────────────────────────────────────────────────────── */
.legal-title { font-size: clamp(2.25rem, 8vw, 4rem); }

.legal {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.legal h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  margin: 2.5rem 0 .75rem;
}
.legal h2:first-child { margin-top: 0; }
.legal p + p { margin-top: .875rem; }
.legal ul { margin: .875rem 0 .875rem 1.25rem; }
.legal li { margin-bottom: .375rem; }
.legal a { color: var(--accent); border-bottom: 1px solid var(--hairline-firm); }
.legal a:hover { border-color: var(--accent); }
.legal strong { color: var(--ink); font-weight: 600; }

.legal-lead {
  font-size: 1.125rem;
  color: var(--ink);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

/* Fehlende Pflichtangabe — fällt auf, damit sie nicht unbemerkt live geht. */
.legal-gap {
  background: var(--accent-wash);
  color: var(--accent);
  border: 1px dashed var(--accent);
  padding: 0 .375rem;
  font-size: .9375rem;
}

.legal-links { display: flex; gap: 1rem; }
.legal-links a { border-bottom: 1px solid transparent; }
.legal-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-sunk { background: var(--paper-sunk); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.section-head .label { white-space: nowrap; }
.section-head .rule { flex: 1; align-self: center; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.section-note {
  font-size: .875rem;
  color: var(--ink-muted);
  margin-top: .5rem;
  max-width: var(--measure);
}

/* ── Form ──────────────────────────────────────────────────────────────────── */
.sheet {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  padding: clamp(1.5rem, 5vw, 2.75rem);
}

.field { margin-bottom: 1.75rem; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}
.field-label > span:first-child {
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field-optional { font-size: .75rem; color: var(--ink-muted); font-style: italic; letter-spacing: 0; text-transform: none; }
.req { color: var(--accent); }

.input, .textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-firm);
  border-radius: 0;
  padding: .625rem 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--ink);
  transition: border-color .15s ease;
  -webkit-appearance: none;
}
.input:focus, .textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); opacity: .7; }
.textarea { resize: vertical; min-height: 8.5rem; line-height: 1.65; }

.counter {
  font-size: .75rem;
  color: var(--ink-muted);
  text-align: right;
  margin-top: .5rem;
  font-variant-numeric: tabular-nums;
}
.counter.is-warn { color: var(--accent); }
.counter.is-over { color: var(--danger); }

.notice {
  border-left: 2px solid var(--danger);
  background: var(--paper-sunk);
  padding: .875rem 1rem;
  font-size: .9375rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  display: none;
}
.notice.is-visible { display: block; }

/* ── Photo upload ──────────────────────────────────────────────────────────── */
.dropzone {
  border: 1px dashed var(--hairline-firm);
  background: var(--paper-sunk);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.dropzone svg { width: 1.75rem; height: 1.75rem; margin: 0 auto .75rem; stroke-width: 1.2; color: var(--ink-muted); }
.dropzone p { font-size: .9375rem; color: var(--ink-soft); }
.dropzone .hint { font-size: .75rem; color: var(--ink-muted); margin-top: .5rem; }
.dropzone input[type="file"] { display: none; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: .625rem;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper-sunk);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-remove {
  position: absolute;
  top: .25rem;
  right: .25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  background: var(--paper-raised);
  border: 1px solid var(--hairline-firm);
  color: var(--ink);
}
.thumb-remove:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.thumb-remove svg { width: .75rem; height: .75rem; stroke-width: 2; }

.thumb-add {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px dashed var(--hairline-firm);
  background: transparent;
  color: var(--ink-muted);
}
.thumb-add:hover { border-color: var(--accent); color: var(--accent); }
.thumb-add svg { width: 1.25rem; height: 1.25rem; stroke-width: 1.4; }

.thumbs-note {
  font-size: .75rem;
  color: var(--ink-muted);
  margin-top: .625rem;
}

/* Der Hinweis steht unter dem Knopf, nicht daneben. Nebeneinander passte er
   auf dem Handy nicht in die Spalte und ragte aus dem Kasten heraus — und ein
   Nachsatz zum Absenden gehört ohnehin darunter, nicht auf gleiche Höhe. */
.submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .625rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}
.submit-row .btn { flex: 0 0 auto; }
.submit-hint {
  font-size: .75rem;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 100%;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.is-busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── View switch ───────────────────────────────────────────────────────────── */
.switch {
  display: inline-flex;
  border: 1px solid var(--hairline-firm);
  border-radius: 2px;
  overflow: hidden;
}
.switch button {
  padding: .4375rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-muted);
  background: transparent;
  transition: background .15s ease, color .15s ease;
}
.switch button + button { border-left: 1px solid var(--hairline-firm); }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.entries-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── Entries ───────────────────────────────────────────────────────────────── */
.entries {
  columns: 1;
  column-gap: 1.5rem;
}
@media (min-width: 48rem) { .entries { columns: 2; } }
@media (min-width: 75rem) { .entries { columns: 3; } }

.entry {
  break-inside: avoid;
  page-break-inside: avoid;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  margin-bottom: 1.5rem;
  transition: border-color .15s ease, box-shadow .2s ease;
}
.entry:hover { border-color: var(--hairline-firm); box-shadow: var(--shadow-sheet); }

.entry-head {
  padding: 1.25rem 1.375rem .875rem;
  border-bottom: 1px solid var(--hairline);
}
.entry-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  word-break: break-word;
}
.entry-meta {
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--ink-muted);
  margin-top: .375rem;
  font-variant-numeric: tabular-nums;
}
.entry-body { padding: 1.25rem 1.375rem; }
.entry-text {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.entries-note {
  color: var(--ink-muted);
  font-size: .9375rem;
  padding: 1.5rem 0;
}

.entry-photos {
  display: grid;
  gap: 2px;
  padding: 0 1.375rem 1.375rem;
}
/* A photo-only card has no text block, so its photos meet the header. */
.entry-head + .entry-photos { padding-top: 1rem; }
.entry-photos.n-1 { grid-template-columns: 1fr; }
.entry-photos.n-2, .entry-photos.n-4 { grid-template-columns: 1fr 1fr; }
.entry-photos.n-3, .entry-photos.n-5 { grid-template-columns: repeat(3, 1fr); }

.photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-sunk);
  cursor: zoom-in;
}
.entry-photos.n-1 .photo { aspect-ratio: 3 / 2; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.photo:hover img { opacity: .9; }

.photo-save {
  position: absolute;
  right: .375rem;
  bottom: .375rem;
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  background: var(--paper-raised);
  border: 1px solid var(--hairline-firm);
  color: var(--ink);
  opacity: 0;
  transition: opacity .15s ease;
}
.photo:hover .photo-save, .photo-save:focus-visible { opacity: 1; }
.photo-save svg { width: .875rem; height: .875rem; stroke-width: 1.6; }

/* ── Gallery ───────────────────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: .5rem;
}
@media (min-width: 48rem) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
}
.gallery .photo { aspect-ratio: 1; border: 1px solid var(--hairline); }
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.75rem .625rem .5rem;
  background: linear-gradient(to top, rgba(20, 19, 17, .82), transparent);
  color: #F7F4EE;
  font-size: .75rem;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .15s ease;
}
.gallery .photo:hover .gallery-caption { opacity: 1; }

/* ── States ────────────────────────────────────────────────────────────────── */
.state {
  padding: clamp(2.5rem, 8vw, 4.5rem) 0;
  text-align: center;
  color: var(--ink-muted);
}
.state-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-soft);
  margin-bottom: .5rem;
}
.state p { font-size: .9375rem; max-width: 26rem; margin: 0 auto; }

.pulse { display: inline-flex; gap: .375rem; }
.pulse span {
  width: .3125rem; height: .3125rem;
  background: var(--ink-muted);
  border-radius: 50%;
  animation: pulse 1.1s ease-in-out infinite;
}
.pulse span:nth-child(2) { animation-delay: .16s; }
.pulse span:nth-child(3) { animation-delay: .32s; }
@keyframes pulse { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 3rem;
}
.site-foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .625rem 1.25rem;
  font-size: .8125rem;
  color: var(--ink-muted);
}
/* Auf schmalen Geräten untereinander statt gequetscht nebeneinander. */
@media (max-width: 34rem) {
  .site-foot-inner { justify-content: flex-start; }
  .site-foot-inner > * { flex: 1 0 100%; }
  .site-foot-inner .legal-links { flex-basis: auto; }
}

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(18, 17, 15, .94);
  padding: 3.5rem 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 86vh;
  object-fit: contain;
  background: #100F0E;
}
.lightbox-caption {
  position: absolute;
  left: 0; right: 0; bottom: 1.25rem;
  text-align: center;
  color: rgba(247, 244, 238, .72);
  font-size: .8125rem;
  letter-spacing: .06em;
}
.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: rgba(247, 244, 238, .8);
  border: 1px solid rgba(247, 244, 238, .22);
  background: rgba(20, 19, 17, .5);
  transition: color .15s ease, border-color .15s ease;
}
.lightbox-btn:hover { color: #fff; border-color: rgba(247, 244, 238, .6); }
.lightbox-btn svg { width: 1.125rem; height: 1.125rem; stroke-width: 1.5; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-btn[hidden] { display: none; }
@media (max-width: 40rem) {
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
}

/* ── Overlay (after sending) ───────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(28, 27, 25, .55);
}
.overlay.is-open { display: flex; }
.overlay-card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline-firm);
  padding: clamp(2rem, 6vw, 3rem);
  max-width: 26rem;
  width: 100%;
  text-align: center;
  animation: rise .24s ease;
}
@keyframes rise { from { transform: translateY(.75rem); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay-card .rule-accent { margin: 1.25rem auto; }
.overlay-title {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.15;
}
.overlay-card p { color: var(--ink-soft); font-size: .9375rem; margin-bottom: 1.75rem; }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: min(28rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  border-left: 2px solid var(--accent);
  padding: .8125rem 1rem;
  font-size: .875rem;
  pointer-events: auto;
  animation: rise .2s ease;
}
.toast.is-error { border-left-color: var(--danger); }
.toast.is-ok { border-left-color: var(--ok); }
.toast.is-leaving { animation: fade .2s ease forwards; }
@keyframes fade { to { opacity: 0; transform: translateY(.5rem); } }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* On narrow phones the two annotations need the whole line to themselves. */
@media (max-width: 26rem) {
  .masthead-meta .rule { display: none; }
  .masthead-meta { justify-content: space-between; gap: .75rem; }
  .masthead-meta .label { font-size: .625rem; letter-spacing: .14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Passwortseite und Hinweisseite ──────────────────────────────────────────
   Lagen früher als <style>-Block in gate.html und gone.html. Mit strenger
   Content-Security-Policy sind Inline-Stile im Dokument nicht erlaubt. */

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.gate-card { width: min(26rem, 100%); }
.gate-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.gate-meta .rule { flex: 1; }
.gate-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 12vw, 4.5rem);
  line-height: 1;   /* Umlaute beim Umbruch, siehe .masthead-title */
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.gate-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
.gate-lead {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.gone { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--gutter); }
.gone-card { width: min(30rem, 100%); text-align: center; }
.gone-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.05;
  margin-bottom: .75rem;
}
.gone-card .rule-accent { margin: 1.5rem auto; }
.gone-card p { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); }

/* ── Extras im Eintragsformular ─────────────────────────────────────────────
   Fotoauftrag und Frage des Abends. Beides ist Beiwerk und soll sich neben dem
   Feld halten, zu dem es gehört — deshalb dieselben Größen und Farben wie die
   übrige Feldbeschriftung, kein Kasten und kein eigener Rahmen. Steht das
   Modul aus, liefert der Server das Element gar nicht erst aus; hier ist
   deshalb nichts zu verstecken. */

.extra-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .375rem .625rem;
  margin: 0 0 .625rem;
}
.extra-label {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex: 0 0 auto;
}
.extra-text {
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1 1 12rem;
  min-width: 0;
}
/* Der Knopf gehört zum Auftrag, nicht zum Formular — er darf nicht wie eine
   der echten Schaltflächen wirken. */
.extra-shuffle {
  flex: 0 0 auto;
  padding: .25rem .625rem;
  font-size: .6875rem;
}

/* Angenommener Fotoauftrag bzw. beantwortete Frage beim Eintrag. Zurückhaltend:
   Der Beitrag des Gastes ist die Hauptsache, das hier nur die Einordnung. */
.entry-extra {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0 0 .625rem;
  padding-left: .75rem;
  border-left: 2px solid var(--hairline-firm);
}
.entry-extra-task { margin: .75rem 0 0; }

/* Häkchen zum Mitmachen. Ohne Häkchen sieht das Formular aus wie immer. */
.extra-optin {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .625rem;
  font-size: .875rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.extra-optin input { flex: 0 0 auto; accent-color: var(--accent); }

/* ── Musikwünsche ───────────────────────────────────────────────────────────
   Eine Liste, zwei Sichten: Gäste sehen Titel und Herz, der DJ zusätzlich die
   Stimmenzahl und seine Knöpfe. Gleiche Bausteine, damit beide Seiten
   erkennbar zur selben Anwendung gehören. */

.songs { list-style: none; margin: 0; padding: 0; }

.song {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--hairline);
}
.song:last-child { border-bottom: 0; }

.song-text { display: flex; flex-direction: column; gap: .125rem; min-width: 0; flex: 1; }
.song-title { font-family: var(--font-display); font-size: 1.125rem; line-height: 1.25; }
.song-artist { font-size: .875rem; color: var(--ink-soft); }
.song-guest { font-size: .75rem; color: var(--ink-muted); font-style: italic; }

/* Die Stimmenzahl steht beim DJ vorn — er sortiert danach. */
.song-votes {
  flex: 0 0 2.25rem;
  text-align: right;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.song-vote {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem .625rem;
  border: 1px solid var(--hairline-firm);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  transition: color .12s ease, border-color .12s ease;
}
.song-vote svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; }
.song-vote:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
/* Schon gestimmt: gefülltes Herz, kein zweiter Klick. */
.song-vote:disabled { color: var(--accent); border-color: var(--accent); cursor: default; }
.song-vote:disabled svg { fill: currentColor; }

.song-actions { display: flex; gap: .375rem; flex: 0 0 auto; }
.song.is-played { opacity: .45; }
.song.is-played .song-title { text-decoration: line-through; }

.dj-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--hairline);
}

@media (max-width: 32rem) {
  .song { flex-wrap: wrap; }
  .song-actions { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Getränkekarte — Stile
   Der Stil steht als data-drinkstyle am <html>-Element. „plain" ist der
   schlichte Satz von oben und braucht hier nichts. Alle Verzierungen sind
   eigenes CSS und SVG als Data-URL: keine fremden Bilder, keine Ladezeit.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tafel ──────────────────────────────────────────────────────────────────
   Dunkle Schiefertafel mit heller Kreideschrift. Der Verlauf ist bewusst
   uneben — eine echte Tafel ist nie gleichmäßig gewischt. */

[data-drinkstyle="chalk"] body {
  background:
    radial-gradient(ellipse at 22% 18%, rgba(255, 255, 255, .05), transparent 55%),
    radial-gradient(ellipse at 78% 72%, rgba(255, 255, 255, .04), transparent 50%),
    #23282a;
  color: #eae6dd;
}
[data-drinkstyle="chalk"] .masthead-title,
[data-drinkstyle="chalk"] .menu-name { color: #f4f1ea; }
[data-drinkstyle="chalk"] .masthead-lead,
[data-drinkstyle="chalk"] .menu-note,
[data-drinkstyle="chalk"] .label,
[data-drinkstyle="chalk"] .back-link { color: rgba(234, 230, 221, .62); }
[data-drinkstyle="chalk"] .rule,
[data-drinkstyle="chalk"] .menu-item { border-color: rgba(234, 230, 221, .18); }
[data-drinkstyle="chalk"] .site-foot { border-top-color: rgba(234, 230, 221, .18); color: rgba(234, 230, 221, .5); }
[data-drinkstyle="chalk"] .site-foot a,
[data-drinkstyle="chalk"] .link { color: rgba(234, 230, 221, .8); }

/* Die Karte bekommt einen Kreiderahmen mit abgerundeten Ecken. */
[data-drinkstyle="chalk"] .drinks-sheet,
[data-drinkstyle="chalk"].drinks-sheet {
  border: 2px solid rgba(234, 230, 221, .28);
  border-radius: .5rem;
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
[data-drinkstyle="chalk"] .menu-name { font-family: var(--font-display); letter-spacing: .01em; }

/* ── Bar ────────────────────────────────────────────────────────────────────
   Gezeichnete Gläser als Zierleiste über und unter der Karte, dazu ein
   schmaler Doppelrahmen. Zurückhaltend genug, dass die Karte lesbar bleibt. */

[data-drinkstyle="bar"] .drinks-sheet,
[data-drinkstyle="bar"].drinks-sheet {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 5rem);
  padding-bottom: clamp(3.5rem, 8vw, 5rem);
}
[data-drinkstyle="bar"] .drinks-sheet::before,
[data-drinkstyle="bar"] .drinks-sheet::after,
[data-drinkstyle="bar"].drinks-sheet::before,
[data-drinkstyle="bar"].drinks-sheet::after {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  height: 2.75rem;
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 2.75rem;
  opacity: .5;
  /* Cocktailglas, Weinglas, Tumbler — als Linienzeichnung. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='44' viewBox='0 0 132 44' fill='none' stroke='%23222' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10h24L22 24v8m-7 0h14'/%3E%3Cpath d='M56 10c0 7 3 11 7 11s7-4 7-11zm7 11v11m-6 0h12'/%3E%3Cpath d='M100 11h18l-2 21h-14z'/%3E%3Cpath d='M101 20h16'/%3E%3C/svg%3E");
}
[data-drinkstyle="bar"] .drinks-sheet::before,
[data-drinkstyle="bar"].drinks-sheet::before { top: .5rem; }
[data-drinkstyle="bar"] .drinks-sheet::after,
[data-drinkstyle="bar"].drinks-sheet::after { bottom: .5rem; transform: scaleY(-1); }

[data-drinkstyle="bar"] .menu-section {
  border-left: 1px solid var(--hairline-firm);
  border-right: 1px solid var(--hairline-firm);
  padding: 0 clamp(1rem, 3vw, 2rem);
}
[data-drinkstyle="bar"] .menu-name { font-family: var(--font-display); font-size: 1.1875rem; }
[data-drinkstyle="bar"] .menu-note { font-variant-numeric: tabular-nums; }

/* ── Bistro ─────────────────────────────────────────────────────────────────
   Französische Tageskarte: Zierlinien mit Raute, Kapitälchen, und zwischen
   Name und Notiz eine Punktreihe wie auf einer gesetzten Speisekarte. */

[data-drinkstyle="bistro"] .drinks-sheet,
[data-drinkstyle="bistro"].drinks-sheet {
  border-top: 3px double var(--hairline-firm);
  border-bottom: 3px double var(--hairline-firm);
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}
[data-drinkstyle="bistro"] .section-head { justify-content: center; gap: .875rem; }
[data-drinkstyle="bistro"] .section-head .rule { display: none; }
/* Die Raute links und rechts der Abschnittsüberschrift. */
[data-drinkstyle="bistro"] .section-head .label::before,
[data-drinkstyle="bistro"] .section-head .label::after {
  content: '◆';
  font-size: .5em;
  vertical-align: .35em;
  color: var(--accent);
  margin: 0 .75em;
}
[data-drinkstyle="bistro"] .section-head .label {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
[data-drinkstyle="bistro"] .menu-item { border-bottom: 0; padding: .5rem 0; }
[data-drinkstyle="bistro"] .menu-name { font-family: var(--font-display); font-size: 1.1875rem; }
/* Die Punktreihe füllt den Platz zwischen Name und Notiz. */
[data-drinkstyle="bistro"] .menu-item::after {
  content: '';
  order: 1;
  flex: 1 1 auto;
  align-self: baseline;
  margin: 0 .5rem;
  height: 1px;
  min-width: 1.5rem;
  background-image: radial-gradient(circle, var(--ink-muted) 1px, transparent 1px);
  background-size: 6px 2px;
  background-position: bottom;
  background-repeat: repeat-x;
  opacity: .55;
}
[data-drinkstyle="bistro"] .menu-note { order: 2; margin-left: 0; }
/* Ohne Notiz hätte die Punktreihe kein Ziel und liefe ins Leere. */
[data-drinkstyle="bistro"] .menu-item:not(:has(.menu-note))::after { display: none; }

/* Der Kartenbaustein trägt die Gestaltung, nicht die Seitenstruktur. So sieht
   die Vorschau in der Verwaltung genau das, was die Gäste später sehen. */
.drinks-sheet { position: relative; }

[data-drinkstyle="chalk"] .drinks-sheet,
[data-drinkstyle="chalk"].drinks-sheet {
  background:
    radial-gradient(ellipse at 22% 18%, rgba(255, 255, 255, .05), transparent 55%),
    radial-gradient(ellipse at 78% 72%, rgba(255, 255, 255, .04), transparent 50%),
    #23282a;
  color: #eae6dd;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}
[data-drinkstyle="chalk"] .drinks-sheet, [data-drinkstyle="chalk"].drinks-sheet .menu-name { color: #f4f1ea; }
[data-drinkstyle="chalk"] .drinks-sheet, [data-drinkstyle="chalk"].drinks-sheet .menu-note,
[data-drinkstyle="chalk"] .drinks-sheet, [data-drinkstyle="chalk"].drinks-sheet .label { color: rgba(234, 230, 221, .62); }
[data-drinkstyle="chalk"] .drinks-sheet, [data-drinkstyle="chalk"].drinks-sheet .rule,
[data-drinkstyle="chalk"] .drinks-sheet, [data-drinkstyle="chalk"].drinks-sheet .menu-item { border-color: rgba(234, 230, 221, .18); }

/* In der Vorschau ist weniger Platz als auf der Seite — die Zierleisten der
   Bar dürfen dort etwas schmaler ausfallen. */
.menu-preview.drinks-sheet { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* Der zurückhaltende Weg zu den Musikwünschen: eine Zeile unter der Auswahl
   statt einer dritten Kachel. Wer sie sucht, findet sie — sie drängt sich
   aber niemandem auf, der nur die Getränkekarte lesen wollte. */
.landing-aside {
  margin-top: 1.75rem;
  font-size: .875rem;
  color: var(--ink-muted);
}
