/* ── Website (public.html, public/js/public-site.js) ──
   Gleiche Tokens wie die App (tokens.css, Variante aus km_theme): dunkle
   GaumenMatch-Fläche (--gm-primary/--gm-text), Knöpfe in --gm-secondary wie
   die Pillen der App. Nur von public.html geladen. */

.pub-body {
  min-height: 100dvh;
  background: var(--gm-primary); color: var(--gm-text);
}
.pub-body--locked { overflow: hidden; }
.pub-body a { color: inherit; }

.pub-muted { margin: 0; font-size: .9rem; line-height: 1.5; color: color-mix(in srgb, var(--gm-text) 72%, transparent); }

/* Kopf */
.pub-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 12px;
  background: color-mix(in srgb, var(--gm-primary) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pub-brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.1rem; font-weight: 800; text-decoration: none; letter-spacing: -.2px; }

/* Knöpfe */
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px; border-radius: 999px;
  white-space: nowrap;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s, transform .1s;
}
.pub-btn:active { transform: scale(.97); }
.pub-btn--primary { background: var(--gm-secondary); color: var(--gm-secondary-text); }
.pub-btn--primary:hover { filter: brightness(.95); }
.pub-btn--ghost {
  background: color-mix(in srgb, var(--gm-text) 10%, transparent);
  border-color: color-mix(in srgb, var(--gm-text) 22%, transparent);
  color: var(--gm-text);
}
.pub-btn--sm { min-height: 44px; padding: 0 18px; font-size: .9rem; }
.pub-btn--block { width: 100%; margin-top: 16px; }

/* Einstieg */
.pub-hero {
  max-width: 720px; margin: 0 auto;
  padding: 28px 20px 36px;
}
.pub-hero__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -1px;
  text-wrap: balance;
}
.pub-hero__sub { margin: 0 0 24px; font-size: 1.05rem; line-height: 1.55; color: color-mix(in srgb, var(--gm-text) 82%, transparent); }
.pub-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pub-hero__actions .pub-btn { flex: 1 1 160px; }
.pub-hero__note { margin: 12px 0 0; font-size: .85rem; color: color-mix(in srgb, var(--gm-text) 65%, transparent); }
.pub-hero__link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 700; }

.pub-features {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px;
}
.pub-feature {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 18px;
  background: color-mix(in srgb, var(--gm-text) 8%, transparent);
  font-size: .9rem; line-height: 1.45; color: color-mix(in srgb, var(--gm-text) 80%, transparent);
}
.pub-feature strong { display: block; color: var(--gm-text); font-size: 1rem; }
.pub-feature__icon { font-size: 1.4rem; line-height: 1.2; }

/* Rezepte */
.pub-recipes {
  max-width: 1100px; margin: 0 auto;
  padding: 8px 20px 40px;
}
.pub-recipes__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pub-recipes__head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.pub-search { margin: 14px 0 18px; }

.pub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px;
}
.pub-card { cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 22px; }
.pub-card:focus-visible { outline: 2px solid var(--gm-secondary); outline-offset: 4px; }
.pub-card__img, .pub-detail__img {
  position: relative; aspect-ratio: 4 / 3; border-radius: 22px;
  background-color: color-mix(in srgb, var(--gm-text) 8%, transparent);
  background-size: cover; background-repeat: no-repeat;
}
.pub-card__img--empty { display: flex; align-items: center; justify-content: center; font-size: 3rem; opacity: .6; }
.pub-card__time { position: absolute; top: 12px; left: 12px; }
.pub-card__info { padding: 10px 4px 0; }
.pub-card__name {
  margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pub-card__meta { margin: 4px 0 0; min-height: 1.2em; font-size: .85rem; font-weight: 600; opacity: .7; }

/* Pille wie .kb-card__time (kochbuch.css) */
.pub-pill {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(20,12,8,.42); color: #fff;
  font-size: .8rem; font-weight: 700;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pub-pill strong { font-size: 1rem; font-weight: 800; }

/* Ebenen: ganze Seite (Rezept) bzw. Blatt (Installieren) */
.pub-sheet {
  position: fixed; inset: 0; z-index: 20;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--gm-primary); color: var(--gm-text);
}
.pub-sheet.hidden { display: none; }
.pub-sheet--small {
  display: flex; align-items: flex-end; justify-content: center;
  background: color-mix(in srgb, #000 55%, transparent);
}
.pub-sheet__card {
  position: relative; width: 100%; max-width: 520px;
  padding: 8px 22px calc(env(safe-area-inset-bottom, 0px) + 24px);
  border-radius: 26px 26px 0 0;
  background: var(--gm-primary); box-shadow: var(--shadow-lg);
}
.pub-sheet__close { position: absolute; top: 12px; right: 14px; }
.pub-sheet__card .pub-sheet__title { margin-right: 52px; }
@media (min-width: 700px) {
  .pub-sheet--small { align-items: center; }
  .pub-sheet__card { border-radius: 26px; }
}

/* Zurück schwebt über dem randlosen Bild, ohne Platz zu belegen. */
.pub-sheet__bar { position: sticky; top: 0; z-index: 2; height: 0; }
.pub-sheet__bar .pub-round-btn { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 14px; }
.pub-round-btn {
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(20,12,8,.42); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pub-round-btn svg { width: 22px; height: 22px; }

.pub-sheet__body { max-width: 720px; margin: 0 auto; padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 32px); }
.pub-sheet__title { margin: 18px 0 10px; font-size: 1.7rem; font-weight: 900; line-height: 1.15; letter-spacing: -.4px; }

.pub-detail__img { margin: 0 -20px; border-radius: 0 0 26px 26px; aspect-ratio: 4 / 3; max-height: 60dvh; width: calc(100% + 40px); }
@media (min-width: 760px) { .pub-detail__img { margin: 16px 0 0; width: 100%; border-radius: 22px; } }
.pub-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-facts .pub-pill { background: color-mix(in srgb, var(--gm-text) 10%, transparent); color: var(--gm-text); border-color: color-mix(in srgb, var(--gm-text) 18%, transparent); }
.pub-detail__h { margin: 26px 0 8px; font-size: 1.15rem; font-weight: 800; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list__group { margin: 12px 0 4px; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; opacity: .65; }
.pub-list__item {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--gm-text) 14%, transparent);
  font-size: .95rem;
}
.pub-list__amount { font-weight: 700; text-align: right; }
.pub-list__step { display: flex; gap: 12px; padding: 10px 0; font-size: .95rem; line-height: 1.55; }
.pub-step-no {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gm-secondary); color: var(--gm-secondary-text);
  font-size: .85rem; font-weight: 800;
}
/* Gekürzt: letzte Zeilen blenden aus — der Rest steht in der App. */
.pub-fade { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }

.pub-lock {
  margin-top: 18px; padding: 18px; border-radius: 20px;
  background: color-mix(in srgb, var(--gm-text) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--gm-text) 18%, transparent);
}
.pub-lock__title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; }
.pub-lock .pub-hero__actions { margin-top: 14px; }
.pub-source { margin-top: 16px; }

/* Installieren-Anleitung */
.pub-steps { margin: 0 0 14px; padding-left: 1.3em; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; line-height: 1.5; }
.pub-inline-icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }

.pub-footer {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  font-size: .9rem; font-weight: 600; opacity: .75;
}
.pub-footer a { display: inline-flex; align-items: center; min-height: 44px; }
