/* ============================================================
   Geisleins Ferienwohnung – Stylesheet
   Aufbau: 1 Tokens · 2 Basis · 3 Layout · 4 Komponenten
           5 Sektionen · 6 Footer · 7 Lightbox · 8 Rechtsseiten
           9 Motion · 10 Belegung · 11 Admin (inkl. Statistik)
   ============================================================ */

/* ---------------------------- 1 Tokens ---------------------- */
:root {
  --bg:            #fbf9f5;
  --bg-tint:       #f3f1e9;
  --surface:       #ffffff;
  --text:          #2c332e;
  --text-muted:    #5f6b61;
  --accent:        #5c7d62;
  --accent-strong: #46614b;
  --accent-soft:   #e6eee4;
  --sky:           #7ea5bd;
  --sky-soft:      #e6eff4;
  --line:          #e5e0d5;
  --line-strong:   #d3ccbd;

  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 26px;

  --shadow-sm: 0 1px 2px rgba(44, 51, 46, .05), 0 4px 12px rgba(44, 51, 46, .04);
  --shadow:    0 2px 6px rgba(44, 51, 46, .05), 0 18px 40px rgba(44, 51, 46, .07);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --container: 1140px;
  --gutter: clamp(1.15rem, 4vw, 2rem);
  --section-space: clamp(4rem, 9vw, 7.5rem);
  --header-h: 68px;

  --cal-free: #e6eee4;
  --cal-weekend: #dfe7dd;
  --cal-busy: #c36b5e;
  --cal-busy-soft: #f6e4e0;
  --cal-option: #7ea5bd;
  --cal-option-soft: #e6eff4;
}

/* ---------------------------- 2 Basis ----------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
html:has(body.page-admin) {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .16vw, 1.075rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.65rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

img, picture, svg { max-width: 100%; }
img { display: block; height: auto; }

address { font-style: normal; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: .5rem;
  translate: -50% -200%;
  z-index: 200;
  background: var(--surface);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { translate: -50% 0; }

/* ---------------------------- 3 Layout ---------------------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section { padding-block: var(--section-space); }
.section--tinted { background: var(--bg-tint); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.eyebrow {
  margin: 0 0 .7rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.lead {
  font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem);
  color: var(--text-muted);
}

.note {
  margin-top: 1.75rem;
  font-size: .92rem;
  color: var(--text-muted);
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__text { order: 2; }
}

.split__figure { margin: 0; }
.split__figure picture > img,
.split__figure > img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.split__figure figcaption {
  margin-top: .85rem;
  font-size: .9rem;
  color: var(--text-muted);
}

/* -------------------------- 4 Komponenten ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-strong); color: #fff; }

.btn--ghost {
  background: rgba(255, 255, 255, .82);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: #fff; border-color: var(--accent); color: var(--accent-strong); }

.btn--sm { padding: .6rem 1.15rem; font-size: .93rem; }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.link-quiet {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
}
.link-quiet:hover { color: var(--accent-strong); text-decoration: underline; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 2rem;
}
.chip {
  padding: .42rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .65);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.callout {
  margin-top: 1.75rem;
  padding: 1.4rem 1.6rem;
  background: var(--sky-soft);
  border-radius: var(--radius);
  border: 1px solid #d7e6ee;
}
.callout h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.callout p { font-size: .97rem; color: var(--text-muted); }

/* -------------------------- 5 Sektionen --------------------- */

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(251, 249, 245, .92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px rgba(44, 51, 46, .05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: #fff;
  transition: color .25s ease;
}
.site-header.is-scrolled .brand { color: var(--text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .38);
}
.brand__mark svg { width: 21px; height: 21px; }
.site-header.is-scrolled .brand__mark {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
}

.brand__text { display: grid; line-height: 1.25; }
.brand__text strong { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }
.brand__text span { font-size: .74rem; letter-spacing: .05em; opacity: .82; }

.site-header__actions { display: flex; align-items: center; gap: 1.1rem; }
.site-header__actions .link-quiet { color: rgba(255, 255, 255, .92); }
.site-header.is-scrolled .site-header__actions .link-quiet { color: var(--text-muted); }
@media (max-width: 560px) {
  .site-header__actions .link-quiet { display: none; }
  .brand__text span { display: none; }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(92svh, 820px);
  padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 7vw, 5.5rem);
  color: #fff;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(28, 36, 30, .5) 0%, rgba(28, 36, 30, .18) 32%, rgba(28, 36, 30, .72) 100%);
}

