/* ── Calc Result Final Overrides (normal screen only) ── */
body:not(.print-mode) #rp,
body:not(.print-mode) .mn{
  background:#f3f3f7 !important;
}
body:not(.print-mode) #rp{
  padding:24px !important;
}
body:not(.print-mode) #rp > .an,
body:not(.print-mode) #rp > .print-job-header{
  background:transparent !important;
}
body:not(.print-mode) #rp .cc,
body:not(.print-mode) #rp .calc-result-toolbar,
body:not(.print-mode) #rp .ph{
  background:#ffffff !important;
}
body:not(.print-mode) #rp .ph{
  background:#f3f3f7 !important;
  border:none !important;
  box-shadow:none !important;
}
body:not(.print-mode) #rp .cc{
  border:1px solid #dddfe7 !important;
  box-shadow:0 4px 20px rgba(17,17,17,.05) !important;
}
body:not(.print-mode) #rp .cc-hd,
body:not(.print-mode) #rp .yield-card .cc-hd,
body:not(.print-mode) #rp .cc-pat,
body:not(.print-mode) #rp .cut-diagram,
body:not(.print-mode) #rp .rem-strip{
  background:#ffffff !important;
}
body:not(.print-mode) #rp .calc-result-toolbar{
  border:1px solid #ddd9ee !important;
  border-radius:16px !important;
}
body:not(.print-mode) #rp .calc-result-title{
  font-size:12px !important;
  font-weight:600 !important;
  color:#1a1a2e !important;
}
body:not(.print-mode) #rp .calc-result-cell:first-child{
  justify-content:center !important;
}
body:not(.print-mode) #rp .calc-result-cell:first-child .calc-result-cell-label{
  display:none !important;
}
body:not(.print-mode) #rp .calc-result-edit{
  border-left:1px solid #ece8f4 !important;
}
body:not(.print-mode) #rp .calc-result-input{
  background:#ffffff !important;
  color:#1a1a2e !important;
  min-height:40px !important;
  height:40px !important;
  border:1px solid #e0e0ea !important;
  border-radius:10px !important;
  padding:0 12px !important;
}
body:not(.print-mode) #rp .calc-result-input:focus{
  background:#faf9ff !important;
}
body:not(.print-mode) #rp .bar-track{
  height:36px !important;
  background:#fff !important;
  border:1.5px solid #555 !important;
}
body:not(.print-mode) #rp .b-piece:not([class*="piece-color-"]){
  background:#d8d8d8 !important;
  color:#000 !important;
  font-size:12px !important;
  font-weight:700 !important;
  border-left:1px solid #555 !important;
}
body:not(.print-mode) #rp .b-piece[class*="piece-color-"]{
  background-color:var(--piece-fill,#d8d8d8) !important;
  background-image:var(--piece-hatch,none) !important;
  color:#111 !important;
  font-size:12px !important;
  font-weight:700 !important;
  border-left:1px solid var(--piece-border,#555) !important;
}
body:not(.print-mode) #rp .b-piece:first-of-type{
  border-left:none !important;
}
body:not(.print-mode) #rp .b-rem{
  background:repeating-linear-gradient(-45deg,#888,#888 1.5px,#ddd 1.5px,#ddd 5px) !important;
  color:#000 !important;
  font-size:10px !important;
}
body:not(.print-mode) #rp .b-loss{
  background:repeating-linear-gradient(-45deg,#ccc,#ccc 1px,#fff 1px,#fff 4px) !important;
  color:#888 !important;
  font-size:10px !important;
}
body:not(.print-mode) #rp .cc-desc,
body:not(.print-mode) #rp .r1 .cc-desc,
body:not(.print-mode) #rp .r2 .cc-desc,
body:not(.print-mode) #rp .r3 .cc-desc{
  color:#1a1a2e !important;
}

