/**
 * 顾客端 · 约单 App 壳（紫系小程序风）
 */
:root {
  --app-bg: #f3f0fa;
  --app-card: #ffffff;
  --app-purple: #7c5cff;
  --app-purple-2: #9b7bff;
  --app-purple-deep: #5b3fd6;
  --app-lavender: #efe9ff;
  --app-pink: #ff4d8d;
  --app-gold: #ffb020;
  --app-text: #1a1a2e;
  --app-muted: #8b86a0;
  --app-border: #e8e2f5;
  --app-radius: 16px;
  --app-tab-h: 58px;
  --app-safe-b: env(safe-area-inset-bottom, 0px);
  --price: var(--app-pink);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.app-body {
  min-height: 100vh;
  background: var(--app-bg);
  padding-bottom: calc(var(--app-tab-h) + var(--app-safe-b) + 12px);
}

.app-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* —— 顶栏 —— */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 240, 250, 0.92);
  backdrop-filter: blur(10px);
}
.app-topbar-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.app-topbar-back {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--app-border);
  color: var(--app-text);
  font-size: 18px;
}
.app-topbar-center {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

/* —— 搜索 —— */
.app-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 8px 10px 8px 14px;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(90, 60, 140, 0.06);
}
.app-search input[type="search"] {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--app-text);
  min-width: 0;
}
.app-search input[type="search"]::placeholder {
  color: var(--app-muted);
}
.app-search-clear {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eee;
  color: #666;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}
.app-search button {
  border: 0;
  background: var(--app-purple, #7c5cbf);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

/* —— Banner —— */
.app-banner {
  margin: 0 12px 12px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  min-height: 140px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(135deg, #6a4cff 0%, #9b6bff 45%, #c4a0ff 100%);
  color: #fff;
  padding: 18px 16px;
  box-shadow: 0 10px 28px rgba(108, 74, 255, 0.28);
}
.app-banner h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(60, 20, 140, .35);
  max-width: 70%;
  line-height: 1.3;
}
.app-banner p {
  margin: 0;
  font-size: 12px;
  opacity: .92;
  max-width: 68%;
  line-height: 1.45;
}
.app-banner-cta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  max-width: 120px;
  text-align: center;
  line-height: 1.3;
}

/* —— 分类圆标 —— */
.app-cats {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 12px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-cats::-webkit-scrollbar { display: none; }
.app-cat {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  color: var(--app-text);
}
.app-cat-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #1b1430;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(90, 60, 180, .18);
  overflow: hidden;
}
.app-cat-icon span { padding: 0 4px; line-height: 1.15; }
.app-cat.active .app-cat-icon {
  box-shadow: 0 0 0 3px var(--app-purple);
}
.app-cat-name {
  font-size: 11px;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-cat.active .app-cat-name { color: var(--app-purple-deep); font-weight: 600; }

/* —— Tabs —— */
.app-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 10px 12px;
  position: sticky;
  top: 48px;
  z-index: 30;
  background: var(--app-bg);
}
.app-tabs {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--app-muted);
  padding: 8px 2px;
  position: relative;
  white-space: nowrap;
}
.app-tab.active {
  color: var(--app-text);
  font-weight: 800;
}
.app-tab.active::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--app-purple);
}
.app-tabs-more {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--app-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--app-muted);
  flex-shrink: 0;
}