.hero__inner { max-width: 44rem; }
.hero__eyebrow {
  margin: 0 0 .9rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .88);
}
.hero__title {
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.9rem);
  margin-bottom: .5em;
  text-shadow: 0 2px 24px rgba(20, 26, 22, .35);
}
.hero__text {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.22rem);
  color: rgba(255, 255, 255, .93);
  max-width: 38rem;
  text-shadow: 0 1px 12px rgba(20, 26, 22, .35);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.9rem;
}

/* Willkommen */
.signature {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent-strong);
}

/* Karten "Die Wohnung" */
.cards {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.card {
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--text-muted); font-size: .99rem; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.card__icon svg { width: 24px; height: 24px; }

.card--accent { background: var(--accent-soft); border-color: #d6e3d3; }
.card--accent .card__icon { background: #fff; }

/* Ausstattung */
.features {
  display: grid;
  gap: .7rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.features li {
  position: relative;
  padding-left: 2rem;
  padding-block: .35rem;
  color: var(--text);
}
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 1.15rem;
  height: 1.15rem;
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346614b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / .72rem no-repeat;
}

/* Galerie
   Eine Zeile ist zwei Drittel einer Spalte hoch, ein Querformat (3:2) füllt
   damit genau eine Zelle. Hochformate belegen 1×2 Zellen, hervorgehobene
   Querformate 2×2 – dadurch bleibt bei jedem Bild das Seitenverhältnis
   erhalten und das Raster geht ohne Lücken auf. Zellenbedarf einer Kachel:
   normal 1, hoch 2, breit 4; ist die Summe durch die Spaltenzahl teilbar,
   ergibt sich ein geschlossener Block. */
.gallery {
  --gallery-gap: clamp(.7rem, 1.4vw, 1rem);
  display: grid;
  gap: var(--gallery-gap);
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row dense;
  container-type: inline-size;
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

.gallery__item {
  /* cqi bezieht sich auf die Breite von .gallery */
  --gallery-col: calc((100cqi - var(--gallery-gap)) / 2);
  --gallery-row: calc(var(--gallery-col) * 2 / 3);
  position: relative;
  display: block;
  height: var(--gallery-row);
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}
.gallery__item--wide { grid-column: span 2; }
.gallery__item--wide,
.gallery__item--tall {
  grid-row: span 2;
  height: calc(2 * var(--gallery-row) + var(--gallery-gap));
}
@media (min-width: 720px) {
  .gallery__item { --gallery-col: calc((100cqi - 3 * var(--gallery-gap)) / 4); }
}

.gallery__item picture {
  display: block;
  height: 100%;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .3s ease;
}
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.045); }

.gallery__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.9rem .9rem .8rem;
  font-size: .86rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, rgba(24, 30, 26, 0) 0%, rgba(24, 30, 26, .72) 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { opacity: 1; }
@media (hover: none) {
  .gallery__caption { opacity: 1; }
}

/* Preise */
.pricecard {
  padding: clamp(1.7rem, 3vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.pricecard__lead {
  margin: 0 0 .2rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.pricecard__price {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
}
.pricecard__price span { font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); font-weight: 600; }
.pricecard__price small { font-size: 1rem; color: var(--text-muted); font-family: var(--font); }

.pricelist { margin-bottom: 1.7rem; }
.pricelist li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
  font-size: .98rem;
}
.pricelist li span { color: var(--text-muted); }

/* Platzhalter */
.placeholder {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  background: rgba(255, 255, 255, .6);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}
.placeholder__badge {
  display: inline-block;
  margin-bottom: 1.2rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  background: var(--sky-soft);
  color: #3e5c6b;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.placeholder__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 1.1rem;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.placeholder__icon svg { width: 30px; height: 30px; }
.placeholder p { color: var(--text-muted); }
.placeholder__hint { font-size: .95rem; }
.placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Anfrage */
.contact {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  min-width: 0;
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 1.35fr 1fr; }
}

.form {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form__status {
  display: none;
  margin: 0 0 1.35rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
}
.form__status:target,
.form__status.is-visible { display: block; }
.form__status--ok {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.form__status--err {
  background: #f8e8e6;
  color: #8a2b22;
}
.form__row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  min-width: 0;
}
.field {
  margin-bottom: 1rem;
  min-width: 0;
  max-width: 100%;
}
.field label {
  display: block;
  margin-bottom: .35rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.field__optional {
  font-weight: 500;
  color: var(--text-muted);
  opacity: .75;
}
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: .75rem .95rem;
  font: inherit;
  font-size: .98rem;
  line-height: 1.68;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input,
.field select {
  display: block;
  box-sizing: border-box;
  min-height: calc(.75rem * 2 + .98rem * 1.68 + 2px);
}
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b61' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: .85rem;
  cursor: pointer;
}
.field__date,
.field__with-hint {
  position: relative;
}
.field__date-hint {
  display: none;
  position: absolute;
  inset: 0 2.5rem 0 .95rem;
  align-items: center;
  pointer-events: none;
  font-size: .98rem;
  line-height: 1.68;
  color: var(--text-muted);
  opacity: .55;
  transition: opacity .15s ease;
}
.field__with-hint .field__date-hint { inset: 0 .95rem; }
/* Chrome/Firefox/Desktop-Safari already show tt.mm.jjjj / placeholder.
   iOS/iPadOS Safari leaves empty date inputs blank; hide native placeholder
   there so the overlay hint is not doubled. */
@supports (-webkit-touch-callout: none) {
  @media (hover: none) {
    .field__date-hint { display: flex; }
    .field__with-hint input::placeholder {
      color: transparent;
      opacity: 0;
    }
  }
}
html.is-ios .field__date-hint { display: flex; }
html.is-ios .field__with-hint input::placeholder {
  color: transparent;
  opacity: 0;
}
.field__date.has-value .field__date-hint,
.field__date:focus-within .field__date-hint,
.field__with-hint.has-value .field__date-hint,
.field__with-hint:focus-within .field__date-hint {
  opacity: 0;
}
/* Safari iOS/iPadOS: native date UI ignores width:100% with appearance:auto
   and may force content-box sizing (notably iOS 26+). */
.field input[type="date"] {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: calc(.75rem * 2 + .98rem * 1.68 + 2px);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  padding: .75rem 2.5rem .75rem .95rem;
  line-height: 1.68;
}
.field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
.field input[type="date"]::-webkit-datetime-edit,
.field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.field input[type="date"]::-webkit-datetime-edit-text,
.field input[type="date"]::-webkit-datetime-edit-day-field,
.field input[type="date"]::-webkit-datetime-edit-month-field,
.field input[type="date"]::-webkit-datetime-edit-year-field {
  padding: 0;
  margin: 0;
}
.field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92, 125, 98, .16);
}
.field input:disabled,
.field select:disabled,
.field textarea:disabled { opacity: .65; cursor: not-allowed; }

.form__note {
  margin-top: 1rem;
  font-size: .88rem;
  color: var(--text-muted);
  text-align: center;
}

.contact__card {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}
.contact__list { margin-bottom: 1.2rem; }
.contact__list li {
  padding: .8rem 0;
  border-top: 1px solid rgba(70, 97, 75, .16);
}
.contact__list li:first-child { border-top: 0; padding-top: 0; }
.contact__label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: .15rem;
}
.contact__hint { font-size: .92rem; color: var(--text-muted); }

/* Lage */
.distances {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  margin-bottom: 2.2rem;
}
.distances li {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.distances strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-strong);
}
.distances span { font-size: .9rem; color: var(--text-muted); }

