/* my.reesl.de – Gaeste-App. Baut auf den Design-Tokens der Website auf. */
@import url("fonts.css");
@import url("colors.css");
@import url("typography.css");
@import url("spacing.css");
@import url("radius.css");
@import url("elevation.css");
@import url("motion.css");
@import url("base.css");
@import url("ui.css");

:root {
  --nav-h: 68px;
  --page-max: 1080px;
  --side: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --side: 28px; } }

html { scroll-padding-top: 72px; }
body { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--side); }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-dark); color: var(--text-inverse); padding: 8px 14px; border-radius: var(--radius-pill); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Top bar (Unterseiten) ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--surface-page) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.topbar .wrap { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 60px; }
.topbar h1 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: var(--weight-semibold); text-align: center; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-pill); color: var(--text-strong); text-decoration: none; }
.iconbtn:hover { background: var(--action-quiet-hover); color: var(--text-strong); }
.iconbtn .icon { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end; color: var(--text-inverse); background: var(--surface-dark) center/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(22,29,25,.45) 0%, rgba(22,29,25,.25) 30%, rgba(22,29,25,.76) 62%, rgba(22,29,25,.86) 86%, var(--surface-page) 100%); z-index: -1; }
.hero .wrap { width: 100%; padding-bottom: 92px; padding-top: 184px; }
/* Logo 2a "Vertikal": Giebel oben, ReesL, Unterzeile FERIENHAUS (Leinen auf Foto) */
.hero-mark { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 8px 14px; border-radius: var(--radius-md); text-decoration: none; color: var(--text-inverse); white-space: nowrap; }
.hero-mark:focus-visible { outline: 2px solid var(--leinen-050); outline-offset: 2px; }
.hero-mark img { width: 50px; height: auto; margin-bottom: 12px; }
.hero-mark .wm { font-family: var(--font-display); font-weight: 400; font-size: 2.25rem; line-height: 1; letter-spacing: -0.02em; }
.hero-mark .sub { margin-top: 8px; font-size: .625rem; font-weight: var(--weight-semibold); letter-spacing: .24em; text-transform: uppercase; color: var(--holz-300); padding-left: .24em; }
.hero-mark:hover .wm { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.hero h1 { color: var(--text-inverse); font-size: clamp(2.25rem, 7vw, 3.75rem); line-height: 1.02; max-width: 14ch; }
.hero p { margin-top: 14px; max-width: 46ch; color: var(--text-inverse-muted); font-size: 1.0625rem; }

/* ---------- Schnellzugriff ---------- */
.quick { margin-top: -64px; position: relative; z-index: 2; }
.rail { container-type: inline-size; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--side) 18px; margin: 0 calc(-1 * var(--side)); scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: var(--side); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
/* Schnellzugriff: Raster statt Karussell, damit immer alle Kacheln sichtbar sind */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; padding-bottom: 6px; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; } }
.tile { min-width: 0; min-height: 104px; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 8px; text-decoration: none; color: var(--text-strong); font-weight: var(--weight-semibold); font-size: .875rem; text-align: center; line-height: 1.2; transition: transform var(--duration-fast, .15s) ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-2px); color: var(--text-strong); box-shadow: var(--shadow-4); }
.tile .icon { width: 30px; height: 30px; stroke-width: 1.5; color: var(--tanne-700); }
.tile.accent { background: var(--action-primary); color: var(--action-primary-text); }
.tile.accent .icon { color: var(--action-primary-text); }

/* ---------- Abschnitte ---------- */
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 1.875rem); }
.section-head a { font-size: .9375rem; white-space: nowrap; }

