/* ==========================================================================
   Flothari Maker — Komponenten
   ========================================================================== */

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 15px; font-weight: 600;
  min-height: 46px;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 19px; height: 19px; }
.btn--primary { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--primary:active { background: var(--clay-dark); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--clay-dark); }
.btn--soft { background: var(--clay-tint); border-color: transparent; color: var(--clay-dark); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 8px 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---- Chips (Filter / Kategorien) ------------------------------------- */
.chips {
  display: flex; gap: var(--s-2);
  overflow-x: auto;
  padding: 2px 2px var(--s-2);
  margin: 0 calc(var(--s-4) * -1);
  padding-left: var(--s-4); padding-right: var(--s-4);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.chip.is-active { background: var(--clay); border-color: var(--clay); color: #fff; }
.chip__count { opacity: 0.7; font-weight: 600; margin-left: 4px; }

/* Kleiner, statischer Tag */
.tag {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  color: var(--ink-soft);
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}
.tag--new { background: var(--good-tint); color: var(--good); border-color: transparent; }
.tag--own { background: var(--clay-tint); color: var(--clay-dark); border-color: transparent; }
.tag--warn { background: color-mix(in srgb, var(--danger) 13%, var(--panel)); color: var(--danger); border-color: transparent; font-weight: 700; }

/* ---- Suchfeld --------------------------------------------------------- */
.search {
  position: relative;
  display: flex; align-items: center;
}
.search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--ink-faint); pointer-events: none; }
.search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  font-size: 16px;
}
.search input:focus { outline: 2px solid var(--clay); outline-offset: 1px; border-color: var(--clay); }
.search__clear {
  position: absolute; right: 8px;
  border: none; background: none; color: var(--ink-faint);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}

/* ---- Formfelder ------------------------------------------------------- */
.field { margin-bottom: var(--s-4); }
.field > label, .label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--ink);
}
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; line-height: 1.4; }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus {
  outline: 2px solid var(--clay); outline-offset: 1px; border-color: var(--clay);
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit {
  position: absolute; right: 14px; font-size: 13px; color: var(--ink-soft); pointer-events: none;
}
.input-wrap .input { padding-right: 54px; }

/* ---- Karten ----------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: var(--s-4); }

/* Formkarte (Katalog-Grid) */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
@media (min-width: 560px) { .form-grid { grid-template-columns: repeat(3, 1fr); } }

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  position: relative;
  text-align: left;
  width: 100%;
  padding: 0;
}
.form-card:active { transform: scale(0.99); }
.form-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--panel-2);
  overflow: hidden;
}
.form-card__media img { width: 100%; height: 100%; object-fit: cover; }
.form-card__media .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
}
.form-card__badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.form-card__fav {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: none; display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); backdrop-filter: blur(4px);
}
.form-card__fav.is-fav { color: var(--fav); }
.form-card__fav.is-fav svg { fill: var(--fav); }

