/* PitScoff: оранжевый как стаканы и вывеска, строительный жёлтый как экскаваторы,
   тёплый песочный фон, округлые шрифты как в логотипе */
:root {
  --bg: #FFF7F0;
  --surface: #FFFFFF;
  --surface-2: #FFF0E4;
  --ink: #1F1A17;
  --muted: #7D6E63;
  --line: #F1E3D6;
  --brand: #F26A1F;
  --brand-deep: #D9550E;
  --brand-ink: #FFFFFF;
  --brand-soft: #FFE5D3;
  --sun: #FFC328;
  --sun-soft: #FFF1C7;
  --sand: #EBD3AE;
  --cup: #FFFFFF;
  --ready: #1E9E62;
  --ready-soft: #DDF4E8;
  --danger: #D63A2F;
  --danger-soft: #FDE4E1;
  --t-caramel: #FFE5D3; --t-caramel-ink: #D9550E;
  --t-ice: #DDEFF7;     --t-ice-ink: #2A6F8C;
  --t-leaf: #E3F1D8;    --t-leaf-ink: #4A7A31;
  --t-berry: #FFE0E6;   --t-berry-ink: #B23A5A;
  --radius: 22px;
  --shadow: 0 2px 6px rgba(242, 106, 31, .06), 0 12px 30px rgba(31, 26, 23, .07);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --logo: 'Comfortaa', 'Nunito', sans-serif;
  --tabbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120F;
    --surface: #221B17;
    --surface-2: #2B221C;
    --ink: #FBF1E8;
    --muted: #B9A697;
    --line: #362A22;
    --brand: #FF7A2E;
    --brand-deep: #FF8E4D;
    --brand-soft: #3A2417;
    --sun-soft: #3A3014;
    --cup: #2B221C;
    --ready: #4CC98B;
    --ready-soft: #173A28;
    --danger: #FF7B70;
    --danger-soft: #3D1F1C;
    --t-caramel: #3A2417; --t-caramel-ink: #FFAF7D;
    --t-ice: #1A2E37;     --t-ice-ink: #96CDE3;
    --t-leaf: #1F2E19;    --t-leaf-ink: #A8D58B;
    --t-berry: #3A1F27;   --t-berry-ink: #F3A5B8;
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 600 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }
small { font-size: 12.5px; }
[hidden] { display: none !important; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px calc(var(--tabbar) + 110px); }

/* ---------- Шапка ---------- */
.top {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 6px;
}
.logo {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand); color: #fff; text-decoration: none;
  box-shadow: 0 6px 16px rgba(242, 106, 31, .35);
}
.logo-name { font: 700 13px/1 var(--logo); letter-spacing: -.02em; }
.logo-tag { font: 500 4.6px/1 var(--logo); letter-spacing: .02em; margin-top: 2px; opacity: .9; }
.top-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hello { font-weight: 900; font-size: 19px; line-height: 1.15; }
.where { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--surface); box-shadow: var(--shadow); color: var(--muted);
}
.open-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.open-pill.ok { color: var(--ready); }
.open-pill.off { color: var(--danger); }
@media (max-width: 400px) { .open-pill { display: none; } }

