/* ============================================================
   The Food Never Comes — stylesheet
   One cascade. No inline styles in the app code.
   ============================================================ */

:root {
  --paper:      #fbf7f2;
  --paper-2:    #ffffff;
  --paper-3:    #f3ece3;
  --ink:        #1c1714;
  --ink-2:      #514842;
  --ink-3:      #6f645c;   /* 5.39:1 on --paper, 4.90:1 on --paper-3 */
  --line:       #e6dbcf;
  --line-2:     #d5c7b8;

  --brand:      #d7391c;
  --brand-dk:   #ab2a12;
  --brand-tint: #fdeee9;
  --good:       #1f7a4d;
  --good-tint:  #e6f4ec;
  --warn:       #a76a12;
  --warn-tint:  #fdf1dc;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-1: 0 1px 2px rgba(28,23,20,.06), 0 2px 8px rgba(28,23,20,.05);
  --shadow-2: 0 4px 14px rgba(28,23,20,.09), 0 12px 34px rgba(28,23,20,.08);
  --shadow-3: 0 18px 60px rgba(28,23,20,.22);

  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --col: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------------------------------------------------- */

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,247,242,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.appbar__in {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px;
}

.brandmark {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; letter-spacing: -.02em; font-size: 16px;
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  border-radius: var(--r-sm);
}
.brandmark__dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--brand); flex: none;
  box-shadow: 0 0 0 4px var(--brand-tint);
}

.addr {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0; margin-inline-start: auto; text-align: right;
}
.addr__label { font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.addr__value {
  font-size: 14px; font-weight: 650; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
}
.addr__value.is-loading { color: var(--ink-3); font-weight: 500; }

.langtoggle {
  display: inline-flex; border: 1px solid var(--line-2);
  border-radius: 999px; overflow: hidden; background: var(--paper-2);
  flex: none;
}
.langtoggle button {
  border: 0; background: none; cursor: pointer;
  padding: 7px 13px; font-size: 13px; font-weight: 650;
  color: var(--ink-3); min-height: 34px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.langtoggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- notice ---------------------------------------------------- */

.notice {
  display: flex; align-items: center; gap: 9px;
  background: var(--warn-tint); color: #6d4408;
  border: 1px solid #f0dcb6; border-radius: var(--r-md);
  padding: 11px 14px; font-size: 13.5px; margin: 16px 0 0;
}
.notice__icon { flex: none; font-size: 15px; }

/* ---------- hero ------------------------------------------------------ */

.hero { padding: 28px 0 10px; }
.hero h1 {
  margin: 0; font-size: clamp(30px, 6vw, 46px);
  letter-spacing: -.035em; line-height: 1.04; font-weight: 820;
}
.hero p {
  margin: 10px 0 0; color: var(--ink-2);
  font-size: clamp(15px, 2.2vw, 17px); max-width: 46ch;
}

/* ---------- section head --------------------------------------------- */

.sechead {
  display: flex; align-items: baseline; gap: 12px;
  margin: 30px 0 14px;
}
.sechead h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; font-weight: 750; }
.sechead p { margin: 0; color: var(--ink-3); font-size: 13.5px; }

/* ---------- restaurant grid ------------------------------------------ */

.rgrid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
}
@media (min-width: 620px) { .rgrid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 980px) { .rgrid { grid-template-columns: repeat(3, 1fr); } }

/* Card rows are containers, not buttons: a <button> may not wrap a heading or
   another control. The title button stretches over the card instead. */
.stretch {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 3px solid var(--brand); outline-offset: -2px; border-radius: inherit; }

.rcard {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-1); text-align: left;
  transition: transform .34s var(--ease-out), box-shadow .34s var(--ease-out),
              border-color .34s var(--ease-out);
}
.rcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.rcard:active { transform: translateY(-1px); }
.rcard .stretch::after { border-radius: var(--r-lg); }

