/* 鲜集生鲜 · 手机网页版店铺
   移动优先，最大宽度 480px 居中；与小程序同一套品牌色。 */

:root {
    --brand: #2f7a3e;
    --brand-dark: #24602f;
    --brand-soft: #eaf4ec;
    --accent: #c2563a;
    --accent-soft: #fbeeea;
    --price: #d1442f;
    --text: #1f2329;
    --muted: #6b7280;
    --line: #eceef0;
    --card: #fff;
    --bg: #f5f6f7;
    --tab-h: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: #e9ebec;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body.locked { overflow: hidden; }

img { display: block; }
button { font-family: inherit; border: 0; background: none; color: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
.hidden { display: none !important; }

.app {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
    overflow-x: hidden;
}

/* ---------- 启动态 ---------- */
.boot {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
}
.boot-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--brand-soft);
    border-top-color: var(--brand);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 14px 10px;
    background: linear-gradient(160deg, #35844a 0%, #2f7a3e 62%, #2a6f39 100%);
    color: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 6px 18px rgba(47, 122, 62, 0.18);
}
.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 17px;
    font-weight: 700;
}
.brand-text { min-width: 0; }
.brand-text h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.brand-text p {
    margin: 1px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 17px;
}
.dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd24a;
    border: 1.5px solid #2f7a3e;
}
.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0 10px;
    height: 38px;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.94);
}
.search-icon { font-size: 13px; opacity: 0.55; }
.search-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    font-size: 13px;
    color: var(--text);
}
.search-row input::placeholder { color: #9aa3a1; }
.search-row input::-webkit-search-cancel-button { display: none; }
.search-clear { font-size: 12px; color: #9aa3a1; padding: 4px; }
.topbar.compact .search-row { display: none; }

/* ---------- 视图 ---------- */
.view { padding: 12px 12px 24px; }
.view.flush { padding: 0 0 24px; }

.block { margin-bottom: 14px; }
.block:last-child { margin-bottom: 0; }

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 2px 2px 8px;
}
.sec-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.sec-head h2 em {
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 6px;
}
.sec-head .more { font-size: 12px; color: var(--muted); }

/* ---------- 轮播 ---------- */
.banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #dfe4e0;
}
.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 16 / 8.6;
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    overflow: hidden;
}
.slide .slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide .veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.48) 100%);
}
.slide .slide-txt { position: relative; z-index: 2; }
.slide .slide-tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.36);
    font-size: 10px;
    letter-spacing: 0.5px;
}
.slide h3 { margin: 0; font-size: 19px; line-height: 1.32; letter-spacing: 0.4px; }
.slide p { margin: 4px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.86); }
.dots {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    gap: 5px;
}
.dots i {
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.22s ease, background 0.22s ease;
}
.dots i.on { width: 14px; background: #fff; }

/* ---------- 分类 ---------- */
.cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 10px;
    border-radius: 16px;
    background: var(--card);
}
.cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 2px;
    border-radius: 12px;
    transition: background 0.15s ease;
}
.cat:active { background: var(--brand-soft); }
.cat-ico {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-soft);
    font-size: 21px;
}
.cat span.name {
    font-size: 12px;
    color: #3d444a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------- 促销横滑 ---------- */
.promos {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.promos::-webkit-scrollbar { display: none; }
.promo {
    flex: 0 0 232px;
    scroll-snap-align: start;
    position: relative;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    overflow: hidden;
    text-align: left;
}
.promo .p-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.24);
    font-size: 10px;
    letter-spacing: 0.5px;
}
.promo h4 { margin: 7px 0 0; font-size: 14px; font-weight: 700; }
.promo p { margin: 3px 0 0; font-size: 11px; color: rgba(255, 255, 255, 0.82); max-width: 92%; }
.promo .p-deal {
    position: absolute;
    right: 10px;
    top: 9px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 1px 8px;
    white-space: nowrap;
}