/* ── App Sidebar Layout ── */
body.sidebar-layout-active{
  background:#eef1f5;
}
body.sidebar-layout-active,
body.sidebar-layout-active input,
body.sidebar-layout-active select,
body.sidebar-layout-active textarea,
body.sidebar-layout-active button{
  font-family:"Segoe UI","Noto Sans JP",sans-serif;
}
body.sidebar-layout-active header{
  justify-content:space-between;
  gap:12px;
  padding:0 20px;
}
body.sidebar-layout-active .hdr-right{
  width:0;
  min-width:0;
  margin-left:auto;
  overflow:visible;
}
body.sidebar-layout-active #guideBtn,
body.sidebar-layout-active #cartBadge,
body.sidebar-layout-active #hamBtn{
  display:none !important;
}
body.sidebar-layout-active .app-shell{
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  min-height:calc(100vh - 54px);
}
body.sidebar-layout-active .app-sidebar{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:#ffffff;
  border-right:1px solid #e6e8ee;
  padding:16px 12px 18px;
  min-width:232px;
}
body.sidebar-layout-active .app-sidebar-main,
body.sidebar-layout-active .app-sidebar-footer{
  display:flex;
  flex-direction:column;
  gap:6px;
}
body.sidebar-layout-active .app-sidebar-footer{
  padding-top:16px;
  border-top:1px solid #eceef3;
}
body.sidebar-layout-active .app-nav-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:46px;
  padding:0 12px;
  border:none;
  border-radius:14px;
  background:transparent;
  color:#1a1a2e;
  text-align:left;
  cursor:pointer;
  transition:background .15s ease;
}
body.sidebar-layout-active .app-nav-item:hover{
  background:#f5f1ff;
}
body.sidebar-layout-active .app-nav-item.active{
  background:#efe9ff;
}
body.sidebar-layout-active .app-nav-item--sub{
  color:#44485d;
}
body.sidebar-layout-active .app-nav-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  stroke:#111111;
  stroke-width:1.9;
  fill:none;
  stroke-linecap:square;
  stroke-linejoin:miter;
}
body.sidebar-layout-active .app-nav-label{
  font-size:14px;
  line-height:1.2;
  font-weight:600;
  letter-spacing:.01em;
}
body.sidebar-layout-active .app-main{
  min-width:0;
  background:#eef1f5;
}
body.sidebar-layout-active .app-main > .pg{
  min-height:calc(100vh - 54px);
}
body.sidebar-layout-active #cp{
  background:#eef1f5;
}
body.sidebar-layout-active #pageCalcLayout{
  height:calc(100vh - 54px);
}
body.sidebar-layout-active #wpp,
body.sidebar-layout-active #dpp,
body.sidebar-layout-active #hip,
body.sidebar-layout-active #cop{
  background:#eef1f5;
}

@media (max-width: 900px){
  body.sidebar-layout-active .app-shell{
    grid-template-columns:1fr;
  }
  body.sidebar-layout-active .app-sidebar{
    min-width:0;
    border-right:none;
    border-bottom:1px solid #e6e8ee;
  }
}