.card { width: calc((100cqw - var(--side)) / var(--cards-per, 1.45) - 12px); text-decoration: none; color: var(--text-strong); }
/* Karussells: immer eine angeschnittene Karte rechts, dazu Verlauf und Pfeile, solange es weitergeht */
:root { --cards-per: 1.45; }
@media (min-width: 560px) { :root { --cards-per: 2.4; } }
@media (min-width: 900px) { :root { --cards-per: 3.4; } }
@media (min-width: 1100px) { :root { --cards-per: 4.4; } }
.rail-wrap { position: relative; }
.rail-wrap::after { content: ""; position: absolute; top: 0; right: calc(-1 * var(--side)); bottom: 18px; width: 48px; pointer-events: none; background: linear-gradient(to right, transparent, var(--surface-page)); opacity: 0; transition: opacity .2s ease; }
.rail-wrap.more-right::after { opacity: 1; }
.rail-btn { position: absolute; top: calc(50% - 30px); width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--leinen-050); background: var(--surface-dark); color: var(--text-inverse); box-shadow: var(--shadow-3); display: none; place-items: center; cursor: pointer; z-index: 3; }
.rail-btn .icon { width: 20px; height: 20px; stroke-width: 2.5; }
.rail-btn:hover { background: var(--action-primary); }
.rail-btn.prev { left: -8px; }
.rail-btn.next { right: -8px; }
@media (hover: hover) and (min-width: 720px) {
  .rail-wrap.more-left .rail-btn.prev, .rail-wrap.more-right .rail-btn.next { display: grid; }
}
.card .media { aspect-ratio: 4 / 3.3; border-radius: var(--radius-lg); overflow: hidden; background: var(--tanne-600); display: grid; place-items: center; box-shadow: var(--shadow-inset-photo); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .media img { transform: scale(1.04); }
.card .media .icon { width: 44px; height: 44px; color: var(--leinen-100); stroke-width: 1.25; }
.card .media.tone-1 { background: var(--tanne-600); }
.card .media.tone-2 { background: var(--holz-700); }
.card .media.tone-3 { background: var(--nebel-600); }
.card .media.tone-4 { background: var(--tanne-400); }
.card h3 { font-family: var(--font-body); font-size: 1rem; font-weight: var(--weight-semibold); letter-spacing: 0; margin-top: 10px; }
.card:hover h3 { color: var(--text-link-hover); }
.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 560px) { .grid-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 16px; } }
.grid-cards .card h3 { font-size: .9375rem; overflow-wrap: anywhere; }
.grid-cards .card .media .icon { width: 36px; height: 36px; }
.grid-cards .card { width: auto; }

/* ---------- Wetter ---------- */
.weather { width: min(92vw, 420px); border-radius: var(--radius-lg); padding: 18px 20px; color: var(--text-inverse); background: linear-gradient(160deg, #2c4a63 0%, #1e3446 60%, var(--tanne-800) 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; box-shadow: var(--shadow-2); }
.weather .day { text-align: center; }
.weather .day strong { display: block; font-weight: var(--weight-semibold); }
.weather .day .icon { width: 36px; height: 36px; margin: 10px auto; stroke-width: 1.25; }
.weather .temps { font-size: .875rem; color: var(--text-inverse-muted); }
.weather .temps b { color: var(--text-inverse); font-weight: var(--weight-semibold); }
.weather-label { font-size: .8125rem; color: var(--text-muted); margin-top: 8px; }

/* ---------- Aufenthalt ---------- */
.stay-card { background: var(--surface-dark); color: var(--text-inverse); border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-3); }
.stay-card .eyebrow { color: var(--holz-300); }
.stay-card h2 { color: var(--text-inverse); font-size: 1.75rem; margin-top: 6px; }
.stay-dates { display: grid; grid-template-columns: auto minmax(64px, 1fr) auto; gap: 14px; align-items: center; margin-top: 18px; max-width: 560px; }
.stay-dates .r { text-align: right; }
.stay-dates .span { position: relative; text-align: center; }
.stay-dates .span::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed rgb(255 255 255 / .28); }
.stay-dates .span span { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface-dark); border: 1px solid rgb(255 255 255 / .18); font-size: .75rem; color: var(--holz-300); white-space: nowrap; }
.stay-dates .span .icon { width: 13px; height: 13px; }
/* sehr schmale Displays: Anreise | Abreise nebeneinander, Naechte mittig darunter */
@media (max-width: 380px) {
  .stay-dates { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .stay-dates .span { grid-column: 1 / -1; order: 3; }
  .stay-dates .val { font-size: 1.1875rem; }
}
.stay-dates .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-inverse-muted); }
.stay-dates .val { font-family: var(--font-display); font-size: 1.3125rem; white-space: nowrap; }
.stay-dates .sub { font-size: .8125rem; color: var(--text-inverse-muted); }
.stay-dates .arrow { color: var(--holz-300); }
.stay-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-on-dark); font-size: .9375rem; color: var(--text-inverse-muted); }
.stay-meta span { display: inline-flex; gap: 6px; align-items: center; }
.btn-light { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; background: var(--leinen-050); color: var(--tanne-900); padding: 10px 18px; border-radius: var(--radius-btn); font-weight: var(--weight-semibold); text-decoration: none; }
.btn-light:hover { background: var(--holz-100); color: var(--tanne-900); }