/* ---------- 商品卡 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.card-p {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: var(--card);
    overflow: hidden;
    text-align: left;
    transition: transform 0.14s ease;
}
.card-p:active { transform: scale(0.985); }
.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(150deg, #f3f6f2, #eaefe9);
    overflow: hidden;
}
.thumb .ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 40px;
}
.thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.p-body { padding: 8px 10px 10px; }
.p-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.p-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 7px;
}
.p-price {
    color: var(--price);
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.p-price small { font-size: 10px; font-weight: 600; margin-right: 1px; }
.p-origin {
    font-size: 11px;
    color: #a4adb3;
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}
.p-unit { font-size: 10px; color: var(--muted); margin-left: auto; }
.p-add {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 10px rgba(47, 122, 62, 0.32);
}
.p-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.4px;
}
.p-badge.sold { background: #8b949b; }

/* 分类页：左栏 + 右列表 */
.cat-wrap {
    display: grid;
    grid-template-columns: 92px 1fr;
    min-height: calc(100vh - var(--tab-h) - 130px);
}
.rail {
    background: #eef0f1;
    padding: 8px 0 20px;
    overflow-y: auto;
    max-height: calc(100vh - var(--tab-h) - 120px);
    position: sticky;
    top: 0;
}
.rail button {
    position: relative;
    display: block;
    width: 100%;
    padding: 13px 8px;
    font-size: 12.5px;
    color: #4a5259;
    text-align: center;
    line-height: 1.3;
}
.rail button.on {
    background: var(--bg);
    color: var(--brand);
    font-weight: 700;
}
.rail button.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}
.cat-main { padding: 10px 10px 20px; }
.cat-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #3d444a;
}
.cat-title em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 11px; }
.row-p {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: var(--card);
    text-align: left;
    width: 100%;
}
.row-p .thumb { width: 78px; flex: 0 0 78px; border-radius: 10px; }
.row-p .thumb .ph { font-size: 30px; }
.row-p .r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-p .r-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.row-p .r-desc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.row-p .r-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 6px; padding-right: 32px; }

