/* =============================================================================
 * 天天美味铺 · Web 版 —— 页面组件样式 pages.css（第二阶段 A）
 * -----------------------------------------------------------------------------
 * 覆盖：店铺详情 / 购物车页 / 结算页 / 订单列表 / 订单详情 / 我的 / 地址 / 优惠券
 * 依赖：tokens.css → base.css → components.css → pages.css（本文件必须最后引入）
 * 约定：一律通过 var(--xxx) 取值，不硬编码颜色与尺寸；移动端优先，900px 起为桌面布局。
 * ========================================================================== */

/* =============================================================================
 * 1. 页面骨架
 * ========================================================================== */
.page { position: relative; padding-block: var(--sp-6) var(--sp-16); }
.page--tight { padding-block: var(--sp-4) var(--sp-12); }

/* 底部有固定操作条时给页面留出安全距离 */
.page--with-bar { padding-bottom: calc(var(--cartbar-h) + var(--sp-12)); }

.page-head { margin-bottom: var(--sp-6); }
.page-head__title { font-size: var(--fs-h3); }
.page-head__desc { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--text-3); }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-bottom: var(--sp-3);
}
.crumb a { color: var(--text-2); }
.crumb a:hover { color: var(--c-brand); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-2);
  transition: color var(--dur-1) var(--ease-out-expo);
}
.back-link:hover { color: var(--c-brand); }
.back-link svg { width: 16px; height: 16px; }

/* =============================================================================
 * 2. 面板 / 卡片容器
 * ========================================================================== */
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.panel + .panel { margin-top: var(--sp-4); }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.panel__title { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
.panel__title small { margin-left: var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--text-3); }
.panel__body { padding: var(--sp-5); }
.panel__body--flush { padding: 0; }
.panel__foot {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-line);
  background: var(--c-ink-04);
}

/* 双列布局：移动端单列，桌面端主内容 + 侧栏 */
.cols { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) {
  .cols--side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.side-sticky { position: static; }
@media (min-width: 900px) {
  .side-sticky { position: sticky; top: calc(var(--nav-h) + var(--sp-5)); }
}

/* =============================================================================
 * 3. 店铺详情
 * ========================================================================== */
.shop-hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--grad-ink);
  color: var(--c-white);
  padding: var(--sp-6) var(--sp-5);
  margin-bottom: var(--sp-5);
  isolation: isolate;
}
.shop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 320px at 88% 8%, rgba(255, 90, 54, .38), transparent 70%),
    radial-gradient(420px 280px at 6% 96%, rgba(255, 161, 132, .22), transparent 72%);
}
.shop-hero__top { display: flex; align-items: flex-start; gap: var(--sp-4); }
.shop-hero__logo {
  flex: 0 0 auto;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  font-size: 30px;
  border-radius: var(--r-md);
  background: var(--grad-brand);
  box-shadow: var(--sh-brand);
}
.shop-hero__name { font-size: var(--fs-h3); color: var(--c-white); }
.shop-hero__desc { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--c-white-64); max-width: 52ch; }
.shop-hero__tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.shop-hero__tag {
  padding: 4px 10px;
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wide);
  border-radius: var(--r-full);
  border: 1px solid var(--c-line-invert);
  background: var(--c-white-06);
  color: var(--c-white-88);
}
.shop-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line-invert);
}
.shop-hero__stat-num { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-bold); }
.shop-hero__stat-label { margin-top: 2px; font-size: var(--fs-2xs); letter-spacing: var(--ls-wide); color: var(--c-white-64); }

/* 分类切换（横向滚动条） */
.menu-tabs {
  position: sticky;
  top: var(--nav-h-sm);
  z-index: var(--z-raised);
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  margin-bottom: var(--sp-3);
  background: linear-gradient(180deg, var(--c-cream) 62%, rgba(255, 245, 235, 0));
  overflow-x: auto;
  scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 16px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease-out-expo);
  white-space: nowrap;
}
.menu-tab:hover { border-color: var(--c-brand-light); color: var(--c-brand); transform: translateY(-1px); }
.menu-tab.is-active {
  color: var(--c-white);
  background: var(--grad-brand-h);
  border-color: transparent;
  box-shadow: var(--sh-brand);
}
.menu-tab__count { font-size: var(--fs-2xs); opacity: .8; }

