/* ============================================================
   havelo — Haushalt (Modul 1) · Dialoge, Flows & Formulare
   Baut auf havelo-tokens.css + dashboard.css + modules.css auf.
   Modale Overlays für: Mitglied hinzufügen/bearbeiten,
   Haustier hinzufügen/bearbeiten, Haushalt-Profil, Zugriffsrechte,
   Daten exportieren.
   ============================================================ */

/* ---------- editable / add affordances in Modul 1 ---------- */
.ch-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* small pill button used in card heads + row hovers */
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border: 1.5px solid var(--slate-12);
  background: #fff; border-radius: var(--radius-full);
  font-family: inherit; font-weight: 700; font-size: 12.5px; color: var(--slate-70);
  cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
}
.mini-btn:hover { border-color: var(--mc, var(--slate-40)); color: var(--mc, var(--slate)); }
.mini-btn svg { width: 14px; height: 14px; }
.mini-btn.solid { background: var(--mc, var(--slate)); border-color: var(--mc, var(--slate)); color: #fff; }
.mini-btn.solid:hover { filter: brightness(1.07); color: #fff; }

/* per-row edit button, revealed on hover */
.member-row, .pet-row { position: relative; }
.row-edit {
  margin-left: 12px; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-12); background: #fff;
  display: grid; place-items: center; cursor: pointer;
  color: var(--slate-55); opacity: 0; transform: translateX(4px);
  transition: all var(--transition-fast);
}
.member-row:hover .row-edit, .pet-row:hover .row-edit { opacity: 1; transform: none; }
.row-edit:hover { border-color: var(--mod-haushalt); color: var(--mod-haushalt); }
.row-edit svg { width: 15px; height: 15px; }

/* dashed "add" row at the foot of a list */
.add-member {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; border: 1.5px dashed var(--slate-12); border-radius: var(--radius-md);
  padding: 14px; color: var(--slate-55); font-weight: 700; font-size: 13.5px;
  cursor: pointer; background: none; width: 100%; font-family: inherit;
  transition: all var(--transition-fast);
}
.add-member:hover { border-color: var(--mod-haushalt); color: var(--mod-haushalt); background: rgba(90,140,140,0.04); }
.add-member svg { width: 16px; height: 16px; }

/* ============================================================
   DIALOG SHELL
   ============================================================ */
.hm-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(11, 40, 62, 0.42); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px; opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.hm-scrim.open { opacity: 1; pointer-events: auto; }

.hm-dialog {
  --mc: var(--mod-haushalt);
  width: 100%; max-width: 560px; max-height: calc(100vh - 64px);
  background: var(--cream); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(14px) scale(0.985); opacity: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.hm-scrim.open .hm-dialog { transform: none; opacity: 1; }
.hm-dialog.wide { max-width: 720px; }

/* header band */
.hm-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px 24px 18px; background: #fff; border-bottom: 1px solid var(--slate-06);
}
.hm-head .hm-ic {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--mc); display: grid; place-items: center;
}
.hm-head .hm-ic svg { width: 22px; height: 22px; color: #fff; }
.hm-head .hm-htxt { flex: 1; min-width: 0; }
.hm-head .hm-eyebrow {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate-40);
}
.hm-head .hm-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.15; margin-top: 2px; }
.hm-close {
  width: 34px; height: 34px; border-radius: var(--radius-md); flex-shrink: 0;
  border: none; background: var(--slate-06); color: var(--slate-55);
  display: grid; place-items: center; cursor: pointer; transition: all var(--transition-fast);
}
.hm-close:hover { background: var(--slate-12); color: var(--slate); }
.hm-close svg { width: 18px; height: 18px; }