/* ── History / Inventory Final Overrides ── */
#hip,
#hip .hi-panel{
  background:#f5f5f7 !important;
}
#hip .hi-panel-layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  min-height:calc(100vh - 118px);
  background:linear-gradient(90deg,#ffffff 0 280px,#f5f5f7 280px 100%);
  align-items:stretch;
}
#hip .hi-sb{
  background:#fff !important;
  border-right:1px solid #e9e9f0;
  padding:20px 16px 32px;
  min-width:280px;
  min-height:100%;
  box-shadow:1px 0 0 rgba(233,233,240,.9);
}
#hip .hi-sb-main{
  padding:20px 24px 28px;
  min-width:0;
}
#hip #hiPanelI .hi-sb,
#hip #hiPanelH .hi-sb{
  background:#fff !important;
}
#hip #hiPanelH,
#hip #hiPanelH .hi-panel-layout,
#hip #hiPanelH .hi-sb-main{
  background:#f5f5f7 !important;
}
#hip #hiPanelH .hi-panel-layout{
  background:linear-gradient(90deg,#ffffff 0 280px,#f5f5f7 280px 100%) !important;
}
#hip #hiPanelI .hi-panel-layout{
  background:linear-gradient(90deg,#ffffff 0 280px,#f5f5f7 280px 100%) !important;
}
#hip .inv-head-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:16px;
  margin-bottom:16px;
}
#hip .inv-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(180px,220px));
  column-gap:16px;
  row-gap:16px;
  justify-content:start;
  width:100%;
  max-width:100%;
  margin-left:14px;
}
#hip .inv-summary-card{
  box-sizing:border-box;
  background:#fff;
  border:1px solid #e7e8ee;
  border-radius:16px;
  padding:16px 18px 16px 40px;
  box-shadow:0 6px 18px rgba(17,17,17,.03);
  height:92px;
}
#hip button.inv-summary-card{
  appearance:none;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
}
#hip .inv-summary-label{
  font-size:11px;
  font-weight:700;
  color:#8b8ea3;
  margin-bottom:8px;
  letter-spacing:.04em;
}
#hip .inv-summary-value{
  font-size:20px;
  line-height:1.2;
  font-weight:800;
  color:#111320;
}
#hip .hi-sb-sec{
  margin-bottom:28px;
}
#hip .hi-sb-lbl{
  font-size:11px;
  font-weight:700;
  color:#8a8aa4;
  letter-spacing:.08em;
  margin-bottom:12px;
  padding:0 12px;
}
#hip .hi-sb-item{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  min-height:40px;
  padding:9px 12px;
  margin-bottom:6px;
  border-radius:12px;
  color:#4f4f66;
  font-size:13px;
  font-weight:600;
  background:transparent;
  border:1px solid transparent;
  text-align:left;
}
#hip .hi-sb-item:hover{
  background:#fafafe;
  border-color:#ececf3;
}
#hip .hi-sb-item.on{
  background:#f4f1ff;
  border-color:#e6dff7;
  color:#1a1a2e;
}
#hip .hi-sb-dot{
  width:6px;
  height:6px;
  border-radius:999px;
  background:#dddfea;
  flex:0 0 6px;
}
#hip .hi-sb-item.on .hi-sb-dot{
  background:#1a1a2e;
}
#hip .hi-topbar{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
#hip .hi-search-wrap{
  position:relative;
  flex:1;
}
#hip .hi-search-wrap input,
#hip .hi-sb-kinput{
  height:48px;
  border:1px solid #e4e4ec !important;
  border-radius:14px !important;
  background:#fff !important;
  padding:0 16px 0 40px !important;
  font-size:14px !important;
  color:#1a1a2e !important;
  box-shadow:0 1px 2px rgba(17,17,17,.02);
}
#hip .hi-detail-toggle{
  width:44px;
  height:44px;
  border:1px solid #e4e4ec;
  border-radius:12px;
  background:#fff;
  color:#5f6078;
}
#hip .hi-detail-panel{
  background:#fff;
  border:1px solid #e8e8ef;
  border-radius:16px;
  padding:14px 16px;
  margin-bottom:14px;
  box-shadow:0 6px 20px rgba(17,17,17,.04);
}
#hip .hi-sort-row{
  padding:0 2px 10px;
  margin-bottom:10px;
}
#hip .hi-count{
  font-size:12px;
  color:#8a8aa4;
  font-weight:600;
}
#hip .hi-sort,
#hip #invSort{
  height:42px;
  border:1px solid #e4e4ec;
  border-radius:12px;
  background:#fff;
  padding:0 14px;
  font-size:13px;
  font-weight:600;
  color:#3e4057;
}
#hip .hi-list-area{
  min-width:0;
}
#hip .inv-add-open-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:128px;
  height:40px;
  margin-bottom:0;
  padding:0 14px;
  background:#181818;
  border:1px solid #181818;
  border-radius:12px;
  color:#fff;
  font-size:12px;
  font-weight:700;
  box-shadow:none;
  white-space:nowrap;
  font-family:inherit;
  cursor:pointer;
}
#hip .inv-add-open-btn:hover{
  background:#181818;
  border-color:#181818;
}
#hip .inv-min-remnant-field{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  box-sizing:border-box;
}
#hip .inv-min-remnant-view{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#hip .inv-min-remnant-field small{
  font-size:11px;
  font-weight:700;
  color:#8b8ea3;
}
#hip .inv-min-remnant-field button{
  height:28px;
  padding:0 10px;
  border:1px solid #e3e4ea;
  border-radius:8px;
  background:#fff;
  color:#111320;
  font-family:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
