/*
 * Hausbau-Assistent – Frontend CSS v2
 * Mobile First · Große Touch-Targets · Klare Klick-Hierarchie
 */

/* ── Variablen ────────────────────────────────────────────────────────────── */
:root {
  --lime:           #aadd00;
  --lime-muted:     #7aaa00;
  --lime-bright:    #c6ff00;
  --dark:           #141410;
  --green-bg:       #EAF3DE;
  --green-text:     #27500A;
  --green-border:   #C0DD97;
  --blue-bg:        #E6F1FB;
  --blue-text:      #0C447C;
  --red-bg:         #fff0f0;
  --red-text:       #c0392b;
  --red-border:     #f5c6c6;
  --bg:             #ffffff;
  --bg2:            #f6f6f4;
  --bg3:            #efefed;
  --text:           #141410;
  --text2:          #5a5a54;
  --text3:          #9a9a94;
  --border:         #e4e4e0;
  --border2:        #d0d0ca;
  --r:              12px;
  --r-sm:           8px;
  --r-xs:           5px;
  --shadow:         0 1px 3px rgba(0,0,0,.07);
  --shadow-md:      0 2px 8px rgba(0,0,0,.1);
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Minimale Touch-Target-Größe */
  --touch:          44px;
}

/* ── Animationen ─────────────────────────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideDown{ from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes checkPop { 0%{transform:scale(0);} 60%{transform:scale(1.3);} 100%{transform:scale(1);} }
@keyframes barGrow  { from{width:0;} to{width:var(--bar-w,100%);} }
@keyframes pulse    { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* ── Basis ────────────────────────────────────────────────────────────────── */
.bp {
  padding: 1.2rem 0 2rem;
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

/* ── Header ──────────────────────────────────────────────────────────────── */
.bp-hdr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  animation: fadeUp .4s both;
}

.bp-eyebrow {
  font-size: .65rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--lime-muted);
  font-weight: 600;
  margin: 0 0 .3rem;
  display: flex; align-items: center; gap: 7px;
}
.bp-eyebrow::before {
  content: ''; display: inline-block; width: 14px; height: 2px; background: var(--lime);
}

.bp-title {
  font-size: 1.65rem; font-weight: 600;
  letter-spacing: -.03em; line-height: 1.1; margin: 0;
  color: var(--text);
}

.bp-title-u { position: relative; display: inline-block; }
.bp-title-u::after {
  content: ''; position: absolute; bottom: 1px; left: 0; right: 0;
  height: 3px; background: var(--lime); border-radius: 2px;
  animation: barGrow .6s .7s ease both; --bar-w: 100%;
}

