/**
 * 闲置 · 二手转卖：独立全屏 App 页样式。
 * 清新可爱奶油风升级版。
 * 与 #shopping-page 同尺寸（#app 小手机视口内的 .page）。
 * 深色模式跟随全站 html[data-appearance="dark"]，定制为温馨巧克力慕斯风。
 * 商品封面复用 love-mi-shopping.css 的内层样式（shopping-cover-*），
 * 这里只定义闲置自己的容器 .idle-cover 及其修饰符。
 */

#idle-market-page {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #FAF6F0; /* 奶油黄/温暖米白底色 */
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#idle-market-page.active {
    display: flex;
}

/* ---------- 顶栏 ---------- */
.idle-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f9dfd5 0%, #f2b5a0 100%); /* 温暖蜜桃奶油色 */
    color: #6d4f47; /* 温暖可可褐 */
    box-shadow: 0 2px 10px rgba(109, 79, 71, 0.05);
}
.idle-toolbar-title {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #6d4f47;
}
.idle-tool-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(109, 79, 71, 0.08);
    color: #6d4f47;
    border-radius: 12px; /* 柔软圆角 */
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.idle-tool-btn:active {
    background: rgba(109, 79, 71, 0.16);
    transform: scale(0.92);
}
.idle-tool-publish { font-size: 20px; font-weight: 700; }

/* ---------- 标签切换 ---------- */
.idle-tabs {
    flex: 0 0 auto;
    display: flex;
    background: #fff;
    border-bottom: 2px solid #eae1d7; /* 柔软浅褐分界线 */
    padding: 2px 4px 0;
}
.idle-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 4px 10px;
    font-size: 14px;
    color: #9e8e7c; /* 温暖浅奶咖 */
    font-weight: 600;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.idle-tab.is-active {
    color: #e88d67; /* 蜜桃甜橙色 */
    font-weight: 800;
}
.idle-tab.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    border-radius: 4px;
    background: #e88d67;
}
.idle-tab-count {
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 8px;
    background: #f4ece6;
    color: #a39286;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
}
.idle-tab.is-active .idle-tab-count {
    background: #fff0eb;
    color: #e88d67;
}