.linklist li { border-bottom: 1px solid var(--line); }
.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  text-decoration: none;
  font-weight: 500;
}
.linklist a::after {
  content: "↗";
  color: var(--accent);
  transition: transform .18s ease;
}
.linklist a:hover::after { transform: translate(2px, -2px); }

.embeds {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.embed {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.embed__consent {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  text-align: center;
}
.embed__consent h3 { margin-bottom: .3rem; }
.embed__consent p { font-size: .9rem; color: var(--text-muted); }
.embed__consent .btn { margin-top: .7rem; }
.embed__alt { margin-top: .8rem; font-size: .85rem; }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --------------------------- 6 Footer ----------------------- */
.site-footer {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.site-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-bottom: 2rem;
}
.site-footer__brand {
  margin-bottom: .5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.site-footer address,
.site-footer p { color: var(--text-muted); font-size: .95rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent-strong); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}

/* -------------------------- 7 Lightbox ---------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(24, 30, 26, .92);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: min(100%, 1200px);
  text-align: center;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 78svh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.lightbox__figure figcaption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, .85);
  font-size: .95rem;
}

.lightbox__close,
.lightbox__nav {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close {
  position: absolute;
  top: clamp(.8rem, 2vw, 1.6rem);
  right: clamp(.8rem, 2vw, 1.6rem);
  font-size: 1.9rem;
}
@media (max-width: 560px) {
  .lightbox__nav { position: absolute; bottom: 1.2rem; }
  .lightbox__nav--prev { left: 25%; }
  .lightbox__nav--next { right: 25%; }
  .lightbox__figure img { max-height: 66svh; }
}

/* ------------------- 8 Rechtsseiten (Impressum) -------------- */
.site-header.is-static { position: sticky; }

.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.legal__inner {
  max-width: 74ch;
  margin-inline: auto;
}
.legal h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.legal h2 {
  margin-top: 2.6rem;
  font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.legal h3 {
  margin-top: 1.9rem;
  font-size: 1.1rem;
  color: var(--accent-strong);
}
.legal p,
.legal li { color: var(--text-muted); font-size: .97rem; }
.legal ul { margin: 0 0 1.1em; padding-left: 1.4rem; list-style: disc; }
.legal li { margin-bottom: .4rem; }
.legal address { margin-bottom: 1.1em; }

/* --------------------------- 9 Motion ----------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------------------- 10 Belegungskalender ---------------- */
.cal-wrap {
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cal-wrap__loading {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
}

.cal__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  margin-bottom: 1.15rem;
}
.cal__year {
  margin: 0;
  min-width: 5.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem);
}
.cal__nav-btn {
  width: 2.75rem;
  min-height: 44px;
  padding-inline: 0;
  font-size: 1.35rem;
  line-height: 1;
  touch-action: manipulation;
}

.cal__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: -.35rem;
  padding-inline: .35rem;
}

.cal__table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 2px;
  table-layout: fixed;
  font-size: .72rem;
}
.cal__table th {
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: .15rem 0;
}
.cal__table .cal__month {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 2.7rem;
  padding-right: .35rem;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  font-size: .8rem;
}

