.production-column-sort{border:0;background:transparent;color:inherit;font:inherit;font-weight:500;text-align:left;cursor:pointer;padding:6px 8px;min-height:36px;width:100%}
.production-column-sort:hover{background:var(--soft)}
/* Shared page hierarchy; scoped mobile adaptations preserve desktop tables. */
.queue-view-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 0;margin-bottom:8px;border-bottom:1px solid var(--border)}
.queue-view-toolbar [role=status]{font-size:12px;color:var(--muted)}
.queue-view-selection{display:flex;align-items:center;gap:8px;min-height:44px;font-size:12px;font-weight:400}
.queue-view-selection input{width:18px;height:18px;accent-color:var(--blue)}
.harvest-history-row:has(.queue-view-selection){grid-template-columns:auto minmax(120px,.8fr) minmax(200px,1.2fr) minmax(140px,.8fr)}
.inbox-group-dialog{width:min(880px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--border);border-radius:8px}
.inbox-group-dialog[open]{display:flex;flex-direction:column}
.inbox-group-dialog .dialog-head{padding:12px 16px;margin:0;border-bottom:1px solid var(--border);flex-shrink:0}
.inbox-group-dialog h2{font-size:18px;margin:0}
.inbox-group-dialog [data-inbox-page-status]{padding:8px 16px;margin:0;background:var(--soft);flex-shrink:0}
.inbox-group-dialog [data-inbox-page-rows]{overflow:auto;min-height:0;overscroll-behavior:contain}
.inbox-detail-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:60px;background:var(--card);border:0;border-bottom:1px solid var(--border);padding:12px 16px;text-align:left;cursor:pointer;color:var(--text)}
.inbox-detail-row:hover,.inbox-detail-row:focus-visible{background:var(--soft)}
.inbox-detail-row>span:first-child{display:grid;gap:4px;min-width:0;flex:1}
.inbox-detail-row strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}
.inbox-detail-row small{font-size:12px;color:var(--muted);line-height:1.5}
.inbox-detail-row>span:last-child{font-size:12px;color:var(--blue);white-space:nowrap}
.inbox-page-footer{display:flex;gap:8px;justify-content:flex-end;padding:12px 16px;border-top:1px solid var(--border);flex-shrink:0}
.production-summary-fold{margin-bottom:12px;border-bottom:1px solid var(--border)}
.production-summary-fold>summary{min-height:40px;display:flex;align-items:center;cursor:pointer;color:var(--muted);font-size:13px}
.production-summary-fold>summary::before{content:'›';font-size:20px;width:20px}
.production-summary-fold[open]>summary::before{transform:rotate(90deg)}
.production-sort-control{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted)}
.production-sort-control select{min-height:36px;background:var(--card);border:1px solid var(--border);border-radius:6px;padding:6px 8px}
.admin-list-assignments{margin:12px 0;border-top:1px solid var(--border);padding-top:8px}
.admin-list-assignments summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.admin-list-choice{display:grid;grid-template-columns:minmax(120px,1fr) minmax(120px,160px);align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}
.admin-list-choice small{display:block;color:var(--muted);font-size:12px}
.admin-list-choice select{min-height:40px}
/* Mobile density: one page heading, compact fact strips, separated list sections.
   Content and permissions stay in the existing controls; nothing is fabricated. */