/* 菜品行 */
.dish-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--c-line);
  transition: opacity var(--dur-2) var(--ease-out-expo);
}
.dish-row:first-child { border-top: 0; }
.dish-row.is-off { opacity: .5; }
.dish-row__thumb {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  font-size: 38px;
  border-radius: var(--r-md);
  background: var(--grad-brand-soft);
  border: 1px solid var(--c-line);
}
.dish-row__name { font-size: var(--fs-body); font-weight: var(--fw-semi); }
.dish-row__desc { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); line-height: var(--lh-snug); }
.dish-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.dish-row__price {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--c-brand-red);
}
.dish-row__price small { font-size: var(--fs-2xs); font-weight: var(--fw-medium); }
.dish-row__skus { font-size: var(--fs-2xs); color: var(--text-3); }
.dish-row__aside { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }

/* 圆形加号按钮 */
.btn-add {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: var(--c-white);
  background: var(--grad-brand-h);
  box-shadow: var(--sh-brand);
  transition: transform var(--dur-2) var(--ease-out-back), box-shadow var(--dur-2) var(--ease-out-expo);
}
.btn-add svg { width: 18px; height: 18px; }
.btn-add:hover { transform: scale(1.1) rotate(90deg); }
.btn-add:active { transform: scale(.94); }
.btn-add[disabled] { background: var(--c-ink-24); box-shadow: none; cursor: not-allowed; }

/* 已选数量气泡 */
.line-qty {
  min-width: 24px;
  padding: 2px 7px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  text-align: center;
  color: var(--c-white);
  background: var(--c-brand-red);
  border-radius: var(--r-full);
}

/* =============================================================================
 * 4. 规格选择 / 通用底部弹窗
 * ========================================================================== */
.sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: none;
}
.sheet.is-open { display: block; }
.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(27, 36, 41, .42);
  backdrop-filter: blur(3px);
  animation: wm-fade-in var(--dur-2) var(--ease-out-expo);
}
.sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(560px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  transform: translateX(-50%);
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-3);
  animation: wm-sheet-in var(--dur-3) var(--ease-out-expo);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
}
.sheet__title { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
.sheet__close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: var(--text-2);
  background: var(--c-ink-07);
  transition: background var(--dur-1) var(--ease-out-expo);
}
.sheet__close:hover { background: var(--c-ink-12); }
.sheet__close svg { width: 15px; height: 15px; }
.sheet__body { padding: 0 var(--sp-5) var(--sp-5); overflow-y: auto; }
.sheet__foot {
  padding: var(--sp-4) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--c-line);
  background: var(--c-ink-04);
}

/* 规格分组与选项 */
.spec-group + .spec-group { margin-top: var(--sp-5); }
.spec-group__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-wide);
  color: var(--text-3);
  text-transform: uppercase;
}
.spec-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-3); }
.spec-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease-out-expo);
}
.spec-opt:hover:not([disabled]) { border-color: var(--c-brand-light); transform: translateY(-2px); }
.spec-opt.is-active {
  border-color: var(--c-brand);
  background: var(--grad-brand-soft);
  box-shadow: 0 0 0 1px var(--c-brand) inset;
}
.spec-opt[disabled] { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.spec-opt__label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.spec-opt__sub { display: block; margin-top: 2px; font-size: var(--fs-2xs); color: var(--text-3); }
.spec-opt__price { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--c-brand-red); }

/* 弹窗内商品头 */
.sheet-dish { display: flex; gap: var(--sp-4); align-items: center; padding-bottom: var(--sp-5); }
.sheet-dish__thumb {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  font-size: 34px;
  border-radius: var(--r-md);
  background: var(--grad-brand-soft);
}
.sheet-dish__name { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
.sheet-dish__desc { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.sheet-dish__price { margin-top: var(--sp-2); font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--c-brand-red); }

/* =============================================================================
 * 5. 表单（地址编辑、备注、订单相关输入）
 * ========================================================================== */
.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-4); }
@media (min-width: 720px) {
  .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.field { display: grid; gap: var(--sp-2); }
.field__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-wide);
  color: var(--text-3);
  text-transform: uppercase;
}
.field__label b { color: var(--c-brand-red); }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); }
.field__error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: var(--fw-medium); }

.input,
.textarea,
.select {
  width: 100%;
  padding: 13px var(--sp-4);
  font-size: var(--fs-body);
  color: var(--text-1);
  background: var(--surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease-out-expo), box-shadow var(--dur-1) var(--ease-out-expo);
}
.textarea { min-height: 92px; resize: vertical; line-height: var(--lh-normal); }
.input::placeholder,
.textarea::placeholder { color: var(--c-ink-40); }
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(255, 90, 54, .16);
}
.input[readonly] { background: var(--c-ink-04); color: var(--text-2); }

