.settings-gear{flex:0 0 42px;width:42px;height:42px;border:0;border-radius:50%;background:#f5f8fb;color:#60778c;display:grid;place-items:center;box-shadow:0 2px 8px #27486608}.settings-gear svg{width:23px;height:23px}.top{gap:10px}.extra-dialog{z-index:160}.extra-dialog::backdrop{background:#283e563d;backdrop-filter:blur(5px)}.crop-stage{height:min(44vh,380px);background:#f3f6f9;border-radius:22px;overflow:hidden}.crop-stage>img{display:block;max-width:100%}.cropper-view-box,.cropper-face{border-radius:3px}.editor-tools{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.editor-tools button,.date-candidates button{border:0;background:#edf5fd;color:#2770ac;border-radius:30px;padding:10px 15px;font:inherit}.extra-dialog input[type=range]{width:100%;accent-color:#5a9fe0;margin:12px 0 20px}.ocr-photo{display:block;width:100%;max-height:240px;object-fit:contain;border-radius:18px;background:#f6f8fa}.ocr-progress{padding:24px 0}.ocr-progress progress{display:block;width:100%;height:7px;margin-top:18px;accent-color:#69a8e3}.ocr-text{white-space:pre-wrap;overflow-wrap:anywhere;background:#f6f8fa;border-radius:16px;padding:14px;font:13px/1.6 ui-monospace,monospace}.date-candidates{margin:20px 0}.date-candidates>div{display:flex;align-items:center;gap:8px;margin:10px 0;flex-wrap:wrap}.date-candidates button{font-size:12px}.confirm-line{display:flex!important;align-items:center;gap:12px;margin:22px 0!important;line-height:1.5}.confirm-line input{width:20px;height:20px;accent-color:#529ce0}.settings-intro{font-size:23px;color:#8796a3;margin-bottom:30px}.settings-row{display:flex;width:100%;justify-content:space-between;align-items:center;border:0;background:#f6f9fc;text-align:left;padding:22px;border-radius:23px;margin-bottom:12px;font:inherit;color:#354b5c}.settings-row b{display:block;font-weight:600;font-size:18px}.settings-row small{display:block;margin-top:7px;color:#81909d}.settings-row>span:last-child{font-size:26px}.settings-note{font-size:13px;color:#84939f;line-height:1.7;margin:25px 12px}.reset-row{background:#fff7f6}.reset-row b{color:#bd7772}.reset-confirm{background:#ae5e5a!important}.family-row{display:grid;grid-template-columns:minmax(80px,1fr) minmax(105px,.8fr) 30px;gap:8px;align-items:center;margin:12px 0}.remove-small{border:0;background:transparent;color:#9aabb9;border-radius:50%;font-size:22px;min-height:40px;min-width:30px}.storage-card{background:#f7f9fc;padding:16px;border-radius:24px;margin:16px 0}.storage-name{display:flex;gap:10px;align-items:center;margin-bottom:10px}.storage-name input{font-weight:600}.storage-shelf{display:flex;gap:8px;align-items:center;margin:8px 0}.storage-shelf>span{font-size:12px;color:#a0aebb}.storage-shelf .field{min-width:0}.storage-shelf small{white-space:nowrap;color:#94a2af;font-size:11px}.storage-card .field{background:#fff}.flow-submit:disabled{opacity:.4;cursor:default}@media(max-width:480px){.top .brand{font-size:21px}.top{padding-left:18px;padding-right:18px;gap:8px}.top-tools{gap:6px}.family-row .field{padding-left:10px;padding-right:8px;font-size:14px}.settings-row{padding:19px}.storage-card{padding:12px}}

header .top{align-items:center;gap:14px}header .top .brand{margin-right:auto;min-width:0}.reset-confirm{color:white!important}@media(max-width:480px){header .top{gap:8px}header .top .brand{font-size:20px;letter-spacing:-.6px}.settings-gear{width:40px;flex-basis:40px}}

.flow-header .done-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;padding:0 20px;border:1px solid #dcecf9;border-radius:999px;background:#eaf5ff;color:#2677b3;font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;box-shadow:0 3px 10px #356d9410;cursor:pointer}
.flow-header .done-button:hover{background:#dbedfc}
.move-storage{margin:10px 0!important;border:1px solid #e6eff6!important;border-radius:20px;overflow:hidden;padding:0!important}
.move-storage>summary{display:flex;align-items:center;gap:10px;padding:17px 18px;list-style:none;cursor:pointer;color:#486e88;font-weight:600}
.move-storage>summary::-webkit-details-marker{display:none}
.move-storage>summary small{margin-left:auto;color:#90a2af;font-weight:400}
.move-storage>summary:after{content:'›';font-size:23px;transition:transform .15s}
.move-storage[open]>summary:after{transform:rotate(90deg)}
.move-shelves{padding:0 12px 12px}.move-shelves .place-option{width:100%;margin-top:7px}
.settings-copyright{margin:32px 0 8px;text-align:center;color:#91a0ad;font-size:13px;line-height:1.8}
.settings-copyright a{color:#6d94b1;text-decoration:none}.settings-copyright a:hover{text-decoration:underline}

.product-slot>.item{touch-action:manipulation}

.macro-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.macro-grid .field{width:100%;min-width:0}.macro-grid label{font-size:14px}@media(max-width:380px){.macro-grid{grid-template-columns:1fr}}

.offline-section{border-top:1px solid #e8eff4;padding-top:20px;margin-top:24px}.offline-section h3{font-size:17px;color:#526f85}.offline-section p{font-size:13px;line-height:1.6}#releaseInfo{color:#9aa9b4}

/* Unified mobile modal geometry and OCR suggestion chips. */
.date-candidates{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;max-width:100%;min-width:0;overflow:hidden}
.date-candidates>p{flex:0 0 100%;margin:0 0 4px}
.date-candidates>div{flex:0 0 100%;min-width:0}
.date-candidates button{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.date-candidates button.selected{background:#ddecf8;color:#1b699f;box-shadow:inset 0 0 0 1px #bddcf2}
.flow-header .done-button,.sheet-close{height:44px;min-height:44px;padding:0 18px;border:1px solid #dcecf9;border-radius:999px;background:#eaf5ff;color:#2677b3;font-family:inherit;font-size:14px;font-weight:600;line-height:42px;box-shadow:0 3px 10px #356d9410;white-space:nowrap}
.sheet-close{float:none;width:auto;position:sticky;top:0;z-index:5;margin-left:auto;display:block}
body,button,.app,.flow-dialog,.sheet{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable=true]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
@media(max-width:699px){
  .flow-dialog,.extra-dialog{border-radius:0!important}
  .flow-header{padding-top:calc(14px + env(safe-area-inset-top))!important;padding-left:max(18px,env(safe-area-inset-left))!important;padding-right:max(18px,env(safe-area-inset-right))!important}
  .flow-content{padding-left:max(18px,env(safe-area-inset-left))!important;padding-right:max(18px,env(safe-area-inset-right))!important;padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
  .family-row{grid-template-columns:minmax(0,1fr) minmax(96px,.72fr) 40px}
  .family-row .field{min-width:0;width:100%}
  .storage-card,.settings-row{max-width:100%;overflow:hidden}
}

/* 1.9.3.6 — cancel actions, family nutrition model and unified header controls. */
.flow-header h2{flex:1;min-width:0}
.flow-header-actions{display:flex;align-items:center;gap:8px;flex:none}
.flow-header .cancel-button{display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;padding:0;border:1px solid #e3ebf1;border-radius:50%;background:#fff;color:#7890a2;font:400 26px/1 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 3px 10px #356d9410;cursor:pointer}
.flow-header .cancel-button:hover{background:#f5f9fc;color:#4d7189}
.top-tools .icon-btn,.top-tools .add-main{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border-radius:50%!important;padding:0!important;display:grid!important;place-items:center!important}
.top-tools .icon-btn svg,.top-tools .add-main svg{width:22px;height:22px}
.searchbar .search-cancel{display:grid;place-items:center;width:42px;height:42px;min-width:42px;padding:0!important;border-radius:50%!important;font-size:24px;line-height:1;background:#f7fafc!important;color:#6d879a!important}
.nutrient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:10px 0}.nutrient-grid>div{min-width:0}.nutrient-grid .field{width:100%;min-width:0}
.nutrition-card-more{margin:12px 0 18px!important}.nutrition-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding:12px 0}.nutrition-card-grid span{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#6b8598}.nutrition-card-grid b{color:#48677d;font-weight:600;text-align:right}
.family-row{grid-template-columns:minmax(130px,1.35fr) minmax(110px,.85fr) 90px minmax(120px,1fr) 40px!important;align-items:center}.family-row .field{min-width:0;width:100%}
.energy-family-total{display:flex;justify-content:space-between;gap:16px;align-items:baseline;background:#f3faff;border:1px solid #e4f2fc;border-radius:20px;padding:15px 17px;margin:14px 0}.energy-family-total span{color:#738b9d;font-size:13px}.energy-family-total strong{font-size:18px;color:#3e82ae}
.family-energy-list{display:grid;gap:8px;margin:12px 0}.family-energy-member{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #edf1f4;padding:10px 2px}.family-energy-member span{min-width:0}.family-energy-member b,.family-energy-member small{display:block}.family-energy-member b{font-size:14px;color:#4c6577}.family-energy-member small{font-size:12px;color:#8a9aa6;margin-top:3px}.family-energy-member strong{white-space:nowrap;font-size:13px;color:#5688aa}
.energy-warning{background:#fff8e9;border:1px solid #f3e8c7;border-radius:18px;padding:14px 16px;margin:14px 0}.energy-warning b{color:#927534}.energy-warning p{margin:5px 0 0!important;color:#8c826b!important}
.quality-dashboard{margin-top:24px;border-top:1px solid #e8eff4;padding-top:18px}.quality-dashboard h3{margin:0 0 5px;font-size:18px;color:#456b84}.quality-dashboard>p,.quality-title p{font-size:12px!important;line-height:1.55}.quality-groups{display:grid;gap:15px;margin-top:16px}.quality-group{background:#f7fafc;border:1px solid #edf2f5;border-radius:18px;padding:13px 12px 11px}.quality-group h4{margin:0 0 10px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#7890a1}.quality-ring-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(66px,1fr));gap:12px 8px;align-items:start}.quality-ring{text-align:center;min-width:0}.quality-ring-chart{position:relative;width:58px;height:58px;margin:0 auto 6px}.quality-ring svg{display:block;width:100%;height:100%;overflow:visible}.quality-ring circle{fill:none;stroke-width:5.5}.quality-ring .ring-track{stroke:#e7eef2}.quality-ring .ring-value{stroke:#65a9d4;stroke-linecap:round;transition:stroke-dasharray .25s ease}.quality-ring.low .ring-value{stroke:#d9796f}.quality-ring.mid .ring-value{stroke:#d8b85d}.quality-ring.good .ring-value{stroke:#5aa889}.quality-ring.unknown .ring-value{stroke:#b9c7d0}.quality-ring-chart strong{position:absolute;inset:0;display:grid;place-items:center;font-size:12px;line-height:1;color:#456578;font-weight:700}.quality-ring>span{display:block;font-size:11px;line-height:1.15;color:#5d7485;min-height:25px;overflow-wrap:anywhere}.quality-note{margin-top:16px!important;color:#8d9ba6!important}
@media(max-width:699px){
  .flow-header-actions{gap:6px}.flow-header .done-button{padding-left:15px;padding-right:15px}.flow-header .cancel-button{width:42px;height:42px;min-width:42px}
  .family-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px!important;gap:8px!important;padding:12px 0;border-bottom:1px solid #edf1f4}.family-row .family-name{grid-column:1/3;grid-row:1}.family-row .remove-small{grid-column:3;grid-row:1}.family-row .family-sex{grid-column:1;grid-row:2}.family-row .family-age{grid-column:2;grid-row:2}.family-row .family-activity{grid-column:1/4;grid-row:3}
  .nutrient-grid,.nutrition-card-grid{grid-template-columns:1fr}.energy-family-total{align-items:flex-start;flex-direction:column;gap:4px}.family-energy-member{align-items:flex-start}.family-energy-member strong{font-size:12px}
}

@media(max-width:480px){.quality-group{padding:12px 8px 10px}.quality-ring-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 4px}.quality-ring-chart{width:52px;height:52px}.quality-ring circle{stroke-width:5}.quality-ring-chart strong{font-size:11px}.quality-ring>span{font-size:10px}}

/* 1.9.4.4 — live date scanner and manual calendar */
.live-date-stage{position:relative;height:min(48vh,420px);overflow:hidden;border-radius:24px;background:#1f2a31}.live-date-stage video{width:100%;height:100%;object-fit:cover}.live-date-guide{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.live-date-guide span{display:block;width:82%;height:42%;border:2px solid #ffffffd9;border-radius:18px;box-shadow:0 0 0 999px #10202a42}.live-date-status{position:absolute;left:12px;right:12px;bottom:12px;border-radius:999px;background:#162631d9;color:#fff;text-align:center;padding:9px 12px;font-size:12px;backdrop-filter:blur(8px)}
.lot-date-actions{display:flex;align-items:center;gap:9px;margin-top:10px}.lot-date-camera,.lot-date-calendar-wrap{width:42px;height:42px;border-radius:50%;border:1px solid #e1edf5;background:#f5faff;color:#347fae;display:grid;place-items:center;position:relative;overflow:hidden}.lot-date-camera{padding:0}.lot-date-camera svg{width:21px;height:21px}.lot-date-calendar-wrap:before{content:"";width:20px;height:18px;border:2px solid currentColor;border-radius:4px;box-sizing:border-box;background:linear-gradient(currentColor,currentColor) 0 4px/100% 2px no-repeat}.lot-date-calendar-wrap:after{content:"";position:absolute;top:9px;left:13px;width:3px;height:3px;border-radius:50%;background:currentColor;box-shadow:6px 0 currentColor,0 6px currentColor,6px 6px currentColor}.lot-date-calendar{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.lot-date-camera:focus-visible,.lot-date-calendar-wrap:focus-within{outline:3px solid #94caee;outline-offset:2px}
/* 1.9.4.4 — live date controls in the new-product card */
.draft-date-row{display:flex;align-items:center;gap:8px;margin-bottom:12px}.draft-date-value{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;padding:0 14px;border:1px solid #e8eff4;border-radius:16px;background:#f9fbfd;color:#496274;font-size:15px;font-variant-numeric:tabular-nums}.draft-date-row .lot-date-camera,.draft-date-row .lot-date-calendar-wrap{flex:0 0 42px;width:42px;height:42px}.draft-date-row .lot-date-camera svg{width:21px;height:21px}

/* 1.9.4.5 — unified close control and inline lot-date actions */
.popup-close,.flow-header .cancel-button,.sheet-close{
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;
  border:1px solid #e3ebf1!important;border-radius:50%!important;background:#fff!important;color:#66849a!important;
  display:inline-grid!important;place-items:center!important;line-height:0!important;font-size:0!important;box-shadow:0 3px 10px #356d9410!important;
}
.popup-close svg,.flow-header .cancel-button svg,.sheet-close svg{width:25px!important;height:25px!important;display:block;stroke-width:2.2!important}
.popup-close:hover,.flow-header .cancel-button:hover,.sheet-close:hover{background:#f5f9fc!important;color:#3f6f8d!important}
.sheet-close{float:none!important;position:sticky;top:0;z-index:5;margin-left:auto!important}

.lot-date-calendar-wrap:before,.lot-date-calendar-wrap:after{content:none!important;display:none!important}
.lot-date-calendar-wrap>svg{width:23px;height:23px;display:block;pointer-events:none}
.lot-date-camera>svg{width:22px!important;height:22px!important;display:block}
.lot-date-calendar-wrap,.lot-date-camera{flex:0 0 42px;cursor:pointer}
.lot-date-inline{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px;margin-left:auto;white-space:nowrap;font-weight:400}
.lot-date-inline>span{font-variant-numeric:tabular-nums;color:#526b7d;margin-right:2px}
#sheet .lot>strong{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}

.edit-lot-date-block{margin:12px 0}
.edit-lot-date-block>label{margin-bottom:6px}
.edit-lot-date-row{display:flex;align-items:center;gap:7px}
.edit-lot-date-value{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;padding:0 14px;border:1px solid #e8eff4;border-radius:16px;background:#f9fbfd;color:#496274;font-size:15px;font-variant-numeric:tabular-nums}
.edit-lot-date-row .lot-date-calendar-wrap,.edit-lot-date-row .lot-date-camera{width:42px;height:42px;flex:0 0 42px}

@media(max-width:520px){
  #sheet .lot>strong{align-items:flex-start;flex-wrap:wrap}
  .lot-date-inline{width:100%;justify-content:flex-start;margin-left:0;margin-top:6px}
  .lot-date-inline>span{margin-right:auto;display:flex;align-items:center;min-height:42px}
  .popup-close,.flow-header .cancel-button,.sheet-close{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important}
  .popup-close svg,.flow-header .cancel-button svg,.sheet-close svg{width:24px!important;height:24px!important}
}
/* Keep the expiry date and its controls on one line whenever the sheet width allows it. */
@media(max-width:520px){
  #sheet .lot>strong{align-items:center;flex-wrap:nowrap}
  .lot-date-inline{width:auto;justify-content:flex-end;margin-left:auto;margin-top:0}
  .lot-date-inline>span{margin-right:2px;min-height:0}
}