/* ---------- Главный баннер ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 12px; min-height: 300px; border-radius: 28px;
  background: var(--brand); color: #fff;
  box-shadow: 0 16px 40px rgba(242, 106, 31, .28);
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 62%; z-index: -2;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(217, 85, 14, .96) 0%, rgba(242, 106, 31, .88) 42%, rgba(242, 106, 31, .15) 75%, rgba(242, 106, 31, 0) 100%);
}
/* на телефоне фото сверху целиком, текст под ним на оранжевом */
@media (max-width: 640px) {
  .hero { min-height: 0; background: linear-gradient(180deg, var(--brand), var(--brand-deep)); }
  .hero-img { position: relative; display: block; height: 240px; object-position: 50% 60%; }
  .hero::after { background: linear-gradient(180deg, rgba(242, 106, 31, 0) 150px, var(--brand) 240px, rgba(0, 0, 0, 0) 240px); }
  .hero-body { padding-top: 0; margin-top: -34px; position: relative; }
}
@media (min-width: 641px) {
  .hero-img { left: auto; width: 58%; object-position: 30% 58%; }
  .hero::after { background: linear-gradient(90deg, var(--brand-deep) 0%, var(--brand) 42%, rgba(242, 106, 31, .55) 50%, rgba(242, 106, 31, 0) 64%); }
  .tabbar { left: 50%; right: auto; bottom: 14px; width: 480px; transform: translateX(-50%); border-radius: 22px; padding-bottom: 6px; height: var(--tabbar); }
  .cart-bar { bottom: calc(var(--tabbar) + 14px); }
}
.hero-body { padding: 26px 22px 22px; max-width: 470px; }
.hero-kicker {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px);
  font: 700 12px/1 var(--logo); letter-spacing: .03em;
}
.hero h1 { margin: 12px 0 8px; font-size: clamp(34px, 8vw, 54px); line-height: .98; font-weight: 900; letter-spacing: -.02em; }
.hero p { margin: 0; font-size: 15.5px; opacity: .95; max-width: 360px; }
.how { display: flex; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.how li { display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 800; }
.how b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--brand); font-size: 12px; }
/* клетчатый флаг — отсылка к «питстопу» */
.hero-checker {
  position: absolute; top: 18px; right: 18px; width: 56px; height: 40px; border-radius: 8px;
  background: repeating-conic-gradient(#1F1A17 0 25%, #fff 0 50%) 0 0 / 14px 14px;
  transform: rotate(8deg); box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 14px 0 0; padding: 13px 15px; border-radius: 18px;
  background: var(--danger-soft); color: var(--danger); font-weight: 700; font-size: 14px;
}

/* ---------- Активный заказ: карточка как бонусная карта ---------- */
.active-order {
  display: flex; flex-direction: column; gap: 6px;
  margin: 14px 0 0; padding: 18px; border-radius: 24px; text-decoration: none;
  color: #fff; background: radial-gradient(circle at 85% 0%, #FF9A55, var(--brand) 45%, var(--brand-deep));
  box-shadow: 0 12px 30px rgba(242, 106, 31, .3);
}
.active-order.s-ready { background: radial-gradient(circle at 85% 0%, #5FD99B, #1E9E62 55%, #17834F); box-shadow: 0 12px 30px rgba(30, 158, 98, .3); }
.ao-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; opacity: .9; }
.ao-title { font-size: 22px; font-weight: 900; }
.ao-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.ao-bar span { display: block; height: 100%; border-radius: 4px; background: #fff; }
.ao-go { font-size: 13.5px; font-weight: 800; }

/* ---------- Промо ---------- */
.promo {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 0; padding: 16px 16px 16px 18px; border-radius: 24px;
  background: var(--sun); color: #1F1A17; overflow: hidden;
}
.promo-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.promo-kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.promo b { font-size: 19px; font-weight: 900; line-height: 1.15; }
.promo-text > span:last-child { font-size: 13px; font-weight: 700; opacity: .8; }
.promo-art { flex: none; width: 110px; }
.promo-art svg { display: block; width: 100%; height: auto; }

/* ---------- Разделы ---------- */
.cats {
  position: sticky; top: 0; z-index: 15;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 16px; margin: 18px -16px 0;
  background: var(--bg); scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 1px 3px rgba(31, 26, 23, .06);
  text-decoration: none; font-weight: 800; font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 14px rgba(242, 106, 31, .3); }

.cat { scroll-margin-top: 64px; }
.cat h2 { font-size: 22px; font-weight: 900; margin: 20px 0 12px; letter-spacing: -.01em; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Карточка товара ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  width: 100%; padding: 8px; text-align: left; cursor: pointer;
  border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
@media (hover: hover) { .card:hover { transform: translateY(-2px); } }
.card:active { transform: scale(.98); }
.card.off { cursor: not-allowed; }
.card.off .card-media, .card.off .card-name { opacity: .45; }
.card-media {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  border-radius: 16px; overflow: hidden;
}
.card-media.photo { display: block; position: relative; background: var(--sand); }
/* кадр со стаканом: приближаем к нему */
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 40% 64%;
  transform: scale(1.3); transform-origin: 42% 58%;
}
.card-media svg { width: 46%; height: 46%; }
.card-media svg, svg.i { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i { width: 20px; height: 20px; stroke-width: 1.8; flex: none; }
.tone-caramel { background: var(--t-caramel); color: var(--t-caramel-ink); }
.tone-ice { background: var(--t-ice); color: var(--t-ice-ink); }
.tone-leaf { background: var(--t-leaf); color: var(--t-leaf-ink); }
.tone-berry { background: var(--t-berry); color: var(--t-berry-ink); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 10px 4px 2px; min-width: 0; }
.card-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.card-desc { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc:empty { display: none; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 10px; }
.price { font-weight: 900; font-size: 15px; }
.add {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-size: 22px; line-height: 1; font-weight: 700;
  box-shadow: 0 4px 10px rgba(242, 106, 31, .35);
}
.soldout { font-size: 12px; font-weight: 800; color: var(--danger); background: var(--danger-soft); padding: 4px 9px; border-radius: 9px; }
.tag-new {
  position: absolute; top: 14px; right: 14px; padding: 3px 8px; border-radius: 8px;
  background: var(--sun); color: #1F1A17; font-size: 11px; font-weight: 900; letter-spacing: .04em;
}
.badge {
  position: absolute; top: 14px; left: 14px; min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 13px; background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 900; display: none; place-items: center;
}
.badge.show { display: grid; }

.foot { margin-top: 40px; padding: 18px; border-radius: 22px; background: var(--surface); color: var(--muted); font-size: 13.5px; }
.foot b { color: var(--ink); font-family: var(--logo); }

/* ---------- Нижнее меню и корзина ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
  background: var(--surface); box-shadow: 0 -6px 24px rgba(31, 26, 23, .08);
  border-radius: 22px 22px 0 0;
}
.tb {
  position: relative; flex: 1; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; text-decoration: none; cursor: pointer;
  color: var(--muted); font-size: 11.5px; font-weight: 800; border-radius: 16px;
}
.tb svg.i { width: 23px; height: 23px; }
.tb.on { color: var(--brand); background: var(--brand-soft); }
.tb em {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--brand); color: #fff; font: 900 11px/18px var(--font); font-style: normal; text-align: center;
}
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 30;
  padding: 10px 16px; pointer-events: none;
}
.cart-btn {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 560px; margin: 0 auto; padding: 15px 18px;
  border: 0; border-radius: 18px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); font-weight: 900; font-size: 16px;
  box-shadow: 0 12px 28px rgba(242, 106, 31, .4);
  animation: rise .3s ease-out;
}
.cart-btn .cnt { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: #fff; color: var(--brand); font-size: 14px; }
.cart-btn .sum { margin-left: auto; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Шторка ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(23, 18, 15, .5); opacity: 0; transition: opacity .25s; }
.sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 20px 20px 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
body.sheet-open .backdrop { opacity: 1; }
body.sheet-open .sheet { transform: none; }
@media (min-width: 720px) {
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto; width: 560px; max-height: 88vh;
    border-radius: 28px; opacity: 0; transform: translate(-50%, -46%);
    transition: transform .25s, opacity .25s;
  }
  body.sheet-open .sheet { transform: translate(-50%, -50%); opacity: 1; }
}
.sheet-photo { margin: -8px -8px 14px; height: 220px; border-radius: 22px; overflow: hidden; background: var(--sand); }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 60%; display: block; }
.sheet-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h3 { font-size: 24px; font-weight: 900; line-height: 1.15; margin: 2px 0 4px; }
.sheet-title p { margin: 0; color: var(--muted); font-size: 14px; }
.tile-lg { width: 72px; height: 72px; aspect-ratio: auto; flex: none; }
.x { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; }
.group { margin-top: 20px; }
.group-title { font-weight: 900; font-size: 15px; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.group-title small { color: var(--muted); font-weight: 700; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg-opt, .time {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 11px 6px; border-radius: 16px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.seg-opt b, .time b { font-size: 14.5px; font-weight: 900; }
.seg-opt small, .time small { color: var(--muted); font-weight: 700; }
.seg-opt.on, .time.on { border-color: var(--brand); background: var(--brand-soft); }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); font-weight: 800; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.pill small { color: var(--muted); font-weight: 700; }
.pill.on { border-color: var(--brand); background: var(--brand-soft); }

.sheet-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 12px; align-items: center;
  margin: 22px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.stepper { display: inline-flex; align-items: center; border-radius: 16px; background: var(--surface-2); flex: none; }
.stepper button { width: 42px; height: 48px; border: 0; background: none; font-size: 20px; font-weight: 800; cursor: pointer; }
.stepper span { min-width: 22px; text-align: center; font-weight: 900; }
.stepper.sm { border-radius: 12px; }
.stepper.sm button { width: 34px; height: 34px; font-size: 17px; }

.primary, .ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; cursor: pointer;
  font-weight: 900; font-size: 16px; text-decoration: none; border: 0;
}
.primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px rgba(242, 106, 31, .3); }
.primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.primary.danger { background: var(--danger); box-shadow: none; }
.ghost { background: var(--surface); border: 2px solid var(--line); color: var(--ink); }
.ghost.danger { color: var(--danger); }
.ghost.sm { min-height: 42px; font-size: 14px; padding: 0 14px; }
.grow { flex: 1; }

.lines { margin-top: 10px; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.line-main b { font-weight: 800; }
.line-main small { color: var(--muted); font-weight: 600; }
.line-sum { font-weight: 900; white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; font-size: 15px; }
.total b { font-size: 21px; font-weight: 900; }

.field { display: block; margin-top: 16px; }
.field > span:first-child { display: block; font-weight: 900; font-size: 14.5px; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 700; }
.field input, .field textarea {
  width: 100%; padding: 14px 15px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: 700 16px/1.3 var(--font); outline: none; transition: border-color .15s; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); }
.phone { display: flex; align-items: stretch; }
.phone .cc { display: grid; place-items: center; padding: 0 13px; font-weight: 900; border: 2px solid var(--line); border-right: 0; border-radius: 16px 0 0 16px; background: var(--surface); }
.phone input { border-radius: 0 16px 16px 0; }
.rules { display: flex; gap: 10px; margin: 16px 0 0; padding: 13px 15px; border-radius: 16px; background: var(--sun-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.form-error { margin-top: 14px; padding: 13px 15px; border-radius: 16px; background: var(--danger-soft); color: var(--danger); font-weight: 800; font-size: 14px; }

.confirm { padding-bottom: 22px; }
.confirm h3 { font-size: 23px; font-weight: 900; margin: 4px 0 8px; }
.confirm p { margin: 0 0 18px; color: var(--muted); }
.confirm .row { display: flex; gap: 10px; }
.confirm .row > * { flex: 1; }

/* ---------- Статус заказа ---------- */
.order {
  position: relative; overflow: hidden;
  max-width: 560px; margin: 16px auto 0; padding: 22px 20px 24px; text-align: center;
  background: var(--surface); border-radius: 30px; box-shadow: var(--shadow);
}
.order::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--brand); }
.order.s-ready::before { background: var(--ready); height: 8px; }
.order-head { display: flex; justify-content: space-between; align-items: center; text-align: left; }
.order-num { color: var(--muted); font-weight: 800; }
.order-num b { color: var(--ink); font-size: 22px; font-weight: 900; }
.link { font-weight: 900; color: var(--brand); text-decoration: none; }
.cup-wrap { margin: 8px auto 0; height: 170px; display: grid; place-items: center; }
.cup { width: 150px; height: auto; overflow: visible; }
.cup-body { fill: var(--cup); }
.cup-line { stroke: var(--ink); stroke-width: 2.5; }
.lid, .lid-top { fill: var(--ink); }
.liquid {
  fill: var(--brand);
  transform-box: fill-box; transform-origin: 50% 100%;
  transform: scaleY(var(--level, 0));
  transition: transform 1.6s cubic-bezier(.3, .7, .2, 1);
}
.s-preparing .liquid { animation: brew 1.8s ease-in-out infinite; }
@keyframes brew { 50% { opacity: .75; } }
.steam { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; opacity: 0; transition: opacity .6s .9s; }
.s-ready .steam, .s-done .steam { opacity: 1; }
.steam path { animation: steam 2.6s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: .5s; }
.steam path:nth-child(3) { animation-delay: 1s; }
@keyframes steam { 0% { transform: translateY(5px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-7px); opacity: 0; } }
.check { opacity: 0; transform: scale(.3); transform-box: fill-box; transform-origin: center; transition: opacity .4s 1s, transform .5s 1s cubic-bezier(.3, 1.6, .5, 1); }
.check circle { fill: var(--ready); }
.check path { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.s-ready .check, .s-done .check { opacity: 1; transform: none; }
.s-noshow .cup, .s-cancelled .cup { opacity: .4; }

.order-title { font-size: 32px; font-weight: 900; line-height: 1.1; margin: 10px 0 8px; letter-spacing: -.01em; }
.s-ready .order-title { color: var(--ready); }
.s-noshow .order-title, .s-cancelled .order-title { color: var(--danger); }
.order-sub { margin: 0 auto; max-width: 400px; color: var(--muted); font-size: 15.5px; }
.order-sub b { color: var(--ink); }
.eta { margin-top: 14px; }
.eta-main { display: inline-block; padding: 11px 16px; border-radius: 16px; background: var(--brand-soft); font-weight: 800; }
.eta-sub { margin-top: 8px; color: var(--muted); font-size: 14px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; margin: 26px 0 4px; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 800; }
.steps li::before { content: ''; position: absolute; top: 8px; right: 50%; width: 100%; height: 4px; background: var(--line); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--brand); }
.steps .dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 4px solid var(--line); }
.steps li.done .dot { background: var(--brand); border-color: var(--brand); }
.steps li.now .dot { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.steps li.now, .steps li.done { color: var(--ink); }
.steps .t { font-size: 11px; color: var(--muted); font-weight: 700; min-height: 14px; }
.s-ready .steps li.now .dot, .s-done .steps li.now .dot { background: var(--ready); border-color: var(--ready); box-shadow: 0 0 0 5px var(--ready-soft); }

#notifyBox:not(:empty) { margin-top: 16px; }

.receipt { max-width: 560px; margin: 14px auto 0; padding: 18px 20px; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); }
.receipt h2 { font-size: 20px; font-weight: 900; margin: 0 0 4px; }
.meta { margin: 16px 0 0; display: grid; gap: 8px; font-size: 14px; }
.meta div { display: flex; justify-content: space-between; gap: 16px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-weight: 800; text-align: right; }

.order-actions { max-width: 560px; margin: 14px auto 0; display: grid; gap: 10px; }

.empty-state { text-align: center; padding: 80px 0; }
.empty-state h2 { font-size: 26px; font-weight: 900; margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }

.loading { display: grid; place-items: center; padding: 120px 0; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 90px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg);
  font-weight: 800; font-size: 14px; box-shadow: var(--shadow); transition: .25s;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
