/* pandabu RC16.251 – Notvorrat Form Flow
   Vollbildiger, Typeform-/Youform-inspirierter Arbeitsmodus.
   Ziel: immer genau eine Position sichtbar, keine Seitenbewegung, interne Stage scrollt nur bei Bedarf. */

body.pandabu-emergency-form-flow-active{
  overflow:hidden!important;
  overscroll-behavior:none;
}
body.pandabu-emergency-form-flow-active #app{
  overflow:hidden!important;
}

.rc251-form-flow{
  position:relative;
  z-index:1;
}
.rc251-form-shell{
  --rc251-bg:#f5f7f9;
  --rc251-panel:#ffffff;
  --rc251-panel-soft:#f0f3f5;
  --rc251-text:#15191d;
  --rc251-muted:#667078;
  --rc251-line:#dbe1e5;
  --rc251-accent:var(--accent,#19b8aa);
  position:fixed;
  inset:0;
  z-index:9000;
  height:100dvh;
  width:100vw;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  color:var(--rc251-text);
  background:var(--rc251-bg);
  isolation:isolate;
}
html[data-theme="dark"] .rc251-form-shell{
  --rc251-bg:#11161b;
  --rc251-panel:#1c232a;
  --rc251-panel-soft:#242c34;
  --rc251-text:#f3f6f8;
  --rc251-muted:#a9b1ba;
  --rc251-line:#333c45;
}

/* Kopf: ruhig, kompakt und immer an derselben Position. */
.rc251-form-header{
  position:relative;
  z-index:3;
  padding:max(14px,env(safe-area-inset-top,0px)) clamp(14px,3vw,34px) 12px;
  border-bottom:1px solid var(--rc251-line);
  background:var(--rc251-bg);
}
.rc251-form-header>*{
  width:min(100%,980px);
  margin-left:auto;
  margin-right:auto;
}
.rc251-form-topline{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
}
.rc251-form-close,
.rc251-form-plan{
  min-height:44px;
  border:1px solid var(--rc251-line);
  background:var(--rc251-panel);
  color:var(--rc251-text);
  box-shadow:none;
}
.rc251-form-close{
  width:44px;
  padding:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:1.65rem;
  line-height:1;
  font-weight:500;
}
.rc251-form-plan{
  border-radius:999px;
  padding:9px 14px;
  font-size:.83rem;
  font-weight:800;
  white-space:nowrap;
}
.rc251-form-title{
  min-width:0;
  display:grid;
  gap:2px;
}
.rc251-form-title>span{
  color:var(--rc251-accent);
  font-size:.69rem;
  line-height:1.1;
  font-weight:900;
  letter-spacing:.11em;
}
.rc251-form-title>strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:clamp(1.05rem,2.3vw,1.38rem);
  line-height:1.16;
}
.rc251-form-title>small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--rc251-muted);
  font-size:.76rem;
}
.rc251-form-progress-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:12px;
  color:var(--rc251-muted);
  font-size:.76rem;
}
.rc251-form-progress-row strong{
  color:var(--rc251-text);
  font-size:.76rem;
}
.rc251-form-shell .emergency-wizard-progress-track{
  width:min(100%,980px);
  height:4px;
  margin-top:7px;
  margin-bottom:10px;
  overflow:hidden;
  border-radius:999px;
  background:color-mix(in srgb,var(--rc251-muted) 16%,transparent);
}
.rc251-form-shell .emergency-wizard-progress-track span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:var(--rc251-accent);
  transition:width .22s ease;
}