/* ---------- 主区 / 列表 ---------- */
.idle-main {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.idle-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.idle-list::-webkit-scrollbar { width: 0; height: 0; display: none; }
.idle-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #bcaea8;
    gap: 10px;
}
.idle-empty p { margin: 0; font-size: 15px; font-weight: 600; color: #8c7f75; }
.idle-empty-sub { font-size: 13px !important; color: #bcaea8; line-height: 1.6; }
.idle-empty-btn {
    margin-top: 12px;
    border: none;
    background: linear-gradient(135deg, #ffd0b8 0%, #e88d67 100%);
    color: #fff;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(232, 141, 103, 0.25);
    transition: all 0.2s;
}
.idle-empty-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* ---------- 列表卡片 ---------- */
.idle-card {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 18px; /* 更加圆润可爱 */
    padding: 12px;
    border: 1.5px solid #fcf7f2;
    box-shadow: 0 4px 12px rgba(184, 155, 122, 0.08); /* 柔和浅褐阴影 */
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}
.idle-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(184, 155, 122, 0.04);
}
.idle-card-cover {
    flex: 0 0 86px;
    width: 86px;
    height: 86px;
    border-radius: 12px;
    overflow: hidden;
}
.idle-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.idle-card-title {
    font-size: 14.5px;
    color: #5c4f3c; /* 浓郁奶茶褐 */
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.idle-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.idle-badge {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 6px; /* 更可爱的小标签 */
    line-height: 1.6;
    font-weight: 700;
}
.idle-badge--mode { background: #fff1eb; color: #e88d67; }
.idle-badge--auction { background: #fdeafc; color: #c026d3; }
.idle-badge--source { background: #eef4ff; color: #2f6bff; }
.idle-badge--gift { background: #ffeef2; color: #ff4d6d; }
.idle-card-foot {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}
.idle-card-price {
    color: #e88d67; /* 标志性可爱橙 */
    font-size: 17px;
    font-weight: 800;
}
.idle-card-price small { font-size: 12px; font-weight: 700; }
.idle-card-price .idle-price-from { font-size: 11px; color: #9e8e7c; font-weight: 600; margin-right: 2px; }
.idle-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.idle-status--on_sale { background: #eff9f3; color: #3aa661; }
.idle-status--pending { background: #fff9ed; color: #e6912c; }
.idle-status--sold { background: #f7f5f2; color: #9c918c; }
.idle-status--delisted { background: #f4f2fa; color: #8c73d9; }
.idle-card-sub { font-size: 12px; color: #a19283; line-height: 1.5; }

/* ---------- 内嵌全屏面板（选品 / 发布 / 详情） ---------- */
.idle-panel {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    background: #FAF6F0;
}
.idle-panel-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 2px solid #eae1d7;
}
.idle-panel-toolbar .idle-tool-btn {
    background: #f7f2ed;
    color: #5c4f3c;
    width: 30px;
    height: 30px;
    font-size: 20px;
}
.idle-panel-toolbar .idle-tool-btn:active { background: #ebdcd5; }
.idle-panel-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #5c4f3c;
}
.idle-panel-spacer { flex: 0 0 30px; }
.idle-panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.idle-panel-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---------- 选品列表 ---------- */
.idle-pick-group-title {
    font-size: 13px;
    color: #9e8e7c;
    margin: 4px 2px 8px;
    font-weight: 700;
}
.idle-pick-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
    box-shadow: 0 4px 12px rgba(184, 155, 122, 0.08);
    transition: all 0.15s ease;
}
.idle-pick-item:active { border-color: #e88d67; transform: scale(0.98); }
.idle-pick-item.is-listed { opacity: 0.55; cursor: default; box-shadow: none; border-color: transparent !important; }
.idle-pick-cover { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.idle-pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.idle-pick-title {
    font-size: 14px;
    color: #5c4f3c;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.idle-pick-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.idle-pick-price { color: #e88d67; font-size: 14px; font-weight: 800; }
.idle-pick-listed-flag { font-size: 11px; color: #e88d67; font-weight: 700; }
.idle-pick-arrow { flex: 0 0 auto; color: #d0c0b4; font-size: 20px; }

/* ---------- 发布表单 ---------- */
.idle-form-product {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 14px;
    border: 1.5px solid #fcf7f2;
    box-shadow: 0 4px 12px rgba(184, 155, 122, 0.06);
}
.idle-form-product .idle-cover { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.idle-form-product-info { flex: 1; min-width: 0; }
.idle-form-product-title { font-size: 14px; font-weight: 700; color: #5c4f3c; line-height: 1.45; }
.idle-form-product-sub { font-size: 12px; color: #a19283; margin-top: 4px; font-weight: 500; }
.idle-field { margin-bottom: 16px; }
.idle-field-label { font-size: 13px; color: #5c4f3c; font-weight: 700; margin-bottom: 8px; display: block; }
.idle-mode-tabs { display: flex; gap: 10px; }
.idle-mode-btn {
    flex: 1;
    border: 2px solid #eae1d7;
    background: #fff;
    border-radius: 14px;
    padding: 10px 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}
.idle-mode-btn b { display: block; font-size: 14px; color: #5c4f3c; transition: color 0.15s; }
.idle-mode-btn span { display: block; font-size: 11px; color: #9e8e7c; margin-top: 2px; }
.idle-mode-btn.is-active { border-color: #e88d67; background: #fffbf7; }
.idle-mode-btn.is-active b { color: #e88d67; }
.idle-input, .idle-textarea {
    width: 100%;
    border: 2px solid #eae1d7;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    color: #5c4f3c;
    background: #fff;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.idle-input:focus, .idle-textarea:focus { border-color: #e88d67; outline: none; background: #fffdfb; }
.idle-textarea { min-height: 72px; resize: none; line-height: 1.5; }
.idle-price-input-wrap { position: relative; display: flex; align-items: center; }
.idle-price-input-wrap .idle-price-yen {
    position: absolute; left: 12px; color: #e88d67; font-weight: 800; font-size: 16px;
}
.idle-price-input-wrap .idle-input { padding-left: 28px; font-weight: 800; color: #e88d67; }
.idle-form-hint { font-size: 12px; color: #bcaea8; margin-top: 6px; line-height: 1.5; font-weight: 500; }
.idle-submit-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #ffd0b8 0%, #e88d67 100%);
    color: #fff;
    padding: 13px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(232, 141, 103, 0.3);
    transition: all 0.2s;
}
.idle-submit-btn:active { transform: scale(0.98); opacity: 0.95; }

/* ---------- 详情 ---------- */
.idle-detail-hero {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1.5px solid #fcf7f2;
    box-shadow: 0 4px 12px rgba(184, 155, 122, 0.06);
}
.idle-detail-hero .idle-cover { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; }
.idle-detail-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.idle-detail-title { font-size: 15px; font-weight: 700; color: #5c4f3c; line-height: 1.45; }
.idle-detail-price { color: #e88d67; font-size: 20px; font-weight: 800; }
.idle-detail-price small { font-size: 12px; font-weight: 700; }
.idle-detail-meta { font-size: 12px; color: #a19283; line-height: 1.6; font-weight: 500; }
.idle-section {
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1.5px solid #fcf7f2;
    box-shadow: 0 4px 12px rgba(184, 155, 122, 0.04);
}
.idle-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #5c4f3c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.idle-section-title .idle-section-extra { font-size: 12px; color: #9e8e7c; font-weight: 600; }
.idle-desc-text { font-size: 13px; color: #6d5e50; line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-weight: 500; }
.idle-empty-line { font-size: 13px; color: #bcaea8; text-align: center; padding: 8px 0; font-weight: 500; }

.idle-bid-row, .idle-buyer-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #eae1d7;
}
.idle-bid-row:last-child, .idle-buyer-card:last-child { border-bottom: none; }
.idle-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fce5d8, #f5beab);
    color: #6d4f47;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 6px rgba(109, 79, 71, 0.12);
}
.idle-bid-info { flex: 1; min-width: 0; }
.idle-bid-name { font-size: 13px; color: #5c4f3c; font-weight: 700; }
.idle-bid-name .idle-tag-friend { font-size: 10px; color: #2f6bff; background: #eef4ff; padding: 0 5px; border-radius: 4px; margin-left: 4px; font-weight: 700; }
.idle-bid-name .idle-tag-stranger { font-size: 10px; color: #a19283; background: #f4ece6; padding: 0 5px; border-radius: 4px; margin-left: 4px; font-weight: 700; }
.idle-bid-msg { font-size: 12px; color: #9e8e7c; margin-top: 2px; line-height: 1.5; word-break: break-word; font-weight: 500; }
.idle-bid-msg--tap { cursor: pointer; }
.idle-bid-msg--tap:active { color: #e88d67; }
.idle-bid-amount { flex: 0 0 auto; color: #e88d67; font-size: 16px; font-weight: 800; }
.idle-bid-amount.is-top::after { content: "最高"; display: block; font-size: 10px; color: #db2777; text-align: right; font-weight: 700; }
.idle-tag { font-size: 10px; padding: 0 5px; border-radius: 4px; margin-left: 4px; font-weight: 700; white-space: nowrap; }
.idle-tag--giver { color: #db2777; background: #fdf2f8; }
.idle-bid-tip { font-size: 12px; line-height: 1.5; color: #db2777; background: #fdf2f8; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-weight: 600; }
.idle-bid-tip--quit { color: #9e8e7c; background: #f4ece6; }

/* ---------- 底部操作条 ---------- */
.idle-action-bar {
    display: flex;
    gap: 10px;
    padding: 6px 0 10px;
}
.idle-btn {
    flex: 1;
    border: none;
    border-radius: 22px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.idle-btn--primary {
    background: linear-gradient(135deg, #ffd0b8 0%, #e88d67 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(232, 141, 103, 0.25);
}
.idle-btn--accent {
    background: linear-gradient(135deg, #fad1dc 0%, #e06c88 100%); /* 草莓奶油慕斯 */
    color: #fff;
    box-shadow: 0 4px 10px rgba(224, 108, 136, 0.2);
}
.idle-btn--ghost { background: #f7f2ed; color: #5c4f3c; }
.idle-btn--danger { background: #fff0f0; color: #e06c6c; }
.idle-btn:active { transform: scale(0.96); opacity: 0.95; }

/* ---------- 封面容器（复用 shopping-cover-* 内层） ---------- */
.idle-cover {
    border-radius: 10px;
    overflow: hidden;
    background: #f7f2ed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.idle-cover > * { width: 100%; height: 100%; }
.idle-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idle-cover--net { background: #fff; }
.idle-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #d0c0b4;
    background: #f4ece6;
}
.idle-cover .shopping-cover-img--net { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.idle-cover .shopping-cover-cosmetic,
.idle-cover .shopping-cover-ai-icon { width: 100%; height: 100%; }

/* ---------- 加载层 ---------- */
.idle-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(109, 79, 71, 0.25);
}
.idle-loading.show { display: flex; }
.idle-loading-inner {
    background: rgba(92, 74, 69, 0.96);
    color: #fff;
    padding: 18px 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.idle-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffd0b8;
    border-radius: 50%;
    animation: idle-spin 0.8s linear infinite;
}
@keyframes idle-spin { to { transform: rotate(360deg); } }

/* ================= 深色模式（可爱的黑巧克力慕斯风） ================= */
html[data-appearance="dark"] #idle-market-page { background: #251c19; }
html[data-appearance="dark"] .idle-toolbar { background: linear-gradient(135deg, #3d2f2b 0%, #2f2320 100%); color: #f5dfd8; box-shadow: none; }
html[data-appearance="dark"] .idle-toolbar-title { color: #f5dfd8; }
html[data-appearance="dark"] .idle-tool-btn { background: rgba(245, 223, 216, 0.08); color: #f5dfd8; }
html[data-appearance="dark"] .idle-tool-btn:active { background: rgba(245, 223, 216, 0.16); }

html[data-appearance="dark"] .idle-tabs { background: #302320; border-bottom-color: #42322e; }
html[data-appearance="dark"] .idle-tab { color: #bcaea8; }
html[data-appearance="dark"] .idle-tab-count { background: #42322e; color: #918079; }
html[data-appearance="dark"] .idle-tab.is-active { color: #f29c79; }
html[data-appearance="dark"] .idle-tab.is-active::after { background: #f29c79; }
html[data-appearance="dark"] .idle-tab.is-active .idle-tab-count { background: #4a2f27; color: #f29c79; }

html[data-appearance="dark"] .idle-card,
html[data-appearance="dark"] .idle-pick-item,
html[data-appearance="dark"] .idle-form-product,
html[data-appearance="dark"] .idle-detail-hero,
html[data-appearance="dark"] .idle-section { background: #302320; border-color: #42322e; box-shadow: none; }

html[data-appearance="dark"] .idle-card-title,
html[data-appearance="dark"] .idle-pick-title,
html[data-appearance="dark"] .idle-form-product-title,
html[data-appearance="dark"] .idle-detail-title,
html[data-appearance="dark"] .idle-section-title,
html[data-appearance="dark"] .idle-bid-name { color: #f3e9e6; }
html[data-appearance="dark"] .idle-card-sub,
html[data-appearance="dark"] .idle-desc-text { color: #bcaea8; }
html[data-appearance="dark"] .idle-tag--giver { color: #f5b3dc; background: #4a253a; }
html[data-appearance="dark"] .idle-bid-tip { color: #f5b3dc; background: #3a1627; }
html[data-appearance="dark"] .idle-bid-tip--quit { color: #bcaea8; background: #2f2320; }

html[data-appearance="dark"] .idle-panel { background: #251c19; }
html[data-appearance="dark"] .idle-panel-toolbar { background: #302320; border-bottom-color: #42322e; }
html[data-appearance="dark"] .idle-panel-title { color: #f3e9e6; }
html[data-appearance="dark"] .idle-panel-toolbar .idle-tool-btn { background: #42322e; color: #eee; }

html[data-appearance="dark"] .idle-input,
html[data-appearance="dark"] .idle-textarea { background: #251c19; border-color: #42322e; color: #f3e9e6; }
html[data-appearance="dark"] .idle-mode-btn { background: #251c19; border-color: #42322e; }
html[data-appearance="dark"] .idle-mode-btn b { color: #ddd; }
html[data-appearance="dark"] .idle-mode-btn.is-active { background: #3c2a23; border-color: #f29c79; }
html[data-appearance="dark"] .idle-mode-btn.is-active b { color: #f29c79; }

html[data-appearance="dark"] .idle-btn--ghost { background: #42322e; color: #ddd; }
html[data-appearance="dark"] .idle-btn--danger { background: #4d2320; color: #ff9180; }
html[data-appearance="dark"] .idle-status--sold { background: #42322e; color: #bcaea8; }
html[data-appearance="dark"] .idle-bid-row,
html[data-appearance="dark"] .idle-buyer-card { border-bottom-color: #42322e; }
html[data-appearance="dark"] .idle-cover { background: #42322e; }
html[data-appearance="dark"] .idle-cover--net { background: #fff; }