.bp-hdr-actions { display: flex; gap: 6px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: var(--bg);
  color: var(--text);
  font-size: .78rem; font-family: var(--font); font-weight: 500;
  padding: .4rem .9rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  /* Touch-Target */
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover  { background: var(--bg2); }
.btn:active { background: var(--bg3); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.btn-lime   { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.btn-lime:hover  { background: var(--lime-bright); }
.btn-lime:active { background: var(--lime-bright); }

.btn-ghost  { border-color: transparent; background: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--text); background: var(--bg2); border-color: var(--border); }

.btn-danger { background: var(--red-bg); color: var(--red-text); border-color: var(--red-border); }
.btn-danger:hover { background: #fce8e8; }

.btn-icon {
  width: var(--touch); height: var(--touch);
  min-height: unset;
  padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Banner ──────────────────────────────────────────────────────────────── */
.bp-notif-banner {
  background: rgba(170,221,0,.07);
  border: 1px solid rgba(170,221,0,.25);
  border-radius: var(--r-sm);
  padding: .6rem .9rem;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: .9rem;
  font-size: .79rem; color: var(--text2);
  animation: fadeUp .4s .1s both;
}

.bp-notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime); flex-shrink: 0;
  animation: pulse 2s infinite;
}

/* ── Fortschritts-Karte ──────────────────────────────────────────────────── */
.bp-prog-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .9rem 1.1rem;
  margin-bottom: 1.1rem;
  animation: fadeUp .4s .15s both;
}

.bp-prog-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.bp-prog-label { font-size: .77rem; font-weight: 500; }
.bp-prog-pct   { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }

.bp-prog-track {
  height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: .45rem;
}
.bp-prog-fill {
  height: 100%; background: var(--lime); border-radius: 4px; transition: width .5s ease;
}

.bp-prog-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.bp-prog-stat { font-size: .73rem; color: var(--text2); }
.bp-prog-stat strong { color: var(--text); font-weight: 500; }

/* ── Phasen-Pillen Navigation ────────────────────────────────────────────── */
.bp-phase-nav {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-bottom: 1rem;
  animation: fadeUp .4s .2s both;
}

.bp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .28rem .75rem;
  border-radius: 14px;
  font-size: .72rem; font-weight: 500;
  border: 1px solid var(--border2);
  cursor: pointer;
  background: var(--bg); color: var(--text2);
  transition: all .15s;
  white-space: nowrap;
  min-height: 32px;
  -webkit-tap-highlight-color: transparent;
}
.bp-pill:hover  { border-color: var(--lime-muted); color: var(--text); background: rgba(170,221,0,.05); }
.bp-pill:active { background: rgba(170,221,0,.12); }
.bp-pill.done   { background: var(--green-bg); color: var(--green-text); border-color: var(--green-border); }
.bp-pill.active { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.bp-pill.active:hover { background: var(--lime-bright); }

.bp-pill .pill-icon { display: inline-flex; align-items: center; width: 14px; height: 14px; }
.bp-pill .pill-icon svg { width: 13px; height: 13px; }

/* ── Hauptbereich: Sidebar + Detail ─────────────────────────────────────── */
.bp-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 12px;
  align-items: start;
  animation: fadeUp .4s .25s both;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.bp-sidebar { display: flex; flex-direction: column; gap: 4px; }

.bp-phase-item {
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .6rem .8rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
  min-height: var(--touch);
}
.bp-phase-item:hover  { border-color: var(--border2); background: var(--bg2); }
.bp-phase-item:active { background: var(--bg3); }
.bp-phase-item.active { border-color: var(--lime); background: rgba(170,221,0,.05); }

.bp-phase-item-top {
  display: flex; align-items: center; gap: 7px;
}

.bp-phase-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 600; color: var(--text2);
  flex-shrink: 0;
}
.bp-phase-num.done   { background: var(--green-bg); border-color: var(--green-border); color: var(--green-text); }
.bp-phase-num.active { background: var(--lime); border-color: var(--lime); color: var(--dark); }

.bp-phase-item-name {
  font-size: .79rem; font-weight: 500; color: var(--text);
  flex: 1; line-height: 1.3;
}

.bp-phase-pct-label { font-size: .65rem; color: var(--text3); flex-shrink: 0; }

.bp-phase-mini-bar  { height: 3px; background: var(--border); border-radius: 2px; margin-top: .35rem; overflow: hidden; }
.bp-phase-mini-fill { height: 100%; background: var(--lime); border-radius: 2px; transition: width .4s; }

/* ── Detail-Bereich ──────────────────────────────────────────────────────── */
.bp-detail-wrap { min-width: 0; }

/* Phasen-Header */
.bp-detail-hdr {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .9rem 1rem;
  margin-bottom: 8px;
}

.bp-detail-top-row {
  display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: .5rem;
}

.bp-badge {
  padding: .15rem .5rem; border-radius: 6px;
  font-size: .65rem; font-weight: 600;
  background: var(--blue-bg); color: var(--blue-text);
  text-transform: uppercase; letter-spacing: .06em;
}
.bp-badge.green { background: var(--green-bg); color: var(--green-text); }

.bp-detail-phase-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 1rem; font-weight: 600; margin-bottom: .2rem;
}
.bp-detail-icon { display: inline-flex; align-items: center; }
.bp-detail-icon svg { width: 18px; height: 18px; color: var(--lime-muted); }