/* Desktop keeps the original always-open filters and direct task entry. */
.responsive-controls-fold{display:contents}
.responsive-controls-fold>summary{display:none}
.responsive-controls-body{display:contents}
@media(max-width:760px){
  :root{--bg:#edf1f5;--card:#fff;--text:#243443;--muted:#586c7e;--border:#d0dbe5;--soft:#e8eff5;--color-canvas:#edf1f5;--color-surface:#fff;--color-surface-subtle:#e8eff5;--color-text-primary:#243443;--color-text-secondary:#586c7e;--color-text-tertiary:#687b8c;--color-border:#d0dbe5;--color-border-strong:#aebfce}
  body{font-size:14px;line-height:1.45;background:var(--bg)}
  .environment-banner{position:sticky;top:0;left:auto;right:auto;transform:none;width:100%;padding:2px 8px;line-height:16px;font-size:11px;font-weight:500;border-radius:0;box-shadow:none}
  .main{padding:8px 12px calc(72px + env(safe-area-inset-bottom));max-width:none}
  .topbar{display:flex;align-items:center;gap:8px;min-height:48px;margin:0 0 8px}
  .topbar>div:first-child{min-width:0;flex:1}
  .topbar .eyebrow,#pageSub,.topbar .permission-pill{display:none}
  .topbar h1{font-size:20px;line-height:1.2;margin:0;font-weight:600;letter-spacing:0;white-space:nowrap}
  .topbar .top-actions{display:flex;flex:0 0 auto;align-items:center;flex-wrap:nowrap;gap:4px;max-width:none}
  .topbar .sync{font-size:11px;max-width:104px;padding:4px 6px;line-height:16px;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar .btn{min-height:44px;min-width:44px;padding:8px;font-size:12px;background:var(--card);border:1px solid var(--border);color:var(--text)}
  .topbar .scan-top-btn{color:var(--blue)}
  .page{display:block;gap:0;min-height:0;align-content:start}
  .page.hidden{display:none}
  .page>*{max-width:100%}
  .page h2,.page h3{font-size:14px;line-height:20px;font-weight:600;margin:0}
  .page strong,.page b{font-weight:500}
  .page .meta{font-size:12px;line-height:17px;color:var(--muted)}
  .page .btn,dialog .btn,.page summary.btn{min-height:44px;border-radius:6px;padding:8px 12px;font-size:13px;font-weight:500;white-space:nowrap;flex-shrink:0}
  .page input:not([type=checkbox]):not([type=radio]),.page select,.page textarea{min-height:44px;max-width:100%;min-width:0;font-size:14px;border-radius:6px;padding:8px;background:var(--card);border:1px solid var(--border)}
  .page input[type=checkbox],.page input[type=radio]{width:18px;height:18px;flex-shrink:0;accent-color:var(--blue)}
  .page label:has(input[type=checkbox]),.page label:has(input[type=radio]){display:flex;align-items:center;gap:8px;min-height:44px}
  .page label{font-size:12px;color:var(--muted)}
  .page summary{cursor:pointer;min-height:44px;align-content:center;font-size:13px;font-weight:500}
  .section-card{min-height:0;height:auto;align-self:start;align-content:start;margin:0 0 12px;padding:8px 12px;border:1px solid var(--border);border-radius:6px;box-shadow:none;background:var(--card)}
  .section-card>.section-head,.section-card>.section-title,.section-card>.product-profile-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;margin:-8px -12px 8px;min-height:36px;background:var(--soft);border:0;border-bottom:1px solid var(--border);border-radius:6px 6px 0 0}
  .section-head>div,.section-title>div{min-width:0}
  .section-head p:empty,.section-title p:empty,.permission-banner:empty{display:none}
  .page-commandbar,.product-commandbar,.production-commandbar{padding:0;background:transparent;border:0;box-shadow:none;margin-bottom:8px}
  .page-commandbar>.section-title,.page-commandbar>.section-head,.product-commandbar>.section-title,.production-commandbar>.section-title{background:transparent;margin:0;padding:0;border:0;min-height:0}
  .page-duplicate-title,.product-commandbar .section-title>div:first-child,.production-commandbar .section-title>div:first-child{display:none}
  .page-commandbar>.section-title>div:has(>.page-duplicate-title),.page-commandbar>.section-head>div:has(>.page-duplicate-title){display:none}
  .permission-banner{margin:4px 0 8px;padding:6px 8px;min-height:0;border-radius:4px;font-size:12px;line-height:17px;background:var(--soft);color:var(--muted)}
  .permission-banner.warning,.permission-banner.danger,.permission-banner.error{padding:8px;border-left:3px solid var(--amber)}
  .page .toolbar{margin:0 0 8px;gap:8px;align-items:center}
  .page .stats{display:flex;flex-wrap:wrap;align-items:stretch;gap:0;background:var(--soft);border:1px solid var(--border);border-radius:6px;margin:0 0 8px;padding:8px 0}
  .page .stats>.stat{flex:1 1 20%;min-width:60px;min-height:0;width:auto;max-width:100%;margin:0;padding:0 8px;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:center}
  .page .stats>.stat+.stat{border-left:1px solid var(--border)}
  .page .stats>.stat::after{display:none}
  .page .stats>.stat>b{display:block;font-size:18px;line-height:24px;font-weight:600;overflow-wrap:anywhere}
  .page .stats>.stat>span{display:block;font-size:11px;line-height:16px;color:var(--muted)}
  .page .ui-empty{min-height:0;height:auto;max-height:none;padding:8px;gap:4px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:transparent;box-shadow:none;border:0}
  .page .ui-empty strong{font-size:13px;line-height:20px;font-weight:400}
  .page .ui-empty>span{font-size:12px;line-height:17px}
  .page .ui-empty-art{display:none}
  .page .review-list{gap:0;min-height:0}
  .page .review-row{margin:0;padding:8px 0;gap:8px;min-height:0;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;box-shadow:none}
  .page .review-row:last-child{border-bottom:0}
  .page .review-row>div{gap:4px;min-width:0}
  .page .review-row strong{font-size:14px;line-height:20px}
  .page .badge,.page .quantity-chip{font-size:12px;font-weight:500;border-radius:4px;padding:2px 6px;line-height:18px}
  .page .activity{padding:8px 0;margin:0;border-bottom:1px solid var(--border);min-height:48px}
  .page .activity b{font-size:13px;line-height:18px;font-weight:500}
  .page .activity small{font-size:12px;line-height:17px;margin-top:2px}
  .page-help{margin:8px 0 0;border-top:1px solid var(--border);color:var(--muted);font-size:12px}
  .page-help summary{font-size:12px}
  .page-help p{margin:0 0 8px;line-height:1.6}
  .bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:0;padding:4px 8px calc(4px + env(safe-area-inset-bottom));box-shadow:none;border-top:1px solid var(--border);background:var(--card)}
  .bottom-nav button{min-height:48px;border-radius:6px;font-size:11px;padding:4px;gap:2px}
  .bottom-nav button span{font-size:18px}
  .toast{max-width:calc(100vw - 24px);font-size:13px;border-radius:6px}
  /* Inbox: a small factual strip, then the actionable rows, without spacer bands. */
  #homeTiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 44px;gap:0;border:1px solid var(--border);border-radius:6px;background:var(--card);margin:0 0 8px;overflow:hidden}
  #homeTiles .home-tile{min-height:64px;min-width:0;gap:2px;border:0;border-right:1px solid var(--border);border-radius:0;padding:8px;background:transparent;box-shadow:none}
  #homeTiles .home-tile b{font-size:22px;font-weight:600;line-height:24px}
  #homeTiles .home-tile span{font-size:12px;line-height:16px;font-weight:400}
  #homeTiles .home-tile small{display:none}
  #homeTiles .home-tile-more{display:flex;flex-direction:column;justify-content:center;align-items:center;grid-column:auto;padding:4px;border:0;font-size:12px;text-align:center}
  #homeTiles .home-tile-more b{font-size:13px;font-weight:400}
  #homeTiles .home-tile-more span{font-size:11px}
  #homeTiles.expanded{grid-template-columns:repeat(3,minmax(0,1fr))}
  #homeTiles.expanded .home-tile-more{grid-column:1/-1;flex-direction:row;gap:8px;min-height:44px;border-top:1px solid var(--border)}
  #homeInboxHint{margin:0 0 8px;font-size:11px;line-height:16px}
  #homeInbox{display:block}
  .home-inbox-group{margin:0 0 12px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--card)}
  .home-inbox-head{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:4px;background:var(--soft);padding:0 8px 0 12px}
  .home-inbox-head>div{gap:6px;min-width:0;flex-wrap:wrap}
  .home-inbox-head strong{font-size:13px;font-weight:600}
  .home-inbox-head .home-inbox-all{min-height:44px;font-size:12px;padding:8px;white-space:nowrap}
  .home-inbox-severity{font-size:11px;padding:2px 4px}
  .home-inbox-row{min-height:52px;gap:8px;padding:8px 12px;border-top:1px solid var(--border)}
  .home-inbox-row strong{font-size:14px;font-weight:500}
  .home-inbox-row small,.home-inbox-row .meta{font-size:12px;line-height:16px}
  .home-inbox-more{min-height:44px;width:100%;padding:8px 12px;background:transparent;border:0;border-top:1px solid var(--border);font-size:12px!important;text-align:left}
  .inbox-group-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .inbox-detail-row{min-height:56px;padding:8px 12px}
  .inbox-page-footer{padding:8px;justify-content:space-between}
  /* Task controls use three useful rows, not title/description/filter subcards. */
  .task-commandbar{display:grid;grid-template-columns:minmax(0,1fr) 96px 80px;gap:8px;padding:0;margin:0 0 8px;background:transparent;border:0}
  .task-commandbar-title,.task-filter-zone,.task-toolbar{display:contents}
  .task-commandbar-title>div:first-child,.task-add-copy strong,#floatBtn{display:none}
  .task-command-actions{grid-column:3;grid-row:2;gap:0}
  #taskSettingsMenu>summary{font-size:12px;padding:8px}
  #taskSearch{grid-column:1/3;grid-row:1;width:100%}
  #taskListSelect{grid-column:1;grid-row:2;width:100%}
  #taskStatusSelect{grid-column:2;grid-row:2;min-width:96px;width:100%}
  .task-add-zone{padding:0;margin:0;border:0}
  #taskCreateMenu{grid-column:3;grid-row:1}
  .task-add-copy{display:none}
  .task-add-zone:has(#quickAddBtn[disabled]) .task-add-copy{display:block;margin-bottom:4px}
  .task-add-zone:has(#quickAddBtn[disabled]) .quick-add{display:none}
  .task-add-zone .quick-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
  #taskSummary .stat{flex-basis:20%;padding:0 4px;min-width:0}
  .task-list{display:block;background:var(--card);border:1px solid var(--border);border-radius:6px;overflow:hidden}
  .task-list .task-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;min-height:64px;margin:0;padding:8px 12px;border:0;border-bottom:1px solid var(--border);border-radius:0;box-shadow:none;background:var(--card)}
  .task-list .task-card:last-child{border-bottom:0}
  .task-list .task-main{grid-column:1;grid-row:1;min-width:0}
  .task-list .task-title-line{gap:4px;align-items:baseline}
  .task-list .task-title-line h3{font-size:14px;font-weight:500;line-height:20px}
  .task-list .task-meta{font-size:11px;line-height:16px;margin-top:4px}
  .task-list .task-progress-empty{display:none}
  .task-list .task-progress{grid-column:1/-1;grid-row:2;padding:0;min-height:0;background:transparent;border:0}
  .task-list .task-progress-label{font-size:11px}
  .task-list .task-progress-copy strong{font-size:13px;font-weight:400;line-height:18px}
  .task-list .task-actions{grid-column:2;grid-row:1;display:flex;gap:4px;align-items:center;flex-wrap:nowrap;margin:0;padding:0;border:0}
  .task-list .task-actions .btn{min-width:44px;min-height:44px;padding:8px;font-size:12px;width:auto}
  .task-list .task-next{margin:4px 0 0;font-size:12px;line-height:17px}
  /* Device rows keep real abnormalities; repetitive 'no issue' fillers disappear. */
  .equipment-commandbar{padding:0;border:0;background:transparent;margin:0 0 8px}
  .equipment-commandbar .section-title,.equipment-commandbar .section-head{display:none}
  .equipment-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:8px;margin:0}
  .equipment-group-tabs{display:flex;flex-wrap:nowrap;gap:4px;margin:4px 0 8px;overflow-x:auto;overscroll-behavior-x:contain}
  .equipment-group-tabs button.btn{min-height:44px;font-size:12px;padding:8px;flex-shrink:0;white-space:nowrap}
  #equipmentManagement{padding:0 8px;margin-bottom:8px;background:transparent;border:1px solid var(--border);border-radius:6px}
  #equipmentManagement>summary{min-height:44px}
  #equipmentManagement>summary>span{display:none}
  #eqSummary .stat:nth-child(3){display:none}
  #eqSummary .stat{flex-basis:50%}
  .equipment-list{display:block;margin:0;border:1px solid var(--border);border-radius:6px;background:var(--card);overflow:hidden}
  .equipment-list .eq-card.eq-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px 12px;min-height:64px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:var(--card)}
  .equipment-list .eq-card:last-child{border-bottom:0}
  .equipment-list .eq-row-main{min-width:0}
  .eq-title-line{gap:8px}
  .eq-title-line h3{font-size:14px;font-weight:500}
  .eq-row-meta{font-size:11px!important;line-height:16px!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  .eq-attention:has(>.eq-calm),.eq-open-count:has(>span:only-child){display:none}
  .eq-attention:not(:has(>.eq-calm)){grid-column:1/-1;font-size:12px}
  .eq-open-count{min-width:0;border:0;padding:0}
  /* Planner: one compact row per machine, not five vertically stacked field cards. */
  .production-commandbar{display:block;gap:0}
  .production-commandbar .production-top-actions{display:flex;width:100%;gap:8px;margin:0}
  .production-commandbar .production-top-actions>.btn{flex:1}
  #productionBridgeState{margin:4px 0;padding:4px 0;background:transparent;font-size:11px}
  .production-summary-fold{margin:0 0 8px;border-bottom:1px solid var(--border)}
  .production-summary-fold>summary{min-height:44px;font-size:12px;padding:0 4px}
  #productionBoardSection{padding:0;margin:0 0 12px;border:0;background:transparent}
  #productionBoardSection>.section-head{padding:0;margin:0 0 8px;min-height:0;border:0;background:transparent;align-items:center}
  #productionBoardSection>.section-head h2{display:none}
  #productionBoardSummary{margin:0;font-size:11px;line-height:16px}
  .production-board-actions .btn{font-size:12px;padding:8px;min-width:44px}
  #productionBoardResetColumns{display:none}
  .production-board-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0 0 8px}
  #productionBoardSearch{grid-column:1;width:100%}
  .production-sort-control{display:flex;align-items:center;gap:8px;margin:0 0 8px;justify-content:flex-end;font-size:12px}
  .production-sort-control select{width:108px;min-height:44px}
  #productionBoardSortDirection{min-height:44px;padding:8px}
  #productionBoardNotice{font-size:11px;line-height:16px;margin:4px 0 8px}
  .production-group-heading{display:flex;align-items:center;gap:8px;padding:4px 8px;margin:8px 0 0;background:#dce6ef;border-bottom:1px solid var(--border);min-height:28px;border-radius:6px 6px 0 0}
  .production-group-heading h3{font-size:12px;font-weight:600}
  .production-group-heading span{font-size:11px;color:var(--muted)}
  .production-slot-head{display:none}
  .production-slot{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px 12px;margin:0;min-height:0;border:1px solid var(--border);border-top:0;border-radius:0;box-shadow:none;background:var(--card)}
  .production-slot>div{min-height:0;padding:0;gap:4px;min-width:0}
  .production-slot-machine{grid-column:1;grid-row:1;display:flex;align-items:baseline;flex-wrap:wrap}
  .production-slot-machine strong{font-size:14px;font-weight:600;line-height:20px}
  .production-slot-machine .meta{font-size:11px;line-height:16px}
  .production-slot-state{grid-column:2;grid-row:1;display:flex;align-items:center;gap:4px}
  .production-slot-state>.meta{display:none}
  .production-slot-file{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px}
  .production-slot-file strong{font-size:13px;font-weight:400;line-height:18px;overflow-wrap:anywhere}
  .production-slot-file>.production-slot-label{display:none}
  .production-slot-file>.meta{font-size:11px}
  .production-slot>div:nth-child(4),.production-slot>div:nth-child(5){grid-column:1/-1;display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;font-size:12px;line-height:17px}
  .production-slot-label{display:inline;color:var(--muted);font-size:11px;min-width:5em;margin:0;line-height:17px}
  .production-slot>div:nth-child(5) .meta{display:none}
  .production-board-empty{padding:12px;font-size:13px;border:1px solid var(--border);background:var(--card);min-height:0}
  /* Harvest / handling: quantities and machine first; full evidence in existing details. */
  #harvestPage>.section-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 8px}
  #harvestPage>.section-head>div:first-child{display:none}
  #harvestMachineScan{flex:1}
  #harvestWorkspaceStatus,#harvestHistoryStatus{font-size:12px;line-height:17px;margin:4px 0 8px}
  #harvestQueueSlot{margin:0 0 12px}
  #harvestQueueSection{padding:0;margin:0;border:0;background:transparent}
  #harvestQueueSection>.section-head{display:flex;align-items:center;gap:8px;margin:0 0 8px;padding:0;border:0;background:transparent}
  #harvestQueueSection>.section-head h2{font-size:13px;white-space:nowrap}
  #harvestSearch{min-width:0;flex:1;width:auto}
  #pendingHarvestList{display:block}
  .harvest-card.compact-harvest{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;padding:8px;margin:0;border:1px solid var(--border);border-top:0;border-left:3px solid transparent;border-radius:0;box-shadow:none;background:var(--card);min-height:64px}
  .harvest-card.compact-harvest.needs-attention{border-left-color:var(--amber);background:var(--card)}
  .compact-harvest .harvest-title-line{gap:4px;flex-wrap:wrap}
  .compact-harvest .harvest-name{font-size:14px;font-weight:500;line-height:20px}
  .compact-harvest .meta{font-size:11px;line-height:16px}
  .compact-harvest .formal-version-notice{font-size:11px;line-height:16px;margin-top:4px;padding:0;background:transparent}
  .compact-harvest .harvest-actions{display:flex;flex-direction:column;gap:0;align-items:stretch}
  .compact-harvest .harvest-actions .btn{width:auto;min-width:52px;min-height:44px;padding:8px;font-size:12px}
  .harvest-trace{font-size:11px;line-height:16px;margin:0}
  .harvest-trace>summary{font-size:11px;min-height:44px}
  .harvest-trace[open] .meta{white-space:normal;overflow-wrap:anywhere}
  .harvest-history-row,.harvest-history-row:has(.queue-view-selection),.quantity-review-row{display:grid;grid-template-columns:1fr;gap:4px;padding:8px 0;margin:0;border-bottom:1px solid var(--border)}
  .queue-view-toolbar{gap:4px;margin:0;padding:4px 0 8px}
  .queue-view-toolbar .btn{font-size:12px;padding:8px}
  .queue-view-toolbar [role=status]{width:100%;font-size:11px}
  .queue-view-selection{min-height:44px;margin:0;font-size:12px}
  .handwork-primary-actions{display:flex;gap:8px;margin-bottom:4px;flex-wrap:wrap}
  .handwork-primary-actions .btn{flex:1;padding:8px;font-size:12px}
  .handwork-batch-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 8px}
  #handworkBatchDemandSelect,#handworkBatchReceiveInput{grid-column:1/-1}
  #handworkBatchReceiveConfirmBtn,#handworkBatchReceiveClearBtn{grid-column:auto}
  #manualQuantityReceiveSection>.toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}
  #manualReceiveCatalog .review-row,#manualInventoryList .review-row{padding:8px 0;gap:8px}
  .handwork-inventory-toolbar{display:block;margin-bottom:8px}
  .handwork-inventory-toolbar .top-actions{max-width:none;display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}
  .handwork-inventory-toolbar .top-actions .btn{flex:1 1 calc(50% - 8px);font-size:12px;padding:8px}
  .handwork-inventory-workspace{display:block;min-height:0}
  .handwork-product-pane{position:static;padding:0;margin:0 0 8px;border:0;min-height:0}
  .handwork-product-summary,.handwork-part-workspace,.handwork-stock-workspace{padding:8px;min-height:0}
  .handwork-part-cards{gap:8px}
  .handwork-stock-metric{min-height:0;padding:8px}
  /* Catalog, stock, capacity: rows/strips, not giant nested panels. */
  .product-commandbar .toolbar{display:grid;grid-template-columns:1fr auto;gap:8px;margin:0;width:100%}
  #productSearch{grid-column:1/-1;width:100%}
  #productStatus{padding:0;margin:4px 0 8px;background:transparent;font-size:11px}
  .product-workspace{display:block;min-height:0}
  .product-workspace>.section-card{margin:0 0 12px}
  .product-workspace>.page-commandbar>.section-head{display:none}
  .product-catalog{display:block}
  #productCatalogList .product-tree{padding:8px 12px;background:var(--card);border:1px solid var(--border);border-left:3px solid transparent;border-radius:6px;margin:0 0 8px}
  #productCatalogList .product-tree.selected{border-left-color:var(--blue);background:var(--card)}
  #productCatalogList .product-tree-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
  #productCatalogList .product-name-button{min-width:0;flex:1;min-height:44px;padding:0;background:transparent;gap:2px}
  #productCatalogList .product-name-button strong{font-size:15px;font-weight:600}
  #productCatalogList .product-name-button span{font-size:11px}
  .product-tree-actions,.product-part-actions{margin:0;display:block;flex-shrink:0}
  .product-row-menu{position:relative}
  .product-row-menu>summary{display:block;min-width:44px;min-height:44px;padding:8px;text-align:center;color:var(--blue);list-style:none;font-size:12px}
  .product-row-menu>summary::-webkit-details-marker{display:none}
  .product-row-menu[open]>.product-menu-items{position:absolute;z-index:45;right:0;top:100%;display:flex;flex-direction:column;gap:0;min-width:160px;padding:4px;background:var(--card);border:1px solid var(--border);border-radius:6px;box-shadow:0 4px 12px #24344318}
  .product-menu-items>.btn{width:100%;text-align:left;background:transparent;border:0;min-height:44px;font-size:13px;padding:8px 12px}
  .product-parts{display:block;padding:0;margin:4px 0 0}
  .product-part-row{display:flex;align-items:center;gap:8px;margin:0;border-top:1px solid var(--border)}
  .product-part-button{min-width:0!important;flex:1;display:grid;gap:2px;text-align:left;min-height:48px;padding:8px;background:var(--soft);border:0;border-radius:4px}
  .product-part-button span{font-size:13px;font-weight:400}
  .product-part-button small{font-size:11px}
  #productPartMeta{font-size:11px;line-height:16px}
  .product-profile-head{margin:8px 0;padding:0;gap:8px}
  .product-profile-head .btn{font-size:12px;padding:8px}
  #inventoryBalanceList .review-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:8px 0;gap:8px}
  #inventoryBalanceList .review-row>div:last-child{text-align:right;align-items:flex-end}
  #inventoryBalanceList .review-row>div:first-child>.meta{font-size:11px;line-height:16px}
  #inventoryBalanceList .review-row>.formal-file-label{font-size:11px}
  #inventoryMovementList .review-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
  #inventoryMovementList .review-row>div:last-child{max-width:128px;text-align:right}
  #capacityPage .label-filter-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 120px}
  #capacityStatus{font-size:12px;line-height:17px;margin:4px 0 8px}
  #capacityFacts.capacity-facts{display:block;margin:0;padding:0;min-height:0}
  #capacityFacts .capacity-facts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #capacityFacts .capacity-facts-more{min-height:44px;font-size:12px;margin:8px 0 0;padding:8px;border:0;background:transparent}
  #capacityFacts .capacity-method{font-size:12px;border-top:1px solid var(--border)}
  #capacityFacts .capacity-method summary{min-height:44px;font-size:12px}
  #capacityFacts .capacity-method p{margin:0 0 8px;line-height:1.5}
  #capacityFacts .capacity-fact{min-height:0;height:auto;padding:8px;border:0;background:var(--soft);border-radius:4px}
  #capacityFacts .capacity-fact b{font-size:20px;line-height:24px}
  #capacityFacts .capacity-fact span{font-size:11px;line-height:16px}
  #capacityFacts .capacity-facts-toggle{grid-column:1/-1;min-height:44px;padding:8px;font-size:12px}
  #finished_goodsPage .section-title>.toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;margin:0 0 8px}
  #finishedGoodsProductSelect{grid-column:1/2}
  #finishedGoodsRefreshBtn{grid-column:2/3}
  #finishedGoodsCopyReportBtn{grid-column:1/-1;min-height:44px}
  #finished_goodsPage .section-card>.section-head{align-items:center;flex-wrap:wrap}
  #finished_goodsPage .section-card>.section-head>div:last-child:has(button){display:flex;gap:8px;flex-wrap:wrap}
  #finished_goodsPage .section-card>.section-head>div:last-child .btn{font-size:12px;padding:8px}
  #finishedGoodsStats .stat{flex:1 1 25%;min-width:0;padding:0 4px}
  #finishedGoodsStats .stat:last-of-type{flex:1 1 100%;display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding:4px 8px 0;border-left:0;border-top:1px solid var(--border)}
  #finishedGoodsStats .stat:last-of-type b{font-size:12px;line-height:18px;font-weight:400;white-space:normal}
  #finishedGoodsStats .stat:last-of-type span{font-size:11px}
  #qrPage .local-label-print-panel{margin:8px 0;padding:8px;border:1px solid var(--border);background:var(--soft);border-radius:6px}
  #qrPage .local-label-print-panel>div:first-child>span{font-size:11px;line-height:16px}
  #printBridgeStatus{font-size:12px;line-height:17px}
  #qrPage .label-library-fold>summary{min-height:44px}
  #qrPage .label-library-fold>summary span{font-size:11px}
  #supervisorPage>.section-card:first-child>.section-title h2{display:none}
  #supervisorPage>.section-card:first-child>.section-title{background:transparent;border:0;justify-content:flex-end}
  .supervisor-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin-bottom:0!important}
  #supStats .stat{flex-basis:20%;min-width:0;padding:0 4px}
  #activityList{padding:0 12px}
  /* Infrequent profile editing is collapsed; account, role and version stay visible. */
  .profile-grid{display:block}
  #profileLogoutBtn{width:auto;min-height:44px;float:right;position:relative;z-index:1;margin:0 0 0 8px;font-size:12px}
  .profile-identity-card>.section-title{min-height:44px}
  .profile-lines{font-size:13px;line-height:20px;margin:8px 0;color:var(--text)}
  #profileIdentity{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px}
  #profileIdentity>.profile-name{grid-column:1/-1;font-size:16px;font-weight:600}
  #profileIdentity>span{font-size:12px;overflow-wrap:anywhere}
  #profileIdentity .profile-version{grid-column:1/-1;color:var(--muted);font-size:11px}
  .settings-fold{padding:0 12px}
  .settings-fold>summary{min-height:48px;display:flex;align-items:center;gap:8px;color:var(--text);font-size:14px;font-weight:500;list-style:none}
  .settings-fold>summary::before{content:'›';color:var(--muted);font-size:20px;width:12px}
  .settings-fold[open]>summary::before{transform:rotate(90deg)}
  .settings-fold>.settings-body{padding:8px 0 12px;border-top:1px solid var(--border)}
  .settings-body>label{display:block;margin:0 0 8px}
  .settings-body>label>input{width:100%;margin-top:4px}
  .settings-body>button{margin:4px 0 0}
  .terminal-settings{border-top:1px solid var(--border)}
  .terminal-settings>summary{min-height:44px;font-size:12px}
  .terminal-settings>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;padding-bottom:8px}
  .terminal-settings label{margin:0}
  .terminal-settings input{width:100%}
  #profileTechnicalDetails{font-size:12px;margin:0}
  #profileTechnicalDetails>summary{min-height:44px}
  .profile-admin-fold,.profile-activity-fold{padding:0 12px;margin-bottom:8px}
  .profile-fold-summary{min-height:48px}
  .profile-fold-summary span{display:none}
  #adminSystemSection .profile-fold-body>.section-title h2{display:none}
  #bambuStats .stat{flex-basis:25%;min-width:0}
  #bambuStats .stat b{font-size:16px}
  #bambuPage .permission-banner{font-size:12px;line-height:18px}
  #bambuPage .review-row{grid-template-columns:1fr;gap:4px}
  .admin-list-choice{grid-template-columns:minmax(0,1fr) 120px;gap:8px}
  .responsive-controls-fold{display:block;position:relative;min-width:0}
  .responsive-controls-fold>summary{display:block;min-height:44px;padding:8px;font-size:12px;text-align:center;list-style:none}
  .responsive-controls-fold>summary::-webkit-details-marker{display:none}
  .responsive-controls-fold[open]>.responsive-controls-body{display:grid;position:absolute;right:0;top:calc(100% + 4px);z-index:46;width:min(320px,calc(100vw - 24px));padding:12px;gap:8px;border:1px solid var(--border);border-radius:6px;background:var(--card);box-shadow:0 4px 12px #2434431a}
  .responsive-controls-body .production-sort-control{margin:0;justify-content:space-between}
  .production-more-actions-menu .production-summary-fold{margin:4px 0 0;padding:4px 0;border-top:1px solid var(--border);border-bottom:0}
  .production-more-actions-menu .production-summary-fold>summary{white-space:normal;font-size:12px}
  .production-slot .desktop-copy{display:none}
  .production-slot>div.production-slot-current,.production-slot>div.production-slot-next{grid-column:auto;grid-row:3;display:flex;align-items:baseline;gap:4px;min-width:0;flex-wrap:wrap}
  .production-slot>div.production-slot-current{grid-column:1}
  .production-slot>div.production-slot-next{grid-column:2}
  .production-slot .production-slot-label{min-width:0}
  .production-slot-current>.meta{flex-basis:100%}

}

