/* Checkout and live order tracker */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.checkout > .menu-message { grid-column: 1 / -1; }
@media (min-width: 1000px) { .checkout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); } }
.checkout-cart h2, .summary h2, .tracker h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.order-types { border: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-5); }
.order-types legend { margin-bottom: var(--space-2); }
.order-types label, .minute-choice label { position: relative; cursor: pointer; }
.order-types input, .minute-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.order-types span, .minute-choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); min-height: 72px; border: 1px solid var(--color-field-border); border-radius: var(--radius-md); font-weight: 600; font-size: var(--text-sm); transition: background-color var(--transition-base), border-color var(--transition-base), transform var(--transition-base); }
.order-types .icon { width: 28px; height: 28px; }
.order-types label:hover span, .minute-choice label:hover span { border-color: var(--color-accent); }
.order-types input:checked + span, .minute-choice input:checked + span { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-on-accent); }
.order-types input:focus-visible + span, .minute-choice input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.summary { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-divider); }
.summary-note { margin-top: var(--space-3); font-size: var(--text-sm); }
.summary-note:empty { display: none; }
.payment-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-block: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); }
.payment-note .icon { color: var(--color-accent); }
#place-order { margin-top: var(--space-4); }

/* ---------- Tracker ---------- */
.tracker { padding-top: var(--space-6); }
.track-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-3); margin-bottom: var(--space-5); }
.track-top h1 { font-size: clamp(var(--text-3xl), 5vw, 3.5rem); }
.track-sub { color: var(--color-text-muted); }
.track-flags { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.conn { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; }
.conn::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--color-text-muted); }
.conn[data-state="live"]::before { background: var(--color-success); border-color: var(--color-success); }
.conn[data-state="lost"] { color: var(--color-error); }
.conn[data-state="lost"]::before { border-color: var(--color-error); }
.late-banner { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-5); padding: var(--space-4) var(--space-5); border: 2px solid var(--color-error); border-radius: var(--radius-md); font-weight: 600; }
.late-banner > .icon { width: 28px; height: 28px; color: var(--color-error); }
.late-banner #late-new { font-weight: 400; }
@media (prefers-reduced-motion: no-preference) { .late-banner > .icon { animation: ring 1.6s ease-in-out 3; transform-origin: top center; } @keyframes ring { 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-16deg); } 50% { transform: none; } } }
.track-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6) var(--space-8); align-items: start; }
@media (min-width: 960px) { .track-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.stage { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); overflow: hidden; }
.stage-caption { padding: var(--space-4) var(--space-5) var(--space-5); border-top: 1px solid var(--color-divider); }
.stage-caption p + p { margin-top: var(--space-2); }
.eta { padding-bottom: var(--space-5); border-bottom: 1px solid var(--color-divider); }
.eta-label { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); font-weight: 600; }
.eta-time { font-family: var(--font-heading); font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); line-height: 1.2; }
.eta-count { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.alerts { padding-block: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-divider); margin-bottom: var(--space-5); }
.alerts .button-row { margin-top: 0; margin-bottom: var(--space-2); }
.timeline li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding-bottom: var(--space-4); }
.timeline li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--color-divider); }
.timeline li:last-child::before { display: none; }
.timeline li.is-done::before { background: var(--color-accent); }
.timeline .dot { width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--color-field-border); border-radius: 50%; }
.timeline .dot .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.timeline .is-done .dot { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-on-accent); }
.timeline .is-current .dot { border-color: var(--color-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.timeline li:not(.is-done):not(.is-current) strong { color: var(--color-text-muted); font-weight: 500; }
.timeline time, .timeline .state { font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.messages li { padding-block: var(--space-3); border-top: 1px solid var(--color-divider); }
.messages li.is-late, .messages li.is-delay { border-left: 3px solid var(--color-error); padding-left: var(--space-3); }
.messages time { display: block; font-size: var(--text-xs); color: var(--color-text-muted); }
.receipt li { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); border-top: 1px solid var(--color-divider); }
.receipt li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.receipt small { display: block; color: var(--color-text-muted); font-size: var(--text-sm); }
.summary-list { margin-block: var(--space-3); }
.confirm { margin: auto; width: min(440px, calc(100% - 32px)); padding: var(--space-5); }
.confirm h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }

/* ---------- Cooking scenes: food colours for the illustrations ---------- */
.scene {
  --wall: #3A141C; --tile: #4D222B; --counter: #6B3B2A; --counter-edge: #8C5238;
  --iron: #4A4648; --iron-dark: #262325; --board: #B9814E; --plate: #EFE6D8; --plate-in: #FFFaf0;
  --bun: #D8953F; --bun-cut: #F3D9A4; --seed: #FBEBC4; --patty: #6A3320; --patty-raw: #B5605A; --char: #26120C;
  --cheese: #F4B52E; --cheese-pale: #F6D777; --sauce: #E0763A; --sauce-red: #B83A25; --lettuce: #7FA344; --herb: #5E8C3A; --tomato: #C93F2E; --onion: #E9D3E0; --fry: #EDBB4C; --carton: #8D1F2D;
  --dough: #EBCF9C; --crust: #C98A43; --brick: #8A4430; --olive: #2F2A26; --pepper: #5F8F3E; --pepperoni: #9E2A20;
  --meat: #8A4422; --meat-light: #C98A62; --meat-raw: #C4705F; --coal: #D4481F; --flame: #F0842A; --flame-core: #FFD66B;
  --masala: #A93E17; --masala-light: #C7691F; --oil: #D79A2B; --ginger: #F1D58E; --chili: #3F7A33;
  --glass: #DFF1F0; --drink: #E89A1E; --ice: #FFFFFF; --lemon: #E7C948; --straw: #C93F4E;
  --cream: #F4E3C0; --sweet: #7C2F16; --syrup: #C97A12; --bowl: #D9CBB5;
  --ink: #3A1A12; --paper: #F8EFDD; --gold: #E7C07A; --ok: #8FB26B;
  position: relative; aspect-ratio: 4 / 3; background: var(--wall);
}
.scene[data-tone="mint"] { --drink: #8FBF5A; } .scene[data-tone="lime"] { --drink: #D3DE7A; } .scene[data-tone="chai"] { --drink: #B97F4E; }
.scene[data-tone="coffee"] { --drink: #7A4A2C; } .scene[data-tone="water"] { --drink: #A9D6E5; } .scene[data-tone="mango"] { --drink: #F2A71B; }
.scene-svg { display: block; width: 100%; height: 100%; }
.s-wall { fill: var(--wall); } .s-tile { stroke: var(--tile); stroke-width: 2; fill: none; } .s-counter { fill: var(--counter); } .s-counter-edge { fill: var(--counter-edge); }
.s-shadow { fill: #000; opacity: .25; } .s-plate { fill: var(--plate); } .s-plate-in { fill: var(--plate-in); } .s-bowl { fill: var(--bowl); }
.s-board { fill: var(--board); } .s-iron { fill: var(--iron); } .s-iron-dark { fill: var(--iron-dark); } .s-iron-handle { fill: none; stroke: var(--iron); stroke-width: 9; stroke-linecap: round; }
.s-bun { fill: var(--bun); } .s-bun-cut { fill: var(--bun-cut); } .s-seed { fill: var(--seed); } .s-patty { fill: var(--patty); } .s-patty-raw { fill: var(--patty-raw); }
.s-char { stroke: var(--char); stroke-width: 3; stroke-linecap: round; fill: none; opacity: .75; }
.s-cheese { fill: var(--cheese); } .s-cheese-pale { fill: var(--cheese-pale); } .s-sauce { fill: var(--sauce); } .s-sauce-red { fill: var(--sauce-red); } .s-lettuce { fill: var(--lettuce); } .s-herb { fill: var(--herb); }
.s-tomato { fill: var(--tomato); } .s-onion { fill: none; stroke: var(--onion); stroke-width: 3.5; } .s-fry { fill: var(--fry); } .s-carton { fill: var(--carton); }
.s-dough { fill: var(--dough); } .s-crust { fill: var(--crust); } .s-brick { fill: var(--brick); } .s-oven-mouth { fill: #1C0B08; }
.s-olive { fill: var(--olive); } .s-pepper { fill: var(--pepper); } .s-pepperoni { fill: var(--pepperoni); } .s-cut { stroke: var(--crust); stroke-width: 2.5; fill: none; }
.s-meat { fill: var(--meat); } .s-meat-light { fill: var(--meat-light); } .s-meat-raw { fill: var(--meat-raw); }
.s-rod { stroke: #C9C2BC; stroke-width: 4; fill: none; stroke-linecap: round; } .s-rod-end { fill: none; stroke: #C9C2BC; stroke-width: 3.5; }
.coal { fill: var(--coal); } .s-chutney { fill: var(--herb); } .s-oil { fill: var(--oil); } .s-masala { fill: var(--masala); } .s-masala-light { fill: var(--masala-light); }
.s-ginger { stroke: var(--ginger); stroke-width: 3.5; stroke-linecap: round; fill: none; } .s-chili { stroke: var(--chili); stroke-width: 5; stroke-linecap: round; fill: none; }
.s-spoon { stroke: var(--board); stroke-width: 9; stroke-linecap: round; fill: none; } .s-spoon-head { fill: var(--board); }
.s-glass { fill: var(--glass); fill-opacity: .13; stroke: var(--glass); stroke-width: 3; } .s-drink { fill: var(--drink); } .s-ice { fill: var(--ice); opacity: .38; }
.s-pour { stroke: var(--drink); stroke-width: 8; fill: none; stroke-dasharray: 18 7; } .s-spout { fill: var(--bowl); } .s-straw { stroke: var(--straw); stroke-width: 7; fill: none; stroke-linejoin: round; }
.s-lemon { fill: var(--lemon); } .s-lemon-cut { stroke: var(--paper); stroke-width: 2; }
.s-cream { fill: var(--cream); } .s-sweet { fill: var(--sweet); } .s-syrup { stroke: var(--syrup); stroke-width: 6; fill: none; stroke-linecap: round; } .s-nut { fill: var(--ginger); }
.s-cloche { fill: #D8D2CC; } .s-ticket { fill: var(--paper); } .s-ticket-line { stroke: #B7A58C; stroke-width: 4; stroke-linecap: round; } .s-ticket-text { fill: var(--ink); font: 700 24px var(--font-heading); } .s-pin { fill: var(--carton); }
.s-road { fill: #2B2527; } .road-dash { stroke: var(--paper); stroke-width: 5; stroke-dasharray: 34 26; opacity: .6; fill: none; }
.speed path { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; opacity: .6; }
.s-tyre { fill: #171416; stroke: #6F6668; stroke-width: 4; } .s-hub { fill: #CFC7C0; } .s-spoke { stroke: #6F6668; stroke-width: 3; } .s-bike { fill: none; stroke: #CFC7C0; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.s-bike-body { fill: var(--gold); } .s-seat { fill: #171416; } .s-box { fill: var(--carton); stroke: var(--gold); stroke-width: 2; } .s-box-line { stroke: var(--gold); stroke-width: 2; } .s-ember-mark { stroke: var(--gold); stroke-width: 3; fill: none; stroke-linecap: round; }
.s-done { fill: var(--carton); stroke: var(--gold); stroke-width: 3; } .s-tick { fill: none; stroke: var(--paper); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; } .s-done-text { fill: var(--paper); font: italic 600 28px var(--font-heading); }
.s-cross { stroke: var(--paper); stroke-width: 8; stroke-linecap: round; }
.flame { fill: var(--flame); } .flame.core { fill: var(--flame-core); }
.steam path { fill: none; stroke: #FFF4E4; stroke-width: 4; stroke-linecap: round; opacity: .22; }
.sizzle circle { fill: var(--flame-core); opacity: .5; }
.bubbles circle { fill: var(--oil); opacity: .8; }

.layer { opacity: 0; transition: opacity 450ms ease, transform 550ms cubic-bezier(.2,.8,.3,1.2); transform: translateY(-34px); }
.layer.fade { transform: none; }
.layer.on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .flame { animation: flicker .55s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
  .steam path { opacity: 0; animation: steam 2.4s ease-out infinite; }
  .sizzle circle { animation: spit .9s ease-out infinite; }
  .bubbles circle { animation: bubble 1.7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .coal { animation: glow 1.6s ease-in-out infinite alternate; }
  .slide { animation: slide-in .75s cubic-bezier(.2,.8,.3,1) both; }
  .drop { animation: drop-in .7s cubic-bezier(.3,.8,.4,1.25) both; }
  .settle { animation: settle-plate .9s cubic-bezier(.2,.8,.3,1.2) both; }
  .flip { animation: flip 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .flip-small { animation: hop 3.2s ease-in-out infinite; }
  .melt { animation: melt 2.6s ease-out infinite alternate; transform-box: fill-box; transform-origin: top; }
  .toast-bun, .hover-bob { animation: bob 2.2s ease-in-out infinite; }
  .stretch { animation: stretch 2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
  .bake { animation: bob 2.6s ease-in-out infinite; }
  .turn { animation: turn 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .char-marks { animation: appear 1.4s ease both; }
  .stir { animation: stir 2.2s ease-in-out infinite alternate; transform-origin: 200px 150px; }
  .pour { animation: appear .6s ease both; } .s-pour { animation: pour .6s linear infinite; }
  .spoon-pour { animation: bob 2.4s ease-in-out infinite; } .drip { stroke-dasharray: 8 10; animation: pour 1s linear infinite; }
  .rattle { animation: rattle 1.3s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
  .lift { animation: lift 1.6s cubic-bezier(.3,.7,.3,1) .3s both; }
  .sway { animation: sway 3.2s ease-in-out infinite; transform-origin: 200px 72px; }
  .spin { animation: spin .7s linear infinite; }
  .ride { animation: ride .5s ease-in-out infinite alternate; }
  .road-dash { animation: road .7s linear infinite; } .speed path { animation: blink 1s ease-in-out infinite; }
  .s-tick { stroke-dasharray: 1; animation: draw 900ms ease-out 500ms both; }
  @keyframes flicker { from { transform: scale(1, .82); } to { transform: scale(.92, 1.12); } }
  @keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 35% { opacity: .42; } 100% { opacity: 0; transform: translateY(-26px); } }
  @keyframes spit { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
  @keyframes bubble { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: .85; transform: scale(1.2); } }
  @keyframes glow { from { opacity: .45; } to { opacity: 1; } }
  @keyframes slide-in { from { opacity: 0; transform: translateX(-120px); } }
  @keyframes drop-in { from { opacity: 0; transform: translateY(-90px); } }
  @keyframes settle-plate { 0% { opacity: 0; transform: translateY(-18px); } 60% { opacity: 1; transform: translateY(3px); } 100% { transform: none; } }
  @keyframes flip { 0%, 55%, 100% { transform: none; } 70% { transform: translateY(-52px) rotate(180deg); } 85% { transform: translateY(0) rotate(360deg); } 86% { transform: none; } }
  @keyframes hop { 0%, 60%, 100% { transform: none; } 75% { transform: translateY(-22px); } }
  @keyframes melt { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
  @keyframes bob { 50% { transform: translateY(-5px); } }
  @keyframes stretch { from { transform: scale(.9, .96); } to { transform: scale(1.02, 1); } }
  @keyframes turn { 0%, 40%, 100% { transform: scaleY(1); } 55% { transform: scaleY(.18); } 70% { transform: scaleY(1); } }
  @keyframes appear { from { opacity: 0; } }
  @keyframes stir { from { transform: rotate(-9deg) translateX(-26px); } to { transform: rotate(8deg) translateX(30px); } }
  @keyframes pour { to { stroke-dashoffset: -25; } }
  @keyframes rattle { 0%, 70%, 100% { transform: none; } 76% { transform: translateY(-7px) rotate(-2deg); } 82% { transform: rotate(1.5deg); } 88% { transform: translateY(-3px); } }
  @keyframes lift { from { transform: translateY(78px); } to { transform: none; } }
  @keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes ride { to { transform: translateY(-3px); } }
  @keyframes road { to { stroke-dashoffset: 60; } }
  @keyframes blink { 50% { opacity: .15; } }
}
@media (prefers-reduced-motion: reduce) { .layer { transform: none; } .scene .pour { display: none; } }
.scene.paused * { animation-play-state: paused !important; }
