/* Phase 1: controls belong to the devices; the existing camera keeps its transforms. */
[hidden]{display:none!important}
.quantity-picker{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;font-size:12px}
.quantity-picker label{font-weight:600}
.quantity-picker select{font:inherit;color:var(--forest);background:var(--mist);border:1px solid var(--line);border-radius:10px;min-width:72px;min-height:44px;padding:8px 12px;opacity:1}
.quantity-picker select:disabled{color:var(--muted)}
.order-progress{display:flex;gap:6px;margin:16px 0 8px;font-size:10px;line-height:1.4;color:#63705f}
.order-progress>span{flex:1;min-width:0;position:relative;padding-top:9px}
.order-progress>span::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:#e6eae2;border-radius:5px;transition:background-color .25s}
.order-progress [data-reached="true"]{color:var(--forest);font-weight:650}
.order-progress [data-reached="true"]::before{background:var(--sage,#7a9166)}
.order-progress [aria-current]::before{background:var(--forest)}
.journey-next{display:inline-flex;align-items:center;justify-content:center;min-height:44px;line-height:1.4;padding:9px 12px;border:1px solid #b4c0ac;border-radius:10px;background:#eaf0e4;color:var(--forest);font-size:12px;font-weight:650;text-decoration:none}
.journey-next:hover{background:#dce7d3}
.journey-next:focus-visible,.quantity-picker select:focus-visible{outline:3px solid var(--forest);outline-offset:3px}
.order-feedback{min-height:139px;display:flex;flex-direction:column;align-items:stretch;gap:5px}
.order-feedback .screen-note{min-height:33px;margin:3px 0 0}
.order-feedback .journey-next{margin-top:1px}
.restart-order{font-size:11px;min-height:44px;padding:7px 0;text-align:center}
.demo-memory{font-size:10px;color:var(--muted);line-height:1.5;margin-top:6px;border-top:1px solid var(--line);padding-top:9px}
.order-visual .phone{width:274px}
.order-visual .menu-bowl{width:124px;height:124px;margin:11px auto}
.order-visual .screen-eyebrow{margin-top:17px}
.order-visual .menu-price{margin:8px 0 10px}
.order-visual{height:760px}
.kitchen-device .device-screen{position:relative}
.kitchen-feedback{min-height:115px}
.kitchen-feedback .screen-note{min-height:36px}
.kitchen-feedback .journey-next{margin-top:10px}
.kitchen-visual{height:710px}
.kitchen-atmosphere{position:absolute;top:99px;right:25px;display:flex;gap:5px;align-items:center;pointer-events:none;opacity:0}
.kitchen-atmosphere i{display:block;width:3px;height:16px;border-radius:100%;background:#7a9166;opacity:.5;animation:kitchen-steam 2.5s ease-in-out infinite;animation-play-state:paused}
.kitchen-atmosphere i:nth-child(2){animation-delay:.35s;height:21px}
.kitchen-atmosphere i:nth-child(3){animation-delay:.7s}
[data-order-state="preparing"] .kitchen-atmosphere{opacity:1}
[data-order-state="preparing"].is-in-view .kitchen-atmosphere i{animation-play-state:running}
[data-order-state="preparing"] .kitchen-product{background:#f1f5ed;border-radius:14px;animation:ticket-received .65s ease-out}
.kitchen-product{padding:8px 0;margin:16px 0}
.kitchen-device .quantity{min-width:50px;text-align:center}
.stock-table td:last-child{font-variant-numeric:tabular-nums}
.stock-delta{display:block;min-height:17px;font-size:10px;color:#557044;font-weight:650;line-height:1.6}
.stock-table tbody td{transition:background-color .6s}
.is-stock-highlighted .stock-table tbody td{background:#e3eed9}
.is-stock-highlighted .stock-delta{color:#243b2a}
.inventory-device .journey-next{margin-top:12px}
.chat-message .journey-next{margin:12px 0}
.phone .order-progress{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));row-gap:11px}
.phone .order-progress>span{grid-column:span 2}
.phone .order-progress>span:nth-last-child(-n+2){grid-column:span 3}
.order-visual{height:795px}
.kitchen-visual{height:750px}
.checkout-visual{height:820px}
.kitchen-feedback{min-height:156px;position:relative;padding-top:4px}
.kitchen-feedback .journey-next{margin-right:5px}
.handoff-seal,.payment-seal{display:inline-flex;width:26px;height:26px;border-radius:50%;background:#243b2a;color:white;align-items:center;justify-content:center;flex:none}
.handoff-seal svg,.payment-seal svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.handoff-seal{position:absolute;right:0;top:9px}
[data-order-state="delivered"] .kitchen-feedback .screen-note{padding-right:35px;color:#243b2a;font-weight:550}
[data-order-state="delivered"] .handoff-seal{animation:receipt-confirmed .55s ease-out}
[data-order-state="delivered"] .inventory-next{background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:4px;padding-inline:0}
.checkout-feedback{position:relative;min-height:128px;padding:15px 0 7px}
.checkout-status{font-size:12px;line-height:1.65;color:var(--muted);min-height:40px;margin-bottom:8px}
.payment-seal{position:absolute;right:0;top:17px}
[data-payment-state="paid"] .checkout-status{padding-right:35px;font-weight:600;color:#243b2a}
[data-payment-state="paid"] .payment-total{background:#eaf0e4;animation:receipt-confirmed .6s ease-out}
[data-payment-state="paid"] .payment-seal{animation:receipt-confirmed .55s ease-out}
.closing-order-summary{display:flex;gap:16px;align-items:center;margin:16px 0}
.closing-order-summary img{width:68px;height:68px;border-radius:50%;object-fit:cover;flex:none}
.closing-order-summary strong{display:block;font-size:18px;line-height:1.4}
.closing-order-summary span{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.closing-statuses{display:flex;flex-wrap:wrap;gap:8px}
.closing-statuses>span{font-size:12px;line-height:1.4;border-radius:8px;padding:7px 10px;background:#edf1e8;color:#243b2a}
.report-screen .order-progress{margin-top:22px;margin-bottom:16px;font-size:12px}
.closing-context{font-size:13px;line-height:1.65;color:var(--muted);max-width:650px;margin:16px 0 22px}
.closing-scope{font-size:12px;line-height:1.6;margin-top:8px;color:#50604d}
.report-screen [data-closing-next]{margin-top:14px}
.report-screen :focus-visible{outline-color:#243b2a!important}
.report-actions{display:block}
.closing-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.closing-actions .button{min-height:48px;font-size:13px;white-space:normal}
.closing-actions .button-outline{color:#fff;border-color:#a9b6a1;background:transparent}
.closing-actions .button-outline:hover{color:#fff;background:#ffffff14}
.closing-actions .button-white:hover{color:#243b2a;background:#eaf0e4}
[data-complete="true"] .closing-statuses{animation:receipt-confirmed .6s ease-out}
@keyframes receipt-confirmed{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.dock-stages[data-more="right"]{mask-image:linear-gradient(to right,#000 calc(100% - 18px),transparent)}
.dock-stages[data-more="left"]{mask-image:linear-gradient(to right,transparent,#000 18px)}
.dock-stages[data-more="both"]{mask-image:linear-gradient(to right,transparent,#000 18px,#000 calc(100% - 18px),transparent)}
.page-hidden .kitchen-atmosphere i{animation-play-state:paused!important}
@keyframes kitchen-steam{0%,100%{transform:translateY(3px) scaleY(.7);opacity:.3}50%{transform:translateY(-3px) scaleY(1);opacity:.85}}
@keyframes ticket-received{from{box-shadow:0 0 0 5px #7a916633;opacity:.7}to{box-shadow:0 0 0 0 #7a916600;opacity:1}}
@media(max-width:599px){
  .order-visual,.kitchen-visual,.checkout-visual{height:auto}
  .order-visual .phone{width:274px;max-width:calc(100% - 26px);margin-right:13px}
  .order-progress{font-size:10px;gap:5px}
  .order-progress{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));row-gap:11px}
  .order-progress>span{grid-column:span 2}
  .order-progress>span:nth-last-child(-n+2){grid-column:span 3}
  .report-screen .order-progress{font-size:11px}
  .closing-order-summary{gap:11px}
  .closing-order-summary img{width:54px;height:54px}
  .closing-order-summary strong{font-size:16px}
  .closing-statuses>span{font-size:11px}
  .closing-context{font-size:12px}
  .closing-actions{display:grid;grid-template-columns:1fr}
  .checkout-feedback{min-height:143px}
  .quantity-picker select{font-size:16px}
  .stock-table{font-size:12px}
  .stock-delta{font-size:11px}
  .stock-table th,.stock-table td{padding-left:5px;padding-right:5px}
  .stock-table th:first-child,.stock-table td:first-child{padding-left:0}
  .kitchen-product h3{font-size:18px}
  .kitchen-device .quantity{padding:8px 12px}
  .kitchen-atmosphere{right:22px;top:91px}
}
@media(prefers-reduced-motion:reduce){
  .kitchen-atmosphere i,.kitchen-product,.handoff-seal,.payment-seal,.payment-total,.closing-statuses{animation:none!important}
  .stock-table tbody td,.order-progress>span::before{transition:none}
}

/* One naturally proportioned handset, two views. Reserve its frame before
   submission so switching to the receipt never stretches the phone or page. */
.order-visual{height:660px}
.order-visual .phone{width:282px;max-width:calc(100% - 12px);height:auto;min-height:0;aspect-ratio:10/20.6;display:flex;flex-direction:column}
.order-visual .phone .device-screen{display:flex;flex:1;flex-direction:column;min-height:0;width:100%;padding:28px 14px 13px;overflow:hidden}
.order-visual .screen-brand{flex:none;min-height:26px;margin-bottom:12px}
.order-visual .screen-brand img{width:91px}
.order-visual .phone-view{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scroll-padding:8px;display:flex;flex-direction:column}
.order-visual .phone-view h3{font-size:22px;line-height:1.15;margin:0}
.order-visual .menu-bowl{width:92px;height:92px;flex:none;margin:9px auto 10px}
.order-visual .menu-item strong{font-size:15px;line-height:1.35}
.order-visual .menu-item>span{font-size:11px;line-height:1.4;margin-top:3px}
.order-visual .quantity-picker{margin-top:10px;flex:none}
.order-visual .menu-price{margin:9px 0 0;min-height:25px;flex:none}
.order-visual .screen-button{margin-top:10px;min-height:44px;flex:none}
.order-visual .phone-confirmation{justify-content:flex-start;justify-content:safe center}
.order-visual .phone-confirmation>.order-chip{align-self:flex-start;flex:none;margin-bottom:7px}
.order-visual .phone-confirmation h3{font-size:21px;margin-bottom:6px}
.order-visual .phone-confirmation>.screen-note{font-size:12px;line-height:1.5;margin:0 0 8px;flex:none}
.phone-order-summary{display:flex;align-items:center;gap:10px;flex:none;padding:6px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.phone-order-summary img{width:36px;height:36px;flex:none;border-radius:50%;object-fit:cover}
.phone-order-summary strong{display:block;font-size:12px;line-height:1.4}
.phone-order-summary span{display:block;font-size:12px;line-height:1.4;color:var(--muted);margin-top:2px}
.order-visual .order-progress{flex:none;margin:9px 0 7px;row-gap:6px;font-size:10px}
.order-visual .order-progress>span{padding-top:6px}
.order-visual .order-feedback{min-height:0;flex:none;gap:0}
.order-visual .order-feedback .journey-next{margin:0}
.order-visual .restart-order{padding:7px 0;min-height:44px}
.order-visual .demo-memory{flex:none;margin-top:9px;padding-top:7px;font-size:10px;line-height:1.4}
[data-order-phone][data-view=confirmation] .phone-confirmation{animation:phone-confirmed .28s ease-out}
@keyframes phone-confirmed{from{opacity:.3;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
/* Reduce the frame footprint, not the text or the 44px touch controls.
   Keep narrow-phone maximums so controls never lose their existing space. */
@media(max-width:599px){.order-visual{height:auto}.order-visual .phone{width:270px;margin-right:6px}.scene-visual .tablet{max-width:350px}.order-visual .quantity-picker select{font-size:16px}}
@media(prefers-reduced-motion:reduce){[data-order-phone] .phone-confirmation{animation:none!important}}
