:root {
  --bg: #090a0d;
  --surface: #13151a;
  --surface-2: #1a1d23;
  --surface-3: #22262d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f2f4;
  --text-2: #a2a7b0;
  --text-3: #6d737d;
  --mcd: #ffc72c;
  --mcd-2: #d9362a;
  --lk: #476fff;
  --red: #e5484d;
  --green: #30c46c;
  --radius: 18px;
  --header-h: 84px;
  --cartbar-h: 108px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  background:
    radial-gradient(circle at 72% -20%, rgba(71, 111, 255, .08), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 18px;
  line-height: 1.45;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

button, a {
  transition: transform .18s var(--ease), background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

button:active, a:active {
  transform: scale(.985);
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #6f8cff;
  outline-offset: 3px;
}

.ui-icon {
  width: 22px;
  height: 22px;
  flex: none;
  vertical-align: middle;
}

input, textarea, select {
  font-family: inherit;
  font-size: 20px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
  width: 100%;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--text-2);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

/* ============ 应用骨架 ============ */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 13, 0.92);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 5;
}

.header .back {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text);
  flex: none;
}

.header .back .ui-icon {
  width: 28px;
  height: 28px;
}

.header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header .sub {
  font-size: 15px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header .spacer {
  flex: 1;
}

.header .loc-chip {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  color: var(--text-2);
  flex: none;
  max-width: 280px;
}

.header-action {
  min-height: 64px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  color: var(--text-2);
  font-size: 15px;
}

.header-action:hover {
  color: var(--text);
  background: var(--surface-2);
}

.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px 32px calc(var(--cartbar-h) + 30px);
  position: relative;
}

.main.no-cartbar {
  padding-bottom: 34px;
}

/* ============ 通用组件 ============ */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: var(--surface-2);
  flex: none;
}

.pill.on {
  color: #101014;
  background: var(--mcd);
  border-color: var(--mcd);
  font-weight: 600;
}

.pill.delivery {
  color: #101014;
  background: var(--lk);
  border-color: var(--lk);
  font-weight: 600;
}

.pill.dt {
  color: #101014;
  background: var(--green);
  border-color: var(--green);
  font-weight: 600;
}

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 16px 22px;
  font-size: 16px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}

.banner .ui-icon {
  color: var(--green);
}

.primary-btn {
  min-height: 72px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 600;
  color: #101014;
  background: var(--mcd);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
  width: 100%;
}

.primary-btn:disabled {
  opacity: 0.38;
}

.primary-btn.blue {
  background: var(--lk);
  color: #f7f8ff;
}

.ghost-btn {
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 19px;
  padding: 0 26px;
  background: var(--surface-2);
}

.ghost-btn:disabled {
  opacity: 0.38;
}

.muted {
  color: var(--text-2);
}

.err-text {
  color: var(--red);
}

/* 长按按钮 */
.hold-btn {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  border-radius: 16px;
  background: var(--red);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.hold-btn .hold-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.28);
  transform: scaleX(var(--hold, 0));
  transform-origin: left center;
  pointer-events: none;
}

.hold-btn .hold-label {
  position: relative;
  z-index: 1;
}

.hold-btn.holding .hold-label::after {
  content: "…";
}

.hold-btn:disabled {
  opacity: 0.38;
}