/* Favorit-Herz als Listen-Button (Meine Formen) */
.fav-heart {
  border: none; background: transparent;
  width: 40px; height: 40px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); border-radius: var(--r-pill);
}
.fav-heart svg { width: 23px; height: 23px; }
.fav-heart:active { background: var(--panel-2); }
.fav-heart.is-fav { color: var(--fav); }
.fav-heart.is-fav svg { fill: var(--fav); }
.form-card__body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.form-card__name {
  font-size: 13.5px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.form-card__meta { font-size: 11.5px; color: var(--ink-faint); }
.form-card__calc {
  margin-top: auto;
  font-size: 12px; color: var(--ink-soft);
  display: flex; justify-content: space-between; gap: 6px;
  padding-top: 6px; border-top: 1px solid var(--line-soft);
}
.form-card__calc b { color: var(--clay-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.form-card__own {
  border: none; border-top: 1px solid var(--line);
  background: var(--panel-2); color: var(--clay-dark);
  padding: 9px; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.form-card__own.is-owned { background: var(--good-tint); color: var(--good); }
.form-card__own svg { width: 16px; height: 16px; }

/* Listenzeile (Meine Formen / Session-Picker) */
.list { display: flex; flex-direction: column; gap: var(--s-2); }
.list-row {
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  width: 100%; text-align: left;
}
.list-row__media {
  width: 56px; height: 56px; flex: 0 0 auto;
  border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; color: var(--ink-faint);
}
.list-row__media img { width: 100%; height: 100%; object-fit: cover; }
.list-row__body { flex: 1; min-width: 0; }
.list-row__name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.list-row__sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-row__end { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Storage-Pill */
.pill-storage {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600;
  background: var(--plaster); color: var(--ink-soft);
  border-radius: var(--r-pill); padding: 2px 9px;
}
.pill-storage svg { width: 12px; height: 12px; }
.pill-storage.is-empty { color: var(--ink-faint); background: var(--panel-2); border: 1px dashed var(--line); }

/* ---- Mengen-Stepper --------------------------------------------------- */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); overflow: hidden; }
.stepper button {
  width: 38px; height: 38px; border: none; background: var(--panel);
  color: var(--clay-dark); font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.stepper button:active { background: var(--panel-2); }
.stepper button[disabled] { color: var(--ink-faint); opacity: 0.5; }
.stepper input {
  width: 44px; text-align: center; border: none;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; height: 38px; background: var(--panel);
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Result / Kennzahlen ---------------------------------------------- */
.result { border-top: 1px dashed var(--line); padding-top: var(--s-4); margin-top: var(--s-2); }
.result-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; }
.result-row + .result-row { border-top: 1px solid var(--line-soft); }
.result-row__label { font-size: 14px; color: var(--ink-soft); }
.result-row__value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-row__value.is-primary { color: var(--clay-dark); font-size: 25px; }
.result-row__value .u { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-left: 2px; }
.result-note { margin-top: var(--s-3); background: var(--plaster); border-radius: var(--r-sm); padding: 10px 12px; font-size: 12.5px; color: var(--ink-soft); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 10px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat__num { font-size: 22px; font-weight: 800; color: var(--clay-dark); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__label { font-size: 11px; color: var(--ink-soft); margin-top: 3px; font-weight: 600; }

/* ---- Home-Tiles ------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.tile {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  text-align: left; min-height: 116px;
  position: relative; overflow: hidden;
}
.tile:active { transform: scale(0.99); }
.tile__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clay-tint); color: var(--clay-dark);
}
.tile__icon svg { width: 23px; height: 23px; }
.tile__title { font-size: 15.5px; font-weight: 700; }
.tile__sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; line-height: 1.35; }
.tile--accent { background: linear-gradient(135deg, var(--clay), var(--clay-dark)); border-color: transparent; color: #fff; grid-column: span 2; min-height: auto; flex-direction: row; align-items: center; }
.tile--accent .tile__icon { background: rgba(255,255,255,0.18); color: #fff; }
.tile--accent .tile__sub { color: rgba(255,255,255,0.85); }

/* ---- Hero ------------------------------------------------------------- */
.hero { margin-bottom: var(--s-5); }
.hero h1 { font-size: 24px; margin-bottom: 4px; }
.hero p { color: var(--ink-soft); font-size: 14px; }

/* ---- Aktives Material Banner ----------------------------------------- */
.material-banner {
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow-sm);
}
.material-banner__icon { width: 34px; height: 34px; border-radius: 9px; background: var(--plaster); color: var(--clay-dark); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.material-banner__body { flex: 1; min-width: 0; }
.material-banner__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 700; }
.material-banner__name { font-size: 14px; font-weight: 700; }
.material-banner__meta { font-size: 12px; color: var(--ink-soft); }

/* ---- Onboarding-Fragebogen -------------------------------------------- */
.onboarding-backdrop {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: flex; flex-direction: column; animation: fade-in 0.2s ease;
}
.onboarding { max-width: var(--maxw); margin: 0 auto; width: 100%; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.onboarding__top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 14px) 16px 10px; }
.onboarding__progress { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-soft); text-transform: uppercase; }
.onboarding__skip { border: none; background: none; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; text-decoration: underline; padding: 6px; }
.onboarding__bar { height: 4px; background: var(--line-soft); border-radius: 2px; margin: 0 16px; overflow: hidden; flex: 0 0 auto; }
.onboarding__bar span { display: block; height: 100%; background: var(--clay); transition: width 0.25s ease; }
.onboarding__body { flex: 1; overflow-y: auto; padding: 22px 16px; -webkit-overflow-scrolling: touch; }
.onboarding__foot { padding: 12px 16px calc(var(--safe-b) + 12px); display: flex; gap: 12px; border-top: 1px solid var(--line-soft); background: var(--bg); }
.onboarding h2 { font-size: 21px; margin-bottom: 6px; }
.onboarding__lead { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 18px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 9px; padding: 14px 13px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--panel);
  font-size: 14px; font-weight: 600; text-align: left; min-height: 56px; color: var(--ink);
}
.choice:active { transform: scale(0.985); }
.choice.is-sel { border-color: var(--clay); background: var(--clay-tint); color: var(--clay-dark); }
.choice__label { flex: 1; line-height: 1.25; }
.choice__sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-faint); margin-top: 2px; }
.choice.is-sel .choice__sub { color: var(--clay-dark); opacity: 0.8; }
.choice__mark { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.choice.is-sel .choice__mark { background: var(--clay); border-color: var(--clay); }
.choice__mark svg { width: 13px; height: 13px; opacity: 0; }
.choice.is-sel .choice__mark svg { opacity: 1; }
.choice--wide { grid-column: span 2; }

.onboarding__section-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- Business-Check --------------------------------------------------- */
.check-disclaimer {
  background: var(--plaster); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 10px;
}
.check-ermutigung {
  font-size: 14px; color: var(--clay-dark); font-weight: 600; line-height: 1.5;
  padding: 2px 4px 0; margin-bottom: 16px;
}
.check-note {
  display: flex; align-items: center; gap: 10px;
  background: var(--clay-tint); border-radius: var(--r); padding: 10px 12px;
  font-size: 13px; font-weight: 600; color: var(--clay-dark); margin-bottom: 14px;
}
.check-note svg { width: 20px; height: 20px; flex: 0 0 auto; }
.check-toggle-all {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 18px; font-size: 13.5px; font-weight: 600;
}
.check-toggle-all input { width: 20px; height: 20px; accent-color: var(--clay); flex: 0 0 auto; }
.check-group { margin-bottom: 20px; }
.check-group__head { font-size: 13.5px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.check-group__count { color: var(--ink-faint); font-weight: 600; }
.check-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); margin-bottom: 8px; overflow: hidden; }
.check-item__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; width: 100%; text-align: left; background: transparent; border: none; }
.check-item__head svg { width: 18px; height: 18px; }
.check-item__title { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.3; }
.check-item__body { padding: 0 14px 14px; display: none; }
.check-item.is-open .check-item__body { display: block; }
.check-item__chev { color: var(--ink-faint); transition: transform 0.15s ease; flex: 0 0 auto; }
.check-item.is-open .check-item__chev { transform: rotate(90deg); }
.check-status-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.typ-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); white-space: nowrap; flex: 0 0 auto; }
.typ-Pflicht { background: color-mix(in srgb, var(--danger) 12%, var(--panel)); color: var(--danger); }
.typ-Entscheidung { background: var(--clay-tint); color: var(--clay-dark); }
.typ-Empfehlung { background: var(--good-tint); color: var(--good); }
.typ-Hinweis { background: var(--panel-2); color: var(--ink-soft); }
.typ-done { background: var(--good-tint); color: var(--good); }   /* erledigt: Marker wird grün */
.check-fehler { background: color-mix(in srgb, var(--warn) 11%, var(--panel)); border-left: 3px solid var(--warn); padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--ink); margin: 10px 0; line-height: 1.5; }