#hip .inv-min-remnant-field button:hover{
  background:#fafafe;
}
#hip .inv-min-remnant-edit{
  align-items:center;
  gap:8px;
}
#hip .inv-min-remnant-edit input{
  min-width:0;
  flex:1;
}
#hip .inv-min-remnant-field input[type="number"]{
  width:100%;
  height:32px;
  box-sizing:border-box;
  border:1px solid #e3e4ea;
  border-radius:8px;
  background:#fbfbfd;
  color:#111320;
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  padding:0 10px;
}
#hip #hiPanelI .inv-add-open-btn{
  min-width:128px !important;
  height:40px !important;
  padding:0 14px !important;
  border:1px solid #181818 !important;
  background:#181818 !important;
  color:#fff !important;
  font-size:12px !important;
  box-shadow:none !important;
}
#hip .hist-row,
#hip .inv-row{
  background:#fff;
  border:1px solid #e8e8ef;
  border-radius:16px;
  margin-bottom:10px;
  padding:18px 16px;
  box-shadow:0 6px 18px rgba(17,17,17,.03);
}
#hip .hist-row:last-child,
#hip .inv-row:last-child{
  border-bottom:1px solid #e8e8ef;
}
#hip .hist-row:hover,
#hip .inv-row:hover{
  background:#fff;
  border-color:#ddddea;
}
#hip #hiPanelH .hist-row,
#hip #hiPanelH .hist-job-group,
#hip #hiPanelH .hist-job-body{
  background:#fff !important;
}
#hip #hiPanelH .hist-row,
#hip #hiPanelH .hist-job-group{
  border:1px solid #e2e4eb !important;
  box-shadow:0 10px 24px rgba(17,17,17,.06) !important;
}
#hip #hiPanelH .hi-list-area,
#hip #hiPanelH #histList{
  background:transparent !important;
}
#hip #hiPanelH .hi-list-area{
  padding-top:4px;
}
#hip #hiPanelH #histList{
  display:flex;
  flex-direction:column;
  gap:14px;
}
#hip #hiPanelH .hist-row{
  margin-bottom:0 !important;
  padding:20px 18px !important;
  border:1px solid #d9dde6 !important;
  border-radius:18px !important;
  box-shadow:0 12px 28px rgba(17,17,17,.08) !important;
}
#hip #hiPanelH .hi-topbar,
#hip #hiPanelH .hi-sort-row{
  background:transparent !important;
}
#hip #hiPanelH .hist-row:hover{
  background:#fff !important;
  border-color:#d2d7e2 !important;
}
#hip #hiPanelH #histList{
  display:flex;
  flex-direction:column;
  gap:14px;
}
#hip .hist-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
#hip .hist-row-main{
  flex:1;
  min-width:0;
}
#hip .hist-row-head{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}
#hip .hist-title-group{
  min-width:0;
}
#hip .hist-client{
  display:block;
  font-size:17px;
  font-weight:700;
  color:#111320;
  line-height:1.35;
}
#hip .hist-name{
  display:block;
  margin-top:3px;
  font-size:12px;
  color:#767b90;
  line-height:1.45;
}
#hip .hist-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
#hip .hist-rem{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:#f4f5f9;
  color:#686d82;
  font-size:11px;
  font-weight:600;
}
#hip .hist-type-badge,
#hip .inv-kind-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 8px;
  border-radius:999px;
  background:#f2effb;
  color:#656083;
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
}
#hip .hist-row-side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:86px;
  padding-top:2px;
}
#hip .hist-date{
  font-size:11px;
  color:#8a8ea1;
  font-weight:600;
  white-space:nowrap;
}
#hip .hist-del-btn,
#hip .inv-del-btn--quiet{
  height:32px;
  padding:0 12px;
  border:1px solid #e3e4ea;
  border-radius:999px;
  background:#fff;
  color:#8b8ea3;
  font-size:11px;
  font-weight:600;
}
#hip .hist-job-group{
  margin-bottom:12px;
  border:1px solid #e8e8ef;
  border-radius:16px;
  background:#fff;
  box-shadow:0 6px 18px rgba(17,17,17,.03);
  overflow:hidden;
}
#hip .hist-job-hd{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  cursor:pointer;
}
#hip .hist-job-title{
  font-size:16px;
  font-weight:700;
  color:#111320;
}
#hip .hist-job-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  margin-top:6px;
  color:#7e8097;
  font-size:11px;
}
#hip .hist-job-body{
  padding:0 12px 12px;
  background:#fff;
}
#hip .inv-table-card{
  background:#fff;
  border:1px solid #e7e8ee;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(17,17,17,.03);
}
#hip .inv-col-header--table,
#hip .inv-row--table{
  display:grid;
  grid-template-columns:48px minmax(220px,1.3fr) minmax(120px,.8fr) 76px 108px minmax(120px,.9fr) minmax(150px,1fr) 72px;
  align-items:center;
  gap:14px;
}
#hip .inv-col-header--table{
  padding:14px 18px;
  border-bottom:1px solid #ececf2;
  color:#8a8aa4;
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  background:#fcfcfe;
}
#hip .inv-row--table{
  margin:0;
  border:none;
  border-bottom:1px solid #f1f1f5;
  border-radius:0;
  box-shadow:none;
  padding:20px 18px;
}
#hip .inv-row--table:last-child{
  border-bottom:none;
}
#hip .inv-no{
  font-size:14px;
  color:#8a8aa4;
  font-variant-numeric:tabular-nums;
}
#hip .inv-spec-cell{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
#hip .inv-spec-main{
  font-size:14px;
  font-weight:700;
  color:#111320;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#hip .inv-len--single{
  min-width:0;
  font-size:15px;
  font-weight:700;
  color:#111320;
}
#hip .inv-qty--plain{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#ecfff2;
  border:none;
  color:#23a35a;
  font-size:12px;
  font-weight:700;
}
#hip .inv-company,
#hip .inv-note,
#hip .inv-date{
  font-size:13px;
  color:#5d6178;
}
#hip .inv-action{
  display:flex;
  justify-content:flex-end;
}
#hip .inv-del-btn--quiet{
  min-width:54px;
}
#hip .pager{
  margin-top:18px;
}
@media (max-width: 900px){
  #hip .hi-panel-layout{
    grid-template-columns:1fr;
    background:#f5f5f7;
  }
  #hip .hi-sb{
    border-right:none;
    border-bottom:1px solid #e7e7ee;
    min-width:0;
  }
  #hip .inv-head-row{
    grid-template-columns:1fr;
  }
  #hip .inv-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    margin-left:0;
  }
  #hip .inv-col-header--table,
  #hip .inv-row--table{
    grid-template-columns:48px minmax(180px,1.2fr) minmax(110px,.8fr) 70px 96px minmax(110px,.8fr) minmax(130px,1fr) 68px;
  }
}
@media (max-width: 820px){
  #hip .hi-sb-main{
    padding:16px 14px 20px;
  }
  #hip .hist-row{
    flex-direction:column;
    align-items:stretch;
  }
  #hip .hist-row-side{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    min-width:0;
    padding-top:0;
  }
  #hip .inv-summary-grid{
    grid-template-columns:1fr;
  }
  #hip .inv-col-header--table{
    display:none;
  }
  #hip .inv-row--table{
    grid-template-columns:1fr auto;
    gap:8px 12px;
  }
  #hip .inv-no,
  #hip .inv-company,
  #hip .inv-note,
  #hip .inv-date,
  #hip .inv-qty--plain,
  #hip .inv-action{
    grid-column:1 / -1;
    justify-content:flex-start;
  }
}