/* ---------- 购物车 ---------- */
.cart-line {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: var(--card);
}
.cart-line .thumb { width: 74px; flex: 0 0 74px; border-radius: 10px; }
.cart-line .thumb .ph { font-size: 28px; }
.cart-line .c-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-line .c-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.cart-line .c-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.cart-line .p-unit { margin-left: 0; }
.stepper {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 20px;
    background: #f2f4f3;
    padding: 2px;
}
.stepper button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    font-size: 15px;
    line-height: 1;
    display: grid;
    place-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.stepper button:disabled { color: #c3c9c6; box-shadow: none; }
.stepper span {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.cart-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
    z-index: 31;
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
}
.cart-bar .sum { flex: 1; }
.cart-bar .sum b { color: var(--price); font-size: 18px; font-variant-numeric: tabular-nums; }
.cart-bar .sum small { color: var(--muted); font-size: 11px; display: block; margin-top: -2px; }
.btn-primary {
    padding: 10px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #35844a, #2f7a3e);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(47, 122, 62, 0.28);
}
.btn-primary:disabled { background: #c8d2cb; box-shadow: none; color: #f4f6f4; }
.btn-ghost {
    padding: 9px 18px;
    border-radius: 22px;
    border: 1px solid var(--brand);
    color: var(--brand);
    font-size: 13px;
    background: #fff;
}
.btn-block { display: block; width: 100%; }

/* ---------- 我的 ---------- */
.me-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(140deg, #35844a, #2a6f39);
    color: #fff;
}
.me-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 22px;
}
.me-card h3 { margin: 0; font-size: 15px; font-weight: 700; }
.me-card p { margin: 2px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, 0.8); }
.me-card .me-btn {
    margin-left: auto;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.me-list {
    margin-top: 12px;
    border-radius: 16px;
    background: var(--card);
    overflow: hidden;
}
.me-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--line);
    width: 100%;
    text-align: left;
}
.me-row:last-child { border-bottom: 0; }
.me-row .r-ico { font-size: 16px; }
.me-row .r-arrow { margin-left: auto; color: #c3c9c6; font-size: 14px; }
.me-row .r-val { margin-left: auto; color: var(--muted); font-size: 12px; }

.order-card {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: var(--card);
}
.order-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}
.order-top b { color: var(--text); font-size: 12.5px; font-weight: 600; }
.order-items { margin: 8px 0 0; font-size: 12.5px; color: #4a5259; line-height: 1.6; }
.order-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--muted);
}
.order-foot b { color: var(--price); font-size: 15px; }
.pill {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 10.5px;
    background: var(--brand-soft);
    color: var(--brand);
}
.pill.warn { background: #fdf1e3; color: #b5761f; }
.pill.info { background: #e9f1fa; color: #2c6ba8; }
.pill.done { background: var(--brand-soft); color: var(--brand); }
.pill.muted { background: #f0f2f1; color: #7b848a; }

/* ---------- 空状态 / 骨架 ---------- */
.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
}
.empty .ico { font-size: 38px; margin-bottom: 10px; opacity: 0.7; }
.empty p { margin: 0 0 14px; font-size: 13px; }
.sk {
    border-radius: 14px;
    background: linear-gradient(90deg, #eef1ef 25%, #f7f9f8 37%, #eef1ef 63%);
    background-size: 400% 100%;
    animation: sk 1.3s ease infinite;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sk-card { height: 190px; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 32;
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10.5px;
    color: #8d959b;
}
.tab-ico { font-size: 19px; line-height: 1; filter: grayscale(1); opacity: 0.62; transition: all 0.15s ease; }
.tab.active { color: var(--brand); font-weight: 600; }
.tab.active .tab-ico { filter: none; opacity: 1; transform: translateY(-1px); }
.badge {
    position: absolute;
    top: 6px;
    left: 50%;
    margin-left: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}

/* ---------- 弹层 ---------- */
.mask {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(18, 22, 20, 0.46);
    animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 61;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    animation: rise 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
    padding-bottom: env(safe-area-inset-bottom);
}
@keyframes rise { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 700;
    background: var(--bg);
}
.sheet-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eceeed;
    color: #6b7280;
    font-size: 13px;
}
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 14px;
    background: #fff;
    border-top: 1px solid var(--line);
}

/* 商品详情 */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.86;
    max-height: 330px;
    background: linear-gradient(150deg, #f3f6f2, #e8eee7);
    overflow: hidden;
}
.hero .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 92px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.detail-box { padding: 14px 16px 6px; background: #fff; }
.detail-price { display: flex; align-items: baseline; gap: 8px; }
.detail-price b { color: var(--price); font-size: 24px; font-variant-numeric: tabular-nums; }
.detail-price b small { font-size: 13px; }
.detail-price s { color: #a4adb3; font-size: 12px; }
.detail-price .save {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
}
.detail-name { margin: 8px 0 0; font-size: 17px; font-weight: 700; line-height: 1.4; }
.detail-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-tags span {
    padding: 3px 8px;
    border-radius: 6px;
    background: #f3f5f4;
    color: #5a636a;
    font-size: 11px;
}
.detail-sec { margin-top: 10px; padding: 12px 16px; background: #fff; }
.detail-sec h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.detail-sec p { margin: 0; font-size: 13px; color: #4a5259; line-height: 1.72; }
.detail-sec .promise { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.detail-sec .promise span::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* 结算 */
.form { background: #fff; border-radius: 14px; padding: 4px 14px; }
.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.form-row:last-child { border-bottom: 0; }
.form-row label { width: 62px; flex: 0 0 62px; font-size: 13px; color: #4a5259; }
.form-row input, .form-row textarea {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: none;
    font-size: 13.5px;
    padding: 0;
    resize: none;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: #b4bcb9; }
.ck-items { margin-top: 10px; background: #fff; border-radius: 14px; padding: 10px 14px; }
.ck-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 12.5px;
    border-bottom: 1px dashed var(--line);
}
.ck-line:last-child { border-bottom: 0; }
.ck-line .ck-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-line .ck-qty { color: var(--muted); }
.ck-line .ck-amt { color: var(--price); font-variant-numeric: tabular-nums; }
.ck-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    font-size: 13px;
}
.ck-total b { color: var(--price); font-size: 19px; font-variant-numeric: tabular-nums; }

/* 登录 */
.login-form { padding: 4px 14px 14px; }
.login-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 14px;
    background: #f1f3f2;
    border-radius: 11px;
}
.login-tab {
    flex: 1;
    padding: 8px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}
.login-tab.on {
    background: #fff;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(20, 30, 25, .1);
}
.link-btn { color: var(--brand); cursor: pointer; }
.login-tip { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 0 12px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button {
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--brand);
    color: var(--brand);
    font-size: 12px;
    background: #fff;
    white-space: nowrap;
}
.code-row button:disabled { border-color: #d8ded9; color: #aeb6b3; }

/* toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28%;
    transform: translateX(-50%);
    z-index: 80;
    max-width: 76%;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(28, 32, 30, 0.9);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    animation: fade 0.16s ease;
}
.toast.err { background: rgba(150, 44, 30, 0.94); }

/* 页脚 */
.foot {
    margin-top: 18px;
    padding: 16px 8px 6px;
    text-align: center;
    color: #a2aaa8;
    font-size: 11px;
    line-height: 1.8;
}
.foot b { color: #7e8785; font-weight: 600; }

@media (min-width: 520px) {
    .app { box-shadow: 0 0 40px rgba(0, 0, 0, 0.08); }
}