/* 2026-10-11: explicitly approved mobile harvest + handoff hierarchy.
   All selectors scoped to the two pages. Desktop and legacy business forms stay intact. */
@media(max-width:760px){
  #harvestPage,#handworkPage{padding-bottom:110px;min-width:0;}
  #harvestPage>.section-head{display:none;}
  #harvestPage .page-help,#handworkPage>.page-help{display:none;}
  #harvestWorkspaceStatus:empty,#handworkStatus:empty{display:none;}
  #harvestWorkspaceStatus{font-size:12px;color:#536d86;padding:4px 0;margin:4px 0;}
  #harvestQueueSection{border:0;background:transparent;box-shadow:none;padding:0;margin:0;}
  #harvestQueueSection>.section-head{padding:0 0 8px;border:0;gap:6px;}
  #harvestQueueSection>.section-head>div{display:none;}
  #harvestSearch{width:100%;height:42px;border:1px solid #dae5f4!important;border-radius:14px!important;background:#f0f5fc!important;}
  #productionGroupTabs{display:none;}
  #pendingHarvestList{display:grid;gap:7px;}
  #pendingHarvestList>.btn{width:100%;border-radius:12px;}
  .mobile-ops-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:1px 0 11px;}
  .mobile-ops-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:58px;border-radius:13px;border:1px solid #e3e9f3;background:#f5f8fd;}
  .mobile-ops-stat b{font-size:21px;line-height:1.2;font-weight:720;font-variant-numeric:tabular-nums;}
  .mobile-ops-stat span{font-size:10px;font-weight:600;letter-spacing:0;color:#71829d;}
  .mobile-ops-stat.green{background:#eaf8f1;color:#07875a;border-color:#d9f3e6;}
  .mobile-ops-stat.blue{background:#eaf2ff;color:#1963d9;border-color:#deebff;}
  .mobile-ops-stat.amber{background:#fff4e9;color:#e47c16;border-color:#ffead5;}
  .mobile-ops-stat.neutral{color:#354963;}
  .mobile-machine-group{background:#fff;border:1px solid #e5edf9;border-left:3px solid #3094ff;border-radius:14px;box-shadow:0 2px 9px #0a32620a;overflow:hidden;min-width:0;}
  .mobile-machine-group>summary{list-style:none;}
  .mobile-machine-group>summary::-webkit-details-marker{display:none;}
  .mobile-machine-head{min-height:44px;padding:7px 10px;display:flex;align-items:center;gap:7px;cursor:pointer;color:#172746;}
  .mobile-machine-head strong{font-size:15px;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mobile-status-dot{flex:0 0 8px;height:8px;border-radius:50%;background:#19ba80;box-shadow:0 0 0 3px #e4f8ee;}
  .mobile-machine-count{padding:3px 6px;border-radius:7px;background:#eff4fb;color:#52647c;font-size:11px;white-space:nowrap;}
  .mobile-pill{font-size:11px;padding:3px 7px;border-radius:7px;white-space:nowrap;}
  .mobile-pill.green{background:#e3f8ec;color:#088750;}
  .mobile-pill.amber{background:#fff0df;color:#b9630a;}
  .mobile-chevron{margin-left:auto;font-size:17px;color:#7d90aa;flex-shrink:0;}
  .mobile-machine-group[open] .mobile-chevron{transform:rotate(180deg);}
  .mobile-machine-rows{padding:0 6px 5px 6px;}
  .mobile-harvest-line{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto;align-items:center;gap:5px;min-height:51px;padding:6px 4px;border-top:1px solid #eff2f7;background:#fff;}
  .mobile-harvest-check{display:grid;place-items:center;min-width:22px;min-height:40px;margin:0;}
  .mobile-harvest-check input{width:18px;height:18px;accent-color:#246efa;}
  .mobile-harvest-info{min-width:0;display:flex;flex-direction:column;gap:3px;overflow:hidden;}
  .mobile-harvest-info strong{font-size:12px;font-weight:660;color:#213457;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-harvest-info span{font-size:10px;color:#8794a9;white-space:nowrap;}
  .mobile-harvest-quantity{font-size:11px;font-weight:700;white-space:nowrap;text-align:right;max-width:90px;overflow:hidden;text-overflow:ellipsis;}
  .mobile-harvest-quantity.confirmed{color:#0c9865;}
  .mobile-harvest-quantity.pending{color:#cb7519;}
  .mobile-inline-action{background:#f0f5ff;border:0;border-radius:8px;color:#2467cf;padding:5px 7px!important;min-height:36px!important;min-width:48px;white-space:nowrap;font-size:11px!important;font-weight:650;}
  .mobile-harvest-cleanup{grid-column:2 / -1;display:flex;gap:6px;align-items:center;font-size:11px;color:#aa3535;}
  .mobile-muted{color:#7c889d;font-size:11px;}
  .mobile-ops-bar{position:fixed;left:0;right:0;bottom:calc(60px + env(safe-area-inset-bottom));display:flex;gap:6px;align-items:center;padding:8px 11px;min-height:60px;border:1px solid #e5ecf8;border-left:0;border-right:0;z-index:30;background:#fffffff2;box-shadow:0 -3px 16px #122f5512;backdrop-filter:blur(10px);}
  .mobile-ops-bar>small{white-space:nowrap;font-size:11px;color:#1a65dc;font-weight:650;max-width:68px;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;}
  .mobile-ops-button{border:1px solid #d8e7fb;border-radius:11px;min-height:44px;min-width:0!important;padding:7px 8px!important;font-size:12px!important;font-weight:650!important;white-space:nowrap;flex:0 1 auto;}
  .mobile-ops-button.scan{color:#1062d5;background:#edf5ff;flex:1;}
  .mobile-ops-button.primary{border:0;background:#1e68f2;color:#fff;flex:1.1;box-shadow:0 2px 6px #0e65d52b;}
  .mobile-ops-button.warning{background:#fff1ea;color:#e26934;}
  .mobile-ops-button.subtle{background:#f4f7fc;color:#51688a;}
  .mobile-ops-button:disabled{opacity:.4;box-shadow:none;}
  body:has(dialog[open]) .mobile-ops-bar{visibility:hidden;}
  #handworkPage>.page-commandbar{display:none;}
  #handworkPage>.settings-fold,#handworkPage>.section-card:not(.page-commandbar){display:none;}
  #handworkPage>.page-help{display:none}
  #mobileHandoffBoard{display:block;min-width:0;padding-bottom:4px;}
  .mobile-handoff-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 9px;}
  .mobile-handoff-tabs>button{min-height:41px;border-radius:11px;border:0;background:#edf3fb;color:#64778e;font-size:13px;font-weight:640;}
  .mobile-handoff-tabs>button.active{background:#246cf4;color:#fff;box-shadow:0 3px 8px #1d60e52a;}
  .mobile-handoff-search{display:flex;align-items:center;gap:8px;border:1px solid #e1e9f5;background:#edf3fb;border-radius:13px;padding:0 10px;margin:0 0 9px;min-height:42px;color:#8797ae;}
  .mobile-handoff-search>span{font-size:22px;}
  #mobileHandoffSearch{border:0!important;background:transparent!important;min-height:40px;flex:1;min-width:0;padding:0!important;font-size:13px;}
  .mobile-handoff-products{display:grid;gap:8px;}
  .mobile-product-group{border:1px solid #e2eaf7;background:#fff;border-radius:15px;padding:10px 8px;box-shadow:0 2px 8px #1731540b;min-width:0;}
  .mobile-product-group>details>summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;}
  .mobile-product-group>details>summary::-webkit-details-marker{display:none;}
  .mobile-product-avatar{background:linear-gradient(145deg,#e4f4ff,#d8e9ff);color:#397bdc;border-radius:10px;width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;font-weight:700;font-size:16px;}
  .mobile-product-head-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px;}
  .mobile-product-head-text strong{font-size:15px;font-weight:700;color:#233653;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-product-head-text small{font-size:10px;color:#8391a4;}
  .mobile-part-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:9px;}
  .mobile-part-tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;min-height:65px!important;padding:6px 7px!important;border-radius:10px!important;border:1px solid #e5edf9;background:#f4f8ff;text-align:left;color:#253850;position:relative;}
  .mobile-part-tile.chosen{border-color:#93b8fc;background:#eaf2ff;}
  .mobile-part-title{font-size:11px;font-weight:650;display:-webkit-box;max-width:100%;white-space:normal;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:15px;min-height:30px;overflow-wrap:anywhere;}
  .mobile-part-qty{font-size:14px;font-weight:750;color:#0d995e;display:block;min-width:0;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;}
  .mobile-part-tile small{font-size:9px;color:#647e9d;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mobile-part-selected{position:absolute;top:2px;right:2px;font-size:9px;color:#0e63c8;background:#d9e9ff;border-radius:5px;padding:1px 3px;}
  .mobile-handoff-draft{display:flex;flex-direction:column;gap:4px;margin-top:8px;border:1px solid #a7c8ff;border-radius:11px;background:#edf5ff;padding:8px 10px;font-size:11px;color:#315783;}
  .mobile-handoff-draft strong{font-size:12px;color:#1d65cd;}
  .mobile-handoff-draft>span{overflow-wrap:anywhere;}
  .mobile-handoff-draft button{align-self:flex-end;border:0;color:#bb4242;background:transparent;min-height:30px!important;font-size:11px;}
  #mobileHandoffToolbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;}
  #mobileHandoffToolbar .mobile-ops-button{min-height:48px;font-size:14px!important;padding:8px!important;}
  #mobileHandoffManual{grid-column:1/5;grid-row:1;}
  #mobileHandoffScan{grid-column:5/7;grid-row:1;}
  #mobileHandoffOverview{grid-column:1/4;grid-row:2;display:flex;align-items:center;justify-content:center;gap:8px;}
  #mobileHandoffOverview>small{font-size:11px;color:#667c98;min-width:0;overflow:hidden;text-overflow:ellipsis;}
  #mobileHandoffConfirm{grid-column:4/7;grid-row:2;}
  .mobile-operations-empty{border-radius:13px;border:1px dashed #d8e4f5;color:#778ca8;background:#f6f9fe;font-size:12px;padding:20px;text-align:center;}
}
.mobile-ops-dialog{border:0;border-radius:18px;width:min(420px,calc(100vw - 24px));padding:0;box-shadow:0 15px 50px #18385f36;background:#fff;}
.mobile-ops-dialog::backdrop{background:#1733506e;}
.mobile-ops-dialog-body{padding:16px;display:grid;gap:12px;}
.mobile-ops-dialog h3{margin:0;font-size:17px;font-weight:700;color:#213754;}
.mobile-ops-dialog-body>p{font-size:12px;color:#667c98;line-height:1.5;margin:0;}
.mobile-ops-dialog-body>label{font-size:13px;font-weight:600;display:grid;gap:7px;}
.mobile-ops-dialog-body input,.mobile-ops-dialog-body select{width:100%;min-height:44px;border:1px solid #dbe5f4;background:#f4f8fe;border-radius:10px;padding:8px;}
.mobile-ops-dialog-actions{display:flex;gap:8px;justify-content:flex-end;}
.mobile-ops-dialog-actions button{flex:1;border-radius:10px;border:1px solid #dce7f6;color:#436388;background:#edf4fe;padding:9px;min-height:44px;}
.mobile-ops-dialog-actions button.primary{background:#206df5;color:#fff;border-color:#206df5;}
.mobile-ops-review-rows{display:grid;gap:6px;max-height:50dvh;overflow:auto;}
.mobile-ops-review-rows>div{background:#f1f6fe;border-radius:9px;padding:9px;font-size:12px;color:#273f63;overflow-wrap:anywhere;}

@media(min-width:761px){#mobileHarvestStats,#mobileHarvestToolbar,#mobileHandoffBoard,#mobileHandoffToolbar,#scanContinuousControl{display:none!important;}}

@media(max-width:760px){
  .mobile-status-dot.warn{background:#f2a037;box-shadow:0 0 0 3px #fff0dc;}
  .mobile-handoff-load-more{width:100%;min-height:44px;background:#edf5ff;color:#2868b9;border:1px solid #cee2ff;border-radius:12px;font-size:12px;font-weight:600;}
}

/* Approved mobile-full-20261012 design: one shared skin over existing business views. */
@media(max-width:760px){
  :root{--bg:#f2f6fd;--card:#fff;--text:#22324d;--muted:#6a7f9b;--border:#e1eaf7;--soft:#edf3fb;--blue:#216ef6;--color-canvas:#f2f6fd;--color-surface:#fff;--color-surface-subtle:#edf3fb;--color-text-primary:#22324d;--color-text-secondary:#6a7f9b;--color-border:#e1eaf7}
  body{background:linear-gradient(#fbfdff,#f2f6fd 260px);background-attachment:fixed}
  .topbar h1{font-size:24px;font-weight:750;color:#172746}
  .topbar .btn{border-radius:12px;color:var(--blue)}
  .topbar .sync{background:#edf5ff;border:1px solid #e1eaf7;border-radius:8px;color:#526d90}
  .section-card{border-color:#e3ebf7;border-radius:12px;padding:10px;margin-bottom:8px;box-shadow:0 2px 8px #17315408}
  .section-card>.section-head,.section-card>.section-title,.section-card>.product-profile-head{background:transparent;border:0;margin:0 0 6px;padding:0;min-height:36px;border-radius:0}
  .page .btn,dialog .btn,.page summary.btn{border-radius:10px}
  .page input:not([type=checkbox]):not([type=radio]),.page select,.page textarea{border-radius:10px;background:#edf3fb;border-color:#e1eaf7;font-size:13px}
  .page strong,.page b{font-weight:650}
  .page .meta{font-size:11px;line-height:16px;color:#7185a0}
  .page .badge,.page .quantity-chip{font-size:11px;border-radius:7px}
  .page .stats{gap:6px;background:transparent;border:0;padding:0}
  .page .stats>.stat{background:#edf4fd;border:1px solid #e3ebf7;border-radius:12px;padding:7px 3px;min-height:58px;min-width:0;flex-basis:20%}
  .page .stats>.stat+.stat{border-left:1px solid #e3ebf7}
  .page .stats>.stat>b{font-size:20px;color:#2169db}
  .page .stats>.stat>span{font-size:10px}
  .page .review-row{border-color:#edf2f8;min-height:52px}
  .page .review-row strong{font-size:13px}
  .bottom-nav{background:#fff;border-color:#e8eff9;box-shadow:0 -3px 12px #24619a0a}
  .bottom-nav button{border-radius:10px;color:#6f83a1}
  .bottom-nav button.active{color:#216ef6;background:#edf5ff}
  #homeTiles{border:0;background:transparent;gap:6px;overflow:visible}
  #homeTiles .home-tile{border:1px solid #e3ebf7;border-radius:12px;background:#edf4fd;min-height:60px;padding:6px}
  #homeTiles .home-tile-more{border-radius:10px;background:#edf4fd}
  #homeTiles .home-tile b{font-size:21px;color:#2169db}
  #homeTiles .home-tile span{font-size:10px;font-weight:600}
  #homeInbox .inbox-group{border-radius:12px;background:#fff;border:1px solid #e3ebf7;margin-bottom:8px;overflow:hidden}
  #homeInbox .inbox-group-head{background:transparent}
  #equipmentList,#taskList{border-radius:12px;background:#fff;border:1px solid #e3ebf7;overflow:hidden}
  #equipmentList .equipment-item,#taskList .task{border-color:#edf2f8}
  .product-row,.product-part-row{border-color:#edf2f8}
  #productCatalogList .product-item{border-radius:12px;border:1px solid #e3ebf7;margin-bottom:8px}
  .product-part-button{border-radius:8px;background:#f2f7fd}
  .product-row-menu[open]>.product-menu-items,.responsive-controls-fold[open]>.responsive-controls-body{border-color:#e1eaf7;border-radius:12px;padding:8px;box-shadow:0 8px 26px #18385f20}
  .dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:16px;border:1px solid #dfe9f7}
  .dialog-card{padding:14px}
  .dialog-head{gap:8px}
  .dialog-head h2{font-size:18px;font-weight:700}
  .dialog-head>button{min-width:44px;min-height:44px;border-radius:10px;background:#edf4fd}
  .mobile-more-grid{gap:8px}
  .mobile-more-grid>.btn{border-color:#e3ebf7;border-radius:12px;min-height:64px;background:#f3f8fe;color:#315479;font-size:13px}
  .login-card{border-radius:18px;border-color:#e3ebf7;box-shadow:0 8px 30px #17315412;padding:20px}
  .login-card input{min-height:44px;border-radius:10px;border-color:#dce7f7;background:#f3f8fe}
  .login-card .btn{min-height:44px;border-radius:10px}
  .scan-camera-panel{border-radius:12px;overflow:hidden;background:#162a45;min-height:180px}
  .scan-camera-panel video{max-height:220px}
  .scan-result{background:#edf5ff;border-color:#dceaff;border-radius:10px}
  .scan-camera-controls,.scan-manual-label{min-width:0}
  .scan-camera-controls .btn,.scan-manual-label input{min-height:44px}
  .scan-dialog-card .dialog-actions{flex-wrap:wrap;gap:6px}
  .scan-dialog-card .dialog-actions .btn{flex:1 1 40%;white-space:normal}
  .mobile-inventory-group{background:#fff;border:1px solid #e3ebf7;border-radius:12px;margin-bottom:8px;overflow:hidden}
  .mobile-inventory-group>summary{display:flex;align-items:center;gap:8px;padding:8px;list-style:none;min-height:54px}
  .mobile-inventory-group>summary strong{font-size:14px;flex:1;min-width:0;overflow-wrap:anywhere}
  .mobile-inventory-group>summary small{font-size:10px;color:#7185a0;white-space:nowrap}
  .mobile-inventory-group>summary::-webkit-details-marker{display:none}
  .mobile-inventory-parts{padding:0 10px}
  .mobile-inventory-part{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:54px;padding:8px 0;border-top:1px solid #edf2f8}
  .mobile-inventory-part>div{display:grid;gap:3px;min-width:0;flex:1}
  .mobile-inventory-part strong{font-size:12px}
  .mobile-inventory-part small{font-size:10px;color:#7185a0;overflow-wrap:anywhere}
  .mobile-inventory-part>b{font-size:12px;color:#09865f;text-align:right;max-width:50%;overflow-wrap:anywhere}
  .mobile-inventory-part.archived{color:#c6484d}
  .handwork-part-card{border-radius:10px;border-color:#e3ebf7;background:#f2f7fd}
  .handwork-part-quantities b{font-size:12px;overflow-wrap:anywhere}
  .handwork-side-processing{padding:8px;border:1px solid #e3ebf7;border-radius:10px;background:#f3f8fe;margin-bottom:8px}
  .handwork-side-processing>strong{font-size:12px;display:block;margin-bottom:8px}
  .handwork-side-processing .handwork-processing-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .handwork-side-processing input{width:100%}
  .mobile-part-tile:has(.mobile-part-selected){padding-bottom:22px!important}
  .mobile-part-selected{top:auto;bottom:2px;left:4px;right:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-part-qty{white-space:normal;font-size:12px;line-height:16px;overflow-wrap:anywhere}
  .mobile-harvest-check{min-width:36px;min-height:44px}
  .mobile-harvest-line{grid-template-columns:36px minmax(0,1fr) auto auto}
  .mobile-inline-action{min-height:44px!important}
  .mobile-machine-head{min-height:48px}
  .toast{top:auto;bottom:calc(140px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px)}
  #homePage{padding-bottom:150px}
  .mobile-home-scan{position:fixed;right:16px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:29;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:76px;height:76px;border:0;border-radius:17px;padding:8px;background:#236ff4;color:#fff;box-shadow:0 5px 16px #236ff43d}
  .mobile-home-scan>span{font-size:29px;line-height:1}
  .mobile-home-scan>strong{font-size:12px;white-space:nowrap}
  body:has(dialog[open]) .mobile-home-scan{visibility:hidden}
}
@media(min-width:761px){.mobile-home-scan{display:none!important}}

#mobileHandworkStockBoard,#mobileHandworkStockBar,#mobileFinishedBoard,#mobilePrintStockBoard{display:none}
.mobile-top-more,#mobilePersonalHistoryBtn{display:none}
.mobile-capacity-progress{display:none}
.mobile-production-stats{display:none}
@media(max-width:760px){
  .topbar{padding-right:0;position:relative}
  .mobile-top-more{display:block;position:static;flex:0 0 40px;min-width:40px;min-height:44px;padding:8px;line-height:1;border:1px solid #e3ebf7;border-radius:10px;background:#fff;color:#216ef6;font-size:20px}
  .topbar .sync{max-width:74px}
  #mobileHandworkStockBoard,#mobileFinishedBoard,#mobilePrintStockBoard{display:block;min-width:0}
  #inventoryPage>.section-card,#inventoryPage>.settings-fold,#inventoryPage>.page-help{display:none}
  #mobileHandworkStockBar{display:flex}
  #handwork_inventoryPage{padding-bottom:80px}
  #handwork_inventoryPage>.handwork-inventory-toolbar{display:none}
  #externalMaterialInventorySection{display:none}
  #handwork_inventoryPage.mobile-stock-external #externalMaterialInventorySection{display:block}
  #handwork_inventoryPage .handwork-inventory-workspace,#handwork_inventoryPage .handwork-inventory-main{display:contents}
  #handwork_inventoryPage .handwork-product-pane,#handworkInventoryProductSummary,#handwork_inventoryPage .handwork-part-toolbar,#handworkInventoryPartCards,#handworkInventoryDetail{display:none}
  #handwork_inventoryPage.mobile-stock-editing #handworkInventoryDetail{display:block;margin-top:8px}
  #handwork_inventoryPage.mobile-stock-editing #mobileHandworkStockBoard{display:none}
  #handwork_inventoryPage>.page-help{display:none}
  #mobileHandworkStockBar{flex-wrap:wrap}
  #mobileHandworkStockBar>small{flex:1 1 100%;max-width:none;white-space:normal;overflow:visible;line-height:16px;min-height:16px;font-size:11px}
  #handwork_inventoryPage{padding-bottom:116px}
  #finished_goodsPage>.section-card,#finished_goodsPage>.settings-fold,#finished_goodsPage>.page-help{display:none}
  #finished_goodsPage.mobile-finished-details>.settings-fold{display:block}
  .mobile-record-tabs{display:flex;gap:6px;padding:4px;background:#edf3fb;border-radius:12px;margin-bottom:8px}
  .mobile-record-tabs>button{flex:1;min-width:0;min-height:44px;border:0;border-radius:9px;background:transparent;color:#637998;font-size:12px}
  .mobile-record-tabs>button.active{background:#216ef6;color:#fff}
  .mobile-stock-part{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:58px;padding:8px 0;text-align:left;border:0;border-top:1px solid #edf2f8;background:#fff;color:#22324d}
  .mobile-stock-part>span{min-width:0;display:grid;gap:4px}
  .mobile-stock-part strong{font-size:12px}
  .mobile-stock-part small{font-size:10px;color:#7185a0;overflow-wrap:anywhere}
  .mobile-stock-part.selected{background:#f1f7ff}
  .mobile-stock-side-note{text-align:right;max-width:43%}
  .mobile-stock-side-note b{font-size:10px;overflow-wrap:anywhere}
  .mobile-stock-side-note .confirmed{color:#09865f}
  .mobile-stock-side-note .pending,.mobile-inventory-part .pending{color:#c8771a}
  .mobile-stock-history{display:flex;align-items:center;gap:8px;background:#fff;padding:10px;border:1px solid #e3ebf7;border-radius:12px;margin-bottom:8px}
  .mobile-stock-history>div{flex:1;min-width:0}
  .mobile-stock-history strong{font-size:12px;overflow-wrap:anywhere}
  .mobile-stock-history small{display:block;font-size:10px;color:#7185a0;margin-top:4px;overflow-wrap:anywhere}
  .mobile-record-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
  .mobile-record-actions select{flex:1;min-width:0;width:0}
  .mobile-finished-progress{border:1px solid #d7ebdf;border-radius:12px;padding:12px;background:#fff;margin-bottom:8px;box-shadow:inset 3px 0 #24bd8d}
  .mobile-finished-progress>small{display:block;font-size:11px;color:#7185a0}
  .mobile-finished-progress>strong{display:block;font-size:20px;margin:5px 0 12px}
  .mobile-progress{height:6px;background:#e5edf7;border-radius:6px;overflow:hidden}
  .mobile-progress>span{display:block;height:100%;background:#25c394;border-radius:6px}
  .mobile-progress-caption{display:flex;justify-content:space-between;font-size:10px;color:#7185a0;padding:8px 0}
  .mobile-record-section-head{display:flex;align-items:center;justify-content:space-between;margin:6px 0;gap:8px;min-height:36px}
  .mobile-record-section-head strong{font-size:13px}
  .mobile-record-list{border:1px solid #e3ebf7;border-radius:12px;background:#fff;padding:0 10px;margin-bottom:8px}
  .mobile-record-list>.mobile-inventory-part:first-child{border-top:0}
  .mobile-record-list>.meta{padding:8px}
  .mobile-record-options{background:#fff;border:1px solid #e3ebf7;border-radius:12px;padding:0 10px;margin:8px 0}
  .mobile-record-options>summary{min-height:44px;font-size:12px;color:#526d90}
  .mobile-record-options .mobile-record-actions{padding:8px 0}
  .page .btn.primary{background:#216ef6;color:#fff;border-color:#216ef6}
  #taskSummary{display:none}
  #mobileTaskBoard{display:block}
  #tasksPage>.task-commandbar{display:none}
  #mobileTaskHeader{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
  #mobileTaskHeader select{width:100%;font-size:12px}
  #mobileTaskHeader #taskCreateMenu>summary{min-height:44px}
  #mobileTaskSearchWrap input{flex:1;border:0;background:transparent;min-width:0;padding:0}
  #tasksPage>#taskSettingsMenu{margin-top:8px;display:block}
  #taskList .task-card{min-height:60px}
  #eqSummary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:10px;order:-1}
  .mobile-equipment-record{display:flex!important;align-items:center;gap:8px;min-height:64px}
  .mobile-equipment-record .eq-row-main{flex:1;min-width:0}
  .mobile-equipment-record .eq-title-line h3{font-size:13px}
  #equipmentPage .equipment-commandbar{display:flex;flex-direction:column}
  #equipmentPage #equipmentManagement{margin-top:8px}
  #productStatus,#capacityStatus{font-size:10px;line-height:15px}
  #capacityPage>#capacityStatus:empty{display:none}
  #supStats .stat{flex-basis:calc(25% - 6px)}
  #supStats .stat:last-child{flex:1 1 100%;display:flex;align-items:center;justify-content:space-between;min-height:36px;padding:5px 10px}
  #bambuStats .stat:first-child,#bambuStats .stat:last-child{flex:1 1 calc(50% - 6px)}
  #bambuStats .stat:first-child b,#bambuStats .stat:last-child b{font-size:12px}
  #qrPage .qr-top-actions,#circulationLabelSection>summary,#circulationLabelSection>p{display:none}
  #qrPage:not(.mobile-qr-label) #circulationLabelSection,#qrPage:not(.mobile-qr-box) #mobileQrBoxSection,#qrPage:not(.mobile-qr-machine) #mobileQrMachineSection{display:none}
  #qrPage .local-label-print-panel{margin:0;border:0;background:transparent}
  #qrPage>.page-commandbar{margin:0}
  #qrPage #qrStatus{font-size:10px;margin:0 0 8px}
  #capacityFacts .capacity-facts-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  #capacityFacts .capacity-fact{padding:8px 4px;border:1px solid #e3ebf7;border-radius:10px;background:#edf4fd;text-align:center}
  #capacityFacts .capacity-fact b{font-size:15px;line-height:20px}
  #capacityFacts .capacity-fact span{font-size:10px;line-height:14px}
  .mobile-print-reference{font-size:10px!important;max-width:30%!important;line-height:16px}
  .mobile-capacity-progress{display:block;background:#fff;border:1px solid #e3ebf7;border-radius:12px;padding:10px;margin-bottom:8px}
  .mobile-production-stats{display:grid}
  .mobile-capacity-progress:empty{display:none}
  .profile-fold-summary::before{content:'›';display:inline-block;width:12px;flex-shrink:0;font-size:20px;color:#7185a0;line-height:20px}
  details[open]>.profile-fold-summary::before{transform:rotate(90deg)}
  .profile-fold-summary{cursor:pointer}
}
@media(max-width:360px){.topbar .sync{display:none}}

.assignment-change-notice{display:grid;gap:4px;border-left:3px solid #c6484d;background:#fff0ee;color:#b33439;padding:8px;margin-top:8px;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.assignment-change-notice strong{font-size:12px;font-weight:700}
.assignment-change-notice.unknown{border-color:#d49330;background:#fff4e9;color:#a76914}
.mobile-harvest-line>.assignment-change-notice{grid-column:2/-1;font-size:10px;margin-top:0;padding:5px 7px;gap:2px}
.mobile-harvest-line>.assignment-change-notice strong{font-size:11px}
.mobile-ops-review-rows>.assignment-change-notice.changed{background:#fff0ee;color:#b33439;border-radius:8px}
.mobile-ops-review-rows>.assignment-change-notice.unknown{background:#fff4e9;color:#a76914;border-radius:8px}
.mobile-harvest-line>.assignment-change-notice.unknown span{display:none}
.freshness-status{font-size:11px;color:#a76914;background:#fff4e9;border-radius:8px;padding:4px 8px;margin-bottom:8px}

#mobileSupervisorBoard{display:none}
@media(max-width:760px){#mobileSupervisorBoard{display:block}#mobileSupervisorBoard h3{font-size:15px;margin:16px 0 10px}.mobile-supervisor-attention{border:0;border-bottom:1px solid #edf1f7;background:white;display:grid;grid-template-columns:32px 1fr auto;gap:8px;width:100%;padding:12px;text-align:left;color:#20314c}.mobile-supervisor-attention:last-child{border-bottom:0}.mobile-supervisor-attention strong,.mobile-supervisor-attention small{display:block;line-height:18px}.mobile-supervisor-attention small{font-size:10px;color:#8295b1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}.mobile-supervisor-attention b{font-size:11px;color:#c24c4c}.mobile-supervisor-mark{background:#fff0ee;border-radius:9px;padding:7px;text-align:center;color:#c24c4c}.mobile-supervisor-departments{background:white;border:1px solid #e3ebf7;border-radius:12px;padding:12px}.mobile-department-progress{display:grid;grid-template-columns:48px 1fr 58px;gap:9px;align-items:center;min-height:32px;font-size:12px}.mobile-department-progress small{text-align:right;color:#748aaa}.mobile-department-progress .mobile-progress{margin:0}.mobile-department-progress .mobile-progress span{background:#12b995}#supervisorPage:not(.mobile-supervisor-expanded) #activityList>.activity:nth-child(n+6){display:none}#supervisorPage #supStats>.stat:nth-child(2){background:#e7f7ef;color:#089775}#supervisorPage #supStats>.stat:nth-child(3){background:#fff2e5;color:#c48421}#supervisorPage #supStats>.stat:nth-child(4){background:#ffefed;color:#c6484d}}

@media(max-width:760px){#mobileSupervisorAll{border:0;background:transparent;color:#216ef6;font-size:12px;padding:0;min-height:32px;cursor:pointer}}

.mobile-picker-dialog{padding:0;border:0;border-radius:18px;width:min(600px,calc(100vw - 20px));height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);background:#f3f7fe;color:#243952;overflow:hidden}
.mobile-picker-dialog[open]{display:flex;flex-direction:column}
.mobile-picker-dialog::backdrop{background:#18365f80}
.inventory-formal-file{font-size:11px;color:#6c83a2;max-width:100%;overflow-wrap:anywhere}.inventory-formal-file>summary{cursor:pointer;line-height:19px}.inventory-formal-file>small{display:block;overflow-wrap:anywhere}
.mobile-picker-head{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 8px;background:white;flex-shrink:0}
.mobile-picker-head h3{font-size:17px;margin:0}.mobile-picker-head button{border:0;background:transparent;font-size:24px;color:#637b99;width:38px;height:38px}
#mobilePartPickerSearch{margin:9px 12px;width:calc(100% - 24px);min-height:42px;border:1px solid #dce7f6;border-radius:11px;background:white;padding:9px;font-size:13px;flex-shrink:0}
#mobilePartPickerStatus{padding:0 12px;color:#a86921;font-size:12px;flex-shrink:0}
.mobile-picker-products{overflow:auto;min-height:0;flex:1;padding:0 12px 12px;overscroll-behavior:contain}
.mobile-picker-product{margin:8px 0;border:1px solid #dfe9f7;border-radius:13px;background:white;padding:10px}
.mobile-picker-product>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer}.mobile-picker-product>summary strong{flex:1;font-size:14px;overflow-wrap:anywhere}.mobile-picker-product>summary::-webkit-details-marker{display:none}
.mobile-picker-parts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}
.mobile-picker-part{display:flex;flex-direction:column;gap:5px;padding:8px 6px;border:1px solid #e0e9f7;border-radius:10px;background:#f4f8ff;min-width:0}.mobile-picker-part.selected{background:#eaf3ff;border-color:#85b1fa}
.mobile-picker-part>span{display:flex;align-items:flex-start;gap:3px;font-size:11px;line-height:16px}.mobile-picker-part>span input{width:15px;height:15px;flex-shrink:0;margin:0}.mobile-picker-part strong{overflow-wrap:anywhere}.mobile-picker-part small{font-size:10px;color:#6881a2;overflow-wrap:anywhere}.mobile-picker-part>input{min-width:0;width:100%;height:36px;background:white;border:1px solid #d4e2f6;border-radius:7px;padding:6px;font-size:13px}
.mobile-picker-footer{flex-shrink:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce7f7}.mobile-picker-footer>div:first-child{font-size:11px;color:#50739d;max-height:64px;overflow:auto;margin-bottom:8px;overflow-wrap:anywhere}.mobile-picker-footer>div:last-child{display:flex;gap:8px}.mobile-picker-footer button{flex:1;min-height:44px;border:0;border-radius:10px;background:#edf4ff;color:#476991}.mobile-picker-footer button.primary{background:#236ff4;color:#fff}
.mobile-picker-parts{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.mobile-picker-variant{display:grid;grid-template-columns:16px minmax(24px,1fr) minmax(40px,58px);gap:3px;align-items:center;font-size:11px;margin:0;min-height:38px}.mobile-picker-variant>span{white-space:nowrap;min-width:24px}.mobile-picker-variant>input[type="checkbox"]{width:16px;height:16px;margin:0}.mobile-picker-variant>input[type="number"]{width:100%;min-width:0;min-height:34px;border:1px solid #d4e2f6;border-radius:7px;background:#fff;padding:5px;font-size:13px}.mobile-picker-part>strong{font-size:12px;line-height:17px;min-height:17px}
.mobile-handoff-tools{display:flex;justify-content:flex-end;gap:8px;margin-bottom:8px}.mobile-handoff-tools button{border:0;background:transparent;color:#286bbd;padding:5px 2px;font-size:12px;min-height:32px}
.mobile-handoff-demand{font-size:11px;color:#6881a2;margin:0 0 8px}.mobile-handoff-demand>summary{cursor:pointer;min-height:28px}.mobile-handoff-demand select{width:100%;min-height:42px;border:1px solid #dce7f6;border-radius:10px;background:white;padding:7px;font-size:12px}
.mobile-handoff-history-tabs{display:flex;gap:5px;padding:10px;background:#fff;flex-shrink:0}.mobile-handoff-history-tabs button{flex:1;border:0;border-radius:9px;font-size:12px;padding:9px 4px;background:#edf4ff;color:#557297}.mobile-handoff-history-tabs button.active{background:#236ff4;color:white}
.mobile-handoff-history-content{overflow:auto;min-height:0;flex:1;padding:12px}.mobile-handoff-history-content .review-row{background:#fff;padding:10px;border-radius:10px;font-size:12px;margin-bottom:8px}
@media(max-width:760px){.mobile-ops-bar{background:#fff;backdrop-filter:none}#handworkPage{padding-bottom:calc(200px + env(safe-area-inset-bottom))}}
@media(max-width:760px){#departmentDemandDialog .department-add-area{display:flex;gap:8px;min-height:0;padding:8px 0}#departmentPicker{display:none}#departmentAdd{flex:1;font-size:0}#departmentAdd::after{content:'选择产品与部件';font-size:13px}#departmentCamera{flex:0 0 auto}#departmentDemandDialog fieldset{min-height:0}}
@media(max-width:760px){
  #harvestDialog{padding:0;width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:18px;overflow:auto}
  #harvestDialog .mobile-harvest-form{padding:14px;gap:10px}
  #harvestDialog .dialog-head h2{font-size:19px}#harvestDialog .dialog-head p{margin:4px 0;font-size:12px}
  #harvestDialog .harvest-name-snapshot{padding:10px 12px;font-size:14px;margin:0;background:#f2f7ff;border-color:#e0eaf9}
  #harvestNameSnapshot strong{font-size:16px}#harvestQuantitySnapshot{display:grid;gap:4px}#harvestQuantitySnapshot>span{font-size:12px;color:#617d9e}.mobile-harvest-main-qty{font-size:23px;color:#109b68}
  #harvestDialog .scan-inline-panel{padding:10px;background:#fff;border:1px solid #e0eaf9;border-radius:12px}#harvestDialog .scan-inline-controls{display:grid;grid-template-columns:1fr auto;gap:7px}#harvestScanLabelBtn{grid-column:1/-1;grid-row:1;min-height:48px}#harvestLabelRef{min-width:0;min-height:40px}#harvestLabelContext{font-size:11px;margin-top:6px}
  #mobileHarvestReview,#mobileHarvestOther{border-bottom:1px solid #e5edf8;padding:7px 2px}#mobileHarvestReview>summary,#mobileHarvestOther>summary{font-size:12px;color:#527297;min-height:32px;cursor:pointer}.mobile-harvest-details-body{display:grid;gap:10px;padding:5px 0 10px}.mobile-harvest-details-body label{font-size:12px}.mobile-harvest-details-body .meta{font-size:10px}
  #harvestDialog .dialog-actions{position:sticky;bottom:-14px;background:#fff;padding:10px 0 8px;margin-top:4px;display:flex;gap:8px;z-index:2}#harvestDialog .dialog-actions button{flex:1;min-height:46px;font-size:14px}
  #harvestWarning{font-size:12px;padding:8px}#harvestQuantitySnapshot .assignment-change-notice{font-size:11px;padding:7px;margin-top:4px}.assignment-change-notice details span{display:block;margin-top:5px}.assignment-change-notice details>summary{cursor:pointer;font-size:11px}
  .mobile-harvest-recovery{width:100%;min-height:44px;border:1px solid #f3d8af;border-radius:10px;background:#fff4e9;color:#9e671f;padding:8px;font-size:12px;margin:0 0 10px;text-align:left}
  #harvestScanLabelBtn,#harvestConfirmBtn{background:#236ff4;border-color:#236ff4}
  #mobileHarvestBagManual{grid-column:1/-1;font-size:11px;color:#6380a2}#mobileHarvestBagManual>summary{min-height:30px;padding-top:7px;cursor:pointer}#mobileHarvestBagManual>div{display:flex;gap:7px}#mobileHarvestBagManual input{flex:1;width:0}
  #mobileHarvestBagPanel.bag-selected .scan-inline-controls{display:none}#mobileHarvestBagPanel.bag-selected #harvestLabelContext{display:flex;align-items:center;gap:5px;margin:0}#mobileHarvestBagChange{margin-left:auto;min-height:32px!important;border:0!important;background:transparent!important;color:#236ff4!important;font-size:12px}
  .mobile-harvest-outcome{font-size:12px;color:#426488;background:#edf5ff;border-radius:8px;padding:8px;line-height:19px}
  .mobile-harvest-fact-warning{font-size:11px;color:#b63c41;background:#fff1ef;padding:7px;border-radius:8px}.mobile-harvest-fact-warning details{margin-top:3px}.mobile-harvest-fact-warning details>summary{cursor:pointer}.mobile-harvest-fact-warning details span{display:block;overflow-wrap:anywhere;margin-top:4px}
}
@media(max-width:760px){
  .mobile-personal-history-legacy{display:none!important}#mobileHarvestManagementDialog .mobile-personal-history-legacy{display:block!important;margin:0;background:#fff}
  .mobile-history-management-body{flex:1;min-height:0;overflow:auto;padding:10px}#mobilePersonalHistoryBtn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:22px;padding:8px;margin:0 0 8px}
  .mobile-history-filters{background:#fff;display:flex;gap:7px;flex-wrap:wrap;padding:9px 12px;flex-shrink:0}.mobile-history-filters>label{font-size:12px;display:flex;align-items:center;gap:4px}.mobile-history-filters input{min-height:36px;border:1px solid #dce7f6;border-radius:8px;background:#f4f8ff;padding:6px;font-size:12px;min-width:0}.mobile-history-filters input[type=number]{width:58px}.mobile-history-filters>button{border:0;border-radius:9px;font-size:12px;padding:7px 10px;color:#2269c2;background:#edf4ff;min-height:38px}#mobileHistoryExport{background:#236ff4;color:#fff;margin-left:auto}.mobile-history-filters>input{width:100%}.mobile-history-filters details{width:100%;font-size:11px;color:#6c83a2}.mobile-history-filters details>summary{min-height:25px;cursor:pointer}.mobile-history-filters details>label{display:flex;gap:5px;align-items:center;margin:5px 0}.mobile-history-filters details input{width:100%}
  #mobileHistoryRange,#mobileHistoryStatus{font-size:11px;color:#667f9e;padding:4px 12px;flex-shrink:0;line-height:17px}#mobileHistoryStatus{color:#a87024}#mobileHistoryDownloads{display:flex;flex-wrap:wrap;gap:7px;padding:0 12px;max-height:65px;overflow:auto}#mobileHistoryDownloads a{font-size:11px;color:#246bc7;padding:5px}
  #mobileHistoryProducts{overflow:auto;flex:1;min-height:0;padding:0 12px 12px}.mobile-history-product{background:#fff;border:1px solid #e1eafa;border-radius:13px;padding:10px;margin:8px 0}.mobile-history-product>.mobile-product-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}.mobile-history-product>.mobile-product-head>strong{flex:1;font-size:14px;overflow-wrap:anywhere}.mobile-history-product>.mobile-product-head>small{font-size:10px;color:#7b90ad}.mobile-history-parts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:start}.mobile-history-parts>details{border:1px solid #e1eafa;border-radius:10px;background:#f5f9ff;min-width:0}.mobile-history-parts>details>summary{display:grid;gap:4px;padding:8px;list-style:none;cursor:pointer}.mobile-history-parts>details>summary::-webkit-details-marker{display:none}.mobile-history-parts>details>summary strong{font-size:12px;overflow-wrap:anywhere}.mobile-history-parts>details>summary span{font-size:11px;line-height:17px;overflow-wrap:anywhere}.mobile-history-parts small{font-size:10px;color:#7b8eaa;overflow-wrap:anywhere}.mobile-history-good{color:#06966b}.mobile-history-loss{color:#bd5259!important}.mobile-history-parts>details[open]{grid-column:1/-1}.mobile-history-details{padding:0 8px 8px;display:grid;gap:6px}.mobile-history-details article{background:#fff;border:1px solid #e0eafa;border-radius:8px;padding:8px;font-size:11px;line-height:18px}.mobile-history-details article>div:first-child{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap}.mobile-history-details article>div{overflow-wrap:anywhere}.mobile-history-row-actions{display:flex;gap:7px;justify-content:flex-end}.mobile-history-row-actions button{border:0;background:#edf5ff;color:#2766ba;border-radius:8px;font-size:11px;padding:6px;min-height:32px}
  .mobile-history-management{padding:9px 12px;background:#fff;border-top:1px solid #e1eafa;flex-shrink:0}.mobile-history-management>button{width:100%;min-height:36px;border:0;background:transparent;color:#587a9f;font-size:11px;text-align:right}
}
@media(max-width:760px){
 #mobileHarvestFields{display:grid;gap:12px}#mobileHarvestFields.hidden{display:none}
 #mobileHarvestFields>label{display:grid;gap:5px;font-size:13px;color:#263b56}
 .mobile-harvest-choice{width:100%;display:flex;justify-content:space-between;text-align:left;background:white;border:1px solid #dce6f3;border-radius:9px;min-height:42px;padding:9px 12px;font-size:14px;color:#263b56}.mobile-harvest-choice::after{content:'⌄';color:#6a819d}
 .mobile-harvest-quantity-input{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px}#mobileHarvestFields input[type=number],#mobileHarvestFields select{min-height:42px;width:100%;border:1px solid #dce6f3;border-radius:9px;padding:8px;background:#fff;font-size:15px}
 #mobileHarvestFields .harvest-loss-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#mobileHarvestFields .harvest-loss-grid label{font-size:12px}
 .mobile-harvest-results{display:flex;flex-wrap:wrap;gap:12px;border:0;padding:0;margin:0;min-width:0}.mobile-harvest-results legend{font-size:13px;margin-bottom:8px}.mobile-harvest-results label{display:flex;align-items:center;gap:5px;font-size:13px}.mobile-harvest-results input{width:17px;height:17px;margin:0;accent-color:#236ff4}
 #harvestLossQtyWrap{background:#fff4f3;border-radius:10px;padding:10px}#mobileHarvestOutcome{font-size:12px;color:#527297;line-height:1.6;padding:0 2px}
 .mobile-harvest-recognition{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.mobile-harvest-recognition button{border:1px solid #dce6f3;background:#fff;color:#527297;border-radius:7px;padding:4px 9px;font-size:11px}#harvestNameSnapshot{overflow-wrap:anywhere;line-height:1.6}.mobile-harvest-tag{display:inline-block;margin:7px 7px 0 0;padding:2px 9px;border-radius:8px;background:#e8f2ff;color:#236ff4;font-size:11px}.mobile-harvest-tag.ok{background:#ddf7e9;color:#139662}.mobile-harvest-tag.warning{background:#fff0d7;color:#a8651c}
 .mobile-harvest-success{font-size:23px;font-weight:700;color:#0b9e70;text-align:center;padding:22px 0}.mobile-harvest-receipt dl{display:grid;grid-template-columns:90px 1fr;gap:12px;padding:16px;border:1px solid #e0eaf9;border-radius:12px;background:#f5f9ff;font-size:13px}.mobile-harvest-receipt dt{color:#527297}.mobile-harvest-receipt dd{margin:0;overflow-wrap:anywhere}.mobile-harvest-info{background:#eaf3ff;color:#3264a4;padding:12px;border-radius:10px;line-height:1.7;font-size:12px}
 #mobileHarvestFile{overflow-wrap:anywhere;font-size:12px;color:#527297}#harvestDialog .dialog-actions{flex-wrap:wrap}#mobileHarvestLater{flex-basis:100% !important;order:3}#harvestWarning:empty{display:none}
 #mobilePartPickerDialog input[type=radio]{width:17px;height:17px;accent-color:#236ff4}.mobile-picker-variant:has(input[type=radio]){grid-template-columns:20px 1fr}
}
@media(max-width:760px){
 #harvestDialog #mobileHarvestFields>label{grid-template-columns:minmax(0,1fr);width:100%;margin:0;min-height:0;justify-items:stretch}
 #harvestDialog .mobile-harvest-quantity-input{width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 90px}
 #harvestDialog #mobileHarvestFields input[type=number]{min-width:0}
 #harvestDialog #harvestNameSnapshot{display:block}
 #harvestDialog .mobile-harvest-results label{margin:0;min-height:32px}
 #harvestDialog #mobileHarvestFields .harvest-loss-grid label{margin:0;min-width:0}
}

.assignment-change-notice.next-round{border-color:#0d9488;background:#e6f5f2;color:#17655f;border-radius:6px;padding:10px 12px;gap:8px}.assignment-change-notice.next-round strong{font-size:14px}.assignment-change-notice.next-round a{justify-self:start;color:#17655f;max-width:100%;white-space:normal}

/* Mobile dialogs: dismissal/back on the left, confirmation/continuation on the right. */
@media(max-width:760px){
  :is(.dialog-actions,.mobile-ops-dialog-actions)>button[value="cancel"]{order:-1}
  :is(.dialog-actions,.mobile-ops-dialog-actions)>:is(button.primary,button.danger),
  .dialog-actions>#confirmOk,.mobile-picker-footer>div:last-child>button.primary{order:1}
}