.cal__day {
  height: 1.45rem;
  border-radius: 4px;
  background: var(--cal-free);
  user-select: none;
}
.cal__day.is-empty { background: transparent; }
.cal__day.is-weekend.is-free { background: var(--cal-weekend); }
.cal__day.is-busy { background: var(--cal-busy); }
.cal__day.is-option { background: var(--cal-option); }
.cal__day.is-change.is-busy {
  background: linear-gradient(135deg, var(--cal-busy) 49%, var(--cal-free) 51%);
}
.cal__day.is-change.is-option {
  background: linear-gradient(135deg, var(--cal-option) 49%, var(--cal-free) 51%);
}
.cal__day.is-change.is-busy.is-weekend {
  background: linear-gradient(135deg, var(--cal-busy) 49%, var(--cal-weekend) 51%);
}
.cal__day.is-change.is-option.is-weekend {
  background: linear-gradient(135deg, var(--cal-option) 49%, var(--cal-weekend) 51%);
}
.cal__day.is-today {
  box-shadow: inset 0 0 0 2px var(--accent-strong);
}
.cal__day.is-clickable {
  cursor: pointer;
}
.cal__day.is-clickable:hover,
.cal__day.is-clickable:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}
.cal__day.is-selected {
  box-shadow: 0 0 0 2px var(--text);
  position: relative;
  z-index: 1;
}
.cal__day.is-today.is-selected {
  box-shadow: inset 0 0 0 2px var(--accent-strong), 0 0 0 2px var(--text);
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
  justify-content: center;
  margin-top: 1.15rem;
  font-size: .88rem;
  color: var(--text-muted);
}
.cal__legend li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.cal__swatch {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  flex: none;
}
.cal__swatch.is-free { background: var(--cal-free); box-shadow: inset 0 0 0 1px var(--line); }
.cal__swatch.is-busy { background: var(--cal-busy); }
.cal__swatch.is-option { background: var(--cal-option); }
.cal__swatch.is-change {
  background: linear-gradient(135deg, var(--cal-busy) 49%, var(--cal-free) 51%);
}

