/* v50.91 — unified top-header visual system (equipment header is the reference) */
:root{
  --rs-head-max:980px;
  --rs-head-pad-x:12px;
  --rs-head-switch-h:34px;
  --rs-head-logo-h:44px;
  --rs-head-radius:11px;
  --rs-head-dark:rgba(0,0,0,.20);
  --rs-head-border:rgba(255,255,255,.34);
  --rs-head-band:linear-gradient(180deg,rgba(9,16,30,.98),rgba(12,19,34,.95));
}

/* Same hero background / density on all three tools */
.cp-top-shell header,
.status-header,
.equip-header{
  position:relative;
  background:url('./assets/rs_title_bg.jpeg') center/cover no-repeat !important;
  color:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.16);
  overflow:hidden;
  isolation:isolate;
  padding:0 !important;
}
.cp-top-shell header::before,
.status-header::before,
.equip-header::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(8,15,30,.28);
  pointer-events:none;
  z-index:0;
}

.hdr,
.status-hero,
.equip-hero{
  position:relative;
  z-index:1;
  width:min(100%,var(--rs-head-max)) !important;
  margin:0 auto !important;
  padding:max(8px,env(safe-area-inset-top)) var(--rs-head-pad-x) 12px !important;
}

/* Two equal navigation buttons at the very top */
.hdr-top,
.status-hero-top,
.equip-hero-top{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
  gap:7px !important;
  width:100%;
  margin:0 !important;
}
.hdr-actions-row{ display:contents !important; }

.cp-top-shell .switchbtn,
.status-switchbtn,
.equip-switchbtn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:var(--rs-head-switch-h) !important;
  height:auto !important;
  padding:7px 8px !important;
  margin:0 !important;
  border:1px solid var(--rs-head-border) !important;
  border-radius:var(--rs-head-radius) !important;
  background:var(--rs-head-dark) !important;
  color:#fff !important;
  text-decoration:none !important;
  font-size:.73rem !important;
  font-weight:850 !important;
  line-height:1.15 !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 8px 20px rgba(0,0,0,.15) !important;
}
.cp-top-shell .switchbtn:active,
.status-switchbtn:active,
.equip-switchbtn:active{ transform:translateY(1px); }
.rs-switch-icon,
.equip-switch-icon{
  flex:0 0 auto;
  font-size:.9rem !important;
  line-height:1 !important;
}
.cp-top-shell .switchbtn .navtxt,
.status-switchbtn span:last-child,
.equip-switchbtn span:last-child{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Logo / brand block */
.hdr-brand,
.status-hero-brand,
.equip-hero-brand{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:4px !important;
  width:100%;
  margin-top:7px !important;
}
.hdr-main-title{ width:100%; margin:0 !important; padding:0 !important; text-align:left !important; }
.hdr-main-logo,
.status-hero-logo,
.equip-hero-logo{
  display:block !important;
  width:min(92vw,520px) !important;
  max-width:min(92vw,520px) !important;
  max-height:var(--rs-head-logo-h) !important;
  height:auto !important;
  margin:0 !important;
  object-fit:contain !important;
  object-position:left center;
  filter:drop-shadow(0 2px 10px rgba(0,0,0,.55));
}

/* Page label + optional page-specific info */
.hdr-subtitle-row,
.status-hero-title-row,
.equip-hero-title-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
  gap:8px !important;
  width:100%;
  margin:0 !important;
}
.hdr-subtitle,
.status-hero-copy,
.equip-hero-copy{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center;
  min-height:34px !important;
  max-width:70%;
  padding:6px 13px !important;
  margin:0 !important;
  border:1px solid #f4c38c !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,#f0ab63,#d8842a) !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.15 !important;
  letter-spacing:.06em !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:0 8px 20px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.22) !important;
  text-shadow:0 1px 2px rgba(0,0,0,.55) !important;
}
.hdr-subtitle::before{ content:"⚔️"; margin-right:6px; letter-spacing:0; }
.status-hero-copy::before{ content:"📝"; margin-right:6px; letter-spacing:0; }
.equip-hero-copy::before{ content:"🔧"; margin-right:6px; letter-spacing:0; }

.hdr-base-inline,
.status-base-inline{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto;
  min-height:34px !important;
  gap:5px !important;
  margin:0 !important;
  padding:5px 8px 5px 10px !important;
  border:1px solid rgba(147,197,253,.66) !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,rgba(30,64,175,.88),rgba(30,58,138,.88)) !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.hdr-base-inline .k,
.status-base-inline .k{
  color:#fff !important;
  font-size:11px !important;
  font-weight:850 !important;
  white-space:nowrap;
}
.hdr-base-inline input,
.status-base-inline input{
  width:62px !important;
  min-width:62px !important;
  height:26px !important;
  min-height:26px !important;
  padding:2px 5px !important;
  border:1px solid rgba(255,255,255,.3) !important;
  border-radius:9px !important;
  background:rgba(255,255,255,.14) !important;
  color:#fff !important;
  font-size:15px !important;
  font-weight:900 !important;
  text-align:center !important;
  box-shadow:none !important;
}

/* Same yellow description band */
.hdr-desc,
.status-hero-sub,
.equip-hero-sub{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  min-height:0 !important;
  margin:1px 0 0 !important;
  padding:7px 11px !important;
  border:1px solid #f4e39b !important;
  border-radius:11px !important;
  background:linear-gradient(135deg,#efd86b,#d5b740) !important;
  color:#242424 !important;
  font-size:11.5px !important;
  font-weight:500 !important;
  line-height:1.45 !important;
  text-align:left !important;
  box-shadow:0 8px 20px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.22) !important;
  text-shadow:none !important;
}
.hdr-sub{ margin:0 !important; }

