.swf-counts {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px;}
.swf-counts>div {display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:12px;}
.swf-counts strong {font-size:24px;}
.swf-counts span {font-size:12px;color:var(--muted);}
.swf-overview td .button {min-height:36px;padding:7px 10px;margin:4px 4px 0 0;font-size:12px;white-space:normal;}
.swf-release {border-top:1px solid var(--line);padding-top:18px;min-width:0;}
.swf-line-plan {margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:10px;min-width:0;}
.swf-line-plan h4 {margin:0 0 6px;overflow-wrap:anywhere;}
.swf-line-plan input[type="number"] {width:90px;max-width:100%;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:6px;color:var(--ink);background:var(--white);}
.swf-attention p {padding:10px 0;border-bottom:1px solid var(--line);}
.production-history {padding-left:20px;overflow-wrap:anywhere;}
.production-history li {padding:8px 0;border-bottom:1px solid var(--line);}
.production-task .production-allocation {flex-wrap:wrap;}
.production-allocation.cancelled {color:var(--muted);}
.production-change-note {padding:10px;border-left:3px solid var(--amber);background:color-mix(in srgb,var(--amber) 10%,transparent);}
@media(max-width:760px){.swf-counts{grid-template-columns:repeat(2,minmax(0,1fr));}.swf-line-plan{padding:10px;}.swf-overview .section-title{flex-wrap:wrap;}}
@media(max-width:430px){.swf-line-plan input[type="number"]{width:74px;}.swf-line-plan td{padding:8px 5px;}}

.sawmill-workspace .cabinet-nav-group {margin:0 0 16px;min-width:0;}
.sawmill-workspace .cabinet-nav-group-title {font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 10px 6px;}
.sawmill-workspace .sawmill-more {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.sawmill-workspace .sawmill-more .cabinet-nav-group {background:var(--white);border:1px solid var(--line);border-radius:12px;padding:18px;}
.sawmill-workspace .sawmill-more .nav-item {width:100%;min-height:44px;}
.sawmill-workspace .cabinet-quick-actions .button {min-height:44px;}
.sawmill-workspace .stat .button {min-height:36px;margin-top:6px;font-size:12px;}
.sawmill-workspace .sawmill-mobile-nav {display:none;}
#sw-editor:not(:empty) {margin-bottom:22px;scroll-margin-top:90px;}
#sw-editor .cabinet-editor {border:2px solid var(--amber);}
#sw-editor .cabinet-editor>.section-title {margin-bottom:18px;}
#sw-editor .cabinet-editor h2:focus {outline:none;}
#sw-editor form,#sw-editor fieldset,#sw-editor .form-grid,#sw-editor .field {min-inline-size:0;max-inline-size:100%;}
#sw-editor .field {grid-template-columns:minmax(0,1fr);}
#sw-editor .form-actions>.button {min-inline-size:0;max-inline-size:100%;white-space:normal;overflow-wrap:anywhere;}
#sw-production-filter {margin:16px 0;}
@media(max-width:760px){
  .sawmill-workspace .sidebar {display:none;}
  .sawmill-workspace .portal-content {padding-bottom:90px;}
  .sawmill-workspace .sawmill-mobile-nav {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;inset:auto 0 0;z-index:40;background:var(--white);border-top:1px solid var(--line);padding:6px 5px calc(6px + env(safe-area-inset-bottom));gap:3px;}
  .sawmill-mobile-nav button {min-width:0;min-height:48px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:11px;line-height:1.25;padding:7px 2px;overflow-wrap:anywhere;}
  .sawmill-mobile-nav button.active {background:var(--amber);color:#23282d;font-weight:700;}
  .sawmill-mobile-nav button:focus-visible {outline:2px solid var(--amber);outline-offset:-2px;}
  .sawmill-workspace .sawmill-more {grid-template-columns:1fr;gap:0;}
  .sawmill-workspace .cabinet-quick-actions .form-actions {display:grid;grid-template-columns:1fr;width:100%;}
  .cabinet-mode .sawmill-workspace .stat-row {grid-template-columns:minmax(0,1fr);}
  .cabinet-mode .sawmill-workspace .stat {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:14px 16px;}
  .cabinet-mode .sawmill-workspace .stat>strong {font-size:clamp(20px,5vw,26px);line-height:1.35;white-space:nowrap;overflow-wrap:normal;}
  .cabinet-mode .sawmill-workspace .stat>span:last-child {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;}
  .cabinet-mode .sawmill-workspace .stat .button {margin-top:0;font-size:12px;}
  #sw-editor .form-grid {grid-template-columns:minmax(0,1fr);}
  #sw-editor .swf-line-plan table {table-layout:fixed;}
  #sw-editor .swf-line-plan td {grid-template-columns:minmax(0,86px) minmax(0,1fr);}
  #sw-production-filter {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  #sw-production-filter label {min-width:0;display:grid;grid-template-columns:minmax(0,1fr);}
  #sw-production-filter input {width:100%;min-width:0;}
}
@media(max-width:430px){#sw-production-filter{grid-template-columns:minmax(0,1fr);}}
@media print{.sawmill-mobile-nav{display:none!important}}

