/* ========== 外卖App样式 ========== */

/* 外卖App Layer */
#layer-fooddelivery {
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100%;
}
#layer-fooddelivery .fd-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 顶部导航栏 — [FIX-弹性保护带] padding-top适配状态栏 */
.fd-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    padding-top: var(--guard-top, env(safe-area-inset-top, 10px));
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    position: relative;
    z-index: 10;
    min-height: 44px;
    box-sizing: border-box;
}
.fd-navbar .fd-nav-left,
.fd-navbar .fd-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fd-navbar .fd-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.fd-navbar .fd-nav-btn:active {
    background: rgba(255,255,255,0.35);
}
.fd-navbar .fd-nav-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 搜索栏 */
.fd-search-bar {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.fd-search-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 0 12px;
    height: 36px;
}
.fd-search-input-wrap i {
    color: #999;
    margin-right: 8px;
    font-size: 14px;
    flex-shrink: 0;
}
.fd-search-input-wrap input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #333;
}
.fd-search-btn {
    padding: 6px 16px;
    background: #ff4500;
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.fd-search-btn:active {
    opacity: 0.8;
}

/* 分类图标网格 */
.fd-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
    background: #fff;
    margin: 0 0 8px;
}
.fd-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 6px 0;
    border-radius: 12px;
    transition: background 0.2s;
}
.fd-category-item:active {
    background: #f5f5f5;
}
.fd-category-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 4px;
}
.fd-category-name {
    font-size: 11px;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

/* 滚动内容区 */
.fd-scroll-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 60px;
}

/* 拼好饭板块 */
.fd-pin-section {
    background: #fff;
    margin: 0 0 8px;
    padding: 12px;
}
.fd-pin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.fd-pin-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-pin-badge {
    font-size: 11px;
    background: #ff4500;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
}
.fd-pin-more {
    font-size: 13px;
    color: #999;
    cursor: pointer;
}
.fd-pin-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.fd-pin-list::-webkit-scrollbar { display: none; }
.fd-pin-card {
    min-width: 140px;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.fd-pin-card:active {
    transform: scale(0.97);
}
.fd-pin-card-img {
    width: 140px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}
.fd-pin-card-info {
    padding: 8px;
}
.fd-pin-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-pin-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #ff4500;
    margin-top: 4px;
}

/* 附近商家板块 */
.fd-nearby-section {
    background: #fff;
    padding: 12px;
}
.fd-nearby-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}
.fd-nearby-tab {
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    padding-bottom: 6px;
    position: relative;
    border: 0;
    background: transparent;
    font-family: inherit;
}
.fd-nearby-title { font-size: 15px; font-weight: 600; color: #333; padding-bottom: 6px; }
.fd-refresh-btn { border: 0; padding: 0; color: inherit; font: inherit; box-sizing: border-box; }
.fd-refresh-btn:disabled, .fd-refresh-btn.is-loading { cursor: not-allowed; opacity: .62; }
.fd-custom-food-row { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #f0f0f0; }
.fd-custom-food-actions { display:flex; gap:6px; flex-shrink:0; flex-wrap:wrap; justify-content:flex-end; }
.fd-custom-food-actions button:disabled { opacity:.35; cursor:not-allowed; }
.fd-profile-cell.fd-profile-static { cursor:default; }
.fd-prompt-templates { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.fd-prompt-templates button { border:1px solid #ddd; background:#fff; color:#555; border-radius:999px; padding:6px 10px; font-size:12px; cursor:pointer; }
.fd-worldbook-context { margin:10px 12px 0; padding:9px 11px; border-radius:10px; background:#f4f0ff; color:#6f4dbf; font-size:12px; line-height:1.4; }
@media (max-width: 520px) {
    .fd-custom-food-row { flex-wrap:wrap; }
    .fd-custom-food-actions { width:100%; padding-left:52px; justify-content:flex-start; box-sizing:border-box; }
}
.fd-nearby-tab.active {
    color: #333;
}
.fd-nearby-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #ff4500;
    border-radius: 2px;
}

/* 商家卡片 */
.fd-shop-card {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}
.fd-shop-card:active {
    background: #fafafa;
}
.fd-shop-logo {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
}
.fd-shop-info {
    flex: 1;
    min-width: 0;
}
.fd-shop-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-shop-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}
.fd-shop-rating {
    color: #ff9800;
    font-weight: 600;
}
.fd-shop-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.fd-shop-tag {
    font-size: 11px;
    padding: 2px 6px;
    background: #fff3e0;
    color: #ff6b35;
    border-radius: 4px;
}

/* 商家详情页 */
.fd-shop-detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.fd-shop-detail-header {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    padding: 12px;
    color: #fff;
}
.fd-shop-detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.fd-shop-detail-nav .fd-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 14px;
}
.fd-shop-detail-info {
    display: flex;
    gap: 12px;
    align-items: center;
}
.fd-shop-detail-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}
.fd-shop-detail-text h3 {
    margin: 0;
    font-size: 16px;
}
.fd-shop-detail-text p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.85;
}
.fd-shop-detail-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.fd-shop-detail-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    position: relative;
}
.fd-shop-detail-tab.active {
    color: #333;
    font-weight: 600;
}
.fd-shop-detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #ff4500;
    border-radius: 2px;
}
.fd-shop-detail-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.fd-menu-sidebar {
    width: 85px;
    background: #f5f5f5;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    /* [FIX-菜品被购物车栏遮挡] 侧栏同样留出底部购物车栏高度，最后一个分类不被遮挡 */
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 20px);
}
.fd-menu-sidebar-item {
    padding: 12px 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
    cursor: pointer;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}