/* 标签选择 chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chips__item { position: relative; }
.chips__item input { position: absolute; opacity: 0; pointer-events: none; }
.chips__item span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease-out-expo);
}
.chips__item input:checked + span {
  color: var(--c-white);
  background: var(--grad-brand-h);
  border-color: transparent;
  box-shadow: var(--sh-brand);
}

/* 开关行 */
.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
}
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px; height: 27px;
  border-radius: var(--r-full);
  background: var(--c-ink-24);
  transition: background var(--dur-2) var(--ease-out-expo);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--c-white);
  box-shadow: var(--sh-1);
  transition: transform var(--dur-2) var(--ease-out-back);
}
.switch.is-on { background: var(--c-brand); }
.switch.is-on::after { transform: translateX(19px); }

/* =============================================================================
 * 6. 列表 / 我的页入口
 * ========================================================================== */
.list { display: block; }
.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--c-line);
  transition: background var(--dur-1) var(--ease-out-expo);
}
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--c-ink-04); }
.list-item__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 19px;
  border-radius: var(--r-sm);
  background: var(--grad-brand-soft);
}
.list-item__main { min-width: 0; flex: 1 1 auto; }
.list-item__title { font-size: var(--fs-body); font-weight: var(--fw-medium); }
.list-item__desc { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); }
.list-item__side { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-3); }
.list-item__arrow { width: 16px; height: 16px; color: var(--c-ink-24); }

/* 我的：头部资料卡 */
.profile-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--grad-ink);
  color: var(--c-white);
  overflow: hidden;
  isolation: isolate;
}
.profile-head::after {
  content: "";
  position: absolute;
  inset: 0; z-index: -1;
  background: radial-gradient(420px 260px at 90% 0%, rgba(255, 90, 54, .40), transparent 70%);
}
.profile-head__avatar {
  flex: 0 0 auto;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  font-size: 30px;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  box-shadow: var(--sh-brand);
}
.profile-head__name { font-size: var(--fs-h4); color: var(--c-white); }
.profile-head__sub { margin-top: 4px; font-size: var(--fs-xs); color: var(--c-white-64); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card {
  padding: var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: center;
  transition: transform var(--dur-2) var(--ease-out-expo), box-shadow var(--dur-2) var(--ease-out-expo);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.stat-card__num {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--c-brand-red);
}
.stat-card__label { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); }

/* =============================================================================
 * 7. 购物车页
 * ========================================================================== */
.cart-line--page {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--c-line);
}
.cart-line--page:first-child { border-top: 0; }
.cart-line__thumb--lg {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: var(--r-sm);
  background: var(--grad-brand-soft);
}
.cart-line__name-lg { font-size: var(--fs-body); font-weight: var(--fw-medium); }
.cart-line__spec-lg { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); }
.cart-line__price-lg { margin-top: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--c-brand-red); }
.cart-line__ops { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); }
.cart-line__remove {
  font-size: var(--fs-xs);
  color: var(--text-3);
  transition: color var(--dur-1) var(--ease-out-expo);
}
.cart-line__remove:hover { color: var(--c-danger); }

/* 不可用行 */
.line-off {
  margin-top: var(--sp-2);
  padding: 6px 10px;
  font-size: var(--fs-2xs);
  border-radius: var(--r-xs);
  color: var(--c-danger);
  background: rgba(232, 67, 31, .08);
}

/* 合计行 */
.sum-list { display: grid; gap: var(--sp-2); }
.sum-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.sum-list__row--strong { padding-top: var(--sp-3); border-top: 1px dashed var(--c-line-strong); font-size: var(--fs-h4); color: var(--text-1); }
.sum-list__row--strong b { font-family: var(--font-display); color: var(--c-brand-red); }
.sum-list__cut { color: var(--c-brand-red); }

/* =============================================================================
 * 8. 结算页
 * ========================================================================== */
.pick-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-5);
  text-align: left;
  transition: background var(--dur-1) var(--ease-out-expo);
}
.pick-card:hover { background: var(--c-ink-04); }
.pick-card__icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 20px;
  border-radius: var(--r-sm);
  background: var(--grad-brand-soft);
}
.pick-card__main { flex: 1 1 auto; min-width: 0; }
.pick-card__title { font-size: var(--fs-sm); font-weight: var(--fw-semi); }
.pick-card__text { margin-top: 3px; font-size: var(--fs-sm); color: var(--text-2); }
.pick-card__empty { margin-top: 3px; font-size: var(--fs-sm); color: var(--c-brand); }
.pick-card__arrow { flex: 0 0 auto; width: 18px; height: 18px; color: var(--c-ink-24); }