/* —— 商品双列 —— */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 20px;
}
.app-card {
  background: var(--app-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(80, 50, 160, .08);
  display: flex;
  flex-direction: column;
  color: inherit;
}
.app-card-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(160deg, #d9ccff, #b8a0ff 40%, #8e6fff);
}
.app-card-cover.has-img {
  background-size: cover;
  background-position: center;
}
.app-card-badge {
  position: absolute;
  top: 0; left: 0;
  background: linear-gradient(90deg, #ff6b3d, #ff3d7a);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px 4px 6px;
  border-radius: 0 0 10px 0;
}
.app-card-cover-caption {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  background: rgba(20, 10, 40, .45);
  color: #fff;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  line-height: 1.3;
}
.app-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.app-card-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.app-card-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.app-price {
  color: var(--app-pink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.app-price-unit {
  font-size: 11px;
  color: var(--app-muted);
}
.app-price-old {
  font-size: 11px;
  color: var(--app-muted);
  text-decoration: line-through;
}
.app-coin {
  display: inline-flex;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd76a, #ff9f1a);
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #7a4100;
  font-weight: 800;
  vertical-align: middle;
  margin: 0 2px;
}

/* —— 底栏 —— */
.app-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--app-border);
  padding-bottom: var(--app-safe-b);
  backdrop-filter: blur(12px);
}
.app-tabbar-inner {
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--app-tab-h);
}
.app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #9a95ae;
  font-size: 11px;
}
.app-tabbar a.active {
  color: var(--app-purple);
  font-weight: 700;
}
.app-tabbar-ico {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.app-tabbar-ico .app-tab-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.app-tabbar a.active .app-tabbar-ico {
  filter: drop-shadow(0 4px 8px rgba(124, 92, 255, .45));
}

/* —— 悬浮客服 —— */
.app-fab-cs {
  position: fixed;
  right: max(12px, calc(50% - 240px + 12px));
  bottom: calc(var(--app-tab-h) + var(--app-safe-b) + 18px);
  z-index: 90;
  width: 56px;
  text-align: center;
  color: var(--app-purple-deep);
  font-size: 10px;
  font-weight: 600;
}
.app-fab-cs-avatar {
  width: 48px; height: 48px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #a78bfa, #6d5efc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(109, 94, 252, .4);
  border: 2px solid #fff;
}
.app-fab-cs-avatar .app-fab-svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* —— 详情页 —— */
.app-detail-hero {
  margin: 8px 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #cbb8ff, #8e78ff);
  aspect-ratio: 1 / 1;
  position: relative;
}
.app-detail-hero.has-img {
  background-size: cover;
  background-position: center;
}
.app-detail-hero-text {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(40,20,80,.55));
  color: #fff;
}
.app-detail-hero-text h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.app-detail-hero-text p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: .95;
}
.app-price-bar {
  margin: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, #5b8dff, #8a5cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-price-bar-tag {
  background: rgba(255,255,255,.25);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.app-price-bar-nums {
  text-align: right;
  font-size: 12px;
}
.app-price-bar-nums .now {
  font-size: 22px;
  font-weight: 800;
}
.app-detail-panel {
  margin: 0 12px 12px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--app-border);
}
.app-detail-panel h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.app-detail-desc {
  color: var(--app-pink);
  font-weight: 650;
  font-size: 13px;
  line-height: 1.55;
}
.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--app-lavender);
  color: var(--app-purple-deep);
  font-size: 12px;
  margin-top: 8px;
}
.app-rules {
  margin: 0 12px 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1430;
  color: #fff;
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
}
.app-rules ol {
  margin: 0;
  padding-left: 1.2em;
}
.app-rating {
  margin: 0 12px 12px;
  background: var(--app-lavender);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
}
.app-rating-score {
  flex: 1;
}
.app-rating-score .label { font-size: 12px; color: var(--app-muted); }
.app-rating-score .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--app-gold);
  line-height: 1.1;
}
.app-stars { color: var(--app-gold); letter-spacing: 1px; font-size: 14px; }
.app-rating-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.app-rating-tags span {
  background: #fff;
  color: var(--app-purple-deep);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}
.app-rating-side {
  width: 38%;
  border-left: 1px solid rgba(124,92,255,.2);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.app-rating-side .num {
  font-size: 26px;
  font-weight: 800;
}
.app-rating-side .label {
  font-size: 12px;
  color: var(--app-muted);
}

.app-sticky-order {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  background: #fff;
  border-top: 1px solid var(--app-border);
  padding: 10px 14px calc(10px + var(--app-safe-b));
}
.app-sticky-order-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-chat-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--app-purple);
  color: var(--app-purple);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.app-order-btn {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #8e6fff, #6a4cff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(106, 76, 255, .35);
}
.app-body.has-sticky-order {
  padding-bottom: calc(72px + var(--app-safe-b));
}
.app-body.has-sticky-order .app-tabbar,
.app-body.has-sticky-order .app-fab-cs { display: none; }

/* —— 动态 —— */
.app-feed-list { padding: 8px 12px 24px; display: flex; flex-direction: column; gap: 12px; }
.app-feed-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(80,50,160,.07);
}
.app-feed-card h3 { margin: 0 0 4px; font-size: 16px; }
.app-feed-card time { font-size: 12px; color: var(--app-muted); }
.app-feed-card .cover {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #b8a0ff, #6a4cff);
}
.app-feed-card .cover.has-img {
  background-size: cover;
  background-position: center;
}
.app-feed-card .body {
  margin-top: 10px;
  font-size: 13px;
  color: var(--app-muted);
  line-height: 1.5;
}