/* stepper */
.hm-steps { display: flex; align-items: center; gap: 0; padding: 16px 24px 4px; background: #fff; }
.hm-step { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.hm-step .sn {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--slate-06); color: var(--slate-40); transition: all var(--transition-base);
}
.hm-step .sl { font-size: 12px; font-weight: 700; color: var(--slate-40); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--transition-base); }
.hm-step .sbar { flex: 1; height: 2px; background: var(--slate-06); margin: 0 8px; border-radius: 2px; transition: background var(--transition-base); }
.hm-step.active .sn { background: var(--mc); color: #fff; }
.hm-step.active .sl { color: var(--slate); }
.hm-step.done .sn { background: var(--mc); color: #fff; }
.hm-step.done .sn::after { content: "✓"; font-family: var(--font-body); }
.hm-step.done .sn .num { display: none; }
.hm-step.done .sbar, .hm-step.active .sbar { background: var(--mc); }

/* body */
.hm-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.hm-pane { display: none; }
.hm-pane.on { display: block; animation: hmFade var(--transition-base); }
@keyframes hmFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hm-lead { font-size: 13.5px; color: var(--slate-55); line-height: 1.5; margin: -4px 0 18px; }

/* footer */
.hm-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 24px; background: #fff; border-top: 1px solid var(--slate-06);
}
.hm-foot .grow { flex: 1; }
.hm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-md);
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  border: 1.5px solid transparent; transition: all var(--transition-fast);
}
.hm-btn svg { width: 16px; height: 16px; }
.hm-btn.primary { background: var(--ember); color: #fff; box-shadow: var(--shadow-sm); }
.hm-btn.primary:hover { background: var(--ember-d); }
.hm-btn.ghost { background: #fff; border-color: var(--slate-12); color: var(--slate-70); }
.hm-btn.ghost:hover { border-color: var(--slate-40); }
.hm-btn.danger { background: #fff; border-color: rgba(200,92,36,0.4); color: var(--ember-text); }
.hm-btn.danger:hover { background: rgba(200,92,36,0.08); }
.hm-btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.hm-field { margin-bottom: 17px; }
.hm-field:last-child { margin-bottom: 0; }
.hm-label {
  display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--slate-55); margin-bottom: 8px; font-weight: 600;
}
.hm-label .opt { color: var(--slate-40); text-transform: none; letter-spacing: 0; font-weight: 500; }
.hm-input, .hm-select, .hm-textarea {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--slate);
  background: #fff; border: 1.5px solid var(--slate-12); border-radius: var(--radius-md);
  padding: 11px 13px; outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.hm-input::placeholder, .hm-textarea::placeholder { color: var(--slate-40); }
.hm-input:focus, .hm-select:focus, .hm-textarea:focus { border-color: var(--mc); box-shadow: 0 0 0 3px rgba(90,140,140,0.13); }
.hm-textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.hm-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230B283E' stroke-opacity='0.5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px; }

.hm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* selectable big choice cards (member type, pet type) */
.hm-choices { display: grid; gap: 12px; }
.hm-choices.c-3 { grid-template-columns: repeat(3, 1fr); }
.hm-choice {
  position: relative; text-align: left; background: #fff; cursor: pointer;
  border: 1.5px solid var(--slate-12); border-radius: var(--radius-md);
  padding: 16px; font-family: inherit; transition: all var(--transition-fast);
  display: flex; flex-direction: column; gap: 4px;
}
.hm-choice:hover { border-color: var(--slate-40); }
.hm-choice.on { border-color: var(--mc); box-shadow: 0 0 0 3px rgba(90,140,140,0.13); background: rgba(90,140,140,0.04); }
.hm-choice .cic { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--slate-06); margin-bottom: 6px; transition: all var(--transition-fast); }
.hm-choice.on .cic { background: var(--mc); }
.hm-choice .cic svg { width: 21px; height: 21px; color: var(--slate-55); transition: color var(--transition-fast); }
.hm-choice.on .cic svg { color: #fff; }
.hm-choice .ct { font-weight: 700; font-size: 14.5px; }
.hm-choice .cs { font-size: 12px; color: var(--slate-55); line-height: 1.4; }
.hm-choice .cmark { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--mc); display: none; place-items: center; }
.hm-choice .cmark::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; }
.hm-choice.on .cmark { display: grid; }