.fd-menu-sidebar-item.active {
    background: #fff;
    color: #ff4500;
    font-weight: 600;
    border-left-color: #ff4500;
}
.fd-menu-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    /* [FIX-菜品被购物车栏遮挡] 底部留出固定购物车栏(56px)+安全区高度，确保能滑到最后一个菜品 */
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 20px);
    background: #fff;
}
.fd-menu-category-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-menu-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
    align-items: flex-start;
}
.fd-menu-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
}
.fd-menu-item-info {
    flex: 1;
    min-width: 0;
}
.fd-menu-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.fd-menu-item-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fd-menu-item-sales {
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
}
.fd-menu-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}
.fd-menu-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #ff4500;
}
.fd-menu-item-price small {
    font-size: 11px;
    font-weight: 400;
}
.fd-menu-item-add {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff4500;
    color: #fff;
    border: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.fd-menu-item-add:active {
    opacity: 0.8;
}

/* 底部Tab栏 */
.fd-bottom-tabs {
    display: flex;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 6px 0;
    position: relative;
    z-index: 10;
}
.fd-bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
    cursor: pointer;
    color: #999;
    font-size: 10px;
    gap: 2px;
    transition: color 0.2s;
}
.fd-bottom-tab.active {
    color: #ff4500;
}
.fd-bottom-tab i {
    font-size: 20px;
}
.fd-bottom-tab span {
    font-size: 10px;
}

/* 优惠券区域 */
.fd-coupon-bar {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    margin-bottom: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.fd-coupon-bar::-webkit-scrollbar { display: none; }
.fd-coupon-item {
    min-width: 140px;
    background: linear-gradient(135deg, #ff4500, #ff6b35);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.fd-coupon-amount {
    font-size: 24px;
    font-weight: 800;
}
.fd-coupon-amount small {
    font-size: 12px;
    font-weight: 400;
}
.fd-coupon-desc {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}

/* 支付弹窗 */
.fd-pay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.fd-pay-sheet {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    animation: fd-slideUp 0.3s ease;
}
@keyframes fd-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.fd-pay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.fd-pay-header h3 {
    margin: 0;
    font-size: 17px;
}
.fd-pay-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.fd-pay-item-preview {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 16px;
}
.fd-pay-item-emoji {
    font-size: 36px;
}
.fd-pay-item-detail h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.fd-pay-item-detail p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}
.fd-pay-total {
    text-align: right;
    font-size: 20px;
    font-weight: 700;
    color: #ff4500;
    margin-bottom: 16px;
}
.fd-pay-methods {
    margin-bottom: 16px;
}
.fd-pay-method {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 10px;
}
.fd-pay-method.selected {
    border-color: #ff4500;
    background: #fff8f5;
}
.fd-pay-method-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.fd-pay-method-info {
    flex: 1;
}
.fd-pay-method-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.fd-pay-method-desc {
    font-size: 11px;
    color: #999;
}
.fd-pay-method-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fd-pay-method.selected .fd-pay-method-check {
    background: #ff4500;
    border-color: #ff4500;
    color: #fff;
    font-size: 12px;
}
.fd-pay-submit {
    width: 100%;
    padding: 14px;
    background: #ff4500;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.fd-pay-submit:active {
    opacity: 0.85;
}

/* 支付分类折叠 */
.fd-pay-category {
    border: 1.5px solid #f0f0f0;
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
}
.fd-pay-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.2s;
}
.fd-pay-category-header:active {
    background: #f0f0f0;
}
.fd-pay-cat-arrow {
    color: #bbb;
    font-size: 12px;
    transition: transform 0.2s;
}
.fd-pay-category-body {
    display: none;
    padding: 0 6px 6px;
}
.fd-pay-category-body.show {
    display: block;
}
.fd-pay-category-body .fd-pay-method {
    margin-bottom: 4px;
    border-radius: 10px;
    border-width: 1px;
}

