.fl-editor{text-align:center;max-width:680px;margin:auto;min-width:0}.fl-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 18px}.fl-tabs button{flex:1;min-width:130px}.fl-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.fl-field{display:grid;gap:6px;min-width:0;text-align:center}.fl-field input,.fl-field select,.fl-field textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box;text-align:center}.fl-wide{grid-column:1/-1}.fl-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:12px 0}.fl-picture{width:140px;height:140px;object-fit:contain;display:block;margin:12px auto;background:transparent;clip-path:none}.fl-nutrient{display:grid;grid-template-columns:minmax(0,1fr) 110px 78px;align-items:center;gap:8px;border-bottom:1px solid #2c617a;padding:10px 0;text-align:left}.fl-nutrient label{display:flex;align-items:center;gap:6px;min-height:44px}.fl-nutrient input[type=number]{width:100%;min-width:0;text-align:center}.fl-nutrient small{display:block;text-align:center}.fl-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.fl-checks label{display:flex;gap:7px;align-items:center;min-height:44px;text-align:left;overflow-wrap:anywhere}.fl-placement{display:grid;grid-template-columns:1fr 1fr;gap:18px}.fl-placement>section{min-width:0}.fl-status{color:#73e3c6;white-space:pre-wrap;overflow-wrap:anywhere}.fl-small{font-size:.85em;color:#b9d8e7}.fl-crop{touch-action:none;display:block;max-width:100%;width:340px;height:auto;margin:10px auto;border:1px solid #2c617a;border-radius:10px;background:#0b2139}.fl-preview-caption{color:#b9d8e7}.fl-thumb{width:64px;height:64px;object-fit:contain;display:block;clip-path:none;background:transparent}.fl-nutrition-table{width:100%;border-collapse:collapse;table-layout:fixed}.fl-nutrition-table th,.fl-nutrition-table td{padding:10px 6px;border-bottom:1px solid #2c617a;overflow-wrap:anywhere;text-align:center}.fl-nutrition-table th{color:#73e3c6}.fl-camera{width:100%;max-width:420px;display:block;margin:auto}.fl-connection-list{margin:10px 0;display:grid;gap:8px}.fl-result{display:flex;gap:12px;justify-content:center;align-items:center;width:100%;margin:8px 0}.fl-result img{width:60px;height:60px;object-fit:contain}.fl-editor input[type=checkbox]{flex:none}.fl-tracked-hidden{display:none!important}@media(max-width:520px){.fl-fields,.fl-placement{grid-template-columns:1fr}.fl-wide{grid-column:auto}.fl-nutrient{grid-template-columns:minmax(0,1fr) 86px 64px;gap:5px}.fl-nutrient label{font-size:.9em}.fl-tabs button{min-width:100px;font-size:.9em}.fl-checks{grid-template-columns:1fr}.fl-nutrition-table{font-size:.9em}}

.fl-editor [hidden]{display:none!important}

/* Approved package/custom serving controls, isolated to the Nutrition tab. */
.fl-editor:has(.fl-serving-layout){max-width:1040px}.fl-serving-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;text-align:left}.fl-serving-card{min-width:0;border:1px solid #2c617a;border-radius:12px;padding:14px}.fl-serving-card h3{margin-top:0}.fl-serving-check{display:flex;align-items:center;gap:8px;min-height:44px;margin-bottom:12px}.fl-calculated{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid #2c617a}.fl-calculated output{font-weight:700}.fl-calculated small{grid-column:2;color:#b9d8e7;font-size:.75em}.fl-serving-card .fl-nutrient{grid-template-columns:minmax(0,1fr) 86px 64px}.fl-serving-card .fl-field{margin-bottom:10px}@media(max-width:700px){.fl-serving-layout{grid-template-columns:1fr}.fl-serving-card .fl-nutrient{grid-template-columns:minmax(0,1fr) 80px 60px}}
#popup:has(.fl-serving-layout){width:min(1080px,calc(100% - 24px))}
/* Optional lookup workspace only; established editor/crop controls remain intact. */
#popup:has(.lk-workspace){width:min(1180px,calc(100% - 24px))}.lk-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.lk-card,.lk-preview{min-width:0;border:1px solid #2c617a;border-radius:12px;padding:14px;margin:12px 0}.lk-card select{width:100%;max-width:100%}.lk-picture{display:block;width:110px;height:110px;object-fit:contain;margin:10px auto}.lk-value{display:grid;grid-template-columns:1fr auto;gap:5px;text-align:left;border-bottom:1px solid #2c617a;padding:8px 0}.lk-value small{grid-column:1/-1}.lk-match strong,.lk-match small{color:#73e3a3}.lk-different strong,.lk-different small{color:#ff9090}.lk-missing,.lk-missing strong{color:#b9c4ce}.lk-choice{display:flex;gap:8px;align-items:center;min-height:44px;text-align:left}.lk-preview-value{display:inline-block;margin:6px 10px}.lk-workspace input{width:100%;min-width:0}.lk-workspace input[type=checkbox]{width:22px}.lk-workspace{overflow-wrap:anywhere}@media(max-width:760px){.lk-grid{grid-template-columns:1fr}}
/* Approved option 4. All rules are confined to the new Library browser. */
#popup:has(.lb-browser){width:min(900px,calc(100% - 24px));display:flex;flex-direction:column;overflow:hidden}
#popup:not([open]):has(.lb-browser){display:none}
#popup:has(.lb-browser) .dialog-head,#popup:has(.lb-browser) .dialog-foot{flex-shrink:0}
#popup:has(.lb-browser) .dialog-body{overflow:auto;min-height:0}
#popup:has(.lb-browser) .dialog-head h2{flex:1;text-align:center}
.lb-browser{max-width:850px;margin:0 auto}
.lb-top{display:grid;gap:12px;margin:0 0 18px}
.lb-top-pictures{display:grid;grid-template-columns:repeat(3,minmax(0,150px));justify-content:space-between;align-items:center;gap:12px}
.lb-search{display:flex;align-items:center;gap:8px;min-width:0;border:1px solid var(--cyan);border-radius:15px;padding:10px;text-align:left}
.lb-search svg{width:24px;height:24px;flex-shrink:0;fill:none;stroke:var(--cyan);stroke-width:2}
.lb-search input{width:100%;min-width:0;border:0!important;background:transparent;padding:0!important;text-align:left;font-size:16px;outline:0}
.lb-search:focus-within{outline:2px solid #55dfc4;outline-offset:2px}
.lb-picture{display:block;min-width:0;width:100%;min-height:44px;border:0!important;padding:0!important;background:transparent!important;line-height:0;border-radius:12px}
.lb-picture img,.lb-picture>svg{display:block;width:100%;height:auto;max-width:100%;object-fit:contain;clip-path:none;margin:0}
.lb-picture:focus-visible{outline:3px solid #55dfc4;outline-offset:3px}
.lb-groups,.lb-category-pictures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.lb-wide{grid-column:1/-1}
.lb-tools{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:18px 0 0}
.lb-custom{margin:16px 0;text-align:center}
.lb-custom button{margin:5px}
.lb-allowance{display:flex;justify-content:center;align-items:center;gap:8px;margin:16px 0}
.lb-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(min-width:760px){.lb-category-pictures{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:400px){#popup:has(.lb-browser) .dialog-body{padding:12px}.lb-top,.lb-top-pictures{gap:8px}.lb-search{padding:9px 7px;gap:5px}.lb-search svg{width:19px;height:19px}.lb-groups,.lb-category-pictures{gap:8px}}

/* Restaurant storyboard navigation only; approved images retain full canvases. */
#popup:has(.rb-browser){width:min(900px,calc(100% - 24px));overflow:hidden;display:flex;flex-direction:column}
#popup:not([open]):has(.rb-browser){display:none}
#popup:has(.rb-browser) .dialog-body{overflow:auto;min-height:0}
#popup:has(.rb-browser) .dialog-head,#popup:has(.rb-browser) .dialog-foot{flex-shrink:0}
.rb-browser{max-width:800px;margin:auto;text-align:center;min-width:0}
.rb-search{display:block;max-width:500px;margin:0 auto 18px}
.rb-search input{width:100%;box-sizing:border-box;text-align:left;font-size:16px}
.rb-grid,.rb-food-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.rb-restaurant{min-width:0;display:grid;justify-items:center;gap:4px}
.rb-picture,.rb-new{width:100%;min-width:0;background:transparent!important;border:0!important;padding:0!important;line-height:0}
.rb-picture img{display:block;width:100%;height:auto;object-fit:contain;clip-path:none}
.rb-restaurant>button:last-child{min-width:44px;min-height:44px;font-size:24px}
.rb-group{min-height:130px;display:grid;place-content:center;gap:8px;border:3px solid #28dccc!important;border-radius:22px;background:linear-gradient(140deg,#087bea,#07315e)!important;box-shadow:inset 0 2px 6px #81e9ff;font-size:18px}
.rb-group span{font-size:45px}.rb-wide{grid-column:1/-1}
.rb-detail-logo{display:flex;justify-content:center;align-items:center;gap:14px;margin-bottom:12px}
.rb-detail-logo img{width:min(150px,40%);height:auto;object-fit:contain;clip-path:none}
.rb-tabs{display:flex;justify-content:center;gap:8px;margin:15px 0}.rb-tabs button{flex:1;min-width:0}
.rb-food{min-width:0;border:1px solid #20afdc;border-radius:18px;padding:12px;overflow-wrap:anywhere}
.rb-food img{width:100%;max-height:160px;object-fit:contain;clip-path:none}.rb-food-icon{font-size:55px}
.rb-quantity{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:8px}.rb-quantity button{min-width:44px;min-height:44px}
.rb-selected{border:1px solid #20afdc;border-radius:18px;padding:12px;margin-top:18px}
.rb-new{display:block;max-width:130px;margin:16px auto}.rb-new img{width:100%;height:auto;object-fit:contain;clip-path:none}
.rb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:760px){.rb-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.rb-wide{grid-column:auto}}
@media(max-width:400px){.rb-grid,.rb-food-grid{gap:8px}.rb-group{font-size:16px;min-height:115px}.rb-food{padding:8px}.rb-tabs{gap:5px}}

.sg-home-button{width:clamp(95px,24vw,150px);padding:0!important;border:0!important;background:transparent!important;line-height:0}.sg-home-button img{display:block;width:100%;height:auto;object-fit:contain;clip-path:none}
/* Isolated approved Happy Meal layouts; original image files remain unchanged. */
.hm-workspace{width:100%;max-width:760px;margin:auto;text-align:center}
.hm-choice-grid,.hm-component-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hm-image-button,.hm-category-button,.hm-entry-picture,.hm-photo-button{background:none;border:0;padding:0;box-shadow:none;min-width:0}
.hm-choice-grid .hm-image-button img{display:block;width:100%;height:auto;object-fit:contain}
.hm-category-button{display:block;width:min(250px,65%);margin:16px auto}
.hm-category-button img,.hm-main-picture{display:block;width:100%;height:auto;object-fit:contain}
.hm-component{position:relative;border:1px solid #31c9ed;border-radius:14px;background:#071f31;padding:12px;min-width:0}
.hm-component h3{font-size:1rem;margin:6px 0}.hm-component p{font-size:.9rem;margin:6px 0}
.hm-component .hm-photo-button{display:block;width:100%;height:120px}
.hm-food-photo,.hm-product{display:block;width:100%;height:120px;object-fit:contain}
.hm-food-symbol{font-size:3rem;height:100px;display:grid;place-items:center}
.hm-remove{position:absolute;right:5px;top:5px;z-index:1;padding:3px 9px;min-height:36px;color:#ff6e74}
.hm-count{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0}.hm-count output{min-width:30px}
.hm-count button{min-width:44px;min-height:44px;padding:4px 10px}
.hm-fractions{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin:8px 0}
.hm-fractions button{min-width:38px;min-height:44px;padding:4px 6px}
.hm-workspace button[aria-pressed="true"]{background:#006e4e;border-color:#63e8ae}
.hm-tools{display:flex;gap:10px;justify-content:center;margin:12px 0}.hm-tools button{flex:1}
.hm-summary{border:1px solid #2bb8d7;border-radius:12px;padding:10px;margin:10px 0}.hm-summary h3{font-size:1rem;margin:0 0 8px}
.hm-summary>div{display:flex;justify-content:space-around;gap:8px;flex-wrap:wrap}.hm-summary span{display:flex;flex-direction:column;font-size:.9rem}.hm-summary strong{font-size:1rem}
.hm-entry-card,.hm-leftover-card{display:grid;grid-template-columns:minmax(100px,180px) minmax(0,1fr);align-items:center;gap:15px}
.hm-entry-picture{width:100%;display:block}.hm-entry-picture img{width:100%;height:auto}
.hm-entry-card h3,.hm-leftover-card h3{font-size:1.1rem;margin:0}.hm-entry-card p,.hm-leftover-card p{font-size:.9rem}
.hm-entry-card .hm-summary,.hm-leftover-card .hm-summary{margin:8px 0}
.hm-edit-picture{width:180px;margin:auto}.hm-nutrient-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.hm-nutrient-fields label{text-align:left;min-width:0}.hm-nutrient-fields input{display:block;width:100%;box-sizing:border-box}
.hm-extra{min-width:0;display:flex;flex-direction:column;gap:8px;align-items:center}.hm-extra .hm-product,.hm-extra .hm-food-photo{height:110px}
.hm-keep{display:flex;align-items:center;gap:10px;margin:8px 0;border:1px solid #2bb8d7;border-radius:10px;padding:8px;text-align:left}
.hm-keep .hm-food-photo,.hm-keep .hm-product{width:80px;height:65px}.hm-keep span{display:flex;flex-direction:column}.hm-keep input{width:24px;height:24px;flex-shrink:0}
.hm-toy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.hm-toy-grid img{width:100%;height:140px;object-fit:contain}.hm-toy-grid p{font-size:.85rem}
.hm-hint{font-size:.9rem}.hm-workspace details{text-align:left;margin-top:12px}.hm-workspace details p{font-size:.9rem;overflow-wrap:anywhere}
@media(max-width:480px){.hm-component{padding:8px}.hm-component-grid,.hm-choice-grid{gap:8px}.hm-component .hm-photo-button,.hm-food-photo,.hm-product{height:90px}.hm-entry-card,.hm-leftover-card{grid-template-columns:110px minmax(0,1fr);gap:8px}.hm-summary{padding:6px}.hm-summary>div{gap:5px}.hm-summary span{font-size:.8rem}.hm-summary strong{font-size:.85rem}.hm-toy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hm-nutrient-fields{grid-template-columns:1fr}.hm-tools{flex-wrap:wrap}.hm-tools button{min-width:120px}}

/* Approved Regular Menu buttons and shared food art, shown without cropping. */
.rb-main-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:center;margin:14px auto;max-width:520px}
.rb-main-menu .hm-category-button{width:100%;max-width:none;margin:0}
.rb-regular-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0}
.rb-regular .rb-picture img{height:auto;max-height:none;object-fit:contain;clip-path:none}
.rb-regular .rb-picture:focus-visible,.rb-main-menu .rb-picture:focus-visible{outline:3px solid #55dfc4;outline-offset:3px}
@media(min-width:760px){.rb-regular-categories{grid-template-columns:repeat(4,minmax(0,1fr))}.rb-regular .rb-food-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:400px){.rb-main-menu,.rb-regular-categories{gap:8px}.rb-regular .rb-food-grid{grid-template-columns:1fr}}

/* Approved food group/connection flow only. */
.fl-group-choice{position:relative;display:block;min-width:0}.fl-group-choice input{position:absolute;top:8px;left:8px;z-index:1;width:24px;height:24px}.fl-group-choice .lb-picture{display:block}.fl-group-choice:has(:checked){outline:2px solid #38dec0;border-radius:16px}.fl-connected-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.fl-connected-cards button{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere}.fl-connected-cards .fl-thumb{width:100%;height:100px;object-fit:contain}.fl-connected-cards [aria-pressed=true]{border-color:#38dec0}.fl-connected-cards small{display:block}#popup:has(.fl-group-choice) .fl-editor{max-width:800px}


/* Transparent food-photo preview; checkerboard is a CSS guide, never exported. */
.fl-photo-frame{width:min(100%,384px);aspect-ratio:1;margin:12px auto;border:2px solid #66e7ff;position:relative;background-color:#eff5f7;background-image:linear-gradient(45deg,#bbc9cf 25%,transparent 25%),linear-gradient(-45deg,#bbc9cf 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#bbc9cf 75%),linear-gradient(-45deg,transparent 75%,#bbc9cf 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
.fl-photo-frame::after{content:'';position:absolute;inset:6.25%;border:1px dashed #0d304a88;pointer-events:none}
.fl-photo-frame canvas{display:block;width:100%;height:100%;touch-action:none}
.fl-photo-modes button[aria-pressed=true]{outline:2px solid #66e7ff;background:#0d5a5533}
.fl-photo-editor input[type=range]{min-height:44px;touch-action:pan-y}
@media(max-width:480px){.fl-photo-editor .fl-fields{grid-template-columns:1fr}.fl-photo-editor .fl-actions button{flex:1 1 120px;min-height:44px}}


/* Food placement reuses the approved meal-selector artwork. */
.fl-category-choice{position:relative;display:block;min-width:0;border-radius:12px}.fl-category-choice>input{position:absolute;top:8px;left:8px;width:24px;height:24px;z-index:1}.fl-category-choice:has(:checked){outline:3px solid #38dec0}.fl-finish-actions{display:grid;gap:12px;max-width:420px;margin:20px auto}.fl-finish-actions button{min-height:48px}.fl-finish-actions [aria-pressed=true]{background:#006e4e;border-color:#63e8ae}

.fl-companions{display:grid;gap:10px}.fl-companion{display:grid;grid-template-columns:24px 64px minmax(0,1fr) minmax(90px,130px);gap:10px;align-items:center;border:1px solid #2c617a;border-radius:12px;padding:10px}.fl-companion>input{width:22px;height:22px}.fl-companion input[type=number]{width:75px;max-width:100%}.fl-companion>span{min-width:0;overflow-wrap:anywhere}.fl-companion:has(:checked){border-color:#38dec0;background:#063f38}.fl-connection-browse{margin-top:14px;padding-top:14px;border-top:1px solid #2c617a}@media(max-width:500px){.fl-companion{grid-template-columns:24px 48px minmax(0,1fr);gap:8px}.fl-companion>span:last-child{grid-column:3}.fl-companion .fl-thumb{width:48px;height:48px}}