/* ── Unified Sidebar Width + Modern Typography (except contact/onboarding) ── */
:root{
  --app-sidebar-w:320px;
  --app-font-sans:"Segoe UI","Noto Sans JP","Hiragino Sans","Yu Gothic UI",system-ui,sans-serif;
  --app-gap-main:18px;
  --app-pad-main:18px;
  --app-pad-side:18px;
}

header,
nav,
nav a,
#cp,
#wpp,
#dpp,
#hip{
  font-family:var(--app-font-sans);
}

nav{
  gap:8px;
  font-family:var(--app-font-sans);
  font-size:11px;
  font-weight:600;
  letter-spacing:.01em;
  text-transform:none;
}

nav a{
  font-family:var(--app-font-sans);
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
  text-transform:none;
  padding:4px 10px;
}

#cp .layout,
#wpp .layout{
  grid-template-columns:var(--app-sidebar-w) minmax(0,1fr);
}

#cp .sb,
#wpp .sb{
  width:var(--app-sidebar-w);
  min-width:var(--app-sidebar-w);
  padding:var(--app-pad-side);
  gap:16px;
}

#hip .hi-panel-layout{
  grid-template-columns:var(--app-sidebar-w) minmax(0,1fr);
  background:linear-gradient(90deg,#ffffff 0 var(--app-sidebar-w),#f5f5f7 var(--app-sidebar-w) 100%);
}