/* —— 消息 —— */
.app-msg-list { padding: 8px 12px 24px; }
.app-msg-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(80,50,160,.06);
}
.app-msg-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--app-lavender);
  color: var(--app-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.app-msg-body { flex: 1; min-width: 0; }
.app-msg-body .t { font-weight: 700; font-size: 14px; }
.app-msg-body .s {
  font-size: 12px;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-msg-time { font-size: 11px; color: var(--app-muted); }

/* —— 我的 —— */
.app-me-hero {
  background: linear-gradient(180deg, #d8ccff 0%, #f3f0fa 100%);
  padding: 16px 16px 28px;
  border-radius: 0 0 28px 28px;
}
.app-me-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.app-me-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #9b7bff, #5b3fd6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(91, 63, 214, .3);
  overflow: hidden;
  flex-shrink: 0;
}
.app-me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-me-meta { flex: 1; min-width: 0; }
.app-me-meta .name {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.app-me-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--app-purple);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.app-me-edit {
  display: inline-flex;
  margin-top: 8px;
  background: var(--app-purple);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  gap: 4px;
  align-items: center;
}
.app-me-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.app-me-tags span {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--app-border);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--app-muted);
}
.app-wallet-card {
  margin: -12px 12px 12px;
  background: linear-gradient(110deg, #7c5cff, #a78bfa);
  border-radius: 16px;
  padding: 16px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(124, 92, 255, .35);
  position: relative;
  z-index: 2;
}
.app-wallet-card .cell .lab { font-size: 12px; opacity: .9; }
.app-wallet-card .cell .val {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-wallet-card .cell + .cell {
  border-left: 1px solid rgba(255,255,255,.28);
  padding-left: 12px;
}
.app-menu-grid {
  margin: 0 12px 20px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 8px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 4px;
  box-shadow: 0 4px 14px rgba(80,50,160,.06);
}
.app-menu-promo {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--app-lavender);
  color: var(--app-text);
}
.app-menu-promo .app-menu-ico {
  margin: 0;
  flex-shrink: 0;
  background: #fff;
}
.app-menu-promo-body { flex: 1; min-width: 0; text-align: left; }
.app-menu-promo-title {
  font-size: 14px;
  font-weight: 700;
}
.app-menu-promo-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--app-muted);
}
.app-menu-promo-arrow {
  color: var(--app-muted);
  display: inline-flex;
  transform: rotate(180deg);
}
.app-menu-promo-arrow .app-menu-arrow {
  width: 16px;
  height: 16px;
  display: block;
}
.app-menu-item {
  text-align: center;
  font-size: 11px;
  color: var(--app-text);
}
.app-menu-ico {
  width: 44px; height: 44px;
  margin: 0 auto 6px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--app-lavender);
  color: var(--app-primary, #7c5cff);
}
.app-menu-ico .app-menu-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.app-inline-ico {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  display: inline-block;
}
.app-search-svg {
  width: 18px;
  height: 18px;
  color: var(--app-muted);
  flex-shrink: 0;
}
.app-badge-svg {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: -1px;
}
.app-staff-count {
  margin: 0 16px 10px;
  font-size: 12px;
  color: var(--app-muted);
}
.app-staff-hero {
  margin: 0 12px 12px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(80,50,160,.06);
  display: flex;
  gap: 12px;
  align-items: center;
}
.app-staff-hero-meta { flex: 1; min-width: 0; }
.app-staff-name {
  font-size: 18px;
  font-weight: 800;
}
.app-staff-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--app-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.app-staff-cta {
  flex-shrink: 0;
  background: var(--app-purple);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
}
.app-panel {
  margin: 0 12px 12px;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(80,50,160,.06);
}
.app-panel-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
}
.app-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.app-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--app-lavender);
}
.app-list { display: flex; flex-direction: column; gap: 10px; }
.app-list-item {
  padding: 10px 0;
  border-top: 1px solid var(--app-border);
}
.app-list-item:first-child { border-top: 0; padding-top: 0; }
.app-list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.app-list-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.45;
}
.app-topbar-back .app-tab-svg {
  width: 18px;
  height: 18px;
  display: block;
}
.app-topbar-link {
  min-width: 36px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--app-purple);
}
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--app-border);
  background: #fff;
  color: var(--app-text);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.app-btn-primary {
  background: linear-gradient(135deg, #7c5cff, #6d5efc);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(109, 94, 252, .28);
}
.app-btn-danger {
  background: #ffe8ef;
  border-color: transparent;
  color: #c01048;
}
.app-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--app-lavender);
  color: var(--app-purple);
  font-size: 11px;
  font-weight: 700;
}
.app-order-list {
  padding: 0 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-order-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(80,50,160,.06);
}
.app-order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.app-order-card-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}
.app-order-card-price {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--app-pink);
}
.app-order-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--app-muted);
}
.app-amt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.app-amt-chip {
  border: 1px solid var(--app-border);
  background: #faf8ff;
  border-radius: 12px;
  padding: 12px 8px;
  font-weight: 700;
  color: var(--app-text);
  cursor: pointer;
}
.app-amt-chip.active,
.app-amt-chip:hover {
  border-color: var(--app-purple);
  background: var(--app-lavender);
  color: var(--app-purple);
}
.app-msg-avatar .app-menu-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.app-alert {
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.app-alert-error { background: #ffe8ef; color: #c01048; }
.app-alert-success { background: #e8fff3; color: #0a7a45; }
.app-empty {
  text-align: center;
  color: var(--app-muted);
  padding: 40px 16px;
  font-size: 14px;
}
.app-form-panel {
  margin: 0 12px 100px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--app-border);
}
.app-form-panel .form-group { margin-bottom: 12px; }
.app-form-panel label {
  display: block;
  font-size: 12px;
  color: var(--app-muted);
  margin-bottom: 4px;
}
.app-form-panel .form-control {
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #faf8ff;
}
.app-form-panel .form-control:focus {
  outline: none;
  border-color: var(--app-purple);
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
}

/* —— 提交订单页 —— */
.so-topbar { background: #fff; }
.so-page {
  padding: 10px 12px 90px;
  background: #f5f5f7;
  min-height: calc(100vh - 50px);
}
.so-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.so-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #d9ccff, #8e6fff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
  overflow: hidden;
}
.so-thumb.has-img {
  background-size: cover;
  background-position: center;
}
.so-product-meta { flex: 1; min-width: 0; }
.so-product-name {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.so-product-price {
  margin-top: 6px;
  color: #e54d5e;
  font-size: 15px;
  font-weight: 700;
}
.so-product-qty {
  color: #999;
  font-size: 13px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.so-form-card {
  background: #fff;
  border-radius: 12px;
  padding: 0 14px;
}
.so-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.so-row:last-child { border-bottom: none; }
.so-row-top { align-items: flex-start; }
.so-row-note { flex-direction: column; align-items: flex-start; gap: 6px; }
.so-label {
  width: 78px;
  flex-shrink: 0;
  font-size: 14px;
  color: #222;
  font-weight: 500;
}
.so-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #222;
  text-align: right;
  padding: 0;
  outline: none;
}
.so-input::placeholder { color: #c0c0c0; }
.so-select {
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23bbb' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center;
  padding-right: 16px;
  color: #999;
}
.so-select option { color: #222; }
.so-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.so-field .so-input,
.so-field .so-select {
  width: 100%;
}
.so-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #999;
  text-align: right;
}
.so-textarea {
  text-align: left;
  resize: none;
  min-height: 40px;
  line-height: 1.4;
}
.so-radios {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}
.so-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}
.so-radio input { position: absolute; opacity: 0; pointer-events: none; }
.so-radio i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  display: inline-block;
  position: relative;
}
.so-radio.active { color: #222; font-weight: 600; }
.so-radio.active i {
  border-color: #e54d5e;
}
.so-radio.active i::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #e54d5e;
}
.so-amount {
  flex: 1;
  text-align: right;
  color: #e54d5e;
  font-size: 15px;
  font-weight: 700;
}
.so-note-text {
  font-size: 13px;
  color: #999;
  line-height: 1.45;
  width: 100%;
}
.so-extras { flex: 1; text-align: right; }
.so-extra-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 12px;
  margin: 4px 0;
  color: #666;
}
.so-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 12px calc(8px + var(--app-safe-b));
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.so-footer-left {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.so-footer-count { font-size: 13px; color: #999; }
.so-footer-total { font-size: 14px; color: #222; }
.so-footer-total strong { color: #e54d5e; font-size: 18px; }
.so-submit-btn {
  flex-shrink: 0;
  min-width: 120px;
  height: 42px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: #e54d5e;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(229, 77, 94, .3);
}

@media (min-width: 520px) {
  .app-body { background: #e8e2f5; }
  .app-page {
    box-shadow: 0 0 0 1px var(--app-border), 0 20px 50px rgba(80,50,160,.12);
    background: var(--app-bg);
  }
  .so-footer { left: 50%; right: auto; transform: translateX(-50%); width: 480px; }
}