.bp-detail-desc {
  font-size: .79rem; color: var(--text2); line-height: 1.55; margin: 0 0 .65rem;
}

.bp-detail-prog-row { display: flex; align-items: center; gap: 8px; }
.bp-detail-prog-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bp-detail-prog-fill  { height: 100%; background: var(--lime); border-radius: 3px; transition: width .4s; }
.bp-detail-prog-label { font-size: .7rem; color: var(--text3); white-space: nowrap; }

/* ── Schritte Trenner ────────────────────────────────────────────────────── */
.steps-lbl {
  font-size: .63rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text3); font-weight: 600;
  display: flex; align-items: center; gap: 7px; margin-bottom: .5rem;
}
.steps-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Schritte Liste ──────────────────────────────────────────────────────── */
.bp-steps { display: flex; flex-direction: column; gap: 5px; }

.bp-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.bp-step:hover    { border-color: var(--border2); box-shadow: var(--shadow); }
.bp-step.done     { border-color: var(--green-border); background: #f5fbee; }
.bp-step.expanded { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(170,221,0,.15); }
.bp-step.custom   { border-style: dashed; }

/* Haupt-Zeile – großes Touch-Target */
.bp-step-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .75rem .9rem;
  cursor: pointer;
  min-height: var(--touch);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Checkbox */
.bp-chk {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
  /* Eigenes Touch-Target: unsichtbarer Padding-Bereich */
  position: relative;
}
.bp-chk::before {
  content: ''; position: absolute;
  inset: -10px; /* 10px extra Touch-Bereich rundherum */
}
.bp-chk:hover  { border-color: var(--lime-muted); }
.bp-chk:active { transform: scale(.9); }
.bp-chk.done   { background: var(--lime); border-color: var(--lime); }
.bp-chk svg    { display: none; }
.bp-chk.done svg { display: block; animation: checkPop .2s ease both; }

/* Step Text-Bereich */
.bp-step-body { flex: 1; min-width: 0; }

.bp-step-title {
  font-size: .84rem; font-weight: 500; color: var(--text);
  line-height: 1.35;
}
.bp-step.done .bp-step-title {
  text-decoration: line-through; color: var(--text3);
}

.bp-step-sub {
  font-size: .73rem; color: var(--text2);
  margin-top: .15rem; line-height: 1.45;
  /* Max 2 Zeilen in Listenansicht */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta-Tags */
.bp-step-meta {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: .3rem;
}

.bp-step-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .63rem; padding: .1rem .42rem; border-radius: 4px;
  background: var(--bg2); color: var(--text2);
  border: 1px solid var(--border);
  white-space: nowrap; font-weight: 500;
}
.bp-step-tag.tag-q     { background: var(--blue-bg); color: var(--blue-text); border-color: #c8ddf5; }
.bp-step-tag.tag-info  { background: var(--bg2); color: var(--text2); }
.bp-step-tag.tag-pdf   { background: var(--red-bg); color: var(--red-text); border-color: var(--red-border); }
.bp-step-tag.tag-custom{ background: #f3eaff; color: #6528c8; border-color: #d8b8f8; }

/* Pfeil */
.bp-expand-icon {
  flex-shrink: 0; color: var(--text3);
  transition: transform .2s ease;
  display: flex; align-items: center;
  /* Extra Padding für bessere Klickbarkeit */
  padding: 4px;
}
.bp-step.expanded .bp-expand-icon { transform: rotate(180deg); }

/* ── Aufgeklappter Inhalt ────────────────────────────────────────────────── */
.bp-step-content {
  border-top: 1px solid var(--border);
  padding: .85rem .9rem .8rem;
  animation: slideDown .2s ease both;
}

.bp-step-section  { margin-bottom: .8rem; }
.bp-step-section:last-child { margin-bottom: 0; }

.bp-step-section-title {
  font-size: .63rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 600; color: var(--text3); margin-bottom: .38rem;
}

.bp-step-text {
  font-size: .8rem; color: var(--text2); line-height: 1.65;
}
.bp-step-text p { margin: 0 0 .4rem; }
.bp-step-text p:last-child { margin: 0; }
.bp-step-text strong { color: var(--text); }

/* Bild */
.bp-step-image {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: var(--r-xs); margin-bottom: .7rem; display: block;
}

/* Links */
.bp-step-links {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .7rem;
}

.bp-step-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .35rem .75rem;
  border-radius: var(--r-xs);
  font-size: .74rem; font-weight: 500;
  text-decoration: none;
  transition: all .15s;
  border: 1px solid var(--border2);
  color: var(--text2); background: var(--bg2);
  min-height: 34px;
}
.bp-step-link:hover { border-color: var(--lime-muted); color: var(--text); background: var(--bg); }
.bp-step-link--pdf  { color: var(--red-text); border-color: var(--red-border); background: var(--red-bg); }
.bp-step-link--pdf:hover { background: #fde8e8; }

/* Tipp */
.bp-tip {
  background: rgba(170,221,0,.07);
  border-left: 2.5px solid var(--lime);
  border-radius: 0 6px 6px 0;
  padding: .5rem .75rem;
  font-size: .78rem; color: var(--text2); line-height: 1.55;
}
.bp-tip-label {
  font-size: .62rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--lime-muted); margin-bottom: .2rem;
}

/* Fragen */
.bp-questions { display: flex; flex-direction: column; gap: 4px; }

.bp-q {
  display: flex; align-items: flex-start; gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .5rem .7rem;
  font-size: .77rem; color: var(--text2);
  line-height: 1.45;
  transition: border-color .15s, background .15s;
  /* Kein Cursor – nur Darstellung, kein Click-Handler nötig */
}
.bp-q:hover { border-color: var(--lime-muted); background: rgba(170,221,0,.04); }

.bp-q-icon {
  flex-shrink: 0; margin-top: 1px; color: var(--lime-muted);
  display: inline-flex; align-items: center;
}

/* Aktionen */
.bp-step-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: .75rem; padding-top: .65rem;
  border-top: 1px solid var(--border);
}

/* ── Button: Eigener Schritt ─────────────────────────────────────────────── */
.bp-add-step-btn {
  width: 100%;
  background: transparent;
  border: 1.5px dashed var(--border2);
  border-radius: var(--r-sm);
  padding: .6rem .9rem;
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
  color: var(--text2); font-size: .79rem;
  transition: border-color .15s, color .15s, background .15s;
  margin-top: 5px;
  min-height: var(--touch);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.bp-add-step-btn:hover  { border-color: var(--lime-muted); color: var(--text); background: rgba(170,221,0,.04); }
.bp-add-step-btn:active { background: rgba(170,221,0,.08); }

/* ── Formulare ───────────────────────────────────────────────────────────── */
.bp-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: .85rem;
  margin-top: 5px;
  animation: slideDown .2s ease both;
}

.bp-edit-form {
  border-color: var(--lime-muted);
  background: rgba(170,221,0,.04);
}

.bp-form-label {
  display: block;
  font-size: .67rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text2); font-weight: 600; margin-bottom: .28rem;
}