/* Kategorie-Fortschritt: Icons statt grosser Kacheln. */
.rc251-form-shell .emergency-wizard-categories{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  gap:clamp(8px,2vw,20px);
  overflow-x:auto;
  padding:2px 4px 4px;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
}
.rc251-form-shell .emergency-wizard-categories::-webkit-scrollbar{display:none}
.rc251-form-shell .emergency-wizard-category{
  position:relative;
  flex:0 0 68px;
  min-width:68px;
  min-height:62px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--rc251-muted);
  display:grid;
  justify-items:center;
  align-content:start;
  gap:5px;
  scroll-snap-align:center;
  cursor:pointer;
  text-align:center;
  box-shadow:none!important;
}
.rc251-form-shell .emergency-wizard-category::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:19px;
  left:calc(-50% - 10px);
  width:calc(100% + 20px);
  height:2px;
  background:var(--rc251-line);
}
.rc251-form-shell .emergency-wizard-category:first-child::before{display:none}
.rc251-form-shell .emergency-wizard-category-icon{
  position:relative;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:2px solid var(--rc251-line);
  border-radius:50%;
  background:var(--rc251-panel);
  transition:border-color .18s ease,transform .18s ease,background .18s ease;
}
.rc251-form-shell .emergency-wizard-category-icon img{
  width:28px;
  height:28px;
  object-fit:contain;
}
.rc251-form-shell .emergency-wizard-category-icon b{
  position:absolute;
  right:-5px;
  bottom:-4px;
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:2px solid var(--rc251-bg);
  background:var(--rc251-accent);
  color:#fff;
  font-size:10px;
  line-height:1;
}
.rc251-form-shell .emergency-wizard-category small{
  display:block;
  max-width:68px;
  color:var(--rc251-muted);
  font-size:.64rem;
  line-height:1.05;
  font-weight:750;
}
.rc251-form-shell .emergency-wizard-category.active .emergency-wizard-category-icon{
  border-color:var(--rc251-accent);
  background:color-mix(in srgb,var(--rc251-accent) 10%,var(--rc251-panel));
  transform:scale(1.07);
}
.rc251-form-shell .emergency-wizard-category.active small{
  color:var(--rc251-text);
  font-weight:900;
}
.rc251-form-shell .emergency-wizard-category.done::before,
.rc251-form-shell .emergency-wizard-category.done .emergency-wizard-category-icon{
  border-color:color-mix(in srgb,var(--rc251-accent) 55%,var(--rc251-line));
}

/* Die Stage ist der EINZIGE scrollbare Inhaltsbereich. */
.rc251-form-stage{
  min-height:0!important;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
  display:grid;
  align-items:center;
  justify-items:center;
  padding:clamp(20px,4vh,52px) clamp(14px,4vw,36px) 34px;
  background:var(--rc251-bg);
}
.rc251-form-stage.is-transitioning{pointer-events:none}
.rc251-form-stage>[hidden],
.rc251-form-stage [data-emergency-supply-group][hidden],
.rc251-form-stage [data-emergency-supply-row][hidden]{display:none!important}

