/* Apartments am Ponyhof – Digitales Gästebuch */
:root {
  --green: #00bf63;
  --green-dark: #00994f;
  --green-soft: #e6f8ee;
  --ink: #1e1e1e;
  --muted: #5d625e;
  --line: #e5e2da;
  --bg: #f7f5f0;
  --card: #ffffff;
  --warn: #b45309;
  --warn-soft: #fdf3e4;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30, 30, 30, .05), 0 8px 24px rgba(30, 30, 30, .06);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Kalam", "Nunito", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font), "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans SC", "Microsoft YaHei", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--green-dark); }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.icon { width: 22px; height: 22px; flex: none; }
.icon--sm { width: 18px; height: 18px; }

/* ---------- Login ---------- */
.login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--green-soft), transparent 70%),
    var(--bg);
}
.login__card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login__logo { width: 240px; margin: 0 auto 28px; }
.login__title { font-family: var(--font-hand); font-size: 2.1rem; line-height: 1.1; margin: 0 0 6px; }
.login__text { margin: 0 0 24px; color: var(--muted); }
.login__hint { margin: 22px 0 0; font-size: .9rem; color: var(--muted); }

.name-field { display: grid; gap: 6px; max-width: 300px; margin: 0 auto 22px; text-align: left; }
.name-field label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.name-field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit; font-size: 16px; text-align: center;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.name-field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.pin__dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px; }
.pin__dots span {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ink);
  transition: background .15s, transform .15s;
}
.pin__dots span.filled { background: var(--ink); transform: scale(1.08); }
.pin--error .pin__dots { animation: shake .4s; }
.pin--error .pin__dots span { border-color: #c2410c; }
.pin--error .pin__dots span.filled { background: #c2410c; }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
/* echtes Eingabefeld für Tastatur/Autofill – visuell durch Punkte ersetzt */
.pin__input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.pin__error { min-height: 1.5em; margin: 0 0 12px; color: #c2410c; font-weight: 600; font-size: .92rem; }
.pin__pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}
.pin__pad button {
  aspect-ratio: 1.35;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: background .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.pin__pad button:active { background: var(--green-soft); transform: scale(.96); }
.pin__pad button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.pin__pad .pin__lang, .pin__pad .pin__del {
  background: transparent; border-color: transparent; box-shadow: none; font-size: 1.05rem; color: var(--muted);
}
.pin__pad .pin__del { font-size: 1.5rem; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(247, 245, 240, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__logo { height: 38px; width: auto; }
.topbar__actions { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .88rem;
  font-weight: 700;
}
.chip:hover { border-color: var(--ink); }
.lang-select {
  position: relative;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0 10px 0 12px;
  font-size: .88rem; font-weight: 700;
}
.lang-select:hover, .lang-select:focus-within { border-color: var(--ink); }
.lang-select .icon { color: var(--green-dark); pointer-events: none; }
.lang-select select {
  appearance: none; -webkit-appearance: none;
  border: 0; background-color: transparent;
  font: inherit; color: var(--ink);
  padding: 7px 18px 7px 6px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 4px center, right 0 center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.lang-select select:focus { outline: none; }
.login { position: relative; padding-top: 72px; }
.login__lang { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }

/* ---------- Hero ---------- */
.hero { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }
.hero__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__body { padding: 22px 4px 4px; }
.hero__kicker {
  margin: 0;
  font-size: .85rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-dark);
}
.hero__name { font-family: var(--font-hand); font-size: clamp(2.2rem, 8vw, 3rem); line-height: 1.05; margin: 4px 0 6px; }
.hero__tagline { margin: 0 0 16px; color: var(--muted); font-size: 1.08rem; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700; font-size: .95rem;
}
.facts .icon { width: 18px; height: 18px; color: var(--green-dark); }

/* ---------- Inhaltsverzeichnis ---------- */
.toc {
  max-width: 760px; margin: 18px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.toc a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700; font-size: .95rem;
  line-height: 1.25;
}
.toc a .icon { color: var(--green-dark); }
.toc a:hover { border-color: var(--green); }
.toc a.toc__highlight { background: var(--green); border-color: var(--green); color: #fff; }
.toc a.toc__highlight .icon { color: #fff; }
.toc a.toc__highlight:hover { background: var(--green-dark); border-color: var(--green-dark); }

/* Nach-oben-Button */
.to-top {
  position: fixed; z-index: 20;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--ink); color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s, transform .2s, background .15s;
}
.to-top svg { width: 24px; height: 24px; }
.to-top--visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--green-dark); }
.to-top:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* ---------- Karten ---------- */
.sections { max-width: 760px; margin: 0 auto; padding: 20px 16px 8px; display: grid; gap: 16px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  scroll-margin-top: 76px;
}
.card__title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px;
  font-size: 1.3rem; line-height: 1.25;
}
.card__icon {
  width: 40px; height: 40px; padding: 9px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
}
.card__body > * + * { margin-top: 14px; }
.card__body p { margin: 0; }
.sub { font-size: 1rem; margin: 22px 0 0; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.list, .steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.list li { position: relative; padding-left: 26px; }
.list li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--green);
}
.list--icons li { padding-left: 36px; }
.list--icons li::before { display: none; }
.list__icon {
  position: absolute; left: 0; top: .05em;
  width: 24px; height: 24px; color: var(--green-dark);
}
.icon--xs { width: 15px; height: 15px; }
.room__details { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.room__details li { display: flex; align-items: flex-start; gap: 6px; font-size: .9rem; color: var(--ink); }
.room__details .icon { color: var(--green-dark); margin-top: .2em; }
.steps { counter-reset: step; }
.steps li { position: relative; padding-left: 40px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 800;
}

.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--green-soft);
}
.note .icon { color: var(--green-dark); margin-top: 1px; }
.note--warn { background: var(--warn-soft); }
.note--warn .icon { color: var(--warn); }
.note p { font-weight: 600; }

/* WLAN */
.wifi { display: grid; gap: 10px; }
.wifi__row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.wifi__label { grid-column: 1; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wifi__value { grid-column: 1; font-weight: 800; font-size: 1.08rem; word-break: break-word; }
.wifi__value--mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.copy {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 0; border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: .85rem; font-weight: 700;
}
.copy .icon { width: 16px; height: 16px; }
.copy.copied { background: var(--green-dark); }

/* Zimmer */
.rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.room {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.room > .icon { color: var(--green-dark); }
.room strong { display: block; }
.room span { color: var(--muted); font-size: .95rem; }
.room__guests {
  font-style: normal; font-weight: 800; font-size: .82rem;
  padding: 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  white-space: nowrap;
}

/* Preise */
.prices { margin: 0; display: grid; gap: 0; }
.prices div {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.prices div:last-child { border-bottom: 0; }
.prices dt { flex: 1; }
.prices dd { margin: 0; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Check-out */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist label {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.checklist input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }

/* Kontakte */
.contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.contact {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
}
.contact:hover { border-color: var(--green); }
.contact__label { font-weight: 600; }
.contact__value { font-weight: 800; white-space: nowrap; color: var(--green-dark); }
.contact--urgent .contact__value { color: #c2410c; font-size: 1.2rem; }

/* Links */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: var(--green-dark); }

/* Orte / Empfehlungen */
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.place {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.place__icon { color: var(--green-dark); margin-top: 2px; }
.place strong { display: block; }
.place__desc { display: block; color: var(--muted); font-size: .95rem; }
.place__addr { display: block; font-size: .9rem; margin-top: 2px; }
.place__actions { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.place__actions a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .88rem; font-weight: 700; text-decoration: none;
}

/* Rechnungsformular */
.invoice__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.field { grid-column: span 6; display: grid; gap: 4px; }
.field--half { grid-column: span 3; }
.field--third { grid-column: span 2; }
.field--two-thirds { grid-column: span 4; }
.field label { font-size: .88rem; font-weight: 700; }
.field label span { color: #c2410c; }
.field label small { font-weight: 600; color: var(--muted); font-size: .8rem; }
.field input {
  width: 100%;
  padding: 12px 14px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfcac0;
  border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.invoice--checked .field input:invalid { border-color: #c2410c; background: #fff7f3; }
.invoice__hint { margin: 14px 0 0 !important; font-size: .85rem; color: var(--muted); }
.invoice__status { margin: 10px 0 0 !important; font-weight: 600; font-size: .92rem; }
.invoice__status:empty { display: none; }
.invoice__status--error { color: #c2410c; }
.btn--block { width: 100%; justify-content: center; margin-top: 14px; border: 0; font-size: 1rem; }
.btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 380px) {
  .field--half, .field--third, .field--two-thirds { grid-column: span 6; }
}

/* Fußzeile */
.footer {
  max-width: 760px; margin: 0 auto;
  padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
  text-align: center; color: var(--muted); font-size: .92rem;
}
.footer p { margin: 0 0 8px; }
.footer a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.noscript { padding: 24px; text-align: center; }

@media (min-width: 640px) {
  .card { padding: 26px 28px; }
  .hero { padding-top: 24px; }
}