/* selectable chips (diet / allergy) */
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-chip {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-full);
  background: #fff; border: 1.5px solid var(--slate-12); color: var(--slate-70);
  transition: all var(--transition-fast); display: inline-flex; align-items: center; gap: 7px;
}
.hm-chip:hover { border-color: var(--slate-40); }
.hm-chip .x { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-12); transition: background var(--transition-fast); }
.hm-chip.on { color: #fff; }
.hm-chip.on.diet { background: #3c6b4d; border-color: #3c6b4d; }
.hm-chip.on.allergy { background: var(--ember); border-color: var(--ember); }
.hm-chip.on .x { background: rgba(255,255,255,0.7); }
.hm-chip-add { border-style: dashed; color: var(--slate-55); }

/* avatar color picker */
.hm-swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hm-swatch {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: none; position: relative;
  transition: transform var(--transition-fast);
}
.hm-swatch:hover { transform: scale(1.08); }
.hm-swatch.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--slate); }

/* avatar preview puck */
.hm-avapreview { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px; background: #fff; border: 1.5px solid var(--slate-06); border-radius: var(--radius-md); }
.hm-avapreview .pk { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.hm-avapreview .pk svg { width: 28px; height: 28px; }
.hm-avapreview .pn { font-weight: 700; font-size: 15px; }
.hm-avapreview .pr { font-size: 12.5px; color: var(--slate-55); }

/* toggle switch + access list */
.hm-toggle-row { display: flex; align-items: center; gap: 13px; padding: 13px 2px; }
.hm-toggle-row + .hm-toggle-row { border-top: 1px solid var(--slate-06); }
.hm-toggle-row .tr-dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.hm-toggle-row .tr-tx { flex: 1; min-width: 0; }
.hm-toggle-row .tr-name { font-weight: 700; font-size: 14px; }
.hm-toggle-row .tr-meta { font-size: 12px; color: var(--slate-55); }
.hm-switch {
  width: 46px; height: 27px; border-radius: var(--radius-full); flex-shrink: 0;
  background: var(--slate-12); border: none; cursor: pointer; position: relative;
  transition: background var(--transition-fast); padding: 0;
}
.hm-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast); }
.hm-switch.on { background: var(--sage); }
.hm-switch.on::after { transform: translateX(19px); }
.hm-switch:disabled { opacity: 0.45; cursor: not-allowed; }

/* radio segmented (role within type, food type) */
.hm-seg { display: inline-flex; background: #fff; border: 1.5px solid var(--slate-12); border-radius: var(--radius-md); padding: 3px; width: 100%; }
.hm-seg button { flex: 1; border: none; background: transparent; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--slate-55); padding: 9px 10px; border-radius: 6px; transition: all var(--transition-fast); cursor: pointer; }
.hm-seg button.on { background: var(--slate); color: var(--cream); }