/* 代付消息气泡卡片 */
.fd-proxy-pay-bubble {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    max-width: 260px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fd-proxy-pay-bubble-header {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-proxy-pay-bubble-body {
    padding: 10px 12px;
}
.fd-proxy-pay-bubble-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.fd-proxy-pay-bubble-emoji {
    font-size: 28px;
}
.fd-proxy-pay-bubble-info {
    flex: 1;
}
.fd-proxy-pay-bubble-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.fd-proxy-pay-bubble-price {
    font-size: 14px;
    font-weight: 700;
    color: #ff4500;
}
.fd-proxy-pay-bubble-footer {
    display: flex;
    border-top: 1px solid #f0f0f0;
}
.fd-proxy-pay-bubble-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
}
.fd-proxy-pay-bubble-btn.accept {
    color: #ff4500;
    font-weight: 600;
    border-left: 1px solid #f0f0f0;
}

/* 健康饮食页面 */
.fd-health-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    padding-bottom: 70px;
}
.fd-health-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.fd-health-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fd-meal-entry {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
    align-items: center;
}
.fd-meal-entry-emoji {
    font-size: 28px;
}
.fd-meal-entry-info {
    flex: 1;
}
.fd-meal-entry-name {
    font-size: 14px;
    font-weight: 600;
}
.fd-meal-entry-cal {
    font-size: 12px;
    color: #999;
}
.fd-meal-entry-delete {
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
}
.fd-add-meal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
    transition: all 0.2s;
}
.fd-add-meal-btn:active {
    border-color: #ff4500;
    color: #ff4500;
}
.fd-health-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.fd-health-stat {
    text-align: center;
    padding: 12px 8px;
    background: #f9f9f9;
    border-radius: 12px;
}
.fd-health-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #ff4500;
}
.fd-health-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.fd-ai-advice {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
}
.fd-ai-advice-title {
    font-size: 14px;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-ai-advice-content {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
}
.fd-ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 8px;
    color: #999;
    font-size: 13px;
}
.fd-ai-loading .fd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff4500;
    animation: fd-dot-pulse 1.2s ease-in-out infinite;
}
.fd-ai-loading .fd-dot:nth-child(2) { animation-delay: 0.2s; }
.fd-ai-loading .fd-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes fd-dot-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* 个人主页 */
.fd-profile-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 70px;
}
.fd-profile-header {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    padding: 24px 16px;
    color: #fff;
    text-align: center;
}
.fd-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 10px;
}
.fd-profile-name {
    font-size: 18px;
    font-weight: 700;
}
.fd-profile-section {
    background: #fff;
    margin: 8px 0;
    padding: 12px 16px;
}
.fd-profile-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}
.fd-profile-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.fd-profile-cell:last-child {
    border-bottom: none;
}
.fd-profile-cell-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fd-profile-cell i {
    font-size: 16px;
    color: #ff4500;
    width: 24px;
    text-align: center;
}

/* 设置弹窗 */
.fd-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.fd-settings-sheet {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    animation: fd-slideUp 0.3s ease;
}
.fd-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.fd-settings-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}
.fd-section-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fd-section-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fd-section-card-emoji {
    font-size: 24px;
}
.fd-section-card-text h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.fd-section-card-text p {
    margin: 2px 0 0;
    font-size: 11px;
    color: #999;
}
.fd-section-card-actions {
    display: flex;
    gap: 6px;
}
.fd-section-card-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}
.fd-section-card-btn.edit {
    background: #e0f2fe;
    color: #0284c7;
}
.fd-section-card-btn.delete {
    background: #fee2e2;
    color: #ef4444;
}

/* 添加餐食弹窗 */
.fd-add-meal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fd-add-meal-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    padding: 20px;
    animation: fd-scaleIn 0.25s ease;
}
@keyframes fd-scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.fd-add-meal-modal h3 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
}
.fd-form-group {
    margin-bottom: 12px;
}
.fd-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.fd-form-group input,
.fd-form-group textarea,
.fd-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.fd-form-group input:focus,
.fd-form-group textarea:focus {
    border-color: #ff4500;
}
.fd-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.fd-form-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.fd-form-actions .fd-btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.fd-form-actions .fd-btn-primary {
    background: #ff4500;
    color: #fff;
}

/* 食物卡片网格（搜索结果） */
.fd-food-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
}
.fd-food-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.15s;
}
.fd-food-card:active {
    transform: scale(0.97);
}
.fd-food-card-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
}
.fd-food-card-body {
    padding: 8px 10px 10px;
}
.fd-food-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-food-card-shop {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.fd-food-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #ff4500;
    margin-top: 4px;
}

