/* =========================================================
   Hüttli – Liquid Glass × Alphütte
   ========================================================= */
:root {
  --wood-900: #2a1a10;
  --wood-700: #5a3a22;
  --wood-500: #8b5a33;
  --wood-300: #c99a6b;
  --cream: #f6efe3;
  --paper: #fbf7f0;
  --fir: #3c5a2e;
  --alp-red: #d3262b;
  --edelweiss: url("img/edelweiss.svg") 0 0 / 28px 28px;
  /* Tischtuch-Karo (Vichy) wie in der Stube */
  --gingham:
    linear-gradient(90deg, rgba(196, 44, 56, .55) 50%, transparent 50%) 0 0 / 14px 14px,
    linear-gradient(rgba(196, 44, 56, .55) 50%, transparent 50%) 0 0 / 14px 14px,
    #fdfaf6;
  --sky: #2f6fb8;

  --text: #2a1e16;
  --text-2: rgba(42, 30, 22, .64);
  --text-3: rgba(42, 30, 22, .42);
  --accent: #d3262b; /* Rot wie der Teekrug */
  --accent-ink: #fff;
  --ok: #3f7a4f;
  --danger: #b23a2e;

  --glass: rgba(255, 250, 243, .58);
  --glass-strong: rgba(255, 250, 243, .78);
  --glass-thin: rgba(255, 250, 243, .32);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-edge: rgba(90, 58, 34, .10);
  --hairline: rgba(42, 30, 22, .10);
  --shadow: 0 10px 40px -12px rgba(43, 29, 20, .35), 0 2px 6px rgba(43, 29, 20, .06);
  --shadow-sm: 0 4px 16px -6px rgba(43, 29, 20, .25);
  --blur: saturate(180%) blur(22px);

  --radius: 26px;
  --radius-sm: 16px;
  --radius-xs: 11px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", "New York", "Iowan Old Style", Georgia, serif;

  --bg-photo: url("img/hut.jpg");
  color-scheme: light;
}