/* 支付方式 */
.pay-opt {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  border-top: 1px solid var(--c-line);
  transition: background var(--dur-1) var(--ease-out-expo);
}
.pay-opt:first-child { border-top: 0; }
.pay-opt:hover { background: var(--c-ink-04); }
.pay-opt__icon { font-size: 22px; }
.pay-opt__main { flex: 1 1 auto; }
.pay-opt__title { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.pay-opt__desc { margin-top: 2px; font-size: var(--fs-2xs); color: var(--text-3); }
.pay-opt__radio {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: 2px solid var(--c-ink-24);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color var(--dur-1) var(--ease-out-expo);
}
.pay-opt.is-active .pay-opt__radio { border-color: var(--c-brand); }
.pay-opt.is-active .pay-opt__radio::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad-brand-h);
}

/* =============================================================================
 * 9. 固定底部操作条
 * ========================================================================== */
.bar-fixed {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-dock);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--page-x) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-top: 1px solid var(--c-line);
}
.bar-fixed__meta { min-width: 0; }
.bar-fixed__label { font-size: var(--fs-2xs); color: var(--text-3); }
.bar-fixed__amount {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--c-brand-red);
}
.bar-fixed__amount small { font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.bar-fixed__hint { font-size: var(--fs-2xs); color: var(--text-3); }
.bar-fixed__btn { flex: 0 0 auto; min-width: 148px; }

/* 有固定条时，右下角购物车胶囊上移，避免遮挡 */
body.has-bar .cart-dock { bottom: calc(var(--cartbar-h) + var(--sp-4) + env(safe-area-inset-bottom, 0px)); }

/* =============================================================================
 * 10. 订单卡片 / 状态标签
 * ========================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-wide);
  border-radius: var(--r-full);
  background: var(--c-ink-07);
  color: var(--text-2);
}
.tag--pay { color: #B26A00; background: rgba(245, 165, 36, .16); }
.tag--wait { color: #2C6BD1; background: rgba(62, 139, 255, .14); }
.tag--cook { color: #E8431F; background: rgba(255, 90, 54, .14); }
.tag--send { color: #0E7C57; background: rgba(31, 169, 122, .14); }
.tag--done { color: #4A5A63; background: var(--c-ink-07); }
.tag--cancel { color: #7A838A; background: var(--c-ink-07); }
.tag--info { color: #E8431F; background: var(--grad-brand-soft); }

.tag--live .tag__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: wm-pulse-ring 1.8s var(--ease-in-out) infinite;
}

.order-card { display: block; }
.order-card + .order-card { margin-top: var(--sp-4); }
.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-line);
}
.order-card__shop { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.order-card__logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-size: 17px;
  border-radius: var(--r-xs);
  background: var(--grad-brand-soft);
}
.order-card__name { font-size: var(--fs-sm); font-weight: var(--fw-semi); }
.order-card__no { margin-top: 2px; font-size: var(--fs-2xs); color: var(--text-3); }
.order-card__body { padding: var(--sp-4) var(--sp-5); }
.order-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-2) 0;
}
.order-line__thumb {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 21px;
  border-radius: var(--r-xs);
  background: var(--c-ink-04);
}
.order-line__name { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.order-line__spec { margin-top: 1px; font-size: var(--fs-2xs); color: var(--text-3); }
.order-line__amount { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.order-line--more { padding-top: var(--sp-3); font-size: var(--fs-xs); color: var(--text-3); }

.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px dashed var(--c-line-strong);
  background: var(--c-ink-04);
}
.order-card__total { font-size: var(--fs-sm); color: var(--text-2); }
.order-card__total b {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  color: var(--c-brand-red);
}
.order-card__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* 筛选分段控件 */
.seg {
  display: flex;
  gap: var(--sp-1);
  padding: 4px;
  margin-bottom: var(--sp-5);
  border-radius: var(--r-full);
  background: var(--c-ink-07);
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 16px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-2);
  border-radius: var(--r-full);
  white-space: nowrap;
  transition: all var(--dur-2) var(--ease-out-expo);
}
.seg__btn:hover { color: var(--c-brand); }
.seg__btn.is-active {
  color: var(--c-white);
  background: var(--grad-brand-h);
  box-shadow: var(--sh-brand);
}
.seg__count { font-size: var(--fs-2xs); opacity: .82; }

/* =============================================================================
 * 11. 订单详情
 * ========================================================================== */
