/* weedbuddy · Chrome Botany — Oberfläche
 * Tokens: css/tokens.css (aus opendesign/handoffs/chrome-botany/tokens.css)
 */

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--wb-bg); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--wb-bg);
  color: var(--wb-text);
  font-family: var(--wb-font-body);
  font-size: var(--wb-text-body);
  font-weight: 400;
  line-height: var(--wb-leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p { margin: 0; }

.icon { display: block; flex: none; }

/* Fokus ------------------------------------------------------------ */
:focus-visible {
  outline: var(--wb-focus-ring);
  outline-offset: var(--wb-focus-offset);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: var(--wb-space-5);
  top: -100px;
  z-index: 100;
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-lime);
  color: var(--wb-bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--wb-radius-control);
}
.skip-link:focus { top: var(--wb-space-3); }

/* Container -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--wb-content-max) + 2 * var(--wb-page-gutter));
  margin-inline: auto;
  padding-inline: var(--wb-page-gutter);
}

main:focus { outline: none; }

/* Account pages reuse local type, color and focus tokens. */
.auth-page { display: grid; place-items: center; padding: 24px; }
.auth-panel { width: min(100%, 380px); display: grid; gap: 20px; }
.auth-monogram { font-family: var(--wb-font-display); font-size: clamp(100px, 26vw, 180px); line-height: 1; text-align: center; }
.auth-panel form, .admin-form { display: grid; gap: 12px; }
.auth-panel input, .admin-form input {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px;
  color: var(--wb-text); background: var(--wb-bg); border: 1px solid var(--wb-control-border);
  border-radius: var(--wb-radius-control); font: inherit;
}
.auth-panel label, .admin-form label { font-weight: 600; }
.auth-panel .banner, .admin-page .banner { overflow-wrap: anywhere; }
.account-nav { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 24px; padding-block: 16px; }
.account-nav a { padding-block: 12px; }
.admin-page { padding-block: 24px 64px; }
.admin-page section { margin-top: 36px; }
.admin-form { max-width: 480px; margin-top: 20px; }
.admin-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 24px; }
.admin-insights dd { margin: 4px 0 0; font-size: 32px; }
.admin-table td { overflow-wrap: anywhere; max-width: 240px; }
.admin-table td:last-child { min-width: 180px; }
.admin-table button { display: block; min-height: 48px; text-align: left; white-space: normal; }
.dashboard { padding-block: 32px; }
.dashboard h3 { margin-block: 28px 16px; }
.dashboard .section-row { flex-wrap: wrap; }
.dashboard .section-row > * { min-width: 0; }
.dashboard-pharmacy { padding: 16px; overflow-wrap: anywhere; }
[data-dashboard-state] { margin-top: 16px; }
button:disabled { opacity: .6; cursor: wait; }

/* Buttons ---------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-6);
  min-width: 216px;
  min-height: 52px;
  padding: 0 var(--wb-space-5);
  border: 0;
  border-radius: var(--wb-radius-control);
  font-size: var(--wb-text-body);
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--wb-duration-fast) var(--wb-ease);
}
.button--primary {
  background: var(--wb-lime);
  color: var(--wb-bg);
}
.button--primary:hover { background: var(--wb-lime-hover); }
.button--primary:active { background: var(--wb-lime-active); }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  min-height: var(--wb-touch-min);
  padding: 0 var(--wb-space-1);
  border: 0;
  background: none;
  color: var(--wb-text);
  font-size: var(--wb-text-small);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--wb-duration-fast) var(--wb-ease);
}
.text-button:hover { color: var(--wb-lime); }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--wb-touch-min);
  height: var(--wb-touch-min);
  padding: 0;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: none;
  color: var(--wb-text);
  cursor: pointer;
  transition: color var(--wb-duration-fast) var(--wb-ease), border-color var(--wb-duration-fast) var(--wb-ease);
}
.icon-button:hover { color: var(--wb-lime); border-color: var(--wb-muted); }

/* Kopfzeile -------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--wb-border);
}
.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--wb-header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--wb-touch-min);
  font-size: 28px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--wb-text);
  text-decoration: none;
  padding-block: 10px; /* 48px Klickfläche */
}