.rcard__media { position: relative; aspect-ratio: 25 / 14; background: var(--paper-3); overflow: hidden; }
.rcard__media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .6s var(--ease), transform .9s var(--ease-out);
}
.rcard__media img.is-loaded { opacity: 1; transform: none; }

.rtag {
  position: absolute; left: 12px; top: 12px;
  background: rgba(28,23,20,.82); color: #fff;
  font-size: 12px; font-weight: 650; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

.rcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.rcard__title { margin: 0; font-size: 16.5px; font-weight: 720; letter-spacing: -.015em; }
.rcard__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; color: var(--ink-2); }
.rcard__meta .dot { color: var(--line-2); }
.star { color: var(--brand); font-weight: 700; }

/* ---------- skeletons ------------------------------------------------- */

.sk { background: var(--paper-3); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.skcard {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
}
.skcard__media { aspect-ratio: 25 / 14; }
.skcard__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; }
.sk-line.w70 { width: 70%; }
.sk-line.w45 { width: 45%; }
.sk-line.w90 { width: 90%; }

/* ---------- entrance -------------------------------------------------- */

.rise { opacity: 0; transform: translateY(14px); }
.rise.is-in {
  opacity: 1; transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease-out);
}

/* ---------- buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 20px; min-height: 44px;
  font-size: 15px; font-weight: 680; letter-spacing: -.01em;
  cursor: pointer; background: var(--paper-3); color: var(--ink);
  transition: background .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease), opacity .2s var(--ease);
}
.btn:hover { background: var(--line); }
.btn:active { transform: scale(.985); }
.btn[disabled] { cursor: default; opacity: .62; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 3px 12px rgba(215,57,28,.26); }
.btn--primary:hover { background: var(--brand-dk); }
.btn--ghost { background: transparent; border-color: var(--line-2); }
.btn--ghost:hover { background: var(--paper-3); }
.btn--block { width: 100%; }
.btn--lg { min-height: 54px; font-size: 16.5px; padding: 14px 24px; }

.btn--add {
  min-height: 38px; padding: 8px 18px; font-size: 14px;
  background: var(--ink); color: #fff; border-radius: 999px;
  min-width: 84px;
}
.btn--add:hover { background: #000; }
.btn--add.is-pending { background: var(--ink-3); }
.btn--add.is-done { background: var(--good); }

.spinner {
  width: 15px; height: 15px; flex: none;
  border: 2px solid rgba(255,255,255,.36);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner--ink { border-color: rgba(28,23,20,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- back bar -------------------------------------------------- */