/* ============ 首页 ============ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.brand-card {
  position: relative;
  min-height: 354px;
  border-radius: 24px;
  padding: 0;
  display: block;
  text-align: left;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .26);
  transition: transform .28s var(--ease), border-color .28s ease;
}

.brand-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .2);
}

.brand-card .brand-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.015);
  transition: transform .7s var(--ease);
}

.brand-card:hover .brand-image {
  transform: scale(1.045);
}

.brand-card .brand-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(8, 9, 12, .96) 0%, rgba(8, 9, 12, .78) 40%, rgba(8, 9, 12, .1) 78%);
}

.brand-card .brand-copy {
  position: absolute;
  left: 38px;
  top: 34px;
  bottom: 32px;
  width: 52%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-index {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .16em;
  color: var(--text-2);
}

.brand-copy strong {
  margin-top: auto;
  font-size: clamp(38px, 3.1vw, 54px);
  line-height: 1;
  letter-spacing: -.04em;
}

.brand-desc {
  margin-top: 14px;
  color: rgba(241, 242, 244, .72);
  font-size: 16px;
  line-height: 1.55;
}

.brand-cta {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
}

.brand-cta .ui-icon {
  width: 18px;
  height: 18px;
}

.brand-card.mcd .brand-cta { color: var(--mcd); }
.brand-card.blue .brand-cta { color: #8ba4ff; }

.brand-card.mcd::after,
.brand-card.blue::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 3;
}

.brand-card.mcd::after { background: var(--mcd); }
.brand-card.blue::after { background: var(--lk); }

.nl-card {
  margin-bottom: 0;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: minmax(230px, .55fr) 1.45fr;
  gap: 16px 26px;
  background: linear-gradient(120deg, rgba(71, 111, 255, .11), rgba(19, 21, 26, .82) 46%);
  border: 1px solid rgba(71, 111, 255, .22);
  border-radius: 18px;
}

.nl-heading {
  grid-row: 1 / span 2;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 6px 0;
  color: #8ba4ff;
}

.nl-heading .ui-icon {
  width: 26px;
  height: 26px;
}

.nl-heading span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nl-heading b {
  color: var(--text);
  font-size: 19px;
}

.nl-heading small {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
}

.nl-card .row {
  display: flex;
  gap: 14px;
}

.nl-card .row input {
  flex: 1;
}

.nl-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nl-chips .pill {
  font-size: 16px;
  padding: 12px 20px;
  min-height: 64px;
}

.status-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-service-row {
  margin-top: 18px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}

.status-pill.connected.mcd i { background: var(--mcd); box-shadow: 0 0 10px rgba(255, 199, 44, .5); }
.status-pill.connected.lk i { background: var(--lk); box-shadow: 0 0 10px rgba(71, 111, 255, .55); }
.status-pill.disconnected { color: #d58f92; }

.text-btn, .text-link {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.text-btn:hover, .text-link:hover { color: var(--text); }
.text-btn .ui-icon, .text-link .ui-icon { width: 18px; height: 18px; }

/* ============ 连接与车机 ============ */
.guide-page {
  max-width: 1500px;
  margin: 0 auto;
}

.guide-intro {
  padding: 18px 4px 30px;
  max-width: 900px;
}

.guide-kicker {
  color: #8ba4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
}

.guide-intro h2 {
  margin-top: 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.guide-intro p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 17px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.setup-service {
  position: relative;
  min-height: 220px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: start;
  gap: 20px;
  overflow: hidden;
}

.setup-service::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.setup-service.mcd::after { background: var(--mcd); }
.setup-service.lk::after { background: var(--lk); }

.setup-number {
  color: var(--text-3);
  font-size: 14px;
  letter-spacing: .12em;
}

.setup-copy h3 {
  font-size: 25px;
  line-height: 1.2;
}

.setup-copy p {
  margin-top: 9px;
  color: var(--text-2);
  font-size: 15px;
}

.setup-copy code,
.trust-note code {
  display: inline-block;
  margin-top: 16px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #c8ced8;
  background: #0d0f13;
  font-size: 13px;
  user-select: text;
  -webkit-user-select: text;
}

.service-state {
  justify-self: end;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--surface-2);
  color: var(--text-2);
}