.site-nav { margin-left: var(--wb-space-12); }
.site-nav__list { display: flex; gap: var(--wb-space-8); }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--wb-touch-min);
  min-width: var(--wb-touch-min);
  justify-content: center;
  font-size: var(--wb-text-small);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--wb-duration-fast) var(--wb-ease);
}
.site-nav__link:hover { color: var(--wb-lime); }
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 0.7em + 8px); /* 8px unter dem Text */
  height: 2px;
  background: var(--wb-lime);
  opacity: 0;
  transition: opacity var(--wb-duration-fast) var(--wb-ease);
}
.site-nav__link[aria-current="page"]::after { opacity: 1; }

.profile-button {
  margin-left: auto;
  border-radius: var(--wb-radius-avatar);
}

.menu-button { display: none; margin-left: auto; }
.menu-button .icon--close { display: none; }
.menu-button[aria-expanded="true"] .icon--menu { display: none; }
.menu-button[aria-expanded="true"] .icon--close { display: block; }

.mobile-menu {
  position: absolute;
  left: var(--wb-page-gutter);
  right: var(--wb-page-gutter);
  top: 100%;
  z-index: 20;
  margin-top: var(--wb-space-2);
  padding: var(--wb-space-3);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  animation: panel-in var(--wb-duration-base) var(--wb-ease);
}
.mobile-menu__list { display: flex; flex-direction: column; }
.mobile-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--wb-touch-min);
  padding: 0 var(--wb-space-3);
  border: 0;
  border-radius: var(--wb-radius-control);
  background: none;
  text-align: left;
  font-size: var(--wb-text-body);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--wb-duration-fast) var(--wb-ease);
}
.mobile-menu__link:hover { color: var(--wb-lime); }
.mobile-menu__link[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--wb-lime);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(calc(-1 * var(--wb-panel-enter-offset))); }
  to { opacity: 1; transform: none; }
}

/* Ansichten -------------------------------------------------------- */
.view[hidden] { display: none; }

/* Hero ------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "title art"
    "sub art"
    "cta art";
  column-gap: var(--wb-space-6);
  min-height: 560px;
  padding-top: var(--wb-space-8);
  padding-bottom: var(--wb-space-12);
}

.hero__title {
  grid-area: title;
  font-family: var(--wb-font-display);
  font-weight: 400;
  font-size: var(--wb-text-display);
  line-height: var(--wb-leading-display);
  letter-spacing: var(--wb-tracking-display);
  text-transform: uppercase;
  overflow-wrap: normal;
}
.hero__line { display: block; }

.hero__sub {
  grid-area: sub;
  margin-top: var(--wb-space-6);
  font-size: var(--wb-text-body);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.16em;
}
.hero__sub-line { display: block; }

.hero__cta {
  grid-area: cta;
  margin-top: var(--wb-space-6);
}

.hero__art {
  grid-area: art;
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 560px;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  user-select: none;
  align-self: start;
  justify-self: stretch;
  margin-inline: auto;
}
.hero__circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--wb-muted);
  border-radius: 50%;
  opacity: 0.6;
}
.hero__sculpture {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
}
.hero__caption {
  position: absolute;
  right: 0;
  top: 0;
  font-size: var(--wb-text-label);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.18em;
  text-align: left;
}

/* Profilband ------------------------------------------------------- */
.profile-band {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 46fr) minmax(0, 20fr);
  align-items: center;
  min-height: 112px;
  padding: var(--wb-space-4) 0;
  border-top: 1px solid var(--wb-border);
  border-bottom: 1px solid var(--wb-border);
}
.profile-band > * + * {
  border-left: 1px solid var(--wb-border);
}

.profile-band__profile {
  display: flex;
  align-items: center;
  gap: var(--wb-space-4);
  min-height: var(--wb-touch-min);
  padding: var(--wb-space-2) var(--wb-space-6) var(--wb-space-2) 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: color var(--wb-duration-fast) var(--wb-ease);
}
.profile-band__profile:hover { color: var(--wb-lime); }

.avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: var(--wb-radius-avatar);
  overflow: hidden;
  background: var(--wb-surface);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }

.profile-band__text { display: flex; flex-direction: column; gap: var(--wb-space-1); min-width: 0; }
.profile-band__title { font-size: 22px; font-weight: 600; line-height: 1.2; }
.profile-band__subtitle { font-size: var(--wb-text-label); line-height: 1.4; letter-spacing: 0.12em; color: var(--wb-muted); }
.profile-band__arrow { margin-left: auto; }

.profile-band__mantra,
.profile-band__slogan {
  padding: 0 var(--wb-space-6);
  font-size: var(--wb-text-label);
  line-height: 1.6;
  letter-spacing: 0.12em;
}
.profile-band__mantra { text-align: center; }
.profile-band__slogan { text-align: left; }

/* Sammlungsvorschau ------------------------------------------------ */
.collection-preview {
  margin-top: var(--wb-space-6);
  padding-bottom: var(--wb-space-16);
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-4);
}
.section-title {
  font-size: var(--wb-text-section);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.section-title:focus { outline: none; }

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wb-space-6);
  margin-top: var(--wb-space-4);
}

.study-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--wb-radius-image);
  background: none;
  text-align: left;
  cursor: pointer;
}
.study-card__media {
  display: block;
  width: 100%;
  aspect-ratio: var(--wb-card-image-ratio);
  overflow: hidden;
  background: var(--wb-surface);
}
.study-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wb-duration-image) var(--wb-ease);
}
.study-card__media--missing {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--wb-text-small);
  color: var(--wb-muted);
}
.study-card__meta {
  display: flex;
  align-items: baseline;
  gap: var(--wb-space-3);
  margin-top: var(--wb-space-3);
}
.study-card__index { font-size: var(--wb-text-label); line-height: 1.4; color: var(--wb-muted); }
.study-card__title {
  font-size: var(--wb-text-small);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.10em;
  transition: color var(--wb-duration-fast) var(--wb-ease);
}
.study-card__description {
  margin-top: var(--wb-space-2);
  font-size: var(--wb-text-small);
  line-height: 1.5;
  color: var(--wb-muted);
}

@media (hover: hover) and (pointer: fine) {
  .study-card:hover .study-card__media img { transform: scale(var(--wb-hover-image-scale)); }
  .study-card:hover .study-card__title { color: var(--wb-lime); }
}

.study-note {
  margin-top: var(--wb-space-4);
  font-size: var(--wb-text-label);
  line-height: 1.4;
  color: var(--wb-muted);
}

/* Seitenköpfe (Sammlung, Notizen) ---------------------------------- */
.page-head {
  padding-top: var(--wb-space-16);
}
.page-title {
  font-size: 40px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.page-title:focus { outline: none; }
.page-lead,
.page-hint {
  margin-top: var(--wb-space-3);
  color: var(--wb-muted);
}
.page-lead { font-size: var(--wb-text-body); line-height: 1.5; }
.page-hint { font-size: var(--wb-text-small); line-height: 1.5; }


/* Dialoge ---------------------------------------------------------- */
.dialog {
  width: min(720px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  background: var(--wb-surface);
  color: var(--wb-text);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  box-shadow: var(--wb-dialog-shadow);
}
.dialog::backdrop { background: var(--wb-backdrop); }
.dialog[open] { animation: panel-in var(--wb-duration-base) var(--wb-ease); }

.dialog__body { padding: var(--wb-space-6); }
.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--wb-space-4);
}
.dialog__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  padding-top: 6px; /* optisch mittig zum 48-px-Button */
}
.dialog__close { flex: none; }
.dialog__media {
  width: 100%;
  aspect-ratio: var(--wb-card-image-ratio);
  margin-top: var(--wb-space-4);
  overflow: hidden;
  background: var(--wb-bg);
}
.dialog__media img { width: 100%; height: 100%; object-fit: cover; }
.dialog--wide .dialog__media { aspect-ratio: auto; height: 360px; }
.dialog--wide .dialog__media img { object-fit: contain; }
body:has(dialog[open]) { overflow: hidden; }
.dialog__text { margin-top: var(--wb-space-4); }
.dialog__note {
  margin-top: var(--wb-space-2);
  font-size: var(--wb-text-label);
  line-height: 1.4;
  color: var(--wb-muted);
}
#profile-dialog .text-button { margin-top: var(--wb-space-4); }