/* Beispiele-Reiter */
.check-tabs { margin-bottom: 12px; }
.beispiel-warn {
  display: flex; align-items: flex-start; gap: 9px;
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--ink); line-height: 1.5; margin-bottom: 12px;
}
.beispiel-warn svg { width: 18px; height: 18px; color: var(--warn); flex: 0 0 auto; margin-top: 1px; }
.beispiel-intro { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 10px; }
.beispiel-code {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-x: auto; color: var(--ink); margin: 0 0 10px;
}
.picto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
.picto-card {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink);
}
.picto-card svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--warn); }

/* ---- Warn-Banner (z. B. Material knapp) ------------------------------- */
.warn-banner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
  border-radius: var(--r); padding: 12px 14px; margin-bottom: 18px;
  color: var(--danger); box-shadow: var(--shadow-sm);
}
.warn-banner:active { transform: scale(0.99); }
.warn-banner svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---- Modal / Bottom-Sheet -------------------------------------------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(46, 42, 36, 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in 0.18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: var(--bg);
  width: 100%; max-width: var(--maxw);
  max-height: 92dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: sheet-up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: var(--safe-b);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 2px; flex: 0 0 auto; }
.sheet__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-soft);
}
.sheet__title { font-size: 16px; font-weight: 700; flex: 1; }
.sheet__close { width: 34px; height: 34px; border: none; background: var(--panel); border-radius: var(--r-pill); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.sheet__body { overflow-y: auto; padding: var(--s-4); -webkit-overflow-scrolling: touch; }
.sheet__foot { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); display: flex; gap: var(--s-3); background: var(--bg); }