/* ========== 给好友点外卖 - 横幅提示 ========== */
.fd-gift-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #ff6b35, #ff9800);
    color: #fff;
    font-size: 13px;
    animation: fd-gift-banner-pulse 2s infinite;
}
@keyframes fd-gift-banner-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}
.fd-gift-banner-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-gift-banner-left i {
    font-size: 16px;
}
.fd-gift-banner-right {
    padding: 4px 12px;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.fd-gift-banner-right:active {
    background: rgba(255,255,255,0.4);
}

/* ========== 联系人选择器（非全屏小窗） ========== */
.fd-contact-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fd-contact-picker-container {
    background: #fff;
    border-radius: 16px;
    width: 85%;
    max-width: 360px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    animation: fdPickerPop 0.22s cubic-bezier(.4,0,.2,1);
}
@keyframes fdPickerPop {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.fd-contact-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.fd-contact-picker-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}
.fd-contact-picker-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f2f2f2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #888;
    padding: 0;
    flex-shrink: 0;
}
.fd-contact-picker-close:active {
    background: #e5e5e5;
}
.fd-contact-picker-search {
    padding: 10px 14px 6px;
    flex-shrink: 0;
}
.fd-contact-picker-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    font-size: 13px;
    background: #f7f7f7;
    outline: none;
    color: #333;
}
.fd-contact-picker-search input:focus {
    border-color: #ff6b35;
    background: #fff;
}
.fd-contact-picker-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.fd-contact-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
}
.fd-contact-picker-item:last-child {
    border-bottom: none;
}
.fd-contact-picker-item:active,
.fd-contact-picker-item.active {
    background: #fff5f0;
}
.fd-contact-picker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}
.fd-contact-picker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.fd-contact-picker-info {
    flex: 1;
    min-width: 0;
}
.fd-contact-picker-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-contact-picker-item .fa-check {
    color: #ff4500;
    font-size: 15px;
    flex-shrink: 0;
}

/* ========== 配送给谁 ========== */
.fd-deliver-to-section {
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
.fd-deliver-to-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.fd-deliver-to-title i {
    color: #ff4500;
}
.fd-deliver-to-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
}
.fd-deliver-to-option:last-child {
    border-bottom: none;
}
.fd-deliver-to-option:active,
.fd-deliver-to-option.active {
    background: #fff5f0;
}
.fd-deliver-to-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}
.fd-deliver-to-info {
    flex: 1;
    min-width: 0;
}
.fd-deliver-to-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.fd-deliver-to-desc {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}
.fd-deliver-to-check {
    font-size: 16px;
    color: #ff4500;
    flex-shrink: 0;
}
.fd-deliver-to-check .fa-circle {
    color: #ddd;
}
.fd-deliver-to-expand {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: #ff4500;
    cursor: pointer;
    font-weight: 600;
    border-top: 1px solid #f0f0f0;
}
.fd-deliver-to-expand:active {
    background: #fff5f0;
}
.fd-deliver-to-expand i:first-child {
    font-size: 14px;
}
.fd-deliver-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
}

/* ========== 外卖投喂消息气泡 ========== */
.fd-gift-bubble {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    max-width: 280px;
    border: 1.5px solid #ffe0cc;
}
.fd-gift-bubble.received {
    border-color: #ffd4d4;
}
.fd-gift-bubble-header {
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fd-gift-bubble.received .fd-gift-bubble-header {
    background: linear-gradient(135deg, #ff6b9d, #ff4081);
}
.fd-gift-bubble-body {
    padding: 10px 12px;
}
.fd-gift-bubble-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fd-gift-bubble-emoji {
    font-size: 32px;
}
.fd-gift-bubble-info {
    flex: 1;
}
.fd-gift-bubble-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.fd-gift-bubble-price {
    font-size: 15px;
    font-weight: 700;
    color: #ff4500;
    margin-top: 2px;
}
.fd-gift-bubble-msg {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff9f5;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    border-left: 3px solid #ff9800;
}
.fd-gift-bubble-footer {
    padding: 8px 12px 10px;
    border-top: 1px solid #f5f5f5;
}
.fd-gift-bubble-status {
    font-size: 12px;
    color: #ff9800;
    font-weight: 600;
    margin-bottom: 6px;
}
.fd-gift-bubble-btn-row {
    display: flex;
    gap: 8px;
}
.fd-gift-bubble-btn {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    background: #fff5f0;
    color: #ff4500;
    transition: all 0.15s;
}
.fd-gift-bubble-btn:active {
    background: #ffe0cc;
    transform: scale(0.96);
}

/* ========== 外卖互送标签 ========== */
.fd-gift-tag {
    display: inline-block;
    font-size: 10px;
    color: #ff4500;
    background: #fff5f0;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 600;
    font-style: normal;
}

/* ========== 购物车底部栏 ========== */
.fd-shop-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0 12px;
    /* [FIX-购物车遮挡] 提高z-index，确保购物车栏始终在商家详情页内容（搜索框等）之上 */
    z-index: 200;
}
.fd-shop-cart-left {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}
.fd-shop-cart-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    position: relative;
    margin-top: -16px;
    box-shadow: 0 4px 12px rgba(255,69,0,0.35);
}
.fd-shop-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ffc107;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.fd-shop-cart-info {
    margin-left: 12px;
}
.fd-shop-cart-total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.fd-shop-cart-tip {
    font-size: 11px;
    color: #999;
}
.fd-shop-cart-checkout {
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.fd-shop-cart-checkout:active {
    transform: scale(0.96);
}
.fd-shop-cart-checkout.disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* ========== 购物车弹窗 ========== */
.fd-cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}
/* 弹层挂在外卖 layer 内，形成与店铺详情一致且可预测的层级。
   购物车需高于详情页(z:100)和底部购物栏(z:200)。 */