/* Tablet ≤ 1023 ---------------------------------------------------- */
@media (max-width: 1023px) {
  .site-nav,
  .profile-button { display: none; }
  .menu-button { display: inline-flex; }
  .wordmark { font-size: 26px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "title"
      "sub"
      "art"
      "cta";
    min-height: 0;
  }
  .hero__art {
    max-width: 520px;
    max-height: 520px;
    margin-top: var(--wb-space-6);
  }
  .hero__sculpture { max-height: 520px; }

  .profile-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .profile-band__slogan { display: none; }

  .study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Smartphone ≤ 767 ------------------------------------------------- */
@media (max-width: 767px) {
  .hero__sub {
    font-size: var(--wb-text-small);
    line-height: 1.6;
    letter-spacing: 0.10em;
  }
  .hero__art { max-width: 400px; max-height: 400px; }
  .hero__sculpture { max-height: 400px; }
  .hero__caption { display: none; }

  .profile-band {
    grid-template-columns: minmax(0, 1fr);
    min-height: 96px;
  }
  .profile-band__profile { padding-right: 0; }
  .profile-band__mantra { display: none; }
  .avatar { width: 56px; height: 56px; }
  .profile-band__title { font-size: 20px; line-height: 1.25; }

  .study-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-preview { padding-bottom: var(--wb-space-10); }
  .page-head { padding-top: var(--wb-space-10); }
  .page-title { font-size: 32px; line-height: 1.15; }

  .dialog {
    width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px - env(safe-area-inset-bottom));
  }
  .dialog__body { padding: var(--wb-space-4); }
  .dialog__title { font-size: 24px; padding-top: 8px; }

  }

/* Reduzierte Bewegung --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .study-card:hover .study-card__media img { transform: none; }
}

/* ---- weedbuddy Produktfunktionen ---------------------------------- */
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.banner {
  margin-top: var(--wb-space-4);
  padding: var(--wb-space-3) var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  font-size: var(--wb-text-small);
  line-height: 1.5;
}
.banner--error { border-color: var(--wb-lime); }
.banner--ok { border-color: var(--wb-lime); }

.nav-count {
  display: inline-block;
  min-width: 20px;
  margin-left: var(--wb-space-1);
  padding: 0 6px;
  border-radius: 999px;
  background: var(--wb-lime);
  color: var(--wb-bg);
  font-size: var(--wb-text-label);
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.status-button { position: relative; margin-left: auto; border-radius: var(--wb-radius-avatar); }
.status-dot { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--wb-border); border: 2px solid var(--wb-bg); }
.status-dot--ok { background: var(--wb-lime); }
.status-dot--error { background: #ff6a3d; }

/* Suche */
.search-form { margin-top: var(--wb-space-8); display: flex; flex-direction: column; gap: var(--wb-space-4); }
.search-box {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding: 0 0 0 var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-control-border);
  border-radius: var(--wb-radius-control);
  color: var(--wb-muted);
}
.search-box:focus-within { border-color: var(--wb-lime); }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  padding: var(--wb-space-3) 0;
  border: 0;
  background: none;
  color: var(--wb-text);
  font: inherit;
  font-size: var(--wb-text-body);
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--wb-muted); opacity: 1; }
.search-submit { min-width: 0; min-height: 52px; justify-content: center; border-radius: 0 var(--wb-radius-control) var(--wb-radius-control) 0; }