@media (max-width: 600px) { :root { --bg-photo: url("img/hut-small.jpg"); } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #f5ece0;
    --text-2: rgba(245, 236, 224, .68);
    --text-3: rgba(245, 236, 224, .42);
    --accent: #e5404d;
    --accent-ink: #fff;
    --glass: rgba(40, 28, 20, .52);
    --glass-strong: rgba(40, 28, 20, .78);
    --glass-thin: rgba(40, 28, 20, .30);
    --glass-border: rgba(255, 235, 210, .16);
    --glass-edge: rgba(0, 0, 0, .3);
    --hairline: rgba(255, 235, 210, .12);
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .2);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --text: #f5ece0; --text-2: rgba(245, 236, 224, .68); --text-3: rgba(245, 236, 224, .42);
  --accent: #e5404d; --accent-ink: #fff;
  --glass: rgba(40, 28, 20, .52); --glass-strong: rgba(40, 28, 20, .78); --glass-thin: rgba(40, 28, 20, .30);
  --glass-border: rgba(255, 235, 210, .16); --glass-edge: rgba(0, 0, 0, .3); --hairline: rgba(255, 235, 210, .12);
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font: 16px/1.4 var(--font);
  color: var(--text);
  background: #5b3a26;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hintergrund: Hüttenfoto + Wärme ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(246, 239, 227, .05) 0%, rgba(246, 239, 227, .30) 40%, rgba(246, 239, 227, .80) 100%),
    var(--bg-photo) 62% 30% / cover no-repeat,
    url("img/backdrop.svg") center bottom / cover no-repeat,
    linear-gradient(180deg, #a9cbe0 0%, #e8dcc6 60%, #cdb08a 100%);
}
.backdrop::after { /* feines Papierkorn – Nostalgie */
  content: ""; position: absolute; inset: 0; opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .backdrop {
    background:
      linear-gradient(180deg, rgba(20, 13, 9, .35) 0%, rgba(20, 13, 9, .7) 45%, rgba(20, 13, 9, .95) 100%),
      var(--bg-photo) 62% 30% / cover no-repeat,
      url("img/backdrop.svg") center bottom / cover no-repeat,
      linear-gradient(180deg, #1d2a36 0%, #2b2018 100%);
  }
}
:root[data-theme="dark"] .backdrop {
  background:
    linear-gradient(180deg, rgba(20, 13, 9, .35) 0%, rgba(20, 13, 9, .7) 45%, rgba(20, 13, 9, .95) 100%),
    var(--bg-photo) 62% 30% / cover no-repeat, url("img/backdrop.svg") center bottom / cover no-repeat, #1d2a36;
}

/* ---------- Glas ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 var(--glass-edge);
  border-radius: var(--radius);
}
.glass.strong { background: var(--glass-strong); }

/* ---------- Layout ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.page {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--tab-h) + var(--safe-b) + 36px);
  animation: pageIn .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; gap: 12px; margin: 6px 2px 18px; }
.topbar h1 {
  flex: 1; margin: 0; font: 600 34px/1.05 var(--font-display); letter-spacing: -.01em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: #fff; text-shadow: 0 2px 16px rgba(20, 30, 50, .45), 0 1px 2px rgba(20, 30, 50, .3);
}
.topbar .eyebrow { display: block; font: 600 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .88); margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar h1 { text-shadow: 0 1px 18px rgba(0, 0, 0, .5); } }

.section-title { font: 600 13px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(20, 12, 6, .6); margin: 26px 6px 10px; display: flex; justify-content: space-between; align-items: center; }
.section-title a { color: #ffd9b8; text-decoration: none; letter-spacing: 0; text-transform: none; font-size: 15px; font-weight: 500; }

.card { padding: 18px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > .card { margin: 0; }
.stack > * + * { margin-top: 10px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }

/* ---------- Tab-Bar (schwebend wie iOS) ---------- */
.tabbar {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 12px);
  width: min(560px, calc(100% - 24px)); height: var(--tab-h);
  display: flex; justify-content: space-around; align-items: center; padding: 6px;
  border-radius: 999px;
}
.tabbar a {
  flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-2); text-decoration: none; font-size: 10.5px; font-weight: 600; border-radius: 999px;
  transition: color .2s, background .25s, transform .2s;
}
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a.active { color: var(--accent); background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 2px 10px -4px rgba(43, 29, 20, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar a.active { background: rgba(255, 235, 210, .12); box-shadow: inset 0 0 0 1px rgba(255, 235, 210, .14); } }
:root[data-theme="dark"] .tabbar a.active { background: rgba(255, 235, 210, .12); }
.tabbar a:active { transform: scale(.94); }
.tabbar .badge { position: absolute; transform: translate(14px, -14px); }

/* ---------- Knöpfe ---------- */
.btn {
  appearance: none; border: 0; font: 600 16px/1 var(--font); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--gloss), var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 18px -8px rgba(200, 32, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .15s, filter .2s, opacity .2s; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--glass-thin); color: var(--text); box-shadow: inset 0 0 0 1px var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; }

.icon-btn {
  appearance: none; border: 0; cursor: pointer; width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--text);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--glass-border); flex: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.accent { background: var(--gloss), var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px rgba(160, 82, 45, .9); }
.icon-btn.plain { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: 36px; height: 36px; color: var(--text-2); }
.icon-btn:active { transform: scale(.92); }

.fab {
  position: fixed; z-index: 45; right: max(16px, calc(50% - 364px));
  bottom: calc(var(--tab-h) + var(--safe-b) + 26px); width: 58px; height: 58px;
}
.fab svg { width: 28px; height: 28px; }

