/* Storefront. Tokens live in theme.css.
   Shape rule: interactive controls are pills, inputs 12px, cards 18px, large panels 26px. */

.view, .topbar-in, .foot-in, #notices { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .view, .topbar-in, .foot-in, #notices { padding-inline: 28px; } }
.view { padding-block: 20px 120px; min-height: 60dvh; outline: none; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.narrow { max-width: 720px; margin-inline: auto; }
.page-title { font-size: clamp(28px, 4vw, 36px); margin: 12px 0 24px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-bar);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 8px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; font-size: 16px; min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
}
.mark.has-img { background: var(--surface-2); }
.mark img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn, .cart-btn {
  flex: none; position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  color: var(--text); text-decoration: none; font-size: 20px;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.icon-btn:hover, .cart-btn:hover { background: var(--surface-2); }
.icon-btn:active, .cart-btn:active { transform: scale(.94); }
.cart-btn .count {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
@media (max-width: 440px) { .brand-name { display: none; } }

/* ---------- Notices ---------- */
#notices { display: grid; gap: 8px; margin-top: 12px; }
#notices:empty { display: none; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--r-md); font-size: 14px; line-height: 1.45;
}
.notice .ph { margin-top: 2px; }
.notice-demo { background: var(--warn-soft); color: var(--text); }
.notice-demo .ph { color: var(--warn); }
.notice-ann { background: var(--accent-soft); }
.notice-ann .ph { color: var(--accent-text); }

/* ---------- Buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), filter .2s var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06) saturate(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; justify-content: space-between; padding-inline: 22px; }
.btn.lg { height: 54px; font-size: 16px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
}
.back-link:hover { color: var(--text); }
.back-link .ph { transition: transform .2s var(--ease); }
.back-link:hover .ph { transform: translateX(-3px); }

.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); flex: none; }
.stepper button {
  width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; transition: background .15s var(--ease);
}
.stepper button:hover:not(:disabled) { background: var(--surface); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper > span { min-width: 22px; text-align: center; font-weight: 650; font-size: 14px; }
.stepper.sm button { width: 28px; height: 28px; font-size: 13px; }

.spin {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite;
}
.spin.lg { width: 28px; height: 28px; border-width: 3px; color: var(--accent); margin: 8px 0; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 13.5px; font-weight: 550; }
.field input, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .75; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent); }
.field-hint { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--bad); font-weight: 500; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
.inline-alert {
  display: flex; gap: 8px; align-items: center; margin-top: 14px;
  background: var(--warn-soft); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px;
}

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 20px; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; padding-top: 48px; align-items: start; }
  .hero.has-image { align-items: center; }
}
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
.hero-sub { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); max-width: 44ch; margin: 20px 0 0; line-height: 1.55; }
.hero-points h2, .points-section h2 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 12px; }
.hero-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--r-xl); }
.points-section { margin-top: 56px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.points-section .points { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.points li { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.point {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px;
  padding: 18px 18px 18px 20px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.point:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.point:active { transform: translateY(0) scale(.99); }
.point[aria-disabled="true"] { opacity: .62; }
.point-text { display: grid; gap: 3px; min-width: 0; }
.point-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.point-meta { font-size: 13.5px; color: var(--muted); }
.point-go { font-size: 18px; color: var(--muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.point:hover .point-go { transform: translateX(3px); color: var(--text); }
.point-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.point-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.point-status.is-open { color: var(--ok); }
.point-status.is-open::before { background: var(--ok); }
@media (max-width: 520px) {
  .point { grid-template-columns: 1fr auto; }
  .point .point-status { grid-column: 1; grid-row: 2; }
  .point-go { grid-row: 1 / 3; grid-column: 2; }
}

/* ---------- Menu ---------- */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.menu-main { min-width: 0; }
@media (min-width: 1100px) { .menu-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.menu-head { padding-top: 8px; }
.menu-head h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; }
.menu-head > p { margin: 8px 0 0; }
.search {
  display: flex; align-items: center; gap: 10px; margin-top: 20px;
  height: 48px; padding: 0 18px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid transparent; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search .ph { color: var(--muted); font-size: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; }
.cats {
  position: sticky; top: 64px; z-index: var(--z-sticky);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 8px -16px 0; padding: 12px 16px;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cats::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .cats { margin-inline: 0; padding-inline: 0; } }
.chip {
  flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.menu-section { margin-top: 28px; scroll-margin-top: 130px; }
.menu-section h2 { font-size: 21px; margin-bottom: 14px; }

.dish-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .dish-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } }
.dish {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 108px; grid-template-areas: "body media";
  padding: 0; text-align: left; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 35ms);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.dish:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.dish:active { transform: scale(.985); }
.dish-media { grid-area: media; margin: 12px 12px 12px 0; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.dish-media img, .no-photo { width: 100%; height: 100%; object-fit: cover; }
.no-photo { display: grid; place-items: center; color: var(--faint); font-size: 30px; background: var(--surface-2); }
.dish-body { grid-area: body; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px 14px 16px; min-width: 0; }
.dish-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-desc { font-size: 13.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.dish-price { font-weight: 650; font-size: 15px; }
.dish-add {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 16px;
  transition: transform .2s var(--ease);
}
.dish:hover .dish-add { transform: scale(1.08); }
.dish.is-soldout { cursor: default; }
.dish.is-soldout:hover { transform: none; box-shadow: none; border-color: var(--line); }
.dish.is-soldout .dish-media, .dish.is-soldout .dish-name, .dish.is-soldout .dish-desc { opacity: .5; }
.dish.is-soldout .dish-price { color: var(--muted); font-weight: 500; font-size: 13.5px; }
@media (min-width: 640px) {
  .dish { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "media" "body"; }
  .dish-media { margin: 0; aspect-ratio: 4 / 3; border-radius: 0; }
  .dish-body { padding: 14px 16px 16px; }
}
.dish-skel { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.dish-skel .skeleton:nth-child(1) { aspect-ratio: 4 / 3; }
.dish-skel .skeleton:nth-child(2) { height: 16px; width: 70%; }
.dish-skel .skeleton:nth-child(3) { height: 12px; width: 45%; }

/* Popular: horizontal rail of larger cards */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 78%); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
  margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .rail { grid-auto-columns: 300px; } }
@media (min-width: 768px) { .rail { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
.dish.is-feature { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "media" "body"; scroll-snap-align: start; }
.dish.is-feature .dish-media { margin: 0; aspect-ratio: 16 / 10; border-radius: 0; }
.dish.is-feature .dish-body { padding: 14px 16px 16px; }

/* Cart side panel (desktop) */
.cart-panel { display: none; }
@media (min-width: 1100px) {
  .cart-panel {
    display: block; position: sticky; top: 88px; align-self: start;
    max-height: calc(100dvh - 110px); overflow: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;
  }
}
.cart-panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel-empty { display: grid; justify-items: start; gap: 4px; padding: 14px 0 4px; color: var(--muted); font-size: 14px; }
.panel-empty .ph { font-size: 26px; color: var(--faint); }
.panel-empty p { margin: 0; }

/* Cart lines (panel, checkout, status) */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.line-name { font-size: 14.5px; font-weight: 550; }
.line-mods { font-size: 12.5px; color: var(--muted); }
.line-price { font-size: 13.5px; color: var(--muted); }
.line-qty { min-width: 28px; color: var(--muted); font-weight: 600; font-size: 14px; }
.lines.static .line { align-items: flex-start; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; font-size: 15px; }
.total-row strong { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.cart-panel .total-row { padding-bottom: 14px; }

/* Floating cart bar (phones and tablets) */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-bar);
  max-width: 560px; margin-inline: auto; height: 58px; padding: 0 7px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; text-decoration: none;
  box-shadow: var(--shadow-lg); animation: rise .35s var(--ease) both; font-weight: 600;
}
.cart-bar-count { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.cart-bar-go {
  display: inline-flex; gap: 10px; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px;
  background: color-mix(in oklab, var(--accent-ink) 14%, transparent); font-size: 15px;
}
@media (min-width: 1100px) { .cart-bar { display: none; } }

/* ---------- Product sheet ---------- */
dialog { color: var(--text); }
dialog::backdrop { background: rgb(9 9 11 / 55%); backdrop-filter: blur(2px); }
.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); overflow: hidden;
}
.sheet[open] { animation: sheet-up .32s var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-in { position: relative; display: flex; flex-direction: column; max-height: 92dvh; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--surface); box-shadow: var(--shadow-md); }
.sheet-media img { width: 100%; aspect-ratio: 16 / 10; max-height: 34dvh; object-fit: cover; }
.sheet-scroll { overflow: auto; padding: 22px 20px 12px; overscroll-behavior: contain; }
.sheet-scroll h2 { font-size: 24px; padding-right: 44px; }
.sheet-desc { color: var(--muted); margin: 8px 0 0; }
.sheet-meta { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.sheet-actions {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface);
}
.sheet-add { flex: 1; justify-content: space-between; height: 48px; }
.sheet-add:disabled { justify-content: center; }
@media (min-width: 760px) {
  .sheet { width: min(520px, 92vw); margin: auto; border-radius: var(--r-xl); max-height: 86dvh; box-shadow: var(--shadow-lg); }
  .sheet[open] { animation: pop .28s var(--ease); }
  .sheet-in { max-height: 86dvh; }
  .sheet:has(.has-media) { width: min(860px, 94vw); }
  .sheet-in.has-media { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; height: min(620px, 86dvh); }
  .has-media .sheet-media { grid-row: 1 / 3; }
  .has-media .sheet-media img { height: 100%; max-height: none; aspect-ratio: auto; }
  .sheet-scroll { padding: 28px 28px 12px; }
  .sheet-actions { padding: 16px 28px; }
}
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.opt-group { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.opt-group legend { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 15px; }
.opt-hint { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.opt-hint.is-required { color: var(--accent-text); }
.opt { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt input { width: 19px; height: 19px; margin: 0; accent-color: var(--accent); flex: none; }
.opt-name { flex: 1; font-size: 14.5px; }
.opt-price { color: var(--muted); font-size: 14px; }
.opt.is-off { opacity: .5; cursor: default; }
.opt-off { font-size: 12px; color: var(--muted); }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.size {
  position: relative; display: grid; gap: 2px; padding: 11px 13px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--r-md); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size-name { font-size: 14px; font-weight: 550; }
.size-price { font-size: 13px; color: var(--muted); }
.size:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.size:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.size.is-off { opacity: .5; cursor: default; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .checkout { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; } }
.co-form h1 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 12px; }
.co-block { padding: 22px 0; border-top: 1px solid var(--line); }
.co-block:first-of-type { border-top: 0; }
.co-block h2 { font-size: 16px; margin-bottom: 14px; }
.co-point { display: flex; gap: 12px; align-items: flex-start; }
.co-point .ph { font-size: 22px; color: var(--accent-text); margin-top: 1px; }
.co-point div { display: grid; gap: 2px; }
.co-point .muted { font-size: 14px; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: 999px; flex-wrap: wrap; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: inline-block; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.time-field { margin-top: 14px; max-width: 200px; }
.pay-options { display: grid; gap: 10px; }
.pay {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pay input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.pay > .ph { font-size: 22px; color: var(--muted); }
.pay span { display: grid; gap: 1px; }
.pay .muted { font-size: 13px; }
.pay:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay:has(input:checked) > .ph { color: var(--accent-text); }
.co-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
@media (min-width: 960px) { .co-summary { position: sticky; top: 88px; } }
.co-summary h2 { font-size: 18px; margin-bottom: 4px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.fine a { color: var(--text); }

/* ---------- Order status ---------- */
.status { max-width: 640px; margin-inline: auto; padding-top: 8px; }
.status-main {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px 24px;
}
.status.is-first .status-main { animation: rise .4s var(--ease) both; }
.status-point { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.order-no { margin: 18px 0 10px; display: grid; }
.order-no span { font-size: 13px; color: var(--muted); }
.order-no strong { font-size: clamp(60px, 14vw, 96px); font-weight: 750; letter-spacing: -0.045em; line-height: 1; }
.status-main h1 { font-size: 26px; }
.status-sub { color: var(--muted); margin: 6px 0 0; }
.status.is-ready .status-main { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.status.is-ready .order-no strong { color: var(--accent-text); }
.status.is-bad h1 { color: var(--bad); }
.track { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.track li { font-size: 13px; color: var(--muted); font-weight: 500; }
.track-bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-3); margin-bottom: 8px; overflow: hidden; position: relative; }
.track li.is-done { color: var(--text); }
.track li.is-done .track-bar { background: var(--accent); }
.track li.is-now:not(.is-done) { color: var(--text); }
.track li.is-now:not(.is-done) .track-bar::after {
  content: ''; position: absolute; inset: 0; width: 45%; border-radius: inherit; background: var(--accent);
  animation: progress 1.6s var(--ease) infinite alternate;
}
@keyframes progress { from { transform: translateX(-60%); } to { transform: translateX(170%); } }
.status-time { display: flex; gap: 8px; align-items: center; margin: 18px 0 0; font-weight: 550; }
.status-items { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 22px; }
.status .back-link { margin-top: 18px; }

/* ---------- My orders ---------- */
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-list li { animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.order-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 18px; align-items: center; gap: 16px;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.order-list a:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ol-main { display: grid; gap: 2px; min-width: 0; }
.ol-main strong { font-size: 16px; }
.ol-main span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-meta { display: grid; justify-items: end; gap: 4px; font-size: 13px; }
.ol-total { font-weight: 650; }
.order-list .ph { color: var(--muted); }
.stage-label { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.stage-accepted, .stage-preparing, .stage-sending, .stage-awaiting_payment { background: var(--accent-soft); color: var(--accent-text); }
.stage-ready { background: var(--ok-soft); color: var(--ok); }
.stage-failed, .stage-cancelled, .stage-payment_failed { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 560px) {
  .order-list a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .ol-meta { grid-column: 1; grid-row: 2; justify-items: start; grid-auto-flow: column; }
  .order-list .ph { display: none; }
}

/* ---------- Empty, prose ---------- */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 16px; color: var(--muted); }
.empty-state .ph { font-size: 30px; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.empty-state.big { padding-top: 80px; }
.empty-state h1 { font-size: 24px; color: var(--text); }
.empty-state p { margin: 0; max-width: 40ch; }
.empty-state .btn { margin-top: 10px; }
.prose p { max-width: 65ch; line-height: 1.7; color: var(--text); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; padding-block: 28px 110px; }
@media (min-width: 1100px) { .foot-in { padding-bottom: 40px; } }
.foot-brand strong { font-weight: 650; }
.foot-brand p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 52ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 14px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* ---------- Toast, confirm ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: var(--z-toast);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: opacity .25s var(--ease), transform .25s var(--ease); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1100px) { .toast { bottom: 28px; } }
.confirm { width: min(420px, 92vw); border: 0; border-radius: var(--r-xl); padding: 0; background: var(--surface); box-shadow: var(--shadow-lg); }
.confirm[open] { animation: pop .25s var(--ease); }
.confirm-in { padding: 24px; }
.confirm-in h2 { font-size: 20px; }
.confirm-in p { color: var(--muted); margin: 8px 0 0; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