.service-state.ready { color: #78d99e; background: rgba(48, 196, 108, .1); }
.service-state.error { color: #f19a9e; background: rgba(229, 72, 77, .1); }

.setup-link {
  position: absolute;
  left: 106px;
  bottom: 24px;
  width: auto;
  min-height: 64px;
  padding: 0 18px;
  font-size: 15px;
}

.trust-note {
  margin-top: 16px;
  padding: 16px 20px;
  display: flex;
  gap: 13px;
  align-items: center;
  border-radius: 14px;
  color: var(--text-2);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  font-size: 14px;
}

.trust-note .ui-icon { color: var(--green); }
.trust-note code { margin: 0 3px; padding: 3px 6px; }

.car-guide {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-heading b { font-size: 25px; }
.section-heading small { color: var(--text-2); font-size: 14px; }
.section-index { color: var(--text-3); font-size: 14px; letter-spacing: .12em; padding-top: 6px; }

.car-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.car-step {
  min-height: 220px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .065);
  display: flex;
  flex-direction: column;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8ba4ff;
  background: rgba(71, 111, 255, .1);
}

.step-no {
  margin: 14px 0 20px;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: .12em;
}

.car-step h3 { font-size: 18px; }
.car-step p { margin-top: 8px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.car-guide .text-link { margin-top: 16px; }

/* ============ 门店列表 ============ */
.loc-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.loc-bar .chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.loc-bar .pill {
  min-height: 64px;
  padding: 0 22px;
  font-size: 16px;
}

.icon-pill .ui-icon {
  width: 20px;
  height: 20px;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 26px;
  margin-bottom: 14px;
  cursor: pointer;
  min-height: 108px;
}

.store-row:active {
  background: var(--surface-2);
}

.store-row .info {
  flex: 1;
  min-width: 0;
}

.store-row .name {
  font-size: 22px;
  font-weight: 600;
}

.store-row .addr {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-row .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.store-row .dist {
  font-size: 20px;
  color: var(--text-2);
  flex: none;
  width: 120px;
  text-align: right;
}

.store-row .arrow {
  font-size: 30px;
  color: var(--text-3);
  flex: none;
}

/* ============ 菜单 ============ */
.menu-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
  height: 100%;
}

.menu-rail {
  border-right: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  align-self: start;
}

.menu-rail .cat-btn {
  min-height: 68px;
  border-radius: 14px;
  font-size: 18px;
  color: var(--text-2);
  padding: 0 18px;
  text-align: left;
  display: flex;
  align-items: center;
}

.menu-rail .cat-btn.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--line);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  padding: 4px 4px 20px 22px;
  align-content: start;
}

.product-card {
  position: relative;
  padding: 22px;
  min-height: 252px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s ease, border-color .2s ease;
}

.product-card:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, .13);
  transform: translateY(-2px);
}

.product-media {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  color: var(--mcd);
  background:
    radial-gradient(circle at 65% 25%, rgba(255, 199, 44, .22), transparent 38%),
    rgba(255, 199, 44, .075);
  border: 1px solid rgba(255, 199, 44, .15);
}

.product-media.lk {
  color: #8ba4ff;
  background:
    radial-gradient(circle at 65% 25%, rgba(71, 111, 255, .25), transparent 38%),
    rgba(71, 111, 255, .08);
  border-color: rgba(71, 111, 255, .18);
}

.product-media .product-glyph {
  display: grid;
  place-items: center;
}

.product-media .ui-icon {
  width: 48px;
  height: 48px;
  stroke-width: 1.45;
}

.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-2);
}

.product-media.compact {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  margin: 0;
  flex: none;
}

.product-media.compact .ui-icon {
  width: 34px;
  height: 34px;
}