.bp-form-input,
.bp-form-textarea {
  width: 100%;
  padding: .5rem .7rem;
  border: 1px solid var(--border2);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--text);
  font-size: .8rem; font-family: var(--font);
  margin-bottom: 8px;
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.5;
  /* iOS-Fix: kein Zoom beim Focus */
  font-size: 16px;
}

@media (min-width: 481px) {
  .bp-form-input, .bp-form-textarea { font-size: .8rem; }
}

.bp-form-input:focus,
.bp-form-textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 2px rgba(170,221,0,.18);
}

.bp-form-textarea { resize: vertical; min-height: 56px; }

.bp-form-actions { display: flex; gap: 7px; margin-top: 4px; }

/* ── Login-Hinweis ───────────────────────────────────────────────────────── */
.hba-login-notice {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .85rem 1rem;
  font-size: .82rem; color: var(--text2);
}
.hba-login-notice a { color: var(--lime-muted); font-weight: 500; }
.hba-login-notice a:hover { color: var(--text); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.hba-toast {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--dark); color: #fff;
  font-size: .78rem; font-family: var(--font);
  padding: .5rem 1.1rem;
  border-radius: 24px;
  z-index: 99999;
  opacity: 0;
  transition: opacity .22s, transform .22s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.hba-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hba-toast--success { background: var(--green-text); }
.hba-toast--error   { background: var(--red-text); }

/* ── Fortschrittsbalken Shortcode ────────────────────────────────────────── */
.hba-progress-bar-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: .9rem 1.1rem;
}

