/* 小程序外壳与组件 v2 */
.mp-stage { min-height: 100vh; display: grid; justify-items: center; align-content: start; gap: var(--space-3); padding: var(--space-5) var(--space-3); background: radial-gradient(ellipse at 70% 0%, #dfe9ff, #eef1f7 55%) ; }
.mp-external { width: min(100%, 375px); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-3); color: var(--primary-dark); font-size: var(--text-xs); font-weight: 650; }
.mp-external a { display: inline-flex; align-items: center; min-height: 28px; gap: var(--space-1); }
.mp-external a:hover { text-decoration: underline; }
.mp-phone { width: 375px; height: 812px; max-width: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: var(--bg); border: 8px solid #12192b; border-radius: 44px; box-shadow: 0 30px 60px #1b243733, 0 0 0 1px #2c3650; }
.mp-chrome { background: var(--surface); }
.mp-status { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 4px var(--space-5) 0 28px; color: #111; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-nav { display: grid; grid-template-columns: 84px minmax(0,1fr) 96px; align-items: center; min-height: 44px; padding: 0 var(--space-2); }
.mp-nav h1 { margin: 0; text-align: center; font-size: 17px; font-weight: 650; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-nav-back { width: 38px; height: 42px; display: grid; place-items: center; }
.mp-capsule { display: flex; align-items: center; justify-content: center; gap: 9px; justify-self: end; margin-right: 4px; width: 87px; height: 32px; border: 1px solid #00000024; border-radius: 16px; background: #ffffffd9; color: #111; }
.mp-capsule-divider { width: 1px; height: 16px; background: #0000001f; }
.mp-capsule-dot { width: 15px; height: 15px; border: 1.6px solid currentColor; border-radius: 50%; display: grid; place-items: center; }
.mp-capsule-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mp-content { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--space-3); scrollbar-width: none; }
.mp-content::-webkit-scrollbar { display: none; }
.mp-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px 4px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.mp-tab { min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 3px; color: #8a93a8; text-align: center; font-size: 10px; line-height: 1.2; }
.mp-tab[aria-current="page"] { color: var(--primary); font-weight: 700; }
.mp-tab:focus-visible { outline-offset: -2px; }
.mp-actions { position: sticky; bottom: calc(-1 * var(--space-3)); margin-bottom: calc(-1 * var(--space-3)); padding-bottom: calc(var(--space-3) * 2) !important; z-index: 2; background: var(--surface); padding: var(--space-3); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px #1b24370a; }
.mp-sheet { width: min(100%, 375px); max-height: 85vh; max-height: 85dvh; margin: auto auto 0; padding: var(--space-5); border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: var(--text); }
.mp-sheet::backdrop { background: #0b1b3c70; }
.mp-content .table :is(th,td) { padding: 7px; }
.mp-content .card { border-color: transparent; }
.mp-content .badge { font-weight: 600; }
.mp-content .btn-sm { border-radius: 6px; }
.mp-content .btn { border-radius: 10px; }
.mp-content .section-title { font-size: 15px; font-weight: 700; }
.mp-content .section-title::before { content: ''; display: inline-block; width: 3px; height: 13px; margin-right: 7px; vertical-align: -1px; border-radius: 2px; background: var(--primary-grad); }
.mp-content .notice { border-radius: 8px; line-height: 1.5; }
.mp-content .input, .mp-content .field :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { background: #f6f8fc; border-color: transparent; border-radius: 8px; }
/* 通用小程序组件（买家/商户可复用） */
.mp-hero { padding: var(--space-4); border-radius: var(--radius); background: var(--primary-grad); color: #fff; }
.mp-searchbar { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--muted); box-shadow: var(--shadow-sm); }
.mp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.mp-goods { display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.mp-goods img { display: block; width: 100%; aspect-ratio: 1/1.05; object-fit: cover; background: var(--bg); }
.mp-goods-body { display: grid; gap: 4px; padding: 8px 10px 10px; }
.mp-goods-body strong { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-cell { display: flex; align-items: center; gap: var(--space-3); padding: 14px var(--space-4); background: var(--surface); border-bottom: 1px solid var(--line); }
.mp-cell:last-child { border-bottom: 0; }
@media (max-width: 480px) {
  .mp-stage { min-height: 100vh; min-height: 100dvh; padding: 0; background: var(--bg); gap: 0; align-content: stretch; grid-template-rows: auto minmax(0,1fr); }
  .mp-external { width: 100%; padding: 0 var(--space-3); background: var(--primary-soft); }
  .mp-phone { width: 100%; height: calc(100vh - 28px); height: calc(100dvh - 28px); border: 0; border-radius: 0; box-shadow: none; }
  .mp-status { display: none; }
}