/* review summary */
.hm-summary { background: #fff; border: 1.5px solid var(--slate-06); border-radius: var(--radius-md); overflow: hidden; }
.hm-summary .sr { display: flex; gap: 14px; padding: 13px 15px; font-size: 13.5px; }
.hm-summary .sr + .sr { border-top: 1px solid var(--slate-06); }
.hm-summary .sr .sk { width: 130px; flex-shrink: 0; color: var(--slate-55); font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 2px; }
.hm-summary .sr .sv { flex: 1; font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* invite callout */
.hm-note {
  display: flex; gap: 12px; padding: 14px 15px; border-radius: var(--radius-md);
  background: rgba(90,140,140,0.08); margin-top: 16px;
}
.hm-note svg { width: 18px; height: 18px; color: var(--mod-haushalt); flex-shrink: 0; margin-top: 1px; }
.hm-note .nt { font-size: 13px; color: var(--slate-70); line-height: 1.5; }
.hm-note.warn { background: rgba(200,92,36,0.09); }
.hm-note.warn svg { color: var(--ember); }

/* success check pane */
.hm-success { text-align: center; padding: 18px 8px 6px; }
.hm-success .sc-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; margin: 0 auto 18px; }
.hm-success .sc-ic svg { width: 32px; height: 32px; color: #fff; }
.hm-success h3 { font-family: var(--font-display); font-weight: 600; font-size: 23px; margin-bottom: 8px; }
.hm-success p { font-size: 14px; color: var(--slate-55); line-height: 1.55; max-width: 30em; margin: 0 auto; }

.hm-hint { font-size: 12px; color: var(--slate-55); margin-top: 7px; line-height: 1.45; }

/* ============================================================
   BILD-UPLOAD
   ============================================================ */
/* avatar uploader (sits inside .hm-avapreview, wraps the .pk puck) */
.hm-avaup { position: relative; flex-shrink: 0; border: none; background: none; padding: 0; cursor: pointer; display: block; }
.hm-avapreview .hm-avaup .pk { background-size: cover; background-position: center; transition: filter var(--transition-fast); }
.hm-avaup:hover .pk { filter: brightness(0.92); }
.hm-avaup .pk.has-img { color: transparent; }
.hm-avaup .cam {
  position: absolute; right: -3px; bottom: -3px; width: 23px; height: 23px;
  border-radius: 50%; background: var(--slate); border: 2.5px solid var(--cream);
  display: grid; place-items: center; pointer-events: none;
}
.hm-avaup:hover .cam { background: var(--ember); }
.hm-avaup .cam svg { width: 11px; height: 11px; color: #fff; }
.hm-avahint { margin-left: auto; align-self: center; font-size: 12.5px; font-weight: 700; color: var(--mod-haushalt); }

/* pet photo uploader (rectangular) */
.hm-petup {
  position: relative; width: 100%; height: 124px; margin-bottom: 17px;
  border: 1.5px dashed var(--slate-12); border-radius: var(--radius-md);
  background: repeating-linear-gradient(135deg,#efe7d8,#efe7d8 7px,#e7dccb 7px,#e7dccb 14px);
  display: grid; place-items: center; cursor: pointer; overflow: hidden;
  transition: border-color var(--transition-fast); color: var(--slate-55);
  font-family: inherit; padding: 0;
}
.hm-petup:hover { border-color: var(--mod-finanzen); }
.hm-petup.has-img { background-size: cover; background-position: center; border-style: solid; border-color: var(--slate-12); }
.hm-petup .pu-ph { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; }
.hm-petup .pu-ph svg { width: 26px; height: 26px; opacity: 0.7; }
.hm-petup.has-img .pu-ph { display: none; }
.hm-petup .cam {
  position: absolute; right: 11px; bottom: 11px; width: 32px; height: 32px;
  border-radius: 50%; background: rgba(11,40,62,0.72); display: grid; place-items: center; pointer-events: none;
}
.hm-petup .cam svg { width: 15px; height: 15px; color: #fff; }

/* ============================================================
   KONTO / LOGIN-WAHL
   ============================================================ */
.hm-choices.c-2 { grid-template-columns: 1fr 1fr; }
.hm-reveal { display: none; margin-top: 14px; }
.hm-reveal.show { display: block; animation: hmFade var(--transition-base); }
.login-state {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1.5px solid var(--slate-06); border-radius: var(--radius-md); background: #fff;
}
.login-state .ls-ic { width: 34px; height: 34px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; }
.login-state .ls-ic svg { width: 17px; height: 17px; }
.login-state.has .ls-ic { background: rgba(123,175,138,0.2); color: #3c6b4d; }
.login-state.none .ls-ic { background: var(--slate-06); color: var(--slate-55); }
.login-state .ls-tx { flex: 1; min-width: 0; }
.login-state .ls-name { font-weight: 700; font-size: 14px; }
.login-state .ls-meta { font-size: 12px; color: var(--slate-55); }

/* ============================================================
   PAKET-AUSWAHL
   ============================================================ */
.plan-billing { display: flex; justify-content: center; margin-bottom: 20px; }
.plan-billing .hm-seg { width: auto; }
.plan-billing .save { margin-left: 7px; font-size: 10px; font-weight: 800; color: var(--sage); background: rgba(123,175,138,0.18); padding: 2px 7px; border-radius: var(--radius-full); vertical-align: middle; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card {
  position: relative; text-align: left; background: #fff; cursor: pointer; font-family: inherit;
  border: 1.5px solid var(--slate-12); border-radius: var(--radius-md); padding: 20px 18px;
  display: flex; flex-direction: column; transition: all var(--transition-fast);
}
.plan-card:hover { border-color: var(--slate-40); }
.plan-card.on { border-color: var(--mod-haushalt); box-shadow: 0 0 0 3px rgba(90,140,140,0.13); }
.plan-card .pl-mark { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%; background: var(--mod-haushalt); display: none; place-items: center; }
.plan-card .pl-mark::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; }
.plan-card.on .pl-mark { display: grid; }
.plan-card .pl-badge { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--mod-haushalt); background: rgba(90,140,140,0.12); padding: 3px 8px; border-radius: var(--radius-full); margin-bottom: 10px; align-self: flex-start; }
.plan-card .pl-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.1; }
.plan-card .pl-price { font-family: var(--font-display); font-weight: 700; font-size: 27px; line-height: 1; margin-top: 9px; }
.plan-card .pl-price small { font-size: 13px; font-weight: 600; color: var(--slate-55); font-family: var(--font-body); }
.plan-card .pl-members { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate-55); margin-top: 7px; }
.plan-card .pl-feats { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--slate-06); }
.plan-card .pl-feats li { display: flex; gap: 8px; font-size: 13px; color: var(--slate-70); align-items: flex-start; line-height: 1.35; }
.plan-card .pl-feats svg { width: 15px; height: 15px; color: var(--sage); flex-shrink: 0; margin-top: 1px; }
.plan-card .pl-feats li.off { color: var(--slate-40); }
.plan-card .pl-feats li.off svg { color: var(--slate-40); }

/* ============================================================
   BFSG / WCAG 2.1 AA — Bedienelemente, Pflichtfelder, Fehler
   ============================================================ */
/* 1.4.11 — Rahmen interaktiver Elemente ≥3:1 */
.mini-btn, .row-edit, .add-member,
.hm-input, .hm-select, .hm-textarea,
.hm-choice, .hm-chip, .hm-seg, .plan-card, .hm-petup {
  border-color: var(--control-border);
}
/* Schalter: sichtbarer Rand (Boundary ≥3:1) in beiden Zuständen,
   ohne Layout-Verschiebung (inset shadow) */
.hm-switch { box-shadow: inset 0 0 0 1.5px var(--control-border); }
.hm-switch.on { box-shadow: inset 0 0 0 1.5px rgba(45,74,62,0.55); }

/* 2.5.8 — Trefferflächen */
.row-edit { width: 36px; height: 36px; }

/* Pflichtfeld-Markierung (Symbol, nicht nur Farbe) */
.hm-label .req { color: var(--field-error); font-weight: 700; margin-left: 3px; }
.hm-label .req::after { content: "*"; }

/* Fehlerzustand: roter Rahmen + Warn-Icon + Klartext (nicht nur Farbe) */
.hm-input.invalid, .hm-select.invalid, .hm-textarea.invalid {
  border-color: var(--field-error) !important;
  background-color: var(--field-error-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23B3261E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
.hm-choices.invalid { outline: 2px solid var(--field-error); outline-offset: 4px; border-radius: var(--radius-md); }
.hm-err {
  display: none; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--field-error);
}
.hm-err svg { width: 15px; height: 15px; flex-shrink: 0; }
.hm-field.has-error .hm-err,
.invalid ~ .hm-err { display: flex; }

/* ============================================================
   BFSG / WCAG 1.4.10 — Reflow (Zoom 400% ≈ 320px), Dialoge
   ============================================================ */
@media (max-width: 640px) {
  .hm-scrim { padding: 0; align-items: flex-end; }
  .hm-dialog, .hm-dialog.wide {
    max-width: 100%; width: 100%; max-height: 100vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .hm-head { padding: 18px 18px 14px; }
  .hm-body { padding: 18px; }
  .hm-foot { padding: 14px 18px; flex-wrap: wrap; }
  .hm-foot .hm-btn { flex: 1; justify-content: center; min-width: 44%; }
  .hm-foot .grow { display: none; }

  /* zwei-/dreispaltige Felder → eine Spalte */
  .hm-grid-2 { grid-template-columns: 1fr; }
  .hm-choices.c-3, .hm-choices.c-2 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }

  /* Stepper kompakter: Labels weg, nur Nummern + Verbinder */
  .hm-steps { padding: 14px 18px 2px; }
  .hm-step .sl { display: none; }

  /* Rechte-Matrix im Dialog horizontal scrollbar */
  .hm-dialog .access-grid { min-width: 440px; }
  .hm-body { overflow-x: auto; }
}