/* Tool/action band: same frame and button rhythm */
.cp-toolbar-band,
.status-toolbar-band,
.equip-tabs-band{
  background:var(--rs-head-band) !important;
  border-top:1px solid rgba(255,255,255,.05);
  border-bottom:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.18) !important;
}
.cp-toolbar-inner,
.status-toolbar-inner,
.equip-tabs-band .equip-toolbar-inner{
  width:min(100%,var(--rs-head-max)) !important;
  max-width:var(--rs-head-max) !important;
  margin:0 auto !important;
  padding:6px var(--rs-head-pad-x) 7px !important;
}
.cp-toolbar-band .toolbtn,
.status-toolbar-band .status-toolbtn,
.equip-tabs-band .tab{
  min-height:55px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.045) !important;
  color:rgba(241,245,249,.94) !important;
  box-shadow:none !important;
}
.cp-toolbar-band .toolbtn:hover,
.status-toolbar-band .status-toolbtn:hover,
.equip-tabs-band .tab:hover{ background:rgba(255,255,255,.08) !important; }
.cp-toolbar-band .toolbtn.active,
.status-toolbar-band .status-toolbtn.active,
.equip-tabs-band .tab.is-active{
  border-color:rgba(147,197,253,.78) !important;
  background:linear-gradient(135deg,#2563eb,#4f46e5) !important;
  color:#fff !important;
  box-shadow:0 8px 18px rgba(37,99,235,.28),inset 0 1px 0 rgba(255,255,255,.22) !important;
}

/* Status BASE moved into the shared hero; page heading becomes title-only. */
.status-pagehead-title-only{ justify-content:flex-start !important; }

@media(max-width:520px){
  :root{
    --rs-head-pad-x:9px;
    --rs-head-logo-h:38px;
  }
  .cp-top-shell .switchbtn,
  .status-switchbtn,
  .equip-switchbtn{
    min-height:32px !important;
    padding:6px 6px !important;
    font-size:.68rem !important;
  }
  .hdr-subtitle,
  .status-hero-copy,
  .equip-hero-copy{
    min-height:30px !important;
    padding:5px 10px !important;
    font-size:12.5px !important;
    letter-spacing:.025em !important;
    max-width:68%;
  }
  .hdr-base-inline,
  .status-base-inline{
    min-height:30px !important;
    padding:4px 6px 4px 8px !important;
  }
  .hdr-base-inline .k,
  .status-base-inline .k{ font-size:10px !important; }
  .hdr-base-inline input,
  .status-base-inline input{
    width:56px !important;
    min-width:56px !important;
    height:24px !important;
    min-height:24px !important;
    font-size:14px !important;
  }
  .hdr-desc,
  .status-hero-sub,
  .equip-hero-sub{
    padding:6px 9px !important;
    font-size:10.5px !important;
  }
  .cp-toolbar-inner,
  .status-toolbar-inner,
  .equip-tabs-band .equip-toolbar-inner{ padding:5px 8px 6px !important; }
  .cp-toolbar-band .toolbtn,
  .status-toolbar-band .status-toolbtn,
  .equip-tabs-band .tab{ min-height:52px !important; }
}

@media(max-width:370px){
  .cp-top-shell .switchbtn,
  .status-switchbtn,
  .equip-switchbtn{ font-size:.62rem !important; }
  .rs-switch-icon,
  .equip-switch-icon{ display:none !important; }
  .hdr-subtitle,
  .status-hero-copy,
  .equip-hero-copy{ font-size:11.5px !important; padding-left:8px !important; padding-right:8px !important; }
  .hdr-base-inline .k,
  .status-base-inline .k{ display:none; }
}


/* v50.99: CP toolbar — four prominent primary utility buttons */
.cp-toolbar-band #topToolbar.cp-toolbar-four{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  width:100% !important;
  overflow:visible !important;
  padding:0 !important;
}
.cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn{
  width:100% !important;
  min-width:0 !important;
  min-height:64px !important;
  padding:8px 6px !important;
  gap:5px !important;
  border-color:rgba(255,255,255,.26) !important;
  background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.035)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 5px 14px rgba(0,0,0,.12) !important;
}
.cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn svg{
  width:21px !important;
  height:21px !important;
}
.cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn .txt{
  font-size:12px !important;
  line-height:1.08 !important;
  font-weight:900 !important;
}
.cp-toolbar-band #topToolbar.cp-toolbar-four #btnHeaderStones .txt-stones{
  font-size:10.5px !important;
  line-height:1.02 !important;
}
.cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn:active{
  background:linear-gradient(135deg,rgba(37,99,235,.48),rgba(79,70,229,.42)) !important;
  border-color:rgba(147,197,253,.70) !important;
}
@media(max-width:520px){
  .cp-toolbar-band #topToolbar.cp-toolbar-four{ gap:7px !important; }
  .cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn{
    min-height:60px !important;
    padding:7px 4px !important;
  }
  .cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn svg{ width:20px !important; height:20px !important; }
  .cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn .txt{ font-size:11px !important; }
  .cp-toolbar-band #topToolbar.cp-toolbar-four #btnHeaderStones .txt-stones{ font-size:9.5px !important; }
}
@media(max-width:370px){
  .cp-toolbar-band #topToolbar.cp-toolbar-four{ gap:5px !important; }
  .cp-toolbar-band #topToolbar.cp-toolbar-four .toolbtn .txt{ font-size:10px !important; }
  .cp-toolbar-band #topToolbar.cp-toolbar-four #btnHeaderStones .txt-stones{ font-size:8.8px !important; }
}