#layer-fooddelivery > .fd-cart-popup {
    position: absolute;
    z-index: 1000;
}
.fd-cart-popup-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}
.fd-cart-popup-content {
    position: absolute;
    bottom: 56px;
    left: 0;
    right: 0;
    max-height: 60vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    animation: fdCartSlideUp 0.25s ease-out;
}
@keyframes fdCartSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.fd-cart-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.fd-cart-popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.fd-cart-popup-clear {
    font-size: 13px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fd-cart-popup-clear:hover {
    color: #ff4500;
}
.fd-cart-popup-body {
    max-height: calc(60vh - 60px);
    overflow-y: auto;
    padding-bottom: 12px;
}

/* ========== 购物车店铺分组 ========== */
.fd-cart-shop-group {
    margin: 12px;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
}
.fd-cart-shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f5f5f5;
}
.fd-cart-shop-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.fd-cart-shop-clear {
    font-size: 12px;
    color: #999;
    cursor: pointer;
}
.fd-cart-shop-clear:hover {
    color: #ff4500;
}
.fd-cart-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.fd-cart-item:last-child {
    border-bottom: none;
}
.fd-cart-item-emoji {
    font-size: 28px;
    width: 36px;
    text-align: center;
}
.fd-cart-item-info {
    flex: 1;
    min-width: 0;
}
.fd-cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-cart-item-price {
    font-size: 14px;
    color: #ff4500;
    font-weight: 600;
    margin-top: 2px;
}
.fd-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fd-cart-qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    color: #ff4500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.fd-cart-qty-btn:active {
    background: #fff5f0;
    transform: scale(0.9);
}
.fd-cart-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}
.fd-cart-shop-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
.fd-cart-shop-footer span {
    font-size: 13px;
    color: #666;
}
.fd-cart-shop-tip {
    font-size: 12px;
    color: #ff9800;
}
.fd-cart-shop-checkout {
    padding: 6px 16px;
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.fd-cart-shop-checkout:active {
    transform: scale(0.96);
}

/* ========== 结算页面 ========== */
.fd-checkout-sheet {
    max-height: 85vh;
    overflow-y: auto;
}
.fd-checkout-shop {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    margin: 0 -16px 12px;
}
.fd-checkout-shop-emoji {
    font-size: 24px;
}
.fd-checkout-shop-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}
.fd-checkout-shop-time {
    font-size: 12px;
    color: #999;
}
.fd-checkout-items {
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}
.fd-checkout-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
}
.fd-checkout-item:last-child {
    border-bottom: none;
}
.fd-checkout-item-emoji {
    font-size: 22px;
}
.fd-checkout-item-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}
.fd-checkout-item-qty {
    font-size: 13px;
    color: #999;
}
.fd-checkout-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #ff4500;
}
.fd-checkout-fees {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

/* ===== 小票分享弹窗 - 新设计（卡片式、无渐变、无emoji） ===== */
.share-receipt-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-receipt-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-receipt-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.share-receipt-icon {
    width: 24px;
    height: 24px;
    color: #333;
    flex-shrink: 0;
}

.share-receipt-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.share-receipt-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.share-receipt-close:active {
    background: #e8e8e8;
}

.share-receipt-close svg {
    width: 18px;
    height: 18px;
}

.share-receipt-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.share-receipt-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.share-receipt-contact:last-child {
    border-bottom: none;
}

.share-receipt-contact:active {
    background: #f9f9f9;
}

.share-receipt-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f0f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.share-receipt-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-receipt-avatar-placeholder svg {
    width: 24px;
    height: 24px;
    color: #999;
}

.share-receipt-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.share-receipt-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-receipt-sub {
    font-size: 12px;
    color: #999;
}

.share-receipt-arrow {
    width: 18px;
    height: 18px;
    color: #ccc;
    flex-shrink: 0;
}

/* 滚动条美化 */
.share-receipt-list::-webkit-scrollbar {
    width: 4px;
}

.share-receipt-list::-webkit-scrollbar-track {
    background: transparent;
}

.share-receipt-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.share-receipt-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}
.fd-checkout-fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #666;
}
.fd-checkout-fee-row.total {
    border-top: 1px dashed #ddd;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.fd-checkout-fee-row.total span:last-child {
    color: #ff4500;
    font-size: 18px;
}
/* 外卖教程与全局购物车 */
.fd-global-cart{position:absolute;right:16px;bottom:76px;z-index:20;border:0;border-radius:24px;background:#222;color:#fff;padding:11px 15px;display:flex;gap:8px;align-items:center;box-shadow:0 5px 18px #0003}.fd-global-cart span{background:#ff5a36;border-radius:12px;padding:1px 6px}.fd-tutorial-overlay{position:fixed;inset:0;z-index:10020;background:#0009;display:flex;align-items:center;justify-content:center;padding:24px}.fd-tutorial-card{position:relative;width:min(420px,100%);background:#fff;border-radius:22px;padding:32px 24px 24px;text-align:center;box-shadow:0 20px 60px #0005}.fd-tutorial-skip{position:absolute;right:16px;top:14px;border:0;background:none;color:#888}.fd-tutorial-icon{font-size:52px;margin:8px}.fd-tutorial-card small{color:#999}.fd-tutorial-card h3{margin:12px 0 8px}.fd-tutorial-card p{color:#666;line-height:1.65;min-height:78px}.fd-tutorial-dots{display:flex;justify-content:center;gap:5px;margin:18px 0}.fd-tutorial-dots i{width:6px;height:6px;border-radius:50%;background:#ddd}.fd-tutorial-dots i.active{width:18px;border-radius:4px;background:#ff5a36}.fd-tutorial-actions{display:flex;justify-content:space-between;gap:12px}.fd-tutorial-actions button{border:0;border-radius:12px;padding:11px 18px;background:#eee}.fd-tutorial-actions .primary{background:#ff5a36;color:#fff;margin-left:auto}

/* ========== 外卖完善功能：通用反馈 ========== */
.fd-undo-toast {
    position: fixed;
    left: 50%;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 10030;
    width: min(420px, calc(100% - 28px));
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(34, 34, 34, 0.96);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    font-size: 13px;
    line-height: 1.45;
    transform: translateX(-50%);
    animation: fdUndoIn 0.22s ease-out;
}
.fd-undo-toast span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.fd-undo-toast button {
    flex-shrink: 0;
    min-height: 32px;
    padding: 5px 11px;
    border: 0;
    border-radius: 9px;
    background: #ff6b35;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
@keyframes fdUndoIn {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ========== 搜索、优惠券与商家辅助内容 ========== */
.fd-recent-search {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px 10px;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.fd-recent-search::-webkit-scrollbar { display: none; }
.fd-recent-search > span {
    flex-shrink: 0;
    color: #999;
    font-size: 11px;
}
.fd-recent-search button {
    flex-shrink: 0;
    max-width: 132px;
    padding: 5px 10px;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #f7f7f7;
    color: #555;
    font: inherit;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.fd-recent-search button:last-child {
    border-color: transparent;
    background: transparent;
    color: #ff6b35;
}
.fd-recent-search button:active { background: #fff0e9; }

.fd-coupon-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.16s ease;
}
.fd-coupon-item:active { transform: scale(0.97); }
.fd-coupon-item b {
    margin-top: 7px;
    padding: 2px 9px;
    border-radius: 9px;
    background: rgba(255,255,255,0.2);
    font-size: 10px;
    font-weight: 600;
}
.fd-coupon-item.claimed {
    background: linear-gradient(135deg, #aaa, #c2c2c2);
    opacity: 0.68;
    cursor: default;
    filter: saturate(0.35);
}
.fd-coupon-item.claimed:active { transform: none; }
.fd-coupon-item.claimed b { background: rgba(255,255,255,0.28); }

.fd-coupon-select-btn {
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid #ffb79e;
    border-radius: 14px;
    background: #fff5f0;
    color: #ff4500;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.fd-coupon-select-btn:active { background: #ffe5d8; }

.fd-shop-alt {
    margin: 12px;
    padding: 18px 16px;
    border: 1px solid #f0f0f0;
    border-radius: 13px;
    background: #fffaf7;
    color: #666;
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.035);
}

/* ========== 结算补充项 ========== */
.fd-checkout-extras {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 13px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #fafafa;
}
.fd-checkout-extras label {
    display: grid;
    gap: 6px;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}
.fd-checkout-extras input,
.fd-checkout-extras select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 11px;
    border: 1px solid #e5e5e5;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #333;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
}
.fd-checkout-extras input:focus,
.fd-checkout-extras select:focus {
    border-color: #ff8d66;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
}

/* ========== 健康记录增强 ========== */
.fd-health-date-nav {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px auto;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 9px;
    border: 1px solid #eee;
    border-radius: 13px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    backdrop-filter: blur(8px);
}
.fd-health-date-nav button,
.fd-health-date-nav input {
    box-sizing: border-box;
    height: 38px;
    border: 1px solid #e6e6e6;
    border-radius: 9px;
    background: #fff;
    color: #444;
    font: inherit;
    font-size: 13px;
}
.fd-health-date-nav button {
    padding: 0 10px;
    font-size: 19px;
    cursor: pointer;
}
.fd-health-date-nav button:last-child {
    color: #ff4500;
    font-size: 12px;
    font-weight: 700;
}
.fd-health-date-nav button:disabled {
    color: #ccc;
    background: #f7f7f7;
    cursor: not-allowed;
}
.fd-health-date-nav input {
    min-width: 0;
    padding: 0 8px;
    text-align: center;
}

.fd-health-empty {
    padding: 18px 12px;
    border: 1px dashed #e2e2e2;
    border-radius: 11px;
    background: #fcfcfc;
    color: #aaa;
    font-size: 12px;
    text-align: center;
}

.fd-ai-analysis-safe {
    min-height: 42px;
    padding: 12px 13px;
    border-left: 3px solid #38a3db;
    border-radius: 9px;
    background: #f3faff;
    color: #334155;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.fd-ai-analysis-safe:empty::before {
    color: #9aa8b4;
    content: "尚未生成分析";
}
.fd-health-disclaimer {
    margin: 9px 1px 12px;
    color: #999;
    font-size: 10px;
    line-height: 1.55;
}
.fd-health-disclaimer::before { content: "ⓘ "; }
.fd-health-ai-btn {
    width: 100%;
    min-height: 42px;
    margin-top: 8px;
    padding: 10px 14px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 9px rgba(255,69,0,0.16);
}
.fd-health-ai-btn.secondary {
    border: 1px solid #ffb79e;
    background: #fff5f0;
    color: #ff4500;
    box-shadow: none;
}
.fd-health-ai-btn:disabled {
    border-color: #e5e5e5;
    background: #eee;
    color: #aaa;
    box-shadow: none;
    cursor: not-allowed;
}
.fd-health-ai-btn:not(:disabled):active { transform: scale(0.985); }

/* ========== 订单列表与个人页 ========== */
.fd-order-filters {
    display: flex;
    gap: 7px;
    margin: 0 -4px 10px;
    padding: 2px 4px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.fd-order-filters::-webkit-scrollbar { display: none; }
.fd-allergy-warning {
    margin-top: 3px;
    color: #c56a00;
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.fd-order-filters button {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 5px 12px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #f7f7f7;
    color: #777;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.fd-order-filters button.active {
    border-color: #ff6b35;
    background: #ff6b35;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 7px rgba(255,107,53,0.2);
}

.fd-order-row {
    gap: 7px;
    flex-wrap: wrap;
    cursor: default;
}
.fd-order-row > div:first-child {
    flex: 1 1 210px !important;
    min-width: 0;
    cursor: pointer;
}
.fd-order-row > div:first-child .fd-profile-cell-left {
    flex: 1;
    min-width: 0;
}
.fd-order-row > div:first-child .fd-profile-cell-left > div {
    min-width: 0;
}
.fd-order-row > div:first-child .fd-profile-cell-left > div > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-order-row > button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #ffd4c5;
    border-radius: 10px;
    background: #fff5f0;
    color: #ff5a24;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.fd-order-row > button:active { background: #ffe7dc; }
.fd-order-delete {
    width: 34px;
    padding: 0 !important;
    border-color: #f1f1f1 !important;
    background: #fafafa !important;
    color: #c5c5c5 !important;
}
.fd-order-delete:active {
    border-color: #ffc7c7 !important;
    background: #fff1f1 !important;
    color: #ef4444 !important;
}
.fd-order-delete i {
    width: auto !important;
    color: inherit !important;
    font-size: 13px !important;
}

.fd-order-status {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 8px;
    background: #f1f1f1;
    color: #777;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.fd-order-status.pending { background: #fff4d6; color: #9a6700; }
.fd-order-status.paid,
.fd-order-status.completed { background: #e9f8ee; color: #168447; }
.fd-order-status.delivering { background: #eaf4ff; color: #2779bd; }
.fd-order-status.declined,
.fd-order-status.delivery_failed { background: #ffe8e8; color: #cf3434; }
.fd-order-status.cancelled { background: #efefef; color: #777; }

.fd-profile-empty {
    padding: 18px 12px;
    border-radius: 10px;
    background: #fafafa;
    color: #aaa;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}
.fd-worldbook-unlink {
    width: 100%;
    min-height: 38px;
    margin-top: 8px;
    border: 1px dashed #ffb8a1;
    border-radius: 10px;
    background: #fff8f5;
    color: #ff5a24;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.fd-worldbook-unlink:active { background: #ffe9df; }

/* ========== 板块设置与自定义菜品 ========== */
.fd-settings-reset {
    width: 100%;
    min-height: 42px;
    margin-top: 4px;
    border: 1px solid #ddd;
    border-radius: 11px;
    background: #fff;
    color: #666;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.fd-settings-reset:active { background: #f3f3f3; }

.fd-section-card.is-hidden {
    border: 1px dashed #d7d7d7;
    background: #f3f3f3;
    opacity: 0.72;
}
.fd-section-card.is-hidden .fd-section-card-emoji { filter: grayscale(1); }
.fd-section-card.is-hidden .fd-section-card-text h4 { color: #777; }
.fd-section-card-info {
    flex: 1;
    min-width: 0;
}
.fd-section-card-text {
    min-width: 0;
}
.fd-section-card-text h4,
.fd-section-card-text p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fd-section-card-actions {
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.fd-section-card-actions > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.fd-section-card-actions > button:disabled {
    color: #bbb;
    opacity: 0.5;
    cursor: not-allowed;
}

.fd-check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    margin: 2px 0;
    padding: 0 4px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.fd-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #ff5a24;
    cursor: pointer;
}

/* ========== 窄屏适配 ========== */
@media (max-width: 420px) {
    .fd-undo-toast {
        bottom: calc(66px + env(safe-area-inset-bottom, 0px));
        width: calc(100% - 20px);
    }
    .fd-health-date-nav {
        grid-template-columns: 36px minmax(0, 1fr) 36px auto;
        gap: 5px;
        padding: 7px;
    }
    .fd-health-date-nav button,
    .fd-health-date-nav input { height: 36px; }
    .fd-health-date-nav button { padding: 0 7px; }
    .fd-order-row > div:first-child { flex-basis: 100% !important; }
    .fd-order-row > button:not(.fd-order-delete) { margin-left: auto; }
    .fd-checkout-extras { padding: 11px; }
}

@media (max-width: 350px) {
    .fd-health-date-nav {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
    }
    .fd-health-date-nav button:last-child {
        grid-column: 1 / -1;
        width: 100%;
    }
    .fd-section-card {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .fd-section-card-actions { justify-content: flex-end; }
    .fd-recent-search { padding-left: 10px; padding-right: 10px; }
}

/* ==========================================================================
   外卖 App — 弹窗 & 按钮统一规范（圆角 + 黑白灰）
   规则：弹窗、对话框、通用按钮统一为圆角黑白灰；保留品牌橙色的部分
   （顶栏、分类、优惠券、价格数字）不在此改动。
   ========================================================================== */

/* ---- 新手引导弹窗：修复被挤到屏幕右侧变成竖排的问题 ----
   用 !important 强制铺满视口，防止用户自定义美化 CSS 把它压缩塌陷。 */
.fd-tutorial-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important; height: 100% !important;
    min-width: 0 !important; max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(0, 0, 0, 0.55) !important;
}
.fd-tutorial-card {
    width: 100% !important;
    max-width: 380px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28) !important;
}
.fd-tutorial-card p { min-height: 64px; }
.fd-tutorial-dots i.active { background: #222 !important; }
.fd-tutorial-actions button {
    min-height: 44px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #444;
    font-weight: 600;
}
.fd-tutorial-actions .primary {
    background: #222 !important;
    color: #fff !important;
}

/* ---- 主要操作按钮（CTA）：橙 → 深灰/黑 ---- */
.fd-pay-submit,
.fd-form-actions .fd-btn-primary,
.fd-shop-cart-checkout,
.fd-cart-shop-checkout,
.fd-health-ai-btn:not(.secondary):not(:disabled),
.fd-search-btn {
    background: #222 !important;
    color: #fff !important;
    box-shadow: none !important;
}
.fd-pay-submit:active,
.fd-form-actions .fd-btn-primary:active,
.fd-shop-cart-checkout:active,
.fd-cart-shop-checkout:active,
.fd-health-ai-btn:not(.secondary):not(:disabled):active,
.fd-search-btn:active { background: #000 !important; opacity: 1 !important; }
.fd-shop-cart-checkout.disabled { background: #ddd !important; color: #999 !important; }

/* 次要 / 取消按钮：浅灰 */
.fd-form-actions .fd-btn-cancel { background: #f0f0f0 !important; color: #555 !important; }
.fd-health-ai-btn.secondary {
    background: #f2f2f2 !important;
    color: #333 !important;
    border: 1px solid #e5e5e5 !important;
}
.fd-add-meal-btn:active { border-color: #999 !important; color: #555 !important; }

/* 订单行按钮（再来一单等）：橙 → 灰 */
.fd-order-row > button {
    border-color: #e5e5e5 !important;
    background: #f5f5f5 !important;
    color: #333 !important;
}
.fd-order-row > button:active { background: #ebebeb !important; }

/* ---- 小按钮：放大 + 灰阶，去掉简陋的迷你圆点 ---- */
.fd-cart-qty-btn {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    font-size: 17px !important;
}
.fd-cart-qty-btn:active { background: #f0f0f0 !important; }
.fd-section-card-btn { width: 34px !important; height: 34px !important; font-size: 14px !important; }
.fd-section-card-btn.edit { background: #f2f2f2 !important; color: #444 !important; }
.fd-section-card-btn.delete { background: #f2f2f2 !important; color: #666 !important; }
.fd-section-card-btn.delete:active { background: #e6e6e6 !important; color: #222 !important; }
.fd-contact-picker-close,
.fd-pay-close { width: 34px !important; height: 34px !important; font-size: 15px !important; }

/* ---- 弹窗内选中态 / 输入聚焦：橙 → 黑灰 ---- */
.fd-pay-method.selected { border-color: #222 !important; background: #f5f5f5 !important; }
.fd-pay-method.selected .fd-pay-method-check { background: #222 !important; border-color: #222 !important; }
.fd-contact-picker-item:active,
.fd-contact-picker-item.active { background: #f2f2f2 !important; }
.fd-contact-picker-item .fa-check { color: #222 !important; }
.fd-form-group input:focus,
.fd-form-group textarea:focus,
.fd-form-group select:focus { border-color: #999 !important; }
.fd-contact-picker-search input:focus { border-color: #999 !important; }

/* ---- 弹窗容器：统一圆角与阴影 ---- */
.fd-add-meal-modal,
.fd-contact-picker-container { border-radius: 18px !important; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2) !important; }
.fd-pay-sheet,
.fd-settings-sheet,
.fd-cart-popup-content { border-radius: 20px 20px 0 0 !important; }