.filter-row { display: flex; flex-wrap: wrap; gap: var(--wb-space-3) var(--wb-space-4); align-items: flex-end; }
.filter-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--wb-space-2) var(--wb-space-4); width: 100%; }
.filter-summary { color: var(--wb-muted); font-size: var(--wb-text-small); }
.filter-reset { min-width: var(--wb-touch-min); padding-inline: var(--wb-space-3); border: 1px solid var(--wb-control-border); border-radius: var(--wb-radius-control); }
.filter-section { width: 100%; min-inline-size: 0; margin: 0; padding: var(--wb-space-4) 0 var(--wb-space-6); border: 0; border-top: 1px solid var(--wb-border); }
.filter-section__title { padding: 0 var(--wb-space-3) 0 0; font-size: var(--wb-text-body); font-weight: 600; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr)); gap: var(--wb-space-4); align-items: start; }
.filter-section--quick { padding-bottom: var(--wb-space-2); }
.filter-section--quick .filter-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-fields .filter__control { width: 100%; max-width: 100%; }
.filter-fields .filter__unavailable { grid-column: 1 / -1; }
.filter-disclosure { width: 100%; min-width: 0; border-top: 1px solid var(--wb-border); }
.filter-disclosure__toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: var(--wb-space-2); align-items: center; min-height: var(--wb-touch-min); padding-block: var(--wb-space-3); list-style: none; cursor: pointer; }
.filter-disclosure__toggle::-webkit-details-marker { display: none; }
.filter-disclosure__toggle::after { content: "+"; text-align: center; font-size: 20px; color: var(--wb-lime); }
.filter-disclosure[open] > .filter-disclosure__toggle::after { content: "−"; }
.filter-disclosure__label { font-size: var(--wb-text-body); line-height: 1.4; font-weight: 600; }
.filter-disclosure__count { font-size: var(--wb-text-label); color: var(--wb-muted); white-space: nowrap; }
.filter-disclosure__count.is-active { color: var(--wb-lime); }
.filter-disclosure > .filter-fields { padding: var(--wb-space-3) 0 var(--wb-space-6); }
.filter-order { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--wb-space-3) var(--wb-space-6); width: 100%; }
.filter-order > .filter__hint { max-width: 52ch; }
.filter { display: flex; flex-direction: column; gap: var(--wb-space-1); min-width: 0; }
.filter__label { font-size: var(--wb-text-label); line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wb-muted); }
.filter__hint { font-size: var(--wb-text-label); line-height: 1.4; color: var(--wb-muted); }
.filter__control {
  min-height: var(--wb-touch-min);
  padding: 0 var(--wb-space-3);
  background: var(--wb-surface);
  color: var(--wb-text);
  border: 1px solid var(--wb-control-border);
  border-radius: var(--wb-radius-control);
  font: inherit;
  font-size: var(--wb-text-small);
}
.filter__control::placeholder { color: var(--wb-muted); opacity: 1; }
.filter__control--num { width: 108px; }
.filter__control:disabled { opacity: .6; cursor: not-allowed; }
.filter__control[aria-invalid="true"] { border-color: var(--wb-lime); }
select.filter__control { max-width: 220px; }
.filter__unavailable { flex-basis: 100%; font-size: var(--wb-text-label); color: var(--wb-muted); }
@media (max-width: 599px) {
  .filter-section--quick .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-section--quick .filter:first-child { grid-column: 1 / -1; }
}

.results { display: flex; flex-direction: column; gap: var(--wb-space-12); margin-top: var(--wb-space-10); padding-bottom: var(--wb-space-16); }
.results[aria-busy="true"] { opacity: .6; }
.stock-coverage { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--wb-space-4); padding-block: var(--wb-space-4); border-block: 1px solid var(--wb-border); }
.stock-coverage > div { flex: 1 1 280px; }
.stock-coverage__title { margin-bottom: var(--wb-space-1); font-size: var(--wb-text-small); font-weight: 600; }
.section-index { color: var(--wb-muted); font-weight: 400; }
.section-meta { font-size: var(--wb-text-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--wb-muted); text-align: right; }

