/* Shared extensions of the existing home palette. */
[hidden] { display: none !important; }
.bottom-nav .dock-item { font-size: 14px; min-height: 48px; }
.bottom-nav { height: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
.proxy-grid .proxy-option { padding: 0; border: 0; background: transparent; }
.proxy-grid .proxy-label { display: block; }
.dock-item > .bi { font-size: 25px; line-height: 1.2; }
.bottom-nav .cart-badge { display: block; width: auto; height: auto; min-width: 18px; padding: 1px 4px; top: -3px; font-size: 12px; line-height: 14px; text-align: center; color: #fff; border-radius: 12px; }
.floating-cart { position: fixed; z-index: 80; right: max(16px, calc((100vw - 540px) / 2 + 16px)); bottom: calc(var(--nav-height) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 62px; height: 62px; border: 2px solid #fff; border-radius: 50%; background: var(--forest); color: #fff; box-shadow: 0 6px 20px #294b3230; font-size: 12px; transition: transform .2s; }
.floating-cart:hover { color: #fff; transform: translateY(-3px); }
.floating-cart > .bi { font-size: 25px; line-height: 1; }
.floating-cart-count { position: absolute; top: -4px; right: -3px; min-width: 21px; padding: 2px 5px; border: 2px solid #fff; border-radius: 20px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.store-toast { position: fixed; z-index: 2100; bottom: calc(var(--nav-height) + 100px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: min(90vw, 440px); padding: 12px 20px; border-radius: 14px; color: #fff; background: #26352bf2; box-shadow: 0 8px 30px #26352b20; font-size: 14px; text-align: center; }
.page-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; min-height: 72px; padding: 12px 14px; }
.page-header h1 { margin: 0; text-align: center; font-size: 21px; font-weight: 700; }
.page-icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #ffffff80; color: var(--forest); font-size: 21px; }
.page-icon-button:hover { background: #fff; color: var(--forest); }
.surface-card { margin: 0 14px 14px; padding: 20px 16px; border-radius: 18px; background: #fff; }
.surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.surface-heading h2 { margin: 0; font-size: 19px; font-weight: 700; }
.surface-heading > a { color: var(--text-sub); font-size: 14px; }
.surface-heading > a .bi { font-size: 12px; margin-left: 3px; }
.soft-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border: 0; border-radius: 24px; background: #ecf2e8; color: var(--forest); font-size: 14px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 11px 24px; border: 0; border-radius: 26px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; }
.primary-button:hover { background: var(--accent-hover); color: #fff; }
.account-shell { --success: #487c4c; --warning: #be7b24; --border-light: #e7ece3; --radius-lg: 18px; --shadow-soft: 0 5px 20px #314a3310; }
.account-hero { padding: 24px 22px 20px; }
.account-user { display: flex; align-items: center; gap: 13px; }
.account-avatar { flex-shrink: 0; width: 62px; height: 62px; object-fit: cover; border: 3px solid #ffffffb8; border-radius: 50%; background: #fff; }
.account-identity { flex: 1; min-width: 0; }
.account-identity h1 { margin: 0 0 5px; color: #294b32; font-size: 23px; font-weight: 700; overflow-wrap: anywhere; }
.account-identity p { margin: 0; font-size: 14px; color: #516d4e; overflow-wrap: anywhere; }
.account-tools { display: flex; flex-shrink: 0; gap: 2px; align-self: flex-start; }
.account-tools .page-icon-button { width: 36px; height: 38px; background: transparent; }
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 27px; gap: 8px; text-align: center; }
.account-stat { display: flex; flex-direction: column; gap: 6px; color: #52694e; font-size: 14px; }
.account-stat strong { color: #385c41; font-size: 23px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.account-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 12px; }
.account-feature { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 10px; min-height: 52px; }
.account-feature + .account-feature { border-left: 1px solid #e7ece3; }
.account-feature strong { display: block; margin-bottom: 5px; font-size: 18px; }
.account-feature small { display: block; color: #db613e; font-size: 12px; }
.account-feature > .quick-icon { width: 43px; height: 43px; }
.account-feature > .quick-icon i { font-size: 24px; }
.account-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 3px; }
.account-shortcut { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; min-height: 65px; padding: 5px 2px; background: transparent; border: 0; color: var(--text-main); text-align: center; font-size: 14px; }
.account-shortcut > .bi { color: var(--forest); font-size: 27px; line-height: 1.2; }
.account-shortcut:hover { color: var(--accent); }
.account-order-count { position: absolute; top: -5px; left: calc(50% + 5px); min-width: 18px; padding: 1px 4px; border: 1px solid #fff; border-radius: 12px; background: var(--accent); color: #fff; font-size: 12px; line-height: 16px; }
.account-service-card { padding-top: 22px; padding-bottom: 17px; }
.account-management { padding-top: 16px; padding-bottom: 16px; }
.account-management .surface-heading { margin-bottom: 16px; }
.account-management .account-grid { row-gap: 16px; }
.account-page-heading { display: flex; align-items: center; gap: 10px; padding: 0 0 15px; }
.account-page-heading h2 { margin: 0; font-size: 19px; }
.account-page-heading > a { display: grid; place-items: center; width: 38px; height: 38px; background: #fff; border-radius: 50%; color: var(--forest); }
.pane-container { padding: 0 14px; }
.pane-container:has(.tab-content > .active) { padding-top: 6px; }
.account-shell .btn-primary { background: var(--forest); border-color: var(--forest); color: #fff; box-shadow: none; }
.account-shell .btn-primary:hover { background: #2c4c33; }
.account-shell .text-muted, .account-shell .form-text { color: var(--text-sub) !important; }
.list-card, .form-group-ios, .qr-card { position: relative; border-radius: 18px; background: #fff; border: 1px solid #edf0e9; }
.list-card { display: flex; flex-direction: column; padding: 16px; margin-bottom: 14px; min-width: 0; }
.lc-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.lc-time { color: var(--text-sub); font-size: 12px; }
.lc-status { display: inline-flex; align-items: center; white-space: nowrap; padding: 5px 9px; border-radius: 20px; font-size: 12px; }
.status-green { background: #edf5e9; color: #487c4c; }
.status-gray { background: #f1f3ef; color: #7c877f; }
.status-red { background: #fff0eb; color: var(--danger); }
.status-orange { background: #fff4e4; color: #ad721f; }
.lc-body { display: flex; align-items: stretch; gap: 13px; min-width: 0; }
.lc-img { flex-shrink: 0; width: 78px; height: 78px; border-radius: 13px; object-fit: contain; background: #f6f7f4; }
.lc-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lc-title { font-size: 16px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.lc-meta { color: var(--text-sub); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.lc-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lc-price { color: var(--accent); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-price::before { content: '¥'; margin-right: 3px; font-size: .65em; }
.lc-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 8px 14px; border: 0; border-radius: 22px; background: #f1f5ed; color: var(--forest); font-size: 14px; }
.lc-action-btn.primary { color: #fff; background: var(--forest); }
.lc-action-btn.danger { color: var(--danger); background: #fff1eb; }
.btn-icon-del { display: grid; place-items: center; width: 34px; height: 34px; color: #9ba496; }
.segmented-control { display: flex; gap: 5px; margin-bottom: 16px; padding: 5px; border-radius: 16px; background: #fff; }
.filter-btn { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-sub); font-size: 14px; }
.filter-btn.active { background: #e8f0e2; color: var(--forest); font-weight: 600; }
.form-group-ios { padding: 20px; margin-bottom: 16px; }
.form-label-ios { display: block; margin-bottom: 8px; color: #60725b; font-size: 14px; font-weight: 500; }
.form-control-ios { width: 100%; margin-bottom: 15px; padding: 13px 14px; border: 1px solid #e1e8db; border-radius: 12px; background: #f7f9f4; color: var(--text-main); font-size: 16px; }
.form-control-ios::placeholder { color: #98a190; }
.form-control-ios:focus { border-color: #6e8e63; outline: 2px solid #dce8d5; outline-offset: 1px; background: #fff; }
.u-avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.qr-card { padding: 26px 20px; text-align: center; }
.qr-wrapper { display: inline-flex; padding: 14px; margin-bottom: 20px; background: #fff; border: 1px solid var(--border-light); border-radius: 18px; }
.copy-box { display: flex; gap: 8px; padding: 6px; background: #f1f5ed; border-radius: 30px; }
.copy-input { flex: 1; min-width: 0; border: 0; background: transparent; text-align: center; color: var(--text-sub); font-size: 14px; }
.agent-flex { display: flex; align-items: center; gap: 12px; min-width: 0; }
.agent-avatar { width: 56px; height: 56px; border-radius: 15px; object-fit: cover; }
.agent-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-light); }
.agent-actions .lc-action-btn { padding: 8px 4px; }
.addr-main-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.addr-person { color: var(--text-main); font-size: 16px; font-weight: 600; }
.addr-phone, .addr-full { color: var(--text-sub); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border-light); }
.addr-chip-default { padding: 4px 9px; border-radius: 18px; color: var(--forest); background: #edf4e7; font-size: 12px; }
.account-shell .text-center.text-muted.py-5 { border-radius: 18px; background: #fff; }
.modal-dialog { display: flex; align-items: flex-end; min-height: 100%; width: min(100%, 540px); max-width: 540px; margin: 0 auto; }
.modal-content { border: 0; border-radius: 22px 22px 0 0; color: var(--text-main); }
.modal-header, .modal-body { padding: 20px; }
.modal-header { border-bottom-color: #edf0e9; }
.modal-title { font-size: 19px; font-weight: 600; }
.modal-footer { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 0; }
.modal .btn-primary { background: var(--forest); border-color: var(--forest); }
.cart-shell { padding-bottom: calc(var(--nav-height) + 110px + env(safe-area-inset-bottom)); }
.cart-reassurance { display: flex; justify-content: space-around; gap: 6px; padding: 0 12px 18px; color: #60765a; font-size: 12px; }
.cart-reassurance .bi { margin-right: 4px; }
.cart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; margin: 0 14px 12px; border-radius: 16px; background: #ffffffd9; font-size: 16px; }
.cart-toolbar strong { color: var(--accent); margin-left: 7px; }
.cart-toolbar button { border: 1px solid #dbe5d3; border-radius: 20px; min-height: 36px; padding: 5px 18px; background: #fff; color: var(--forest); font-size: 14px; }
.cart-list { padding: 0 14px; }
.cart-row { display: grid; grid-template-columns: 28px 88px minmax(0, 1fr); align-items: center; gap: 12px; padding: 19px 14px; margin-bottom: 12px; background: #fff; border-radius: 18px; }
.cart-row.is-unavailable { background: #ffffffb8; }
.cart-row.is-unavailable .cart-item-image { opacity: .5; }
.cart-check { display: flex; align-items: center; justify-content: center; min-width: 28px; min-height: 44px; cursor: pointer; }
.cart-check input { appearance: none; position: relative; flex-shrink: 0; width: 22px; height: 22px; margin: 0; border: 1.5px solid #c6d0bf; border-radius: 50%; background: #fff; cursor: pointer; }
.cart-check input:checked, .cart-check input:indeterminate { border-color: var(--accent); background: var(--accent); }
.cart-check input:checked::after { content: ''; position: absolute; top: 4px; left: 7px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cart-check input:indeterminate::after { content: ''; position: absolute; top: 9px; left: 4px; width: 11px; height: 2px; background: #fff; }
.cart-check input:disabled { opacity: .45; cursor: default; }
.cart-item-image { display: block; width: 88px; height: 96px; object-fit: contain; border-radius: 12px; background: #f7f8f5; }
.cart-item-content { min-width: 0; }
.cart-item-name { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.cart-item-meta { margin: 5px 0 12px; color: var(--text-sub); font-size: 12px; line-height: 1.5; }
.cart-item-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
.cart-price { color: var(--accent); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-price small { font-size: 13px; margin-right: 3px; }
.quantity-stepper { display: flex; height: 34px; border: 1px solid #e0e6da; border-radius: 9px; overflow: hidden; }
.quantity-stepper button { width: 32px; padding: 0; border: 0; background: #f6f8f2; color: var(--forest); font-size: 20px; }
.quantity-stepper input { width: 38px; padding: 0 2px; border: 0; border-right: 1px solid #e0e6da; border-left: 1px solid #e0e6da; border-radius: 0; text-align: center; color: var(--text-main); background: #fff; font-size: 16px; appearance: textfield; }
.quantity-stepper input::-webkit-inner-spin-button, .quantity-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.cart-item-remove { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 18px; background: #fff0e9; color: var(--danger); font-size: 14px; }
.cart-empty { padding: 65px 20px; text-align: center; }
.cart-empty > .bi { display: block; margin-bottom: 20px; color: #91aa85; font-size: 68px; }
.cart-empty h2 { margin: 0 0 9px; font-size: 20px; font-weight: 600; }
.cart-empty p { margin: 0 0 25px; color: var(--text-sub); font-size: 14px; line-height: 1.6; }
.cart-notice { margin: 0 14px 12px; padding: 12px 14px; border-radius: 12px; background: #fff4e5; color: #936526; font-size: 14px; line-height: 1.6; }
.cart-notice button { margin-left: 8px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: inherit; }
.cart-summary { position: fixed; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); left: 50%; z-index: 90; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: 100%; max-width: 540px; min-height: 84px; padding: 15px 16px; border-top: 1px solid #e7ece3; background: #fffffff5; }
.cart-select-all { display: flex; align-items: center; gap: 7px; flex-shrink: 0; color: #61745b; font-size: 14px; }
.cart-summary-total { flex: 1; min-width: 0; text-align: right; }
.cart-summary-total small { display: block; margin-bottom: 3px; color: var(--text-sub); font-size: 12px; }
.cart-summary-total strong { color: var(--accent); font-size: 21px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cart-summary .primary-button { padding: 12px 20px; white-space: nowrap; }
.cart-template { margin: 0 14px 12px; padding: 16px; background: #fff; border-radius: 16px; }
.cart-template label { display: block; margin-bottom: 10px; font-size: 14px; }
.cart-template select { width: 100%; padding: 12px; border: 1px solid #dfe7d8; border-radius: 12px; background: #f7f9f4; color: var(--forest); font-size: 16px; }
@media (min-width: 900px) {
    .floating-cart { right: max(24px, calc((100vw - 1100px) / 2 + 24px)); }
    .account-hero { padding: 32px 36px 28px; }
    .account-shell > .surface-card, .account-shell > .pane-container { margin-left: auto; margin-right: auto; max-width: 760px; }
    .account-hero { max-width: 760px; margin: 0 auto; }
    .cart-summary { max-width: 1100px; padding-right: 32px; padding-left: 32px; }
    .cart-toolbar, .cart-notice, .cart-template { margin-left: 30px; margin-right: 30px; }
    .cart-list { padding: 0 30px; }
    .cart-row { grid-template-columns: 36px 110px minmax(0, 1fr); padding: 22px; gap: 20px; }
    .cart-item-image { width: 110px; height: 110px; }
    .cart-item-name { font-size: 18px; }
    .cart-item-bottom { margin-top: 18px; }
}
@media (max-width: 370px) {
    .account-hero { padding-left: 16px; padding-right: 16px; }
    .account-avatar { width: 54px; height: 54px; }
    .account-identity h1 { font-size: 21px; }
    .account-tools { flex-direction: column; }
    .account-feature { padding: 0 4px; }
    .account-feature strong { font-size: 16px; }
    .account-feature > .quick-icon { width: 32px; height: 32px; }
    .account-feature > .quick-icon i { font-size: 20px; }
    .surface-card { margin-left: 10px; margin-right: 10px; padding-left: 10px; padding-right: 10px; }
    .cart-row { grid-template-columns: 24px 66px minmax(0, 1fr); padding: 14px 10px; gap: 8px; }
    .cart-item-image { width: 66px; height: 80px; }
    .cart-summary { flex-wrap: wrap; gap: 8px; padding: 10px; }
    .cart-summary .primary-button { padding: 11px 13px; font-size: 14px; }
    .cart-summary-total strong { font-size: 19px; }
}

/* 首页加入商品后始终可见的金额与结算入口。 */
.home-cart-summary { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 110; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - 28px); max-width: 512px; padding: 12px 15px; border: 1px solid #f0f3ec; border-radius: 19px; background: #fffffff5; box-shadow: 0 6px 26px #304e3326; }
.home-cart-summary[hidden] { display: none; }
.home-cart-amount { min-width: 0; }
.home-cart-amount small { display: block; font-size: 12px; color: #61715f; }
.home-cart-amount strong { display: block; margin-top: 3px; color: var(--accent-hover); font-size: clamp(18px, 5vw, 25px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-cart-summary .checkout-button { flex-shrink: 0; display: flex; align-items: center; gap: 9px; background: var(--accent); }
.has-cart-summary .floating-cart { bottom: calc(var(--nav-height) + 111px + env(safe-area-inset-bottom)); }
.has-cart-summary .store-shell { padding-bottom: calc(var(--nav-height) + 125px + env(safe-area-inset-bottom)); }
