/* ==================================================
   RC16.255 · Guided Nav + Label Polish
   ================================================== */

/* Guided header: history arrows belong to the position indicator,
   not to the prepared counter. */
.rc255-progress-row{
  align-items:flex-start!important;
}
.rc255-step-position{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.rc255-step-position>[data-emergency-wizard-step-label]{
  white-space:nowrap;
}
.rc255-prepared-count{
  margin-left:auto;
  white-space:nowrap;
  text-align:right;
}
.rc255-step-nav{
  display:flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
}

@media(max-width:720px){
  .rc255-progress-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px 10px!important;
    align-items:start!important;
  }
  .rc255-step-position{
    gap:6px;
    flex-wrap:wrap;
  }
  .rc255-step-position>[data-emergency-wizard-step-label]{
    font-size:.78rem!important;
  }
  .rc255-prepared-count{
    font-size:.72rem!important;
    line-height:1.15!important;
    align-self:start;
  }
  .rc255-step-nav{
    order:2;
  }
  .rc255-step-nav button{
    width:29px!important;
    height:29px!important;
    min-width:29px!important;
    border-radius:9px!important;
    font-size:1.22rem!important;
  }
}
@media(max-width:370px){
  .rc255-step-position{gap:5px}
  .rc255-step-position>[data-emergency-wizard-step-label]{font-size:.72rem!important}
  .rc255-prepared-count{font-size:.66rem!important}
  .rc255-step-nav button{width:27px!important;height:27px!important;min-width:27px!important}
}

/* Mobile bottom navigation: one more compact step. Keep the iOS safe area,
   but reduce the visible navigation strip and push its contents lower. */
@media(max-width:899px){
  :root{--nav-h:42px;}
  body.pandabu-authenticated .bottom-nav{
    height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;
    min-height:calc(var(--nav-h) + env(safe-area-inset-bottom))!important;
    padding:0 4px env(safe-area-inset-bottom)!important;
    align-items:stretch!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item{
    justify-content:flex-end!important;
    padding:0!important;
    gap:0!important;
    line-height:1!important;
    transform:translateY(4px)!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon{
    width:23px!important;
    height:23px!important;
    flex-basis:23px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item .nicon img{
    width:23px!important;
    height:23px!important;
  }
  body.pandabu-authenticated .bottom-nav .nav-item>span:last-child{
    font-size:8px!important;
    line-height:1!important;
  }
}