.status-panel {
  position: relative;
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--grad-ink);
  color: var(--c-white);
  overflow: hidden;
  isolation: isolate;
}
.status-panel::after {
  content: "";
  position: absolute;
  inset: 0; z-index: -1;
  background: radial-gradient(460px 300px at 92% 4%, rgba(255, 90, 54, .42), transparent 72%);
}
.status-panel__label { font-size: var(--fs-xs); letter-spacing: var(--ls-wide); color: var(--c-white-64); }
.status-panel__title { margin-top: var(--sp-2); font-size: var(--fs-h2); color: var(--c-white); }
.status-panel__hint { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--c-white-64); }
.status-panel__countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: var(--sp-4);
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--c-white-10);
  border: 1px solid var(--c-line-invert);
  font-family: var(--font-mono);
  font-size: var(--fs-h4);
  letter-spacing: var(--ls-tight);
}

/* 取餐码 */
.pickup {
  display: grid;
  gap: var(--sp-2);
  justify-items: center;
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px dashed var(--c-line-strong);
  background: var(--surface);
  text-align: center;
}
.pickup__label { font-size: var(--fs-xs); letter-spacing: var(--ls-wider); color: var(--text-3); text-transform: uppercase; }
.pickup__code {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: var(--fw-black);
  letter-spacing: .12em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pickup__tip { font-size: var(--fs-xs); color: var(--text-3); }

/* 状态时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline__item { position: relative; padding-bottom: var(--sp-5); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -19px; top: 18px; bottom: -4px;
  width: 1px;
  background: var(--c-line-strong);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  position: absolute;
  left: -26px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--c-line-strong);
  background: var(--surface);
  transition: all var(--dur-2) var(--ease-out-expo);
}
.timeline__item.is-done .timeline__dot {
  border-color: transparent;
  background: var(--grad-brand-h);
  box-shadow: var(--sh-brand);
}
.timeline__title { font-size: var(--fs-sm); font-weight: var(--fw-semi); }
.timeline__time { margin-top: 2px; font-size: var(--fs-2xs); color: var(--text-3); font-family: var(--font-mono); }
.timeline__note { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-2); }

/* 键值明细 */
.kv { display: grid; gap: var(--sp-3); }
.kv__row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-sm); }
.kv__k { flex: 0 0 auto; color: var(--text-3); }
.kv__v { text-align: right; color: var(--text-1); word-break: break-all; }
.kv__v--strong { font-weight: var(--fw-semi); color: var(--c-brand-red); }
.kv__v--mono { font-family: var(--font-mono); font-size: var(--fs-xs); }

/* =============================================================================
 * 12. 地址卡片
 * ========================================================================== */
.addr-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-5);
  text-align: left;
  border-top: 1px solid var(--c-line);
  transition: background var(--dur-1) var(--ease-out-expo);
}
.addr-card:first-child { border-top: 0; }
.addr-card:hover { background: var(--c-ink-04); }
.addr-card.is-active { background: var(--grad-brand-soft); }
.addr-card__main { flex: 1 1 auto; min-width: 0; }
.addr-card__row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.addr-card__name { font-size: var(--fs-body); font-weight: var(--fw-semi); }
.addr-card__phone { font-size: var(--fs-sm); color: var(--text-2); font-family: var(--font-mono); }
.addr-card__text { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-snug); }
.addr-card__ops { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
.addr-card__edit { font-size: var(--fs-xs); color: var(--text-3); }
.addr-card__edit:hover { color: var(--c-brand); }
.addr-card__default { flex: 0 0 auto; }

.link-btn {
  font-size: var(--fs-xs);
  color: var(--text-3);
  transition: color var(--dur-1) var(--ease-out-expo);
}
.link-btn:hover { color: var(--c-brand); }
.link-btn--danger:hover { color: var(--c-danger); }

/* =============================================================================
 * 13. 优惠券
 * ========================================================================== */
.coupon {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform var(--dur-2) var(--ease-out-expo), box-shadow var(--dur-2) var(--ease-out-expo);
}
.coupon:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.coupon + .coupon { margin-top: var(--sp-4); }
.coupon__left {
  display: grid;
  place-content: center;
  gap: 2px;
  padding: var(--sp-5) var(--sp-3);
  text-align: center;
  color: var(--c-white);
  background: var(--grad-brand);
}
.coupon__value { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-black); line-height: 1; }
.coupon__value small { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.coupon__cond { margin-top: 4px; font-size: var(--fs-2xs); color: var(--c-white-88); }
.coupon__body { padding: var(--sp-4) var(--sp-5); }
.coupon__name { font-size: var(--fs-body); font-weight: var(--fw-semi); }
.coupon__meta { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.coupon__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-4); }
/* 齿孔分隔 */
.coupon__left::after,
.coupon__left::before {
  content: "";
  position: absolute;
  left: 100px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c-cream);
  border: 1px solid var(--c-line);
}
.coupon__left::before { top: -9px; }
.coupon__left::after { bottom: -9px; }