.study-card__open {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .study-card__open:hover .study-card__media img { transform: scale(var(--wb-hover-image-scale)); }
  .study-card__open:hover .study-card__title { color: var(--wb-lime); }
}
.study-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--wb-space-3); margin-top: var(--wb-space-3); }
.study-card__price { font-weight: 650; font-size: var(--wb-text-body); }
.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--wb-touch-min);
  padding: 0 var(--wb-space-4);
  border: 1px solid var(--wb-control-border);
  border-radius: var(--wb-radius-control);
  background: none;
  color: var(--wb-text);
  font-size: var(--wb-text-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--wb-duration-fast) var(--wb-ease), color var(--wb-duration-fast) var(--wb-ease), border-color var(--wb-duration-fast) var(--wb-ease);
}
.chip-button:hover { border-color: var(--wb-lime); color: var(--wb-lime); }
.chip-button.is-on { background: var(--wb-lime); border-color: var(--wb-lime); color: var(--wb-bg); }
.chip-button.is-on:hover { background: var(--wb-lime-hover); color: var(--wb-bg); }
.chip-button:disabled { opacity: .5; cursor: default; }
.chip-button--big { min-width: 160px; }

/* Dialog-Inhalte */
.dialog--wide { width: min(880px, calc(100vw - 40px)); }
.dialog__subtitle { margin-top: var(--wb-space-6); font-size: var(--wb-text-body); font-weight: 600; letter-spacing: 0.04em; }
.dialog__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-4); margin-top: var(--wb-space-4); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--wb-space-1) var(--wb-space-4); margin: var(--wb-space-4) 0 0; font-size: var(--wb-text-small); }
.facts dt { color: var(--wb-muted); }
.facts dd { margin: 0; }
.table-wrap { overflow-x: auto; margin-top: var(--wb-space-3); }
.offer-table { width: 100%; border-collapse: collapse; font-size: var(--wb-text-small); }
.offer-table th { text-align: left; font-size: var(--wb-text-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--wb-muted); padding: var(--wb-space-2) var(--wb-space-2) var(--wb-space-2) 0; border-bottom: 1px solid var(--wb-border); }
.offer-table td { padding: var(--wb-space-3) var(--wb-space-2) var(--wb-space-3) 0; border-bottom: 1px solid var(--wb-border); vertical-align: top; }
.offer-table td.num { font-weight: 650; white-space: nowrap; }
.offer-table tr.is-out { color: var(--wb-muted); }
.offer-table a { color: var(--wb-text); }
.offer-table a:hover { color: var(--wb-lime); }
.offer-table__city { display: block; font-size: var(--wb-text-label); color: var(--wb-muted); }
.reference-list li { padding: var(--wb-space-2) 0; border-bottom: 1px solid var(--wb-border); font-size: var(--wb-text-small); color: var(--wb-muted); }