.product-card .pname {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.product-card .pdesc {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .pbottom {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card .price {
  font-size: 22px;
  font-weight: 700;
}

.add-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  font-size: 40px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin: 8px 0 18px;
}

/* ============ 购物车 ============ */
.cart-line {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.cart-line .info {
  flex: 1;
  min-width: 0;
}

.cart-line .cname {
  font-size: 20px;
  font-weight: 600;
}

.cart-line .cspec {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

.qty button {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty .n {
  font-size: 24px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

.cart-line .lprice {
  font-size: 20px;
  font-weight: 600;
  flex: none;
  width: 130px;
  text-align: right;
}

.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--cartbar-h);
  background: rgba(20, 20, 25, 0.96);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  z-index: 10;
}

.cartbar .total {
  font-size: 30px;
  font-weight: 700;
}

.cartbar .count {
  font-size: 17px;
  color: var(--text-2);
}

.cartbar .go {
  margin-left: auto;
  min-width: 300px;
}

/* ============ 结算 ============ */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: start;
}

.checkout-section {
  padding: 26px 28px;
  margin-bottom: 20px;
}

.checkout-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
}

.seg {
  display: flex;
  gap: 12px;
}

.seg button {
  flex: 1;
  min-height: 76px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 19px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.seg button .s {
  font-size: 13px;
  color: var(--text-3);
}

.seg button.active {
  border-color: var(--mcd);
  color: var(--mcd);
  background: rgba(255, 199, 44, 0.08);
}

.seg button.active.blue {
  border-color: var(--lk);
  color: var(--lk);
  background: rgba(61, 107, 255, 0.1);
}

.addr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.addr-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  min-height: 72px;
}

.addr-row.active {
  border-color: var(--lk);
}

.addr-row .radio {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--text-3);
  flex: none;
}

.addr-row.active .radio {
  border-color: var(--lk);
  background: var(--lk);
  box-shadow: inset 0 0 0 5px var(--surface-2);
}

.addr-row .ainfo {
  flex: 1;
  min-width: 0;
}

.addr-row .aname {
  font-size: 18px;
  font-weight: 600;
}

.addr-row .aaddr {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-box {
  padding: 26px 28px;
  position: sticky;
  top: 0;
}

.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  color: var(--text-2);
  padding: 8px 0;
}

.price-line.total {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 18px;
}

.price-line.total .val {
  color: var(--mcd);
}

.price-line.total .val.blue {
  color: var(--lk);
}

.parking-warn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 15px;
  color: #ffb3b5;
  margin-bottom: 18px;
}

.parking-warn .ui-icon {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex: none;
}

.checkout-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============ 订单页 ============ */
.order-hero {
  text-align: center;
  padding: 46px 30px;
  margin-bottom: 20px;
}

.order-hero .status {
  font-size: 20px;
  color: var(--green);
  font-weight: 600;
}

.order-hero .pickup-label {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 22px;
}

.order-hero .pickup-code {
  font-size: 84px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--mcd);
  font-variant-numeric: tabular-nums;
}

.order-hero.blue .pickup-code {
  color: var(--lk);
}

.order-hero .amount {
  font-size: 26px;
  margin-top: 14px;
}

.order-meta {
  padding: 22px 28px;
  margin-bottom: 14px;
}

.order-meta .line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 18px;
}

.order-meta .line .k {
  color: var(--text-2);
}

.pay-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 24px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 18px 0;
}

.pay-hint .ui-icon {
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: #8ba4ff;
}

.order-actions {
  display: flex;
  gap: 14px;
}

.order-actions > * {
  flex: 1;
}

/* ============ 弹层 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.modal {
  width: min(860px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  padding: 30px 32px 34px;
  margin-bottom: 0;
}

.modal h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
}

.spec-product {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 2px 72px 24px 0;
}

.spec-product h3 {
  margin: 0;
  min-width: 0;
}

.spec-group {
  margin-bottom: 20px;
}

.spec-group .gname {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.spec-opts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.spec-opts button {
  min-height: 64px;
  padding: 0 24px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 17px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-opts button.active {
  border-color: var(--mcd);
  color: var(--mcd);
  background: rgba(255, 199, 44, 0.08);
}

.spec-opts button.active.blue {
  border-color: var(--lk);
  color: var(--lk);
  background: rgba(61, 107, 255, 0.1);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions > * {
  flex: 1;
}

.modal-close {
  float: right;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 22px;
  color: var(--text-2);
}

.nl-search-results > h3 {
  margin-top: 10px;
}

.nl-prompt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(71, 111, 255, .12), var(--surface-2));
  border: 1px solid rgba(71, 111, 255, .22);
}

.nl-prompt span {
  color: var(--text-2);
  font-size: 14px;
}

.nl-prompt strong {
  font-size: 24px;
  line-height: 1.35;
}

.nl-store {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px 20px;
  color: #8ba4ff;
}

.nl-store > span {
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-weight: 600;
}

.nl-store small {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 400;
}

.nl-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.nl-product-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.nl-product-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nl-product-copy strong {
  font-size: 18px;
}

.nl-product-copy small {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nl-product-price {
  font-size: 20px;
  font-weight: 700;
  color: #8ba4ff;
}

.nl-product-row .ghost-btn {
  min-width: 150px;
  flex: none;
}

/* ============ Toast ============ */
#toast-root {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 17px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.18s ease;
}