/* Keine alte Listenoptik im geführten Modus. */
.rc251-form-shell .emergency-smart-group{
  width:min(100%,760px)!important;
  margin:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.rc251-form-shell .emergency-smart-group>summary{display:none!important}
.rc251-form-shell .emergency-requirement-list{
  display:block!important;
  padding:0!important;
}
.rc251-form-shell .emergency-requirement{
  width:100%;
  margin:0!important;
  border:1px solid var(--rc251-line)!important;
  border-radius:26px!important;
  background:var(--rc251-panel)!important;
  box-shadow:0 18px 48px rgba(10,24,30,.08)!important;
  overflow:hidden;
}
html[data-theme="dark"] .rc251-form-shell .emergency-requirement{
  box-shadow:0 18px 48px rgba(0,0,0,.24)!important;
}
.rc251-form-shell .emergency-requirement-copy{
  padding:clamp(22px,4vw,38px)!important;
}
.rc251-form-shell .emergency-row-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.rc251-form-shell .emergency-row-heading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}
.rc251-form-shell .emergency-row-heading>strong{
  font-size:clamp(1.32rem,3vw,1.9rem)!important;
  line-height:1.12;
}
.rc251-form-shell .emergency-row-status{
  flex:0 0 auto;
}
.rc251-form-shell .emergency-requirement-copy>small{
  display:block;
  margin:0 0 18px;
  color:var(--rc251-muted)!important;
  font-size:.9rem!important;
  line-height:1.45;
}
.rc251-form-shell .emergency-requirement-body{
  display:grid;
  gap:14px;
}
.rc251-form-shell .emergency-quantity-grid,
.rc251-form-shell .emergency-quantity-grid.is-pool{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.rc251-form-shell .emergency-quantity-grid>div{
  min-width:0;
  padding:14px 15px;
  border-radius:15px;
  background:var(--rc251-panel-soft);
}
.rc251-form-shell .emergency-quantity-grid small{color:var(--rc251-muted)}
.rc251-form-shell .emergency-quantity-grid strong{font-size:1.1rem}
.rc251-form-shell .emergency-shopping-action-button,
.rc251-form-shell [data-emergency-shopping-group],
.rc251-form-shell .emergency-check-btn{
  min-height:54px;
  border-radius:15px!important;
  font-weight:900!important;
}
.rc251-form-shell .emergency-product-plan,
.rc251-form-shell .emergency-check-overview,
.rc251-form-shell .emergency-existing-stock,
.rc251-form-shell .emergency-component-targets,
.rc251-form-shell .emergency-pool-planner{
  border-radius:18px!important;
}

/* Animation bewegt nur den Frageinhalt, niemals die Seite. */
.rc251-form-shell .emergency-wizard-leave{
  opacity:0;
  transform:translate3d(-18px,0,0);
  transition:opacity .14s ease,transform .14s ease;
}
.rc251-form-shell .emergency-wizard-leave-back{
  opacity:0;
  transform:translate3d(18px,0,0);
  transition:opacity .14s ease,transform .14s ease;
}
.rc251-form-shell .emergency-wizard-enter{
  opacity:0;
  transform:translate3d(18px,0,0);
  transition:none;
}
.rc251-form-shell .emergency-wizard-enter-back{
  opacity:0;
  transform:translate3d(-18px,0,0);
  transition:none;
}
.rc251-form-shell .emergency-wizard-enter.is-visible,
.rc251-form-shell .emergency-wizard-enter-back.is-visible{
  opacity:1;
  transform:none;
  transition:opacity .18s ease,transform .18s ease;
}

/* Feste, simple Vor-/Zurück-Navigation. */
.rc251-form-shell .emergency-wizard-controls{
  position:relative!important;
  inset:auto!important;
  z-index:4;
  width:100%;
  margin:0!important;
  padding:12px max(14px,calc((100vw - 980px)/2)) max(12px,env(safe-area-inset-bottom,0px))!important;
  border:0!important;
  border-top:1px solid var(--rc251-line)!important;
  border-radius:0!important;
  background:var(--rc251-bg)!important;
  box-shadow:none!important;
  display:grid!important;
  grid-template-columns:minmax(120px,180px) 1fr minmax(120px,180px)!important;
  align-items:center;
  gap:16px;
}
.rc251-form-shell .emergency-wizard-controls[hidden]{display:none!important}
.rc251-form-shell .emergency-wizard-controls button{
  width:100%;
  min-height:48px;
  border-radius:14px;
  font-weight:900;
}
.rc251-form-shell .emergency-wizard-controls button:disabled{
  opacity:.32;
  cursor:default;
}
.rc251-step-counter{
  color:var(--rc251-muted);
  text-align:center;
  font-size:.8rem;
  font-weight:800;
}

.rc251-form-shell .emergency-wizard-complete{
  width:min(100%,720px);
  min-height:min(520px,65vh);
  margin:auto;
  border:1px solid var(--rc251-line);
  border-radius:26px;
  background:var(--rc251-panel);
  box-shadow:0 18px 48px rgba(10,24,30,.08);
}
.rc251-form-shell .emergency-wizard-complete[hidden]{display:none!important}

/* Profil-Dialog muss über dem Fullscreen-Flow liegen. */
.rc251-profile-modal{z-index:9200!important}
.rc251-profile-modal .emergency-profile-modal-card{max-height:calc(100dvh - 32px);overflow:auto}

@media(max-width:720px){
  .rc251-form-header{
    padding:max(10px,env(safe-area-inset-top,0px)) 12px 9px;
  }
  .rc251-form-topline{
    grid-template-columns:42px minmax(0,1fr) auto;
    gap:9px;
  }
  .rc251-form-close{width:40px;min-height:40px;font-size:1.45rem}
  .rc251-form-plan{min-height:40px;padding:8px 10px;font-size:.72rem}
  .rc251-form-title>span{font-size:.6rem}
  .rc251-form-title>strong{font-size:1rem}
  .rc251-form-title>small{font-size:.68rem}
  .rc251-form-progress-row{margin-top:8px;font-size:.69rem}
  .rc251-form-progress-row strong{font-size:.69rem}
  .rc251-form-shell .emergency-wizard-progress-track{margin-top:5px;margin-bottom:7px}
  .rc251-form-shell .emergency-wizard-categories{
    justify-content:flex-start;
    gap:7px;
    margin-left:-2px;
    margin-right:-2px;
    padding-bottom:2px;
  }
  .rc251-form-shell .emergency-wizard-category{
    flex-basis:49px;
    min-width:49px;
    min-height:45px;
    gap:0;
  }
  .rc251-form-shell .emergency-wizard-category::before{
    top:17px;
    left:calc(-50% - 5px);
    width:calc(100% + 10px);
  }
  .rc251-form-shell .emergency-wizard-category-icon{
    width:35px;height:35px;
  }
  .rc251-form-shell .emergency-wizard-category-icon img{width:24px;height:24px}
  .rc251-form-shell .emergency-wizard-category small{display:none}
  .rc251-form-stage{
    align-items:start;
    padding:16px 12px 24px;
  }
  .rc251-form-shell .emergency-requirement{
    border-radius:20px!important;
    box-shadow:none!important;
  }
  .rc251-form-shell .emergency-requirement-copy{padding:20px 16px!important}
  .rc251-form-shell .emergency-row-title{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }
  .rc251-form-shell .emergency-row-heading>strong{font-size:1.35rem!important}
  .rc251-form-shell .emergency-row-status{align-self:flex-start}
  .rc251-form-shell .emergency-quantity-grid,
  .rc251-form-shell .emergency-quantity-grid.is-pool{
    grid-template-columns:1fr;
  }
  .rc251-form-shell .emergency-quantity-grid>div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .rc251-form-shell .emergency-wizard-controls{
    padding:9px 12px max(9px,env(safe-area-inset-bottom,0px))!important;
    grid-template-columns:1fr auto 1fr!important;
    gap:8px;
  }
  .rc251-form-shell .emergency-wizard-controls button{min-height:46px;padding:9px 10px;font-size:.88rem}
  .rc251-step-counter{min-width:42px;font-size:.72rem}
}

@media(max-width:390px){
  .rc251-form-title>small{display:none}
  .rc251-form-progress-row strong{display:none}
  .rc251-form-shell .emergency-wizard-category{flex-basis:46px;min-width:46px}
  .rc251-form-shell .emergency-wizard-controls{grid-template-columns:1fr 38px 1fr!important}
}

@media(min-width:1000px){
  .rc251-form-stage{
    padding-top:clamp(30px,6vh,72px);
    padding-bottom:clamp(30px,6vh,72px);
  }
}

@media(prefers-reduced-motion:reduce){
  .rc251-form-shell *,
  .rc251-form-shell *::before,
  .rc251-form-shell *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}

/* Schutz gegen Legacy-Minbreiten innerhalb komplexer Mehrprodukt-Schritte. */
.rc251-form-shell .emergency-product-planner,
.rc251-form-shell .emergency-product-plan-list,
.rc251-form-shell .emergency-product-plan-row,
.rc251-form-shell .emergency-product-plan-select,
.rc251-form-shell .emergency-product-controls,
.rc251-form-shell .emergency-existing-stock,
.rc251-form-shell .emergency-existing-stock-panel,
.rc251-form-shell .emergency-existing-stock-row,
.rc251-form-shell .emergency-component-targets,
.rc251-form-shell .emergency-component-target-row{
  min-width:0!important;
  max-width:100%!important;
}
.rc251-form-shell .emergency-product-plan-select>span{min-width:0}
.rc251-form-shell .emergency-product-plan-select strong,
.rc251-form-shell .emergency-product-plan-select small,
.rc251-form-shell .emergency-component-target-row strong,
.rc251-form-shell .emergency-component-target-row small{
  overflow-wrap:anywhere;
}
@media(max-width:520px){
  .rc251-form-shell .emergency-product-plan-row{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  .rc251-form-shell .emergency-product-plan-status,
  .rc251-form-shell .emergency-product-controls{
    grid-column:1!important;
    grid-row:auto!important;
  }
  .rc251-form-shell .emergency-product-controls{
    width:100%!important;
    grid-template-columns:minmax(0,1fr) minmax(88px,106px)!important;
  }
  .rc251-form-shell .emergency-product-controls.is-fixed-package{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  .rc251-form-shell .emergency-product-qty{
    width:100%!important;
    grid-template-columns:42px minmax(0,1fr) 42px!important;
  }
  .rc251-form-shell .emergency-existing-stock-controls{
    width:100%!important;
    grid-template-columns:42px minmax(0,1fr) 42px auto!important;
  }
}


/* ==================================================
   RC16.252 · Form-Flow Polish + Mobile Global Nav
   ================================================== */

/* 1) Guided Notvorrat: harte Breitenbegrenzung auf kleinen Displays. */
.rc251-form-shell,
.rc251-form-header,
.rc251-form-stage,
.rc251-form-shell .emergency-smart-group,
.rc251-form-shell .emergency-requirement-list,
.rc251-form-shell .emergency-requirement,
.rc251-form-shell .emergency-requirement-copy,
.rc251-form-shell .emergency-requirement-body,
.rc251-form-shell .emergency-product-planner,
.rc251-form-shell .emergency-product-plan,
.rc251-form-shell .emergency-pool-planner,
.rc251-form-shell .emergency-component-targets,
.rc251-form-shell .emergency-component-target-row,
.rc251-form-shell .emergency-check-overview,
.rc251-form-shell .emergency-existing-stock{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.rc251-form-shell .emergency-smart-group,
.rc251-form-shell .emergency-requirement-list,
.rc251-form-shell .emergency-requirement{
  width:100%!important;
}
.rc251-form-shell .emergency-row-heading,
.rc251-form-shell .emergency-row-heading>strong,
.rc251-form-shell .emergency-requirement-copy>small,
.rc251-form-shell .emergency-component-target-row>div{
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere;
}
.rc251-form-shell input,
.rc251-form-shell select,
.rc251-form-shell textarea,
.rc251-form-shell button{
  max-width:100%;
}

/* 4) Kurze Bestätigungen: dezenter und deutlich kürzer; Undo-Toasts bleiben voll sichtbar. */
#toast.soft-confirmation.show{
  opacity:.5!important;
}

/* 5) Mobile Bottom-Navigation global kompakter und optisch tiefer setzen. */
@media(max-width:899px){
  :root{--nav-h:64px;}
  body.pandabu-authenticated .bottom-nav{
    height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;
    padding:4px 5px env(safe-area-inset-bottom)!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item{
    padding:7px 1px 0!important;
    gap:1px!important;
    line-height:1!important;
    transform:translateY(3px);
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon{
    width:28px!important;
    height:28px!important;
    flex-basis:28px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon img{
    width:27px!important;
    height:27px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item>span:last-child{
    font-size:9px!important;
  }
}

@media(max-width:720px){
  .rc251-form-stage{
    width:100%!important;
    max-width:100vw!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
  .rc251-form-shell .emergency-requirement-copy{
    width:100%!important;
    padding-left:15px!important;
    padding-right:15px!important;
  }
  .rc251-form-shell .emergency-component-target-row{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .rc251-form-shell .emergency-component-target-row>div:last-child{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }
}

/* ==================================================
   RC16.253 · Mengenwahl + Kategorie-/Bottom-Nav Polish
   ================================================== */

/* Einfache Mengenpositionen (z. B. Wasser/Saft/Milch) bekommen vor dem
   Hinzufügen dieselbe direkte − / + Mengenwahl wie Mehrprodukt-Planer. */
.emergency-simple-shopping-planner{
  display:grid;
  gap:11px;
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(127,127,127,.16);
  border-radius:14px;
  background:rgba(127,127,127,.035);
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.emergency-simple-shopping-planner .emergency-choice-single{
  justify-self:center;
  font-size:.84rem;
}
.emergency-simple-shopping-planner .emergency-choice-single>span:last-child{
  font-weight:850;
}
.emergency-simple-shopping-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
}
.emergency-simple-shopping-controls .emergency-product-qty{
  width:100%;
  min-width:0;
  grid-template-columns:44px minmax(0,1fr) 44px;
}
.emergency-simple-shopping-controls .emergency-product-qty button,
.emergency-simple-shopping-controls .emergency-product-qty input{
  height:44px;
}
.emergency-simple-shopping-controls .emergency-fixed-unit{
  height:44px;
  min-width:72px;
  padding-inline:12px;
}
.emergency-simple-shopping-planner>.emergency-shopping-action-button{
  width:100%;
  min-height:48px;
  font-weight:900;
}

/* Guided Mode: simple Mengenwahl nutzt die volle Kartenbreite. */
.rc251-form-shell .emergency-simple-shopping-planner{
  border-radius:18px;
  padding:14px;
}
.rc251-form-shell .emergency-simple-shopping-planner>.emergency-shopping-action-button{
  min-height:54px;
  border-radius:15px!important;
}

/* Kategorien oben auf Mobile enger: alle sieben Bereiche passen auf ein iPhone,
   ohne dass die Leiste horizontal verschoben werden muss. */
@media(max-width:720px){
  .rc251-form-shell .emergency-wizard-categories{
    width:100%;
    justify-content:space-between!important;
    gap:0!important;
    overflow-x:hidden!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .rc251-form-shell .emergency-wizard-category{
    flex:0 0 40px!important;
    min-width:40px!important;
    width:40px!important;
  }
  .rc251-form-shell .emergency-wizard-category::before{
    top:16px!important;
    left:calc(-50% - 2px)!important;
    width:calc(100% + 4px)!important;
  }
  .rc251-form-shell .emergency-wizard-category-icon{
    width:33px!important;
    height:33px!important;
  }
  .rc251-form-shell .emergency-wizard-category-icon img{
    width:23px!important;
    height:23px!important;
  }
}
@media(max-width:350px){
  .rc251-form-shell .emergency-wizard-category{
    flex-basis:38px!important;
    min-width:38px!important;
    width:38px!important;
  }
  .rc251-form-shell .emergency-wizard-category-icon{
    width:31px!important;
    height:31px!important;
  }
  .rc251-form-shell .emergency-wizard-category-icon img{
    width:22px!important;
    height:22px!important;
  }
}

/* Globale Mobile-Navigation: obere Leerzone verkleinern und Inhalte optisch
   weiter nach unten setzen. Die iOS Safe Area bleibt vollständig respektiert. */
@media(max-width:899px){
  :root{--nav-h:56px;}
  body.pandabu-authenticated .bottom-nav{
    height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;
    padding:0 5px env(safe-area-inset-bottom)!important;
    align-items:stretch!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item{
    justify-content:flex-end!important;
    padding:0 1px 3px!important;
    gap:1px!important;
    line-height:1!important;
    transform:none!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon{
    width:27px!important;
    height:27px!important;
    flex-basis:27px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon img{
    width:27px!important;
    height:27px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item>span:last-child{
    font-size:9px!important;
    line-height:1.05!important;
  }
}

@media(max-width:430px){
  .emergency-simple-shopping-controls{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .emergency-simple-shopping-controls .emergency-product-qty{
    grid-template-columns:42px minmax(0,1fr) 42px;
  }
  .emergency-simple-shopping-controls .emergency-fixed-unit{
    min-width:68px;
  }
}
\n\n/* ==================================================\n   RC16.254 · Guided History + Bottom-Nav Polish\n   ================================================== */\n\n/* Geführter Modus: schrittweise Historiennavigation bleibt oben sichtbar. */\n.rc254-progress-actions{\n  display:flex;\n  align-items:center;\n  justify-content:flex-end;\n  gap:10px;\n  min-width:0;\n}\n.rc254-progress-actions>strong{white-space:nowrap}\n.rc254-step-nav{\n  display:flex;\n  align-items:center;\n  gap:5px;\n  flex:0 0 auto;\n}\n.rc254-step-nav button{\n  width:34px;\n  height:34px;\n  min-width:34px;\n  padding:0;\n  display:grid;\n  place-items:center;\n  border:1px solid var(--rc251-line);\n  border-radius:11px;\n  background:var(--rc251-panel);\n  color:var(--rc251-text);\n  font-size:1.45rem;\n  font-weight:800;\n  line-height:1;\n  box-shadow:none;\n}\n.rc254-step-nav button:disabled{\n  opacity:.28;\n  cursor:default;\n}\n\n@media(max-width:720px){\n  .rc251-form-progress-row{gap:7px!important}\n  .rc254-progress-actions{gap:7px}\n  .rc254-progress-actions>strong{font-size:.66rem!important}\n  .rc254-step-nav{gap:4px}\n  .rc254-step-nav button{\n    width:30px;\n    height:30px;\n    min-width:30px;\n    border-radius:10px;\n    font-size:1.28rem;\n  }\n}\n@media(max-width:370px){\n  .rc254-progress-actions>strong{font-size:.61rem!important}\n  .rc254-step-nav button{width:28px;height:28px;min-width:28px}\n}\n\n/* Globale Mobile-Navigation nochmals kompakter. Die Safe Area bleibt erhalten,\n   der sichtbare Inhaltsbereich wird aber auf 48 px reduziert und die Icons\n   optisch etwas weiter nach unten gesetzt. */\n@media(max-width:899px){\n  :root{--nav-h:48px;}\n  body.pandabu-authenticated .bottom-nav{\n    height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;\n    min-height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;\n    padding:0 5px env(safe-area-inset-bottom)!important;\n    align-items:stretch!important;\n  }\n  body.pandabu-authenticated .bottom-nav .nav-item{\n    justify-content:flex-end!important;\n    padding:0 1px 0!important;\n    gap:0!important;\n    line-height:1!important;\n    transform:translateY(2px)!important;\n  }\n  body.pandabu-authenticated .bottom-nav .nav-item .nicon{\n    width:25px!important;\n    height:25px!important;\n    flex-basis:25px!important;\n  }\n  body.pandabu-authenticated .bottom-nav .nav-item .nicon img{\n    width:25px!important;\n    height:25px!important;\n  }\n  body.pandabu-authenticated .bottom-nav .nav-item>span:last-child{\n    font-size:8.5px!important;\n    line-height:1!important;\n  }\n}\n