/* ---------- Formulare ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 4px 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius-sm);
  font: 16px var(--font); color: var(--text);
  background: rgba(255, 255, 255, .55); border: 1px solid var(--hairline);
  outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
textarea.input { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(200, 32, 47, .15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .input { background: rgba(0, 0, 0, .25); } }
:root[data-theme="dark"] .input { background: rgba(0, 0, 0, .25); }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; min-width: 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(120, 100, 80, .28); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }

.segmented { display: flex; padding: 3px; border-radius: 999px; background: var(--glass-thin); box-shadow: inset 0 0 0 1px var(--glass-border); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.segmented button { flex: 1; appearance: none; border: 0; background: transparent; color: var(--text-2); font: 600 14px var(--font); height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.segmented button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px -2px rgba(43, 29, 20, .25); }

.search { position: relative; margin-bottom: 14px; }
.search svg { z-index: 1; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); }
.search .input { padding-left: 42px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-color: var(--glass-border); }

/* ---------- Listen ---------- */
.list { padding: 4px 0; overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 58px; position: relative; }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: 1px solid var(--hairline); }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.list-item.tap { cursor: pointer; }
.list-item.tap:active { background: rgba(255, 255, 255, .2); }
.list-empty { padding: 28px 18px; text-align: center; color: var(--text-2); }
.list-empty svg { width: 42px; height: 42px; opacity: .45; display: block; margin: 0 auto 10px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatars { display: flex; }
.avatars .avatar { width: 30px; height: 30px; font-size: 12px; margin-left: -8px; border: 2px solid var(--paper); }
.avatars .avatar:first-child { margin-left: 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(160, 82, 45, .14); color: var(--accent); }
.chip.green { background: rgba(63, 122, 79, .15); color: var(--ok); }
.chip.red { background: rgba(178, 58, 46, .14); color: var(--danger); }
.chip.gray { background: rgba(120, 100, 80, .14); color: var(--text-2); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--alp-red); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }

.check {
  width: 28px; height: 28px; border-radius: 50%; flex: none; cursor: pointer; display: grid; place-items: center;
  border: 2px solid var(--text-3); background: transparent; transition: all .2s; color: #fff; padding: 0;
}
.check svg { width: 16px; height: 16px; opacity: 0; transform: scale(.4); transition: all .25s cubic-bezier(.3, 1.6, .5, 1); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on svg { opacity: 1; transform: none; }
.done .title { text-decoration: line-through; color: var(--text-3); }

.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 1px var(--hairline); }
.stepper button { appearance: none; border: 0; background: transparent; width: 32px; height: 32px; font-size: 20px; color: var(--accent); cursor: pointer; }
.stepper b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---------- Übersicht ---------- */
.hero { padding: 22px; position: relative; overflow: hidden; }
.hero .big { font: 600 26px/1.15 var(--font-display); margin: 4px 0 10px; }
.weather { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.weather svg { width: 22px; height: 22px; }
.stat { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; min-height: 118px; justify-content: space-between; }
.stat .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.stat .ico svg { width: 22px; height: 22px; }
.stat .num { font: 600 30px/1 var(--font-display); }
.stat .lbl { font-size: 13px; color: var(--text-2); font-weight: 600; }

.tour-card { display: block; position: relative; height: 190px; overflow: hidden; padding: 0; text-decoration: none; color: #fff; }
.tour-card img, .tour-card .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tour-card .ph { background: linear-gradient(135deg, #6b4a2f, #2f4636); }
.tour-card .label { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 12px 16px; border-radius: 18px; display: flex; align-items: center; gap: 12px; color: var(--text); }
.tour-card .label svg { width: 26px; height: 26px; color: var(--accent); }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; background: var(--glass-thin); }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font: 600 22px var(--font-display); text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); padding: 4px 0 8px; text-transform: uppercase; }
.cal-day { min-height: 58px; padding: 4px 2px; border-radius: 12px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 2px; }
.cal-day:active { background: rgba(255, 255, 255, .3); }
.cal-day .n { font-size: 14px; font-weight: 600; text-align: center; width: 26px; height: 26px; line-height: 26px; margin: 0 auto; border-radius: 50%; }
.cal-day.other .n { color: var(--text-3); }
.cal-day.today .n { background: var(--alp-red); color: #fff; }
.cal-day .bar { height: 6px; border-radius: 3px; margin: 0 -2px; }
.cal-day .bar.s { margin-left: 3px; } .cal-day .bar.e { margin-right: 3px; }
.cal-day .more { font-size: 9px; text-align: center; color: var(--text-2); }
.stay-date { width: 52px; text-align: center; flex: none; border-radius: 14px; padding: 6px 0; background: rgba(255, 255, 255, .4); box-shadow: inset 0 0 0 1px var(--hairline); }
.stay-date b { display: block; font: 600 20px/1 var(--font-display); }
.stay-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent); }