#hip .hi-sb{
  width:var(--app-sidebar-w);
  min-width:var(--app-sidebar-w);
}

#hip #hiPanelH .hi-panel-layout{
  background:linear-gradient(90deg,#ffffff 0 var(--app-sidebar-w),#f5f5f7 var(--app-sidebar-w) 100%) !important;
}

#hip #hiPanelI .hi-panel-layout{
  background:linear-gradient(90deg,#ffffff 0 var(--app-sidebar-w),#f5f5f7 var(--app-sidebar-w) 100%) !important;
}

#cp,
#wpp,
#dpp,
#hip{
  font-size:13px;
  letter-spacing:0;
}

#cp button,
#cp input,
#cp select,
#cp textarea,
#wpp button,
#wpp input,
#wpp select,
#wpp textarea,
#dpp button,
#dpp input,
#dpp select,
#dpp textarea,
#hip button,
#hip input,
#hip select,
#hip textarea,
#cp table,
#wpp table,
#dpp table,
#hip table{
  font-family:var(--app-font-sans);
  letter-spacing:0;
}

#cp .mn,
#wpp .mn{
  padding:var(--app-pad-main);
  gap:var(--app-gap-main);
}

#cp .shd,
#cp .field label,
#wpp .shd,
#wpp .field label,
#hip .hi-sb-lbl,
#hip .hi-sb-item,
#dpp .group-title,
#dpp .eyebrow,
#dpp .dt-sel-label,
#dpp .dp2-sec-lbl,
#dpp .dp2-note-lbl{
  font-family:var(--app-font-sans);
  letter-spacing:.03em !important;
}

#cp input[type=number],
#cp input[type=text],
#cp input[type=date],
#cp select,
#wpp input[type=number],
#wpp input[type=text],
#wpp input[type=date],
#wpp select{
  font-family:var(--app-font-sans);
  font-size:12px;
  font-weight:500;
}

#cp .field label,
#wpp .field label{
  font-size:10px;
  margin-bottom:4px;
}

#cp .shd,
#wpp .shd{
  font-size:10px;
  margin-bottom:6px;
}

/* master 仕様 (2026-05-10): pill 形式に伴い 28px に統一 */
#cp .calc-steel-input,
#cp .calc-browse-btn,
#wpp #wCmdInput,
#wpp #wCmdWrap button.calc-browse-btn{
  height:28px;
}

#cp .run,
#wpp .run{
  min-height:46px;
  font-size:11px;
  letter-spacing:.08em;
  padding:12px;
}

#cp .sm-btn,
#wpp .sm-btn,
#hip .hi-filter-btn,
#hip .hi-sort,
#hip .hist-del-btn,
#hip .inv-del-btn--quiet{
  font-size:10px;
}

#cp .cc-hd,
#cp .yield-card .cc-hd{
  padding:9px 12px;
}

#cp .pc-row{
  padding:5px 10px;
  font-size:11px;
}

#cp .detail-toggle,
#cp .diag-toggle{
  padding:8px 12px;
  font-size:10px;
}

#cp .calc-result-toolbar{
  padding:10px 14px;
  margin-bottom:12px;
}

#cp .calc-result-title{
  font-size:12px;
  font-weight:600;
  line-height:1.25;
}

@media (max-width: 1100px){
  #cp .calc-result-toolbar{
    align-items:stretch;
  }

  #cp .calc-result-toolbar-main{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:
      "job-title job-title"
      "job-client job-name"
      "job-deadline job-memo";
    gap:10px 12px;
  }

  #cp .calc-result-toolbar-main > .calc-result-cell:nth-child(1){
    grid-area:job-title;
    min-height:20px;
    justify-content:flex-start !important;
    align-self:end;
  }

  #cp .calc-result-toolbar-main > .calc-result-edit:nth-child(2){ grid-area:job-client; }
  #cp .calc-result-toolbar-main > .calc-result-edit:nth-child(3){ grid-area:job-name; }
  #cp .calc-result-toolbar-main > .calc-result-edit:nth-child(4){ grid-area:job-deadline; }
  #cp .calc-result-toolbar-main > .calc-result-edit:nth-child(5){ grid-area:job-memo; }

  #cp .calc-result-edit{
    padding:0 !important;
    border-left:none !important;
  }

  #cp .calc-result-input{
    height:42px !important;
    min-height:42px !important;
  }

  #cp .calc-toolbar-cart{
    align-self:center;
  }
}