.viewbar {
  position: sticky; top: 62px; z-index: 30;
  background: rgba(251,247,242,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.viewbar__in { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.iconbtn {
  border: 1px solid var(--line-2); background: var(--paper-2);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex: none;
  font-size: 17px; transition: background .18s var(--ease);
}
.iconbtn:hover { background: var(--paper-3); }
.viewbar__title {
  margin: 0; font-size: 16px; font-weight: 720; letter-spacing: -.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- restaurant view ------------------------------------------ */

.rhero { position: relative; border-radius: var(--r-lg); overflow: hidden; margin-top: 18px; box-shadow: var(--shadow-1); }
.rhero img { width: 100%; aspect-ratio: 25 / 9; object-fit: cover; }
.rhero__scrim {
  position: absolute; inset: auto 0 0 0; padding: 40px 22px 18px; color: #fff;
  background: linear-gradient(transparent, rgba(20,15,12,.86));
}
.rhero__scrim h2 { margin: 0; font-size: clamp(20px, 4vw, 27px); letter-spacing: -.025em; font-weight: 780; }
.rhero__meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 13.5px; margin-top: 5px; opacity: .95; }

.dishlist { display: flex; flex-direction: column; gap: 0; padding: 8px 0 120px; }

.dish {
  position: relative;
  display: grid; grid-template-columns: 1fr 108px; gap: 16px;
  align-items: center; padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background .2s var(--ease);
}
.dish:hover { background: rgba(255,255,255,.6); }
/* the Add control has to sit above the stretched title target */
.dish .btn--add, .dish__price { position: relative; z-index: 1; }
.dish__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dish__name { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.dish__desc { margin: 0; color: var(--ink-2); font-size: 14px; }
.dish__facts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ink-3); }
.dish__price { font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.dish__opts { color: var(--brand); font-weight: 620; font-size: 13px; }
.dish__media { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/3; background: var(--paper-3); }
.dish__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.dish__media img.is-loaded { opacity: 1; }
.dish__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3px; }

@media (min-width: 720px) {
  .dish { grid-template-columns: 1fr 150px; gap: 22px; padding: 22px 0; }
}

/* ---------- dialog ---------------------------------------------------- */

dialog.sheet {
  border: 0; padding: 0; background: transparent;
  max-width: 560px; width: calc(100% - 24px);
  margin: auto; color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(24,18,14,.5); backdrop-filter: blur(3px); }

.sheet__panel {
  background: var(--paper-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-3); overflow: hidden;
  display: flex; flex-direction: column; max-height: min(86vh, 780px);
}
dialog.sheet[open] .sheet__panel { animation: sheetIn .4s var(--ease-out); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(22px) scale(.985); } }

.sheet__media { position: relative; aspect-ratio: 21/9; background: var(--paper-3); flex: none; }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; }
.sheet__close {
  position: absolute; right: 12px; top: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.94); cursor: pointer;
  display: grid; place-items: center; font-size: 17px;
  box-shadow: var(--shadow-1);
}
.sheet__scroll { overflow-y: auto; padding: 18px 22px 6px; flex: 1; }
.sheet__title { margin: 0; font-size: 21px; letter-spacing: -.025em; font-weight: 780; }
.sheet__desc { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.sheet__kcal { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

.optgroup { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.optgroup__head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.optgroup__head legend, .optgroup__title { font-size: 15px; font-weight: 720; letter-spacing: -.01em; padding: 0; }
.pill {
  font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.pill--req { background: var(--brand-tint); color: var(--brand-dk); }
.pill--multi { background: var(--paper-3); color: var(--ink-2); }

.optgroup fieldset { border: 0; padding: 0; margin: 0; }
.optlist { display: flex; flex-direction: column; gap: 2px; }

.opt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-md); cursor: pointer;
  min-height: 46px;
  transition: background .18s var(--ease);
}
.opt:hover { background: var(--paper-3); }
.opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; cursor: pointer; }
.opt__label { flex: 1; font-size: 15px; }
.opt__delta { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.qtyrow {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 18px; padding: 16px 0 4px;
}
.qtyrow__label { font-size: 15px; font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--paper-2);
  font-size: 19px; cursor: pointer; display: grid; place-items: center;
  transition: background .18s var(--ease);
}
.stepper button:hover:not([disabled]) { background: var(--paper-3); }
.stepper button[disabled] { opacity: .4; cursor: default; }
.stepper__val { min-width: 34px; text-align: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.sheet__foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); background: var(--paper-2); flex: none; }

/* ---------- cart bar -------------------------------------------------- */

.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(251,247,242,.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform .42s var(--ease-out);
}
.cartbar.is-up { transform: none; }
.cartbar__in { max-width: var(--col); margin: 0 auto; }
.cartbar .btn { width: 100%; }
.cartbar__count {
  /* darken rather than lighten: white-on-lightened-red drops under 3:1 */
  background: rgba(0,0,0,.22); border-radius: 999px;
  min-width: 24px; height: 24px; display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 750; padding: 0 7px;
}

/* ---------- checkout -------------------------------------------------- */

.checkout { padding: 20px 0 140px; display: grid; gap: 22px; }
@media (min-width: 900px) { .checkout { grid-template-columns: 1.15fr .85fr; align-items: start; gap: 34px; } }

.panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-1);
}
.panel + .panel { margin-top: 20px; }
@media (min-width: 900px) {
  .panel--sticky { position: sticky; top: 132px; }
}
.panel h3 { margin: 0 0 14px; font-size: 16px; font-weight: 740; letter-spacing: -.015em; }