/* ---------- Album ---------- */
.composer { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; margin-bottom: 14px; }
.post { padding: 0; overflow: hidden; margin-bottom: 16px; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.post-body { padding: 0 16px 12px; white-space: pre-wrap; word-break: break-word; }
.post-imgs { display: grid; gap: 3px; }
.post-imgs.n1 { grid-template-columns: 1fr; }
.post-imgs.n2 { grid-template-columns: 1fr 1fr; }
.post-imgs.n3, .post-imgs.nm { grid-template-columns: repeat(3, 1fr); }
.post-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; aspect-ratio: 1; background: rgba(0, 0, 0, .06); }
.post-imgs.n1 img { aspect-ratio: auto; max-height: 520px; }
.post-actions { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.like { appearance: none; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; font: 600 15px var(--font); color: var(--text-2); cursor: pointer; padding: 6px 8px; border-radius: 99px; }
.like svg { width: 24px; height: 24px; transition: transform .25s cubic-bezier(.3, 1.8, .5, 1); }
.like.on { color: var(--alp-red); }
.like.on svg { transform: scale(1.12); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 14px; }
.pick-grid div { position: relative; }
.pick-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.pick-grid button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }

/* ---------- Bottom-Sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(30, 20, 12, .32); animation: fade .25s; }
.sheet-wrap.closing { animation: fade .2s reverse forwards; }
.sheet {
  width: 100%; max-width: 620px; max-height: calc(100dvh - var(--safe-t) - 24px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 30px 30px 0 0; padding: 10px 20px calc(var(--safe-b) + 22px);
  animation: sheetUp .38s cubic-bezier(.2, .9, .2, 1);
  background: var(--glass-strong);
}
.sheet-wrap.closing .sheet { animation: sheetUp .22s reverse forwards ease-in; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 0 auto 10px; opacity: .6; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet-head h3 { flex: 1; margin: 0; font: 600 22px var(--font-display); }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 30px; padding-bottom: 22px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 200; left: 50%; top: calc(var(--safe-t) + 12px); transform: translateX(-50%);
  padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; max-width: calc(100% - 32px);
  animation: toastIn .4s cubic-bezier(.2, 1.4, .4, 1);
}
.toast.err { color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -20px) scale(.9); } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(10, 6, 4, .92); display: flex; align-items: center; justify-content: center; animation: fade .2s; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .icon-btn { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav.prev { left: 10px; } .lightbox .nav.next { right: 10px; }

/* ---------- 360° ---------- */
.pano-wrap { position: fixed; inset: 0; z-index: 60; background: #000; }
#pano { position: absolute; inset: 0; }
.pano-top { position: absolute; z-index: 5; top: calc(var(--safe-t) + 12px); left: 12px; right: 12px; display: flex; gap: 10px; align-items: center; }
.pano-top .title { flex: 1; padding: 0 16px; height: 44px; border-radius: 999px; display: flex; align-items: center; font-weight: 600; }
.pano-scenes { position: absolute; z-index: 5; left: 0; right: 0; bottom: calc(var(--safe-b) + 14px); display: flex; gap: 10px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
.pano-scenes button { flex: none; border: 0; padding: 4px; border-radius: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; color: var(--text); font: 600 12px var(--font); width: 100px; }
.pano-scenes img { width: 92px; height: 56px; object-fit: cover; border-radius: 14px; display: block; }
.pano-scenes button.on { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.pano-hint { position: absolute; z-index: 6; left: 50%; top: calc(var(--safe-t) + 70px); transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pnlm-hotspot-base.hs-go { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 250, 243, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer; display: grid; place-items: center; }
.pnlm-hotspot-base.hs-go::after { content: ""; width: 18px; height: 18px; border-top: 4px solid #5a3a22; border-right: 4px solid #5a3a22; transform: translateY(3px) rotate(-45deg); }
.pnlm-hotspot-base.hs-go span { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: rgba(43, 29, 20, .75); color: #fff; padding: 4px 10px; border-radius: 99px; font: 600 12px var(--font); }
.pnlm-hotspot-base.hs-info { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(160, 82, 45, .7); }
.pnlm-hotspot-base.hs-info span { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: rgba(43, 29, 20, .8); color: #fff; padding: 4px 10px; border-radius: 99px; font: 600 12px var(--font); }
.pnlm-load-box { background: rgba(43, 29, 20, .7) !important; border-radius: 20px !important; }

/* ---------- Scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 160; background: #000; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; left: 50%; top: 42%; width: min(76vw, 340px); height: 170px; transform: translate(-50%, -50%); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .9); }
.scanner .frame::after { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; height: 2px; background: var(--alp-red); box-shadow: 0 0 12px var(--alp-red); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
.scanner .bar { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 20px); display: flex; gap: 10px; }
.scanner .msg { position: absolute; left: 50%; top: calc(42% + 110px); transform: translateX(-50%); color: #fff; font-weight: 600; text-shadow: 0 1px 8px #000; text-align: center; width: 90%; }
.scanner .icon-btn { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; }

/* ---------- Auth ---------- */
body.is-auth { --bg-photo: url("img/hut-login.jpg"); }
body.is-auth .backdrop { background-position: center, 30% 40%, center bottom, 0 0; }
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--safe-t) + 30px) 16px calc(var(--safe-b) + 24px); max-width: 480px; margin: 0 auto; }
.auth .brand { text-align: center; margin-bottom: auto; padding-top: 6vh; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .45); }
.auth .brand .logo { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.auth .brand h1 { font: 600 46px/1 var(--font-display); margin: 0 0 6px; }
.auth .brand p { margin: 0; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.auth .card { padding: 22px; }
.auth h2 { margin: 0 0 4px; font: 600 24px var(--font-display); }
.auth .lead { margin: 0 0 18px; color: var(--text-2); }

.copybox { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 13px; word-break: break-all; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--hairline); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 380px) { .topbar h1 { font-size: 29px; } .cal-day { min-height: 50px; } }

/* =========================================================
   Liquid Glass – klar, ruhig, professionell
   Muster aus der Hütte nur als feine Akzente.
   ========================================================= */
:root {
  --rim: linear-gradient(155deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 35%, rgba(255, 255, 255, .06) 62%, rgba(255, 255, 255, .55));
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .06) 48%, rgba(255, 255, 255, 0) 52%);
  --blur: saturate(190%) blur(28px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --rim: linear-gradient(155deg, rgba(255, 240, 225, .38), rgba(255, 240, 225, .08) 40%, rgba(255, 240, 225, .03) 62%, rgba(255, 240, 225, .2)); }
}
:root[data-theme="dark"] { --rim: linear-gradient(155deg, rgba(255, 240, 225, .38), rgba(255, 240, 225, .08) 40%, rgba(255, 240, 225, .03) 62%, rgba(255, 240, 225, .2)); }

/* Glas mit Lichtkante (heller Rand oben links, weicher Rand unten rechts) */
.glass {
  border: 1px solid transparent;
  background: linear-gradient(var(--glass), var(--glass)) padding-box, var(--rim) border-box;
  box-shadow: 0 14px 44px -16px rgba(30, 18, 10, .42), 0 2px 6px -2px rgba(30, 18, 10, .08),
              inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -1px 1px rgba(0, 0, 0, .04);
}
.glass.strong { background: linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box, var(--rim) border-box; }
.sheet.glass { background: linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box, var(--rim) border-box; }

/* Knöpfe: einfarbig mit Glanz – keine Muster */
.btn { background: var(--gloss), var(--accent); text-shadow: none;
  box-shadow: 0 10px 22px -12px rgba(200, 32, 47, .75), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .12); }
.btn.ghost { background: linear-gradient(var(--glass-thin), var(--glass-thin)) padding-box, var(--rim) border-box; border: 1px solid transparent; box-shadow: var(--shadow-sm); }
.btn.danger { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.icon-btn { border: 1px solid transparent; background: linear-gradient(var(--glass), var(--glass)) padding-box, var(--rim) border-box; }
.icon-btn.plain { border: 0; background: transparent; }
.icon-btn.accent { background: var(--gloss), var(--accent); border: 0;
  box-shadow: 0 12px 26px -10px rgba(200, 32, 47, .75), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -2px 4px rgba(0, 0, 0, .12); }

/* Tab-Bar wie iOS 26: Glas-Pille, aktive Linse */
.tabbar { padding: 5px; }
.tabbar a.active { color: var(--accent);
  background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) padding-box, var(--rim) border-box; border: 1px solid transparent;
  box-shadow: 0 4px 14px -6px rgba(30, 18, 10, .35), inset 0 1px 0 rgba(255, 255, 255, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar a.active { background: linear-gradient(rgba(255, 235, 210, .12), rgba(255, 235, 210, .12)) padding-box, var(--rim) border-box; box-shadow: none; } }
:root[data-theme="dark"] .tabbar a.active { background: linear-gradient(rgba(255, 235, 210, .12), rgba(255, 235, 210, .12)) padding-box, var(--rim) border-box; box-shadow: none; }

.segmented { border: 1px solid transparent; box-shadow: none; background: linear-gradient(var(--glass-thin), var(--glass-thin)) padding-box, var(--rim) border-box; }
.segmented button.on { box-shadow: 0 3px 10px -3px rgba(30, 18, 10, .3), inset 0 1px 0 rgba(255, 255, 255, .7); }

.check.on { background: var(--ok); border-color: var(--ok); }
.chip { background: rgba(200, 32, 47, .1); color: var(--accent); }
.stat .ico { background-image: var(--gloss); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -4px rgba(0, 0, 0, .3); }
.section-title a { color: #fff; text-decoration: none; opacity: .9; }
.like.on { color: var(--alp-red); }

/* Einziger Muster-Akzent ausserhalb des Hüttenbuchs: feines Edelweiss-Band auf der Anmeldung */
.auth .card { overflow: hidden; }
.auth .card::before { content: ""; display: block; height: 7px; margin: -22px -22px 18px; background: url("img/edelweiss.svg") 0 -10px / 20px 20px; opacity: .9; }
.auth .brand .logo { box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .4); }

/* ---------- Hüttenbuch ---------- */
.book { display: flex; flex-direction: column; gap: 16px; }
.book-cover {
  border-radius: 10px 22px 22px 10px; padding: 0 22px 24px; text-align: center; color: #f6e7c8; position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, .05) 14px, transparent 22px),
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 5px),
    #6b3420;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.book-cover-band { height: 18px; margin: 0 -22px 22px; background: var(--gingham); }
.book-cover-title { font: 600 40px/1 var(--font-display); letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); color: #f3d79a; }
.book-cover-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 8px 0 18px; opacity: .8; }
.book-page {
  position: relative; padding: 22px 20px 18px 46px; border-radius: 6px 16px 16px 6px; color: #3a2a1c;
  font-family: "Caveat", "Bradley Hand", "Segoe Print", cursive; font-size: 23px; line-height: 30px;
  background:
    linear-gradient(90deg, transparent 32px, rgba(200, 32, 47, .45) 32px, rgba(200, 32, 47, .45) 34px, transparent 34px),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(80, 110, 160, .22) 29px 30px),
    linear-gradient(180deg, #fffaf0, #f7eedc);
  background-position: 0 0, 0 22px, 0 0;
  box-shadow: 0 10px 30px -14px rgba(43, 29, 20, .55), 0 1px 0 rgba(0, 0, 0, .04), inset 6px 0 10px -6px rgba(90, 58, 34, .35);
}
.book-date { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--alp-red); line-height: 30px; }
.book-title { margin: 0; font: 700 30px/30px "Caveat", cursive; }
.book-body { white-space: pre-wrap; word-break: break-word; }
.book-photos { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 6px; }
.book-photos img {
  width: calc(50% - 7px); max-width: 200px; aspect-ratio: 1; object-fit: cover; cursor: zoom-in;
  padding: 7px 7px 22px; background: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); transform: rotate(var(--r, 0deg));
}
.book-sign { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.book-sign span { font-size: 19px; color: #6b5a48; }
.book-sign b { font-size: 28px; font-weight: 700; transform: rotate(-3deg); display: inline-block; }
.book-tools { position: absolute; top: 6px; right: 6px; display: flex; }
.book-tools .icon-btn { color: rgba(58, 42, 28, .45); }
.book-input { font: 22px/1.3 "Caveat", cursive; min-height: 160px; }
.book-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.book-card .mini {
  width: 54px; height: 68px; flex: none; border-radius: 4px 9px 9px 4px; display: grid; place-items: center; color: #f3d79a;
  background: linear-gradient(90deg, rgba(0, 0, 0, .3), transparent 8px), #6b3420; box-shadow: var(--shadow-sm);
  font: 700 22px "Caveat", cursive;
}
.book-card .quote { font: 20px/1.15 "Caveat", cursive; color: var(--text-2); }

/* ---------- Spiel: Brot streichen ---------- */
.game-intro p { margin: 0 0 10px; }
.game-hero svg { width: 100%; max-height: 150px; display: block; margin: -4px 0 6px; }
.game-rules { margin: 0 0 18px; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.game-rules li { margin: 4px 0; }
.game { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 12px;
  padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 16px); max-width: 560px; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.game-top { display: flex; gap: 10px; align-items: center; }
.game-hud { flex: 1; display: flex; justify-content: space-around; padding: 6px 10px; border-radius: 999px; }
.game-hud span { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.game-hud small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.game-hud b { font: 600 20px var(--font-display); font-variant-numeric: tabular-nums; }
.game-order { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; }
.game-order small { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
.game-order b { font: 600 22px var(--font-display); }
.jar-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .25), inset 0 3px 6px rgba(255, 255, 255, .35); }
.game-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }
.game-stage canvas { touch-action: none; cursor: crosshair; }
.game-pct { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 14px; padding: 5px 12px; border-radius: 99px;
  background: rgba(30, 18, 10, .55); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.game-pop { position: absolute; top: 18%; left: 50%; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  font: 700 34px var(--font-display); color: var(--ok); text-shadow: 0 2px 12px rgba(255, 255, 255, .8); transition: all .35s cubic-bezier(.2, 1.4, .4, 1); white-space: nowrap; }
.game-pop.show { opacity: 1; transform: translate(-50%, -10px); }
.game-pop.bad { color: var(--danger); font-size: 20px; }
.game-jars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jar { border: 1px solid transparent; border-radius: 18px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: 600 11px/1.15 var(--font); color: var(--text); cursor: pointer; transition: transform .15s; text-align: center; }
.jar:active { transform: scale(.95); }
.jar.on { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-sm); }
.jar-body { width: 34px; height: 40px; border-radius: 8px 8px 10px 10px; position: relative;
  background: linear-gradient(90deg, rgba(255, 255, 255, .0) 20%, rgba(255, 255, 255, .45) 32%, rgba(255, 255, 255, 0) 44%), var(--c);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .2), 0 3px 8px -3px rgba(0, 0, 0, .4); }
.jar-body i { position: absolute; left: -2px; right: -2px; top: -7px; height: 9px; border-radius: 3px; background: linear-gradient(#f2efe9, #c9c3b8); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.game-big { font: 600 64px/1 var(--font-display); margin-top: 6px; }
.game-stats { display: flex; justify-content: space-around; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.game-stats span { display: flex; flex-direction: column; } .game-stats b { font: 600 22px var(--font-display); } .game-stats small { color: var(--text-2); font-size: 12px; }
.rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; color: var(--text-2); background: rgba(120, 100, 80, .12); }
.rank.r1 { background: linear-gradient(#f6d77a, #d9a83a); color: #5a3d00; } .rank.r2 { background: linear-gradient(#eceff2, #b9c0c8); color: #3d444b; } .rank.r3 { background: linear-gradient(#e9b98f, #b9773f); color: #4a2a10; }
.list-item.me { background: rgba(200, 32, 47, .06); }
.list-item .score { font: 600 20px var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-height: 700px) { .game-order b { font-size: 18px; } .jar-body { width: 28px; height: 32px; } }
.game-mini { background: linear-gradient(160deg, #fff6e6, #f0dcc0) !important; }
.game-mini svg { width: 40px; height: 40px; }
.page:has(.game) ~ .tabbar { display: none; }
.game::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(246, 239, 227, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