#hip .hi-sb{
  padding:18px 14px 24px;
}

#hip .hi-sb-main{
  padding:16px 18px 22px;
}

#hip .hi-sb-lbl{
  font-size:10px;
}

#hip .hi-sb-item{
  font-size:12px;
  padding:8px 10px;
}

#hip .hi-search-wrap input,
#hip .hi-sb-kinput{
  padding:10px 12px 10px 34px;
  font-size:12px;
}

#hip .hi-topbar,
#hip .hi-sort-row{
  margin-bottom:12px;
}

#hip .hist-row,
#hip .inv-row--table{
  border-radius:14px;
}

#cp .pt-row input,
#cp .stk-nm,
#cp .stk-mx,
#cp .pt-n,
#cp .pt-kg,
#cp .tot-v,
#cp .pc-row,
#cp .bar-vis-label,
#cp .bar-piece,
#cp .bar-loss,
#cp .bar-rem,
#wpp #wTable.w-table tbody td.w-r,
#wpp #wTable.w-table tfoot td.w-r,
#dpp .mono,
#dpp .data-sb-item .cnt{
  font-family:var(--app-font-sans) !important;
  font-variant-numeric:tabular-nums;
}

@media (max-width: 1100px){
  #cp .layout,
  #wpp .layout{
    grid-template-columns:var(--app-sidebar-w) minmax(0,1fr);
  }
}

@media (max-width: 1280px){
  :root{
    --app-sidebar-w:300px;
    --app-gap-main:14px;
    --app-pad-main:14px;
    --app-pad-side:16px;
  }

  #cp .mn,
  #wpp .mn{
    padding:14px;
    gap:14px;
  }

  #cp .cc,
  #cp .yield-card,
  #cp .r1,
  #cp .r2,
  #cp .r3{
    border-radius:14px;
  }

  #cp .res-hd{
    margin-bottom:10px;
    padding-bottom:9px;
  }

  #cp .res-ttl{
    font-size:16px;
  }

  #cp .cc-hd,
  #cp .yield-card .cc-hd{
    gap:8px;
    padding:8px 10px;
  }

  #cp .cc-desc{
    font-size:12px;
  }

  #cp .cs .cl{
    font-size:10px;
  }

  #cp .cs .cv{
    font-size:12px;
  }

  #cp .rem-strip,
  #cp .cc-detail-body{
    padding-left:10px;
    padding-right:10px;
  }

  #hip .hi-sb{
    padding:16px 12px 20px;
  }

  #hip .hi-sb-main{
    padding:14px 16px 20px;
  }

  #hip .inv-head-row{
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    align-items:start;
  }

  #hip .inv-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    column-gap:12px;
    row-gap:14px;
    width:100%;
    margin-left:0;
  }

  #hip .inv-min-remnant-field{
    grid-column:auto;
    padding-left:12px;
    padding-right:12px;
  }

  #hip .inv-summary-card{
    height:84px;
    padding:14px 16px 14px 34px;
  }

  #hip .inv-min-remnant-field .inv-summary-label{
    font-size:9px;
    line-height:1.25;
    margin-bottom:4px;
  }

  #hip .inv-min-remnant-field .inv-summary-value{
    font-size:17px;
  }

  #hip .inv-min-remnant-field button{
    height:26px;
    padding:0 8px;
    font-size:10px;
  }

  #hip #hiPanelI .inv-add-open-btn{
    height:40px !important;
  }

  #hip .inv-min-remnant-view{
    gap:6px;
  }

  #hip .hi-topbar{
    gap:10px;
    margin-bottom:12px;
  }
}

#cp .bar-vis-label .bar-count,
#rp .bar-vis-label .bar-count{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#000 !important;
  color:#fff !important;
  border:1px solid #000 !important;
  border-radius:999px !important;
  padding:2px 10px !important;
  font-size:10px !important;
  font-weight:700 !important;
  line-height:1 !important;
}