.coupon.is-off { filter: grayscale(.86); opacity: .72; }
.coupon.is-off .coupon__left { background: var(--c-ink-24); }
.coupon.is-used .coupon__left { background: linear-gradient(135deg, #B9C2C7, #98A3A9); }

/* =============================================================================
 * 14. 空状态 / 提示条
 * ========================================================================== */
.empty {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-16) var(--sp-5);
  text-align: center;
}
.empty__icon {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  font-size: 34px;
  border-radius: var(--r-full);
  background: var(--grad-brand-soft);
  animation: wm-float 6s var(--ease-in-out) infinite;
}
.empty__title { font-size: var(--fs-h4); font-weight: var(--fw-semi); }
.empty__desc { max-width: 44ch; font-size: var(--fs-sm); color: var(--text-3); }
.empty__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-2); }

.hint-strip {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
  border-radius: var(--r-md);
  background: var(--c-ink-04);
  color: var(--text-2);
}
.hint-strip__icon { flex: 0 0 auto; font-size: 15px; }
.hint-strip--warn { background: rgba(245, 165, 36, .14); color: #8A5A00; }
.hint-strip--info { background: var(--grad-brand-soft); color: #B23A1B; }
.hint-strip + .hint-strip { margin-top: var(--sp-3); }

/* =============================================================================
 * 15. 通用小件
 * ========================================================================== */
.grow { flex: 1 1 auto; min-width: 0; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.text-c { text-align: center; }
.text-r { text-align: right; }
.fs-sm { font-size: var(--fs-sm); }
.fs-xs { font-size: var(--fs-xs); }
.brand-text { color: var(--c-brand-red); }
.divider { height: 1px; background: var(--c-line); margin-block: var(--sp-5); }
.fade-in { animation: wm-fade-up var(--dur-3) var(--ease-out-expo) both; }

/* 骨架屏（列表加载占位） */
.skeleton-card { padding: var(--sp-5); }
.skeleton-line {
  height: 14px;
  border-radius: var(--r-xs);
  background: linear-gradient(90deg, var(--c-ink-07) 25%, var(--c-ink-12) 50%, var(--c-ink-07) 75%);
  background-size: 220% 100%;
  animation: wm-skeleton 1.5s linear infinite;
}
.skeleton-line + .skeleton-line { margin-top: var(--sp-3); }

/* 弹窗动画 */
@keyframes wm-sheet-in {
  from { transform: translate(-50%, 100%); }
  to   { transform: translate(-50%, 0); }
}
@keyframes wm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =============================================================================
 * 16. 桌面端（≥900px）微调
 * ========================================================================== */
@media (min-width: 900px) {
  .page { padding-block: var(--sp-8) var(--sp-24); }
  .sheet__panel {
    border-radius: var(--r-xl);
    bottom: var(--sp-5);
  }
  .dish-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .dish-row__thumb { width: 96px; height: 96px; font-size: 44px; }
  .cart-line--page { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .cart-line__thumb--lg { width: 64px; height: 64px; font-size: 30px; }
  .coupon { grid-template-columns: 132px minmax(0, 1fr); }
  .coupon__left::after, .coupon__left::before { left: 124px; }
  .shop-hero { padding: var(--sp-8); }
  .status-panel { padding: var(--sp-8); }
}

/* =============================================================================
 * 17. 无障碍：减少动效
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .coupon:hover,
  .stat-card:hover,
  .btn-add:hover,
  .menu-tab:hover,
  .spec-opt:hover:not([disabled]) { transform: none; }
  .empty__icon { animation: none; }
}

/* =============================================================================
 * 18. 第二阶段 A 补充：规格大号步进器 / 抽屉结算区 / 空购物车
 * ========================================================================== */
.stepper--lg { gap: var(--sp-4); }
.stepper--lg .stepper__btn { width: 40px; height: 40px; font-size: 20px; }
.stepper--lg .stepper__val { min-width: 32px; font-size: var(--fs-h4); font-weight: var(--fw-bold); }
.cart-line__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-2); }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-10) var(--sp-4); text-align: center; }
.cart-empty__icon { font-size: 40px; line-height: 1; }
.cart-empty__text { margin: 0; color: var(--c-ink-55); }
.drawer-summary { display: flex; flex-direction: column; gap: var(--sp-2); }
.drawer-summary__row { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: var(--c-ink-55); }
.drawer-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px dashed var(--c-line); }
.drawer-total__label { font-weight: var(--fw-semi); }
.drawer-total__value { font-size: var(--fs-h4); font-weight: var(--fw-black); color: var(--c-brand); }
.drawer-tip { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--c-ink-55); }
.drawer-actions { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.drawer-actions .btn--primary { flex: 1; }
.is-empty { opacity: .6; }

/* =============================================================================
 * 19. 第二阶段 B 补充：校园互助（大厅 / 发布需求 / 任务详情）
 * ========================================================================== */

/* ---- 19.1 大厅工具条：搜索 + 发布入口 ---- */
.aid-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.aid-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.aid-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  color: var(--c-ink-40);
  pointer-events: none;
}
.aid-search .input { padding-left: 40px; }
.aid-toolbar .btn { flex: 0 0 auto; }