.olines { display: flex; flex-direction: column; gap: 14px; }
.oline { display: grid; grid-template-columns: 60px 1fr auto; gap: 13px; align-items: center; }
.oline__media { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; background: var(--paper-3); }
.oline__media img { width: 100%; height: 100%; object-fit: cover; }
.oline__name { font-size: 14.5px; font-weight: 680; }
.oline__sub { font-size: 13px; color: var(--ink-3); }
.oline__price { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.oline__ctrl { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.oline__ctrl button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--paper-2); cursor: pointer; font-size: 15px;
  display: grid; place-items: center;
}
.oline__ctrl span { min-width: 22px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

.totals { display: flex; flex-direction: column; gap: 9px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; }
.trow span:last-child { font-variant-numeric: tabular-nums; }
.trow--total {
  border-top: 1px solid var(--line); margin-top: 5px; padding-top: 13px;
  font-size: 17px; font-weight: 780; letter-spacing: -.015em;
}
.trow__muted { color: var(--ink-2); }
.quoting { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13.5px; }
.val-sk { display: inline-block; width: 76px; height: 14px; vertical-align: middle; }
.retrynote { color: var(--warn); font-size: 13px; margin: 6px 0 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 13.5px; font-weight: 660; color: var(--ink-2); }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--r-md); padding: 12px 14px; width: 100%;
  min-height: 46px;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus { background: var(--paper-2); border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }
.field textarea { resize: vertical; min-height: 74px; }

.paylist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--paper); cursor: pointer; font-size: 13.5px; font-weight: 620;
  min-height: 76px; text-align: center;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.pay input { position: absolute; opacity: 0; pointer-events: none; }
.pay__icon { font-size: 19px; }
.pay:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dk); }
.pay:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }

.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(251,247,242,.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.paybar__in { max-width: var(--col); margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.paybar__total { display: flex; flex-direction: column; gap: 1px; flex: none; }
.paybar__total small { font-size: 12px; color: var(--ink-3); }
.paybar__total strong { font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.paybar .btn { flex: 1; }

/* ---------- placing-order overlay ------------------------------------- */

.placing {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(251,247,242,.97); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn .35s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.placing__card { width: 100%; max-width: 420px; text-align: left; }
.placing h2 { margin: 0 0 22px; font-size: 21px; letter-spacing: -.025em; font-weight: 780; }

.stages { display: flex; flex-direction: column; gap: 3px; }
.stage {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 4px; font-size: 15px; color: var(--ink-3);
  transition: color .3s var(--ease);
}
.stage__mark {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--line-2); background: var(--paper-2);
  font-size: 14px; color: #fff;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease-out);
}
.stage.is-active { color: var(--ink); font-weight: 650; }
.stage.is-active .stage__mark { border-color: var(--brand); }
.stage.is-done { color: var(--ink-2); }
.stage.is-done .stage__mark {
  background: var(--good); border-color: var(--good); transform: scale(1.04);
}
.stage__spin { width: 15px; height: 15px; border-width: 2px; }

/* ---------- tracking -------------------------------------------------- */

.track { padding: 18px 0 60px; display: grid; gap: 20px; }
@media (min-width: 900px) { .track { grid-template-columns: 1.1fr .9fr; align-items: start; gap: 30px; } }

.mapcard {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  background: linear-gradient(160deg, #eef3ee, #e4ece6 60%, #dfe8e2);
}
.mapcard svg { display: block; width: 100%; height: auto; }
.route-line { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 7 7; }
.route-done { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.pin { font-size: 19px; }
.rider {
  transition: transform 1s var(--ease);
}
.rider circle { fill: var(--brand); }
.rider text { font-size: 15px; }

.etabar {
  display: flex; align-items: baseline; gap: 10px;
  padding: 15px 18px; background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.etabar__num { font-size: 30px; font-weight: 820; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.etabar__unit { font-size: 15px; color: var(--ink-2); }
.etabar__label { margin-inline-start: auto; font-size: 13.5px; color: var(--ink-3); text-align: right; }
.etabar__num.is-slipping { color: var(--warn); }

.timeline { display: flex; flex-direction: column; }
.tstep {
  display: grid; grid-template-columns: 30px 1fr; gap: 13px;
  padding-bottom: 20px; position: relative;
}
.tstep:last-child { padding-bottom: 0; }
.tstep::before {
  content: ""; position: absolute; left: 14px; top: 26px; bottom: 0;
  width: 2px; background: var(--line);
}
.tstep:last-child::before { display: none; }
.tstep__mark {
  width: 30px; height: 30px; border-radius: 50%; z-index: 1;
  display: grid; place-items: center; font-size: 14px;
  border: 2px solid var(--line-2); background: var(--paper-2); color: var(--ink-3);
  transition: background .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.tstep__body h4 { margin: 3px 0 2px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tstep__body p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.tstep.is-done .tstep__mark { background: var(--good); border-color: var(--good); color: #fff; }
.tstep.is-active .tstep__mark { border-color: var(--brand); color: var(--brand); }
.tstep.is-active .tstep__body h4 { color: var(--brand-dk); }
.tstep.is-pending { opacity: .55; }
.tstep.is-warn .tstep__mark { border-color: var(--warn); color: var(--warn); background: var(--warn-tint); }
.tstep.is-warn .tstep__body h4 { color: var(--warn); }
.tstep.is-late-in { animation: rise .5s var(--ease-out); }

.courier {
  display: flex; align-items: center; gap: 13px;
  padding: 15px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--paper);
}
.courier__av {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--brand-tint); display: grid; place-items: center; font-size: 21px;
}
.courier__name { font-size: 15px; font-weight: 700; }
.courier__sub { font-size: 13px; color: var(--ink-3); }

/* ---------- savings --------------------------------------------------- */

.savings {
  border: 1px solid #cfe6d8; background: var(--good-tint);
  border-radius: var(--r-lg); padding: 22px; margin-top: 20px;
  box-shadow: var(--shadow-1);
  animation: rise .6s var(--ease-out);
}
.savings__cta { margin-top: 14px; background: rgba(255,255,255,.72); border-color: #bcdcc9; }
.savings__cta:hover { background: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.savings h3 { margin: 0 0 4px; font-size: 18px; font-weight: 780; letter-spacing: -.02em; color: #12603a; }
.savings > p { margin: 0 0 16px; font-size: 14px; color: #2c6247; }
.savegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.savecell {
  background: rgba(255,255,255,.72); border-radius: var(--r-md);
  padding: 13px 12px; text-align: center;
}
.savecell strong {
  display: block; font-size: clamp(17px, 4vw, 22px); font-weight: 820;
  letter-spacing: -.03em; color: #12603a; font-variant-numeric: tabular-nums;
}
.savecell span { font-size: 12.5px; color: #3c6b53; }

/* ---------- footer ---------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 24px 0 40px; font-size: 13.5px; color: var(--ink-3);
}
.foot__in { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.foot a:hover { color: var(--brand); }
.foot__sp { margin-inline-start: auto; }

/* ---------- toast ----------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 70;
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-2);
  pointer-events: none;
  transition: opacity .32s var(--ease), transform .32s var(--ease-out);
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }

/* ---------- credits page --------------------------------------------- */

.creditlist { columns: 2 260px; column-gap: 26px; padding: 0 0 40px; margin: 0; list-style: none; }
.creditlist li { break-inside: avoid; font-size: 13px; color: var(--ink-2); padding: 7px 0; border-bottom: 1px solid var(--line); }
.creditlist a { color: var(--ink); }

/* ---------- motion preferences ---------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rise { opacity: 1; transform: none; }
  .rcard__media img, .dish__media img { opacity: 1; transform: none; }
}
