/* The ingredients are independent high-resolution cutouts; movement never changes the order. */
.item-dialog.has-ingredients{max-width:880px;overflow:hidden;max-height:94dvh;width:calc(100% - 32px)}
.ingredient-form{display:flex;flex-direction:column;max-height:94dvh;overflow:hidden}
.ingredient-form>.dialog-header{padding:20px 25px;flex-shrink:0;background:#fffdf7;z-index:4}
.ingredient-form>.dialog-header h2{font-size:25px}
.ingredient-form>.dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0;scrollbar-gutter:stable}
.ingredient-config{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:0}
.ingredient-form .item-config-options{padding:24px}
.ingredient-form .item-summary{margin:0 0 20px;padding:0 0 17px;border-bottom:1px solid #ece1ce;align-items:start}
.ingredient-form .item-summary>div{display:flex;align-items:center;justify-content:space-between;width:100%;gap:15px}
.ingredient-form .item-summary p{font-size:13px!important;line-height:1.5}
.ingredient-form .item-summary .price{font-size:19px;margin:0}
.ingredient-form>.dialog-footer{flex-shrink:0;position:static;padding:16px 25px;z-index:6}
.ingredient-preview{position:sticky;top:0;align-self:start;padding:22px 16px 14px;background:linear-gradient(135deg,#faf2df,#f6e9cc 70%,#ecd5a4);border-right:1px solid #e9d8b5;isolation:isolate;min-width:0;overflow:hidden}
.ingredient-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative;z-index:3}
.ingredient-eyebrow{display:block;font-size:8px;font-weight:800;letter-spacing:1.4px;color:#9a7034}
.ingredient-preview h3{font-size:17px;line-height:1.3;letter-spacing:-.45px;margin:6px 0 0;color:#44331e;max-width:210px}
.motion-toggle{flex-shrink:0;font-size:10px;padding:6px 8px;min-height:32px;border:1px solid #d3b779;border-radius:6px;background:#fff9e9;color:#765b2e}
.motion-toggle[aria-pressed=false]{background:#f1e7cf;color:#6f6656}
.ingredient-stage{position:relative;aspect-ratio:640/360;max-height:276px;width:100%;overflow:hidden;margin:10px 0 3px;isolation:isolate}
.ingredient-stage-glow{position:absolute;width:80%;height:90%;left:10%;bottom:0;border-radius:50%;background:radial-gradient(ellipse,#fff9eb 0%,#fff9eb80 45%,transparent 70%)}
.ingredient-plate-shadow{position:absolute;left:25%;bottom:6%;width:52%;height:12%;background:radial-gradient(ellipse,#62421138,transparent 70%);border-radius:50%}
.ingredient-sprite{display:block;background-image:url('/assets/ingredient-atlas.png');background-size:300% 200%;background-repeat:no-repeat;aspect-ratio:1;pointer-events:none}
.sprite-doner{background-position:0 0}.sprite-burger{background-position:50% 0}.sprite-salad{background-position:100% 0}.sprite-onion{background-position:0 100%}.sprite-tomato{background-position:50% 100%}.sprite-cheese{background-position:100% 100%}
.ingredient-base{position:absolute;width:60%;left:20%;bottom:1%;filter:drop-shadow(0 9px 6px #61361518)}
.ingredient-stage[data-base=burger] .ingredient-base{width:61%;left:20%;bottom:-7%}
.ingredient-stage[data-base=salad] .ingredient-base{width:64%;left:18%;bottom:-8%}
.ingredient-layers,.ingredient-tools,.ingredient-layer{position:absolute;inset:0;pointer-events:none}
.ingredient-layer-onion{z-index:3}.ingredient-layer-tomato{z-index:2}.ingredient-layer-cheese{z-index:1}.sauce-layer{z-index:4}
.ingredient-piece{position:absolute;aspect-ratio:1;transform:translate(-50%,-50%) rotate(var(--rotation));filter:drop-shadow(1px 3px 2px #30110340)}
.ingredient-piece>.ingredient-sprite{width:100%;height:100%}
.ingredient-stage[data-base=salad] .ingredient-piece{margin-top:-2%}
.ingredient-tools{z-index:8}
.sauce-art{position:absolute;inset:0;width:100%;height:100%;fill:none;overflow:visible}
.sauce-art path{stroke-linecap:round;stroke-linejoin:round;fill:none}
.sauce-shadow{stroke:#44260c2b;stroke-width:11;transform:translate(1px,3px)}
.sauce-ribbon{stroke-width:8}.sauce-herbs{stroke:#527b38;stroke-width:2.2;stroke-dasharray:1 12;opacity:.8}
.sauce-pour-tool{position:absolute;left:31%;top:-8%;width:16%;height:42%;transform-origin:50% 85%;filter:drop-shadow(1px 3px 3px #28190030)}
.sauce-pour-tool>svg{display:block;width:100%;height:100%;stroke:none;fill:none}
.sauce-stream{display:block;position:absolute;top:94%;left:48%;width:5%;height:68%;border-radius:60%;background:var(--sauce-color);transform-origin:top;box-shadow:1px 1px 1px #fff9}
.ingredient-stage-badge{position:absolute;bottom:0;right:0;border:1px solid #d5c195;border-radius:100px;background:#fffaf0bc;color:#7c633d;padding:4px 8px;font-size:9px;font-weight:600;z-index:5}
.ingredient-preview-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;z-index:10;padding-top:6px}
.ingredient-preview-foot>span{font-size:9px;line-height:1.4;color:#856f4e;max-width:185px}
.ingredient-replay{background:transparent;padding:5px 0 5px 5px;min-height:32px;font-size:11px;font-weight:650;white-space:nowrap;color:#9c3025}
.ingredient-live{font-size:12px;color:#664c28;border-top:1px solid #ddc79d;padding-top:11px;margin:9px 0 0;line-height:1.6;min-height:49px}
.ingredient-options{margin-top:0}
.ingredient-options legend{font-size:15px;line-height:1.5}
.ingredient-choice-row{padding:10px 0 14px;border-bottom:1px solid #eee6d9}
.ingredient-choice-title{display:flex;gap:9px;align-items:center;font-size:14px;margin-bottom:7px;color:#4d3925}
.ingredient-choice-title .ingredient-sprite{width:30px;height:30px}
.ingredient-choices{display:flex;gap:5px;width:100%;background:#f1ece3;border:1px solid #e7dfd1;border-radius:8px;padding:4px}
.ingredient-choices label{flex:1;position:relative;text-align:center;cursor:pointer;min-width:0}
.ingredient-choices input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.ingredient-choices span{display:block;font-size:12px;font-weight:600;padding:9px 5px;border-radius:5px;white-space:nowrap;color:#766a58;min-height:37px}
.ingredient-choices input:checked+span{background:#b62626;color:white;box-shadow:0 2px 5px #80340e20}
.ingredient-choices input[value=standard]:checked+span{background:white;color:#625441}
.ingredient-choices input:focus-visible+span{outline:3px solid #b62626;outline-offset:2px}
.ingredient-hint{font-size:11px;line-height:1.5;color:#97856d;margin:11px 0 0}
.ingredient-form .option-row{gap:6px}.ingredient-form .choice{font-size:12px;padding:10px}
@media(max-width:660px){
 .item-dialog.has-ingredients{width:calc(100% - 16px);max-height:96dvh;border-radius:16px}
 .ingredient-form{max-height:96dvh}
 .ingredient-form>.dialog-header{padding:15px 18px}
 .ingredient-form>.dialog-header h2{font-size:23px}
 .ingredient-form>.dialog-header p{font-size:10px;margin-top:2px}
 .ingredient-config{display:block}
 .ingredient-preview{z-index:3;padding:12px 16px 9px;border-right:0;border-bottom:1px solid #d9c18e;box-shadow:0 5px 14px #4b311515}
 .ingredient-preview h3{font-size:16px;max-width:none;margin-top:3px}
 .ingredient-eyebrow{font-size:7px;letter-spacing:1.1px}
 .ingredient-stage{height:160px;aspect-ratio:640/360;width:284px;max-width:100%;margin:0 auto}
 .ingredient-preview-foot{padding-top:0}
 .ingredient-live{font-size:11px;min-height:0;padding-top:6px;margin-top:4px;line-height:1.4}
 .ingredient-preview-foot>span{max-width:none;font-size:8px}
 .ingredient-replay{min-height:28px;font-size:10px}
 .ingredient-form .item-config-options{padding:18px}
 .ingredient-form .item-summary{padding-bottom:12px;margin-bottom:15px}
 .ingredient-form .item-summary p{font-size:12px!important}
 .ingredient-form .item-summary .price{font-size:18px}
 .ingredient-form>.dialog-footer{padding:12px 16px}
 .ingredient-form .dialog-footer>.button{font-size:12px;padding:12px}
 .ingredient-choices span{font-size:13px;min-height:40px}
 .ingredient-preview .motion-toggle{font-size:9px;min-height:29px}
}
@media(max-height:700px) and (max-width:660px){.ingredient-stage{height:126px;width:224px}.ingredient-preview{padding-top:8px}.ingredient-preview h3{font-size:14px}.ingredient-eyebrow{display:none}.ingredient-form>.dialog-header{padding:10px 16px}.ingredient-form>.dialog-header h2{font-size:21px}.ingredient-form>.dialog-header p{display:none}.ingredient-live{font-size:10px}.ingredient-form>.dialog-footer{padding:10px 16px}}
@media(prefers-reduced-motion:reduce){.ingredient-stage *{animation:none!important;transition:none!important}}