/* ---- 19.2 分类胶囊（按钮式，可点击切换） ---- */
.aid-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.aid-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  transition: all var(--dur-2) var(--ease-out-expo);
}
.aid-cat:hover { color: var(--c-brand); border-color: var(--c-brand); }
.aid-cat.is-active {
  color: var(--c-white);
  background: var(--grad-brand-h);
  border-color: transparent;
  box-shadow: var(--sh-brand);
}

/* ---- 19.3 任务卡片 ---- */
.aid-list { display: grid; gap: var(--sp-4); }
@media (min-width: 860px) { .aid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.aid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out-expo), box-shadow var(--dur-2) var(--ease-out-expo), border-color var(--dur-2) var(--ease-out-expo);
}
.aid-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--c-line-strong); }
.aid-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-brand-h);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out-expo);
}
.aid-card:hover::before { opacity: 1; }
.aid-card--urgent { border-color: rgba(255, 61, 46, .38); }
.aid-card--done { opacity: .82; }
.aid-card__top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.aid-card__cat {
  font-size: var(--fs-2xs);
  color: var(--text-2);
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--c-ink-07);
}
.aid-card__role {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  color: #E8431F;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--grad-brand-soft);
}
.aid-card__spacer { flex: 1 1 auto; }
.aid-card__title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
}
.aid-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: var(--lh-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aid-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.aid-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.aid-card__meta svg { width: 14px; height: 14px; }
.aid-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--c-line-strong);
}
.aid-card__reward {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--c-brand);
  line-height: 1.1;
}
.aid-card__reward small { font-size: .55em; font-weight: var(--fw-semi); margin-right: 1px; }
.aid-card__reward.is-free { font-size: var(--fs-h4); color: #0E7C57; }
.aid-card__sub { margin-top: 2px; font-size: var(--fs-2xs); color: var(--text-3); }
.aid-card__go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-brand);
  white-space: nowrap;
}
.aid-card__go svg { width: 15px; height: 15px; }
.aid-card__imgs { display: flex; gap: 6px; }
.aid-card__imgs img {
  width: 46px; height: 46px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
}

/* 悬浮发布按钮（移动端优先） */
.aid-fab {
  position: fixed;
  right: 18px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-dock);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 20px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-white);
  background: var(--grad-brand-h);
  border-radius: var(--r-full);
  box-shadow: var(--sh-brand);
  transition: transform var(--dur-2) var(--ease-out-expo), box-shadow var(--dur-2) var(--ease-out-expo);
}
.aid-fab svg { width: 18px; height: 18px; }
.aid-fab:hover { transform: translateY(-3px) scale(1.02); }
.aid-fab:active { transform: scale(.97); }

/* ---- 19.4 发布需求：图片上传预览 ---- */
.aid-upload {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: var(--sp-3);
}
.aid-upload__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: var(--c-ink-04);
}
.aid-upload__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aid-upload__del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--c-white);
  background: rgba(38, 50, 56, .68);
  border-radius: 50%;
}
.aid-upload__del svg { width: 12px; height: 12px; }
.aid-upload__add {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--text-3);
  background: var(--c-ink-04);
  border: 1px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  transition: all var(--dur-2) var(--ease-out-expo);
}
.aid-upload__add:hover { color: var(--c-brand); border-color: var(--c-brand); }
.aid-upload__add svg { width: 22px; height: 22px; }
.aid-upload__input { display: none; }