.cal-fallback {
  text-align: center;
  padding: .6rem .4rem;
}
.cal-fallback p { color: var(--text-muted); }
.cal-fallback__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.cal-note {
  margin-top: 1.4rem;
  text-align: center;
}

@media (min-width: 900px) {
  .cal__table { min-width: 0; }
  .cal__day { height: 1.6rem; }
}

/* --------------------------- 11 Admin ----------------------- */
.admin {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.admin-login {
  max-width: 32rem;
  margin-inline: auto;
}
.admin-login .form {
  margin: 0;
}
.admin-login .admin-status.is-visible {
  position: static;
}
.admin .section-head { margin-bottom: 1.75rem; }
.admin h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
}
.admin h2 {
  font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem);
}

.admin-status {
  display: none;
  margin: 0 0 1.35rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
}
.admin-status.is-visible {
  display: block;
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 40;
  transition: opacity .3s ease;
}
.admin-status.is-leaving {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .admin-status.is-visible { transition: none; }
}
.admin-status--ok {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.admin-status--err {
  background: #f8e8e6;
  color: #8a2b22;
}

.admin-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .55rem;
  margin: 1.05rem 0 0;
  font-size: .95rem;
}
.admin-jump a {
  font-weight: 600;
  text-decoration: none;
}
.admin-jump a:hover { color: var(--text); }
.admin-jump span { color: var(--text-muted); font-weight: 400; }