/* ---- Detail-Kopf ------------------------------------------------------ */
.detail-media {
  width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--ink-faint);
  margin-bottom: var(--s-4);
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Segmented control ------------------------------------------------ */
.segment { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 3px; }
.segment button {
  flex: 1; border: none; background: transparent; border-radius: var(--r-sm);
  padding: 9px 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.segment button.is-active { background: var(--panel); color: var(--clay-dark); box-shadow: var(--shadow-sm); }

/* Ratio-Auswahl (wie im Rechner) */
.ratio-group { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.ratio-opt { flex: 1 1 auto; position: relative; min-width: 64px; }
.ratio-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ratio-opt span {
  display: block; text-align: center; padding: 11px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.ratio-opt input:checked + span { background: var(--clay); border-color: var(--clay); color: #fff; }

/* ---- Session-Leiste (fix unten über der Nav) ------------------------- */
.session-bar {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b));
  z-index: 45;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--s-3) var(--s-2);
}
.session-bar__inner {
  background: var(--ink); color: #fff;
  border-radius: var(--r); padding: 10px 12px 10px 14px;
  display: flex; align-items: center; gap: var(--s-3);
  box-shadow: var(--shadow-lg);
}
.session-bar__count { background: var(--clay); border-radius: var(--r-pill); font-size: 12px; font-weight: 800; padding: 3px 9px; }
.session-bar__body { flex: 1; min-width: 0; font-size: 12.5px; }
.session-bar__body b { font-size: 14px; font-variant-numeric: tabular-nums; }
.session-bar__body span { color: rgba(255,255,255,0.7); }

/* Sammel-Lagerliste (gruppiert) */
.pickgroup { margin-bottom: var(--s-4); }
.pickgroup__head {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 12.5px; font-weight: 700; color: var(--clay-dark);
  margin-bottom: var(--s-2); text-transform: none;
}
.pickgroup__head svg { width: 15px; height: 15px; }
.pick-item {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 8px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.pick-item:last-child { border-bottom: none; }
.pick-item__qty { font-weight: 800; color: var(--clay-dark); min-width: 30px; }
.pick-item input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--clay); }
.pick-item.is-checked { color: var(--ink-faint); text-decoration: line-through; }

/* ---- Messassistent ---------------------------------------------------- */
.guide { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.guide__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; background: transparent; border: none;
  font-weight: 600; font-size: 14px; color: var(--clay-dark); text-align: left;
}
.guide__icon { transition: transform 0.15s ease; font-size: 18px; line-height: 1; }
.guide.is-open .guide__icon { transform: rotate(45deg); }
.guide__body { display: none; padding: 0 14px 14px; }
.guide.is-open .guide__body { display: block; }
.guide ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.guide li { counter-increment: step; display: flex; gap: 12px; padding: 9px 0; }
.guide li + li { border-top: 1px solid var(--line-soft); }
.guide li::before {
  content: counter(step); flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--plaster); color: var(--clay-dark); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.guide li span { font-size: 13.5px; line-height: 1.5; color: var(--ink); padding-top: 1px; }
.guide li span strong { color: var(--clay-dark); }

/* ---- Foto-Upload ------------------------------------------------------ */
.photo-drop {
  border: 1.5px dashed var(--line); border-radius: var(--r);
  background: var(--panel-2); padding: var(--s-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  color: var(--ink-soft); font-size: 13px; font-weight: 600; text-align: center;
}
.photo-drop svg { width: 26px; height: 26px; color: var(--ink-faint); }
.photo-preview { position: relative; border-radius: var(--r); overflow: hidden; }
.photo-preview img { width: 100%; max-height: 240px; object-fit: cover; }
.photo-preview__remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(46,42,36,0.6); color: #fff; border: none; border-radius: var(--r-pill);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}

/* Divider mit Text */
.divider { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-faint); font-size: 12px; margin: var(--s-4) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Fixierte Kopfzeile in Views (Suche/Filter) */
.view-sticky {
  position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 30;
  background: var(--bg); padding-top: var(--s-2); margin-top: calc(var(--s-4) * -1);
  padding-bottom: var(--s-2);
}

/* Ergebniszähler */
.result-count { font-size: 12.5px; color: var(--ink-faint); margin: 2px 2px var(--s-3); font-weight: 600; }