.toast.err {
  background: rgba(229, 72, 77, 0.16);
  border-color: rgba(229, 72, 77, 0.4);
  color: #ffb3b5;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-2);
  font-size: 19px;
  padding: 60px 0;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--text);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1400px) {
  body { font-size: 17px; }
  .main { padding-left: 24px; padding-right: 24px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .brand-card h2 { font-size: 38px; }
  .brand-card { min-height: 318px; }
  .brand-card .brand-copy { left: 30px; top: 28px; bottom: 27px; width: 58%; }
  .car-step { min-height: 238px; padding: 20px; }
}

@media (max-width: 1100px) {
  body { overflow: auto; }
  .app { min-height: 100vh; height: auto; }
  .main { overflow: visible; }
  .header-action span { display: none; }
  .header-action { width: 64px; padding: 0; justify-content: center; }
  .home-grid,
  .setup-grid { grid-template-columns: 1fr; }
  .nl-card { grid-template-columns: 1fr; }
  .nl-heading { grid-row: auto; }
  .car-steps { grid-template-columns: repeat(2, 1fr); }
  .checkout-grid { grid-template-columns: 1fr; }
  .price-box { position: static; }
}

@media (max-width: 760px) {
  :root { --header-h: 76px; }
  .header { padding: 0 14px; gap: 10px; }
  .header .back,
  .header-action { width: 58px; height: 58px; min-height: 58px; }
  .header h1 { font-size: 20px; }
  .header .sub,
  .header .loc-chip { display: none; }
  .main,
  .main.no-cartbar { padding: 18px 14px 132px; }
  .brand-card { min-height: 320px; }
  .brand-card .brand-shade { background: linear-gradient(90deg, rgba(8, 9, 12, .95), rgba(8, 9, 12, .55) 68%, rgba(8, 9, 12, .1)); }
  .brand-card .brand-copy { left: 24px; right: 24px; width: auto; }
  .nl-card .row { flex-direction: column; }
  .nl-card .row .primary-btn { max-width: none !important; }
  .home-service-row { align-items: flex-start; flex-direction: column; }
  .setup-service { grid-template-columns: 42px 1fr; padding: 22px; min-height: 260px; }
  .service-state { position: absolute; right: 20px; top: 20px; }
  .setup-link { left: 84px; right: 22px; bottom: 22px; }
  .car-steps { grid-template-columns: 1fr; }
  .menu-shell { display: block; }
  .menu-rail { position: static; overflow-x: auto; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu-rail .cat-btn { flex: none; }
  .product-grid { padding: 18px 0; grid-template-columns: 1fr; }
  .cart-line { flex-wrap: wrap; }
  .cart-line .info { min-width: calc(100% - 100px); }
  .cart-line .qty { margin-left: 88px; }
  .cart-line .lprice { margin-left: auto; width: auto; }
  .cartbar { height: 118px; padding: 0 14px; gap: 12px; }
  .cartbar .go { min-width: 0; width: auto; flex: 1; }
  .cartbar .total { font-size: 24px; }
  .cartbar .count { display: none; }
  .seg { flex-direction: column; }
  .order-actions { flex-direction: column; }
  .order-hero .pickup-code { font-size: 62px; }
  .modal { padding: 24px 20px 28px; }
  .nl-product-row { flex-wrap: wrap; }
  .nl-product-row .ghost-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