.tasks { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 44px 1fr 24px; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-card); text-decoration: none; color: var(--text-body); }
.task:hover { color: var(--text-body); box-shadow: var(--shadow-2); }
.task .ti { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--surface-warm); color: var(--holz-900); }
.task .ti .icon { width: 22px; height: 22px; }
.task strong { display: block; color: var(--text-strong); font-weight: var(--weight-semibold); }
.task small { display: block; font-size: .875rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.task .state { color: var(--border-strong); }
.task.done .ti { background: var(--state-ok-surface); color: var(--state-ok-text); }
.task.done .state { color: var(--state-ok-text); }
.task.todo .ti { background: var(--glut-100); color: var(--glut-600); }
.task.locked { opacity: .75; }
.pill { display: inline-block; font-size: .6875rem; font-weight: var(--weight-semibold); letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-muted); margin-left: 6px; vertical-align: 2px; }
.pill.ok { background: var(--state-ok-surface); color: var(--state-ok-text); }
.pill.alert { background: var(--state-alert-surface); color: var(--state-alert-text); }

/* ---------- Listen / Inhalte ---------- */
.list { background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.list a, .list .row { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--text-strong); font-weight: var(--weight-medium); border-top: 1px solid var(--border-subtle); }
.list > :first-child { border-top: 0; }
.list a:hover { background: var(--surface-sunken); color: var(--text-strong); }
.list .icon { color: var(--text-muted); }
.list .sep { width: 1px; }
.list form { margin: 0; }
.list button.row { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; border-top: 1px solid var(--border-subtle); }
.list .muted { color: var(--text-muted); font-weight: 400; font-size: .9375rem; }

.prose { font-size: 1.0625rem; line-height: 1.65; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 1em; }
.prose ul { padding-left: 1.2em; margin: 0; }
.prose strong { color: var(--text-strong); }
.detail-hero { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; margin: 16px 0 22px; background: var(--tanne-600); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--action-primary); color: var(--action-primary-text); font: inherit; font-weight: var(--weight-semibold); text-decoration: none; cursor: pointer; transition: background .15s ease; }
.btn:hover { background: var(--action-primary-hover); color: var(--action-primary-text); }
.btn.secondary { background: var(--action-secondary); }
.btn.secondary:hover { background: var(--action-secondary-hover); }
.btn.quiet { background: var(--surface-raised); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-1); }
.btn.quiet:hover { background: var(--action-quiet-hover); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.form { display: grid; gap: 18px; }
.fieldset { background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 18px; border: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.fieldset legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 1.125rem; color: var(--text-strong); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fieldset legend + * { clear: both; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row-zip { grid-template-columns: 140px 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field .label { font-size: .875rem; font-weight: var(--weight-semibold); color: var(--text-strong); }
.field .hint { font-size: .8125rem; color: var(--text-muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text-strong); font: inherit; font-size: 1rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--ring-focus); }
.field.error input, .field.error select { border-color: var(--state-alert-text); background: var(--state-alert-surface); }
.field .err { font-size: .8125rem; color: var(--state-alert-text); font-weight: var(--weight-medium); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .9375rem; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--tanne-800); }
.check.error { color: var(--state-alert-text); }
.sig-wrap { position: relative; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--leinen-050); touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 180px; cursor: crosshair; }
.sig-wrap .sig-clear { position: absolute; top: 8px; right: 8px; }
.sig-line { position: absolute; left: 18px; right: 18px; bottom: 36px; border-bottom: 1px solid var(--border-strong); pointer-events: none; }
.sig-existing { max-height: 90px; display: block; margin: 6px 0; }
.linkbtn { background: none; border: 0; color: var(--text-link); font: inherit; font-size: .875rem; cursor: pointer; padding: 4px; text-decoration: underline; }

.notice { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--state-info-surface); color: var(--state-info-text); font-size: .9375rem; }
.notice.ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok) 25%, transparent); }
.notice.alert { background: var(--state-alert-surface); color: var(--state-alert-text); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--state-alert-text) 25%, transparent); }
.notice.warm { background: var(--surface-warm); color: var(--holz-900); }