/* 报价行 + 快捷金额 */
.aid-money { position: relative; }
.aid-money .input { padding-right: 46px; }
.aid-money__unit {
  position: absolute;
  right: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-sm);
  color: var(--text-3);
  pointer-events: none;
}
.aid-quick { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.aid-quick__btn {
  padding: 7px 13px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  background: var(--c-ink-07);
  border-radius: var(--r-full);
  transition: all var(--dur-2) var(--ease-out-expo);
}
.aid-quick__btn:hover { color: var(--c-brand); }
.aid-quick__btn.is-active {
  color: var(--c-white);
  background: var(--grad-brand-h);
  box-shadow: var(--sh-brand);
}

/* 费用试算 / 须知条 */
.aid-note {
  display: grid;
  gap: 6px;
  padding: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-2);
  background: var(--c-ink-04);
  border-radius: var(--r-md);
}
.aid-note b { color: var(--text-1); }
.aid-note__row { display: flex; justify-content: space-between; gap: var(--sp-3); }
.aid-note__row strong { font-family: var(--font-display); color: var(--c-brand); }

/* ---- 19.5 任务详情 ---- */
.aid-head { display: grid; gap: var(--sp-3); }
.aid-head__tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.aid-head__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}
.aid-head__body {
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: var(--lh-loose);
  white-space: pre-wrap;
}
.aid-price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: var(--fw-black);
  color: var(--c-brand);
}
.aid-price small { font-size: .45em; font-weight: var(--fw-semi); }
.aid-price span { font-size: var(--fs-sm); font-family: var(--font-sans); font-weight: var(--fw-regular); color: var(--text-3); }
.aid-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-3); }
.aid-imgs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
}

/* 参与进度 */
.aid-progress { display: grid; gap: var(--sp-3); }
.aid-progress__bar {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--c-ink-07);
  overflow: hidden;
}
.aid-progress__fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-full);
  background: var(--grad-brand-h);
  transition: width 620ms var(--ease-out-expo);
}
.aid-progress__label {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.aid-progress__label b { color: var(--c-brand); font-weight: var(--fw-semi); }

/* 状态流转步骤 */
.aid-steps { display: grid; gap: var(--sp-3); }
.aid-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: var(--sp-3);
  padding-bottom: var(--sp-2);
}
.aid-step__line {
  position: absolute;
  left: 8px; top: 18px; bottom: 0;
  width: 2px;
  background: var(--c-ink-12);
}
.aid-step:last-child .aid-step__line { display: none; }
.aid-step__dot {
  position: relative;
  z-index: 1;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-ink-12);
  color: var(--c-white);
}
.aid-step__dot svg { width: 11px; height: 11px; }
.aid-step.is-done .aid-step__dot { background: var(--grad-brand-h); }
.aid-step__label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.aid-step__text { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); }
.aid-step__time { font-size: var(--fs-2xs); color: var(--c-ink-40); }

/* 发布者 / 接单人卡片 */
.aid-user { display: flex; align-items: center; gap: var(--sp-3); }
.aid-user__avatar {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 50%;
  background: var(--grad-brand-soft);
}
.aid-user__name { display: flex; align-items: center; gap: 6px; font-size: var(--fs-body); font-weight: var(--fw-medium); }
.aid-user__meta { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); }
.aid-user + .aid-user { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px dashed var(--c-line-strong); }
.aid-me {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  color: #E8431F;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--grad-brand-soft);
}

/* 联系方式（接单前隐藏） */
.aid-locked { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); }
.aid-locked svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* 操作区 */
.aid-actions { display: grid; gap: var(--sp-3); }
.aid-actions__hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: var(--lh-normal);
}
.aid-actions__hint svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }

/* 完成证明 */
.aid-proof { display: grid; gap: var(--sp-3); }
.aid-proof__text { font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-normal); white-space: pre-wrap; }
.aid-proof__imgs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.aid-proof__imgs img {
  width: 84px; height: 84px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
}

/* ---- 19.6 留言区 ---- */
.aid-comments { display: grid; gap: var(--sp-4); }
.aid-comment { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--sp-3); }
.aid-comment__avatar {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-size: 16px;
  border-radius: 50%;
  background: var(--c-ink-07);
}
.aid-comment__head { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-3); }
.aid-comment__name { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-1); }
.aid-comment__text {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: var(--lh-normal);
  word-break: break-word;
}
.aid-comment__form { display: grid; gap: var(--sp-3); }
.aid-comment__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.aid-comment__count { font-size: var(--fs-2xs); color: var(--c-ink-40); }

/* ---- 19.7 桌面端微调 ---- */
@media (min-width: 900px) {
  .aid-fab { display: none; }
  .aid-head__title { font-size: 40px; }
}

/* ---- 19.8 无障碍：减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
  .aid-card, .aid-fab, .aid-cat, .aid-quick__btn { transition: none !important; }
  .aid-card:hover { transform: none; }
  .aid-progress__fill { transition: none !important; }
}