.admin-preise { margin-bottom: clamp(1.5rem, 3vw, 2.2rem); }
.admin-links { margin-top: clamp(1.5rem, 3vw, 2.2rem); }
.admin-preise,
.admin-links,
.admin-belegung,
.admin-stats {
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.admin-preise__hint {
  text-align: left;
  margin: 0 0 1.1rem;
}

.admin-links__list { margin-bottom: .35rem; }
.admin-link {
  display: grid;
  gap: .7rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.admin-link:first-child { padding-top: 0; }
.admin-link:last-child { border-bottom: 0; }
.admin-link__fields {
  display: grid;
  gap: .75rem;
  min-width: 0;
}
.admin-link .field { margin-bottom: 0; }
.admin-link__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.admin-link__actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.admin-link__actions button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.admin-link__actions [data-link-remove]:hover {
  background: #f8e8e6;
  border-color: #c36b5e;
  color: #8a2b22;
}
.admin-links__toolbar {
  margin: .4rem 0 1rem;
}
@media (min-width: 720px) {
  .admin-link {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .admin-link__fields {
    grid-template-columns: minmax(10rem, 16rem) 1fr;
  }
}
.admin-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
@media (min-width: 980px) {
  .admin-grid { grid-template-columns: minmax(18rem, 24rem) 1fr; align-items: start; }
}

.admin .form { margin: 0; }
.admin .form h2 { font-size: 1.15rem; margin-bottom: .9rem; }

.btn--danger {
  background: transparent;
  border-color: #d7b4ad;
  color: #8a2b22;
}
.btn--danger:hover {
  background: #f8e8e6;
  border-color: #c36b5e;
  color: #8a2b22;
}

.admin-list {
  display: grid;
  gap: .75rem;
}
.admin-entry {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.admin-entry.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92, 125, 98, .16);
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.admin-entry__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .8rem;
  margin-bottom: .35rem;
}
.admin-entry__dates {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
}
.admin-entry__nights {
  font-size: .88rem;
  color: var(--text-muted);
}
.admin-entry__meta {
  margin: 0 0 .8rem;
  font-size: .92rem;
  color: var(--text-muted);
}
.admin-entry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.admin-entry__actions form {
  flex: 1 1 8rem;
  margin: 0;
  display: flex;
}
.admin-entry__actions .btn {
  flex: 1 1 8rem;
  min-height: 44px;
}
.admin-entry__actions form .btn { width: 100%; }

.admin-badge {
  display: inline-block;
  padding: .18rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-badge--belegt {
  background: var(--cal-busy-soft);
  color: #8a2b22;
}
.admin-badge--option {
  background: var(--cal-option-soft);
  color: #3e5c6b;
}

.admin-past {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .4rem 1rem 1rem;
}
.admin-past summary {
  cursor: pointer;
  font-weight: 600;
  padding: .7rem 0;
  color: var(--text-muted);
}
.admin-past .admin-list { margin-top: .4rem; }

.admin-empty {
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.admin-cal {
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
}
.admin-cal .cal-wrap { margin: 0; }

.admin-stats {
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0;
  padding: 1.15rem 1.2rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.admin-stats h2 { margin-bottom: .35rem; }
.admin-stats > .form__note {
  text-align: left;
  margin: 0 0 1.15rem;
}
.admin-stats__kpis {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
}
@media (min-width: 720px) {
  .admin-stats__kpis { grid-template-columns: repeat(5, 1fr); }
}
.admin-stats__kpis li {
  background: var(--bg-tint);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
}
.admin-stats__kpis span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-stats__kpis strong {
  display: block;
  margin-top: .15rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.admin-stats h3 {
  font-size: 1rem;
  margin: 0 0 .55rem;
}
.admin-stats__chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem .75rem;
  margin: 0 0 .55rem;
}
.admin-stats__chart-head h3 { margin: 0; }
.admin-stats__back {
  font-size: .78rem;
  font-weight: 600;
}
.admin-stats__chart {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 7.5rem;
  padding: .2rem 0 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.admin-stats__bar {
  position: relative;
  flex: 1 0 7px;
  min-width: 7px;
  display: flex;
  align-items: flex-end;
  min-height: 100%;
}
.admin-stats__fill {
  display: block;
  width: 100%;
  height: var(--h, 0%);
  min-height: 2px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  opacity: .82;
}
.admin-stats__count {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 2px;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  text-shadow: 0 0 2px rgba(44, 51, 46, .7);
}
.admin-stats__bar.is-empty .admin-stats__fill {
  background: var(--line-strong);
  opacity: .45;
}
.admin-stats__bar.is-today .admin-stats__fill {
  background: var(--accent-strong);
  opacity: 1;
}
.admin-stats__axis {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: .4rem 0 1.2rem;
  font-size: .78rem;
  color: var(--text-muted);
}
.admin-stats__tables {
  display: grid;
  gap: 1.35rem;
}
@media (min-width: 800px) {
  .admin-stats__tables { grid-template-columns: 1.35fr .75fr; align-items: start; }
}
.admin-stats table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.admin-stats th,
.admin-stats td {
  text-align: left;
  padding: .42rem 0;
  border-bottom: 1px solid var(--line);
}
.admin-stats th:last-child,
.admin-stats td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.admin-stats tbody tr.is-current td { font-weight: 600; }
.admin-stats tbody tr.is-open td:first-child a { font-weight: 700; }
.admin-stats__older {
  margin-top: .7rem;
}
.admin-stats__older summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  padding: .35rem 0;
}
.admin-stats .admin-empty { margin: 0; }

@media (max-width: 979px) {
  .admin .form__row { grid-template-columns: 1fr; }
  .admin .btn--block,
  .admin .form .btn { min-height: 46px; }
}