.code-box { text-align: center; padding: 26px 18px; background: var(--surface-dark); color: var(--text-inverse); border-radius: var(--radius-xl); }
.code-box .code { font-family: var(--font-display); font-size: clamp(2.75rem, 12vw, 4rem); letter-spacing: .12em; margin: 8px 0; }
.code-box small { color: var(--text-inverse-muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .9375rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text-strong); font-weight: var(--weight-medium); word-break: break-word; }

.page { padding-top: 20px; padding-bottom: 40px; }
.page > h2 { font-size: 1.875rem; margin-bottom: 8px; }
.lead { color: var(--text-muted); margin-bottom: 20px; }
.stack > * + * { margin-top: 16px; }
.center-msg { text-align: center; padding: 60px 0; }
.center-msg .icon { width: 48px; height: 48px; color: var(--holz-500); margin: 0 auto 14px; stroke-width: 1.5; }
.powered { text-align: center; margin: 40px 0 10px; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Bottom-Navigation ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in oklab, var(--surface-raised) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border-subtle); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 520px; height: var(--nav-h); }
.bottomnav a { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--text-muted); font-size: .75rem; font-weight: var(--weight-semibold); position: relative; }
.bottomnav a .icon { width: 24px; height: 24px; stroke-width: 1.75; }
.bottomnav a[aria-current="page"] { color: var(--text-strong); }
.bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--action-primary); }
.bottomnav .dot { position: absolute; top: 12px; margin-left: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--action-primary); }

.skeleton { background: linear-gradient(90deg, var(--leinen-200), var(--leinen-100), var(--leinen-200)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-md); }
@keyframes sk { to { background-position: -200% 0; } }

@media (min-width: 900px) {
  .hero { min-height: 560px; }
  .tile { min-height: 120px; }
}

/* Bedingungen fuer den Tuercode */
.cond-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cond-list li { display: flex; align-items: center; gap: 8px; font-weight: var(--weight-semibold); }
.cond-list li .icon { width: 18px; height: 18px; flex: none; }
.cond-list li.ok { color: var(--state-ok-text); }
.pay-secure { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--text-muted); text-align: center; margin: 0; }
.pay-secure .icon { width: 16px; height: 16px; flex: none; }
.detail-icon { width: 72px; height: 72px; border-radius: var(--radius-lg); background: var(--tanne-600); color: var(--leinen-100); display: grid; place-items: center; margin: 12px 0 18px; }
.detail-icon .icon { width: 36px; height: 36px; stroke-width: 1.5; }

.weather .temps span { display: block; }
.card-rest { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
/* Hinweisseite ohne Buchungslink */
.hero.hero--short { min-height: min(56vh, 460px); }
.hero.hero--short .wrap { padding-top: 150px; padding-bottom: 72px; }
.hero h1, .hero p { text-shadow: 0 1px 8px rgb(0 0 0 / .45); }
.hero p { color: var(--text-inverse); }
.btn-light--ghost { background: transparent; color: var(--text-inverse); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); }
.btn-light--ghost:hover { background: rgb(255 255 255 / .08); color: var(--text-inverse); }