.source-list { display: flex; flex-direction: column; margin-top: var(--wb-space-4); }
.source-item { padding: var(--wb-space-3) 0; border-top: 1px solid var(--wb-border); }
.source-item__head { display: flex; justify-content: space-between; align-items: center; gap: var(--wb-space-3); }
.source-item__name { font-weight: 600; }
.source-item__badge { font-size: var(--wb-text-label); letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--wb-border); border-radius: var(--wb-radius-control); }
.source-item__badge.is-ok { color: var(--wb-lime); border-color: var(--wb-lime); }
.source-item__badge.is-error { color: #ff6a3d; border-color: #ff6a3d; }
.source-item__meta { margin-top: var(--wb-space-1); font-size: var(--wb-text-small); color: var(--wb-muted); }
.source-item__error { margin-top: var(--wb-space-1); font-size: var(--wb-text-small); color: var(--wb-lime); }

/* Merkliste & Abgleich */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: var(--wb-space-8); margin-top: var(--wb-space-8); padding-bottom: var(--wb-space-16); }
.watch-list { display: flex; flex-direction: column; margin-top: var(--wb-space-4); }
.watch-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3) var(--wb-space-4); padding: var(--wb-space-4) 0; border-top: 1px solid var(--wb-border); }
.watch-item:last-child { border-bottom: 1px solid var(--wb-border); }
.watch-item__open { display: flex; flex: 1 1 320px; align-items: center; gap: var(--wb-space-4); min-width: 0; min-height: var(--wb-touch-min); padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.watch-item__open:hover .watch-item__name { color: var(--wb-lime); }
.watch-item__thumb { flex: none; width: 72px; aspect-ratio: 16 / 10; background: var(--wb-surface); overflow: hidden; }
.watch-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.watch-item__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.watch-item__name { font-weight: 600; }
.watch-item__meta { font-size: var(--wb-text-small); color: var(--wb-muted); }
.watch-item__controls { display: flex; align-items: center; gap: var(--wb-space-3); margin-left: auto; }
.watch-item__grams { display: flex; align-items: center; gap: var(--wb-space-2); font-size: var(--wb-text-small); color: var(--wb-muted); }
.watch-item__grams .filter__control--num { width: 88px; }

.match-panel { padding: var(--wb-space-6); background: var(--wb-surface); border: 1px solid var(--wb-border); border-radius: var(--wb-radius-control); align-self: start; }
.match-filters { margin-top: var(--wb-space-4); padding-bottom: var(--wb-space-2); border-bottom: 1px solid var(--wb-border); }
.match-big { display: flex; align-items: baseline; gap: var(--wb-space-3); margin-top: var(--wb-space-4); }
.match-big__num { font-family: var(--wb-font-display); font-size: 72px; line-height: 1; color: var(--wb-lime); }
.match-big__text { font-size: var(--wb-text-body); }
.match-teaser { margin-top: var(--wb-space-4); padding: var(--wb-space-3) var(--wb-space-4); border: 1px solid var(--wb-lime); border-radius: var(--wb-radius-control); font-size: var(--wb-text-small); }
.match-list { display: flex; flex-direction: column; gap: var(--wb-space-3); margin-top: var(--wb-space-4); }
.match-item { padding: var(--wb-space-4); border: 1px solid var(--wb-border); border-radius: var(--wb-radius-control); }
.match-item.is-best { border-color: var(--wb-lime); }
.match-item__head { display: flex; justify-content: space-between; gap: var(--wb-space-3); }
.match-item__name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.match-item__total { display: flex; flex-direction: column; flex: none; text-align: right; font-weight: 700; }
.match-item__total-amount { white-space: nowrap; }
.match-item__total-note { font-size: var(--wb-text-label); font-weight: 400; color: var(--wb-muted); }
.match-item__meta { margin-top: var(--wb-space-1); font-size: var(--wb-text-label); color: var(--wb-muted); }
.match-item__lines { margin-top: var(--wb-space-2); font-size: var(--wb-text-small); color: var(--wb-muted); }
.match-item__lines li { padding: 2px 0; }
.match-item__cta { margin-top: var(--wb-space-3); min-width: 0; width: 100%; justify-content: space-between; }
.blocker { margin-top: var(--wb-space-6); padding: var(--wb-space-4); border: 1px dashed var(--wb-control-border); border-radius: var(--wb-radius-control); }
.blocker__title { font-weight: 600; }
.blocker__text { margin-top: var(--wb-space-1); font-size: var(--wb-text-small); color: var(--wb-muted); }
.swap-list { display: flex; flex-direction: column; gap: var(--wb-space-2); margin-top: var(--wb-space-2); }
.swap-item { display: flex; align-items: center; justify-content: space-between; gap: var(--wb-space-3); font-size: var(--wb-text-small); }
.partial-list li { padding: var(--wb-space-2) 0; border-top: 1px solid var(--wb-border); font-size: var(--wb-text-small); color: var(--wb-muted); }

@media (max-width: 1023px) {
  .watch-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .search-box { flex-wrap: wrap; padding: 0; }
  .search-box .icon { display: none; }
  .search-input { flex-basis: 100%; padding-left: var(--wb-space-4); }
  .search-submit { width: 100%; border-radius: 0 0 var(--wb-radius-control) var(--wb-radius-control); }
  .filter__control--num { width: 96px; }
  .match-big__num { font-size: 56px; }
  .watch-item__controls { margin-left: 0; width: 100%; justify-content: space-between; }
  .dialog--wide { width: calc(100vw - 40px); }
  .dialog--wide .dialog__media { height: 220px; }
}