/* ── Leer-Zustand ────────────────────────────────────────────────────────── */
.bp-empty {
  text-align: center; padding: 2rem 1rem;
  color: var(--text3); font-size: .82rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bp-body { grid-template-columns: 200px 1fr; }
}

/* ── Mobile: Ab hier MOBILE FIRST ────────────────────────────────────────── */
@media (max-width: 680px) {

  .bp { padding: .8rem 0 2rem; }

  /* Sidebar wird zum Overlay-Drawer */
  .bp-body {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bp-sidebar {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    padding: 0;
    overflow: auto;
  }

  .bp-sidebar.sidebar-open {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    animation: fadeUp .25s ease;
  }

  /* Phasenliste als Bottom-Sheet */
  .bp-sidebar.sidebar-open::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 280px;
  }

  /* Innerer Container für die Items */
  #bp-phase-list {
    background: var(--bg);
    border-radius: var(--r) var(--r) 0 0;
    padding: 1rem;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
  }

  /* Toggle-Button sichtbar auf Mobile */
  #bp-toggle-sidebar {
    display: flex !important;
  }

  /* Pillen: kleinerer Font, aber gut klickbar */
  .bp-phase-nav { gap: 4px; }
  .bp-pill { font-size: .69rem; padding: .25rem .65rem; min-height: 34px; }
  .bp-pill .pill-icon { display: none; } /* Icon auf Mobile verbergen */

  /* Fortschritt kompakter */
  .bp-prog-meta { gap: .8rem; }
  .bp-prog-stat { font-size: .71rem; }

  /* Schritte: etwas mehr Padding für Finger */
  .bp-step-main { padding: .8rem .85rem; min-height: 52px; }
  .bp-step-title { font-size: .86rem; }

  /* Buttons größer */
  .btn { min-height: 40px; }
  .btn-lime { min-height: 42px; padding: .5rem 1rem; }

  /* Aktionen übereinander wenn zu eng */
  .bp-step-actions { gap: 8px; }
  .bp-step-actions .btn { flex: 1; justify-content: center; }

  /* Formulare */
  .bp-form-actions { flex-direction: column; }
  .bp-form-actions .btn { width: 100%; justify-content: center; }

  .bp-title { font-size: 1.35rem; }

  /* Toast unten mittig, volle Breite auf kleinen Screens */
  .hba-toast { 
    left: 12px; right: 12px; bottom: 16px;
    transform: translateY(12px);
    text-align: center;
    white-space: normal;
  }
  .hba-toast.show { transform: translateY(0); }
}

/* ── Kleinstes Mobile ────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .bp-title { font-size: 1.15rem; }
  .bp-hdr-actions .btn:not(.btn-icon) { display: none; }

  /* Pillen scrollen horizontal */
  .bp-phase-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bp-phase-nav::-webkit-scrollbar { display: none; }
  .bp-pill { flex-shrink: 0; }
}

/* ── Desktop: Toggle-Button ausblenden ───────────────────────────────────── */
@media (min-width: 681px) {
  #bp-toggle-sidebar { display: none !important; }
  .bp-sidebar { display: flex !important; position: static; background: none; }
  #bp-phase-list { background: none; padding: 0; max-height: none; border-radius: 0; }
}
