/* 计划菜谱 / 家务详情 帮助页模拟器 — 对齐 week-menu & housework-details */
:root { --sim-primary: #a855f7; --primary-rgb: 168, 85, 247; }

.planner-page { background: #f5f5f5; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; }
.planner-page .custom-navbar {
    background: #fff; position: sticky; top: 0; z-index: 10;
    padding: 34px 12px 10px; border-bottom: 1px solid #f0f0f0;
}
.planner-page .navbar-content { display: flex; align-items: center; justify-content: space-between; position: relative; width: 100%; min-height: 28px; }
.planner-page .back-btn {
    padding: 4px 12px; border-radius: 16px; background: rgba(168,85,247,0.1);
    color: #a855f7; font-size: 0.78rem; font-weight: 600;
}
.planner-page .navbar-title {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: inline-flex; align-items: baseline; justify-content: center;
    max-width: calc(100% - 96px); white-space: nowrap;
}
.planner-page .navbar-right { width: 48px; min-width: 48px; }
.planner-page .main-content { padding-bottom: 72px; }

/* 模拟器导航标题身份后缀 — 对齐小程序 page-navbar-title */
.wf-home-page .navbar-title,
.planner-page .navbar-title {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    max-width: calc(100% - 96px);
}
.navbar-title-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}
.navbar-title-side {
    font-size: 0.62rem;
    font-weight: 400;
    color: #999;
    margin-left: 4px;
    flex-shrink: 0;
    line-height: 1.2;
}
.emp-navbar-title {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    max-width: calc(100% - 96px);
    white-space: nowrap;
}
.emp-navbar-title .navbar-title-main {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

/* 工作流首页顶栏 */
.wf-top-nav {
    display: flex; background: #fff; border-bottom: 1px solid #f0f0f0;
    margin: 0; padding: 0 8px;
}
.wf-top-tab {
    flex: 1; text-align: center; padding: 10px 4px; font-size: 0.72rem;
    color: #888; font-weight: 600; border-bottom: 2px solid transparent;
}
.wf-top-tab.active { color: #a855f7; border-bottom-color: #a855f7; }
.wf-top-tab .tab-icon { display: block; font-size: 1rem; margin-bottom: 2px; }

/* 顶部导航 */
.planner-top-nav { background: #fff; padding: 8px 10px 10px; margin-bottom: 8px; }
.menu-type-switcher {
    display: flex; background: #f3f4f6; border-radius: 10px; padding: 3px; margin-bottom: 8px;
}
.menu-type-tab {
    flex: 1; text-align: center; padding: 7px 0; font-size: 0.78rem; font-weight: 600;
    color: #666; border-radius: 8px;
}
.menu-type-tab.active { background: #fff; color: #a855f7; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.week-navigator { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.nav-arrow { font-size: 0.68rem; color: #a855f7; font-weight: 600; white-space: nowrap; }
.nav-arrow.disabled { color: #ccc; }
.week-display { text-align: center; }
.week-label { font-size: 0.78rem; font-weight: 700; color: #333; display: block; }
.current-week-tag { font-size: 0.68rem; color: #888; }
.regenerate-btn-inline {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
    padding: 4px 10px; border-radius: 14px; border: 1px solid #e9d5ff;
    background: rgba(168,85,247,0.08); color: #7c3aed; font-size: 0.68rem; font-weight: 600;
}
.week-action-row { display: flex; gap: 6px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }

/* 折叠区块 */
.collapsible-section {
    background: #fff; margin: 0 10px 8px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.collapsible-header {
    display: flex; align-items: center; padding: 10px 12px; gap: 8px; cursor: default;
}
.collapsible-header .icon-wrap {
    width: 28px; height: 28px; border-radius: 8px; background: rgba(168,85,247,0.1);
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.collapsible-title { flex: 1; font-size: 0.78rem; font-weight: 600; color: #333; }
.collapsible-extra { font-size: 0.72rem; color: #888; }
.collapsible-arrow { color: #ccc; font-size: 1rem; transition: transform 0.2s; }
.collapsible-arrow.open { transform: rotate(90deg); }
.collapsible-body { display: none; padding: 0 12px 12px; font-size: 0.72rem; color: #666; line-height: 1.6; }
.collapsible-body.open { display: block; }

/* 餐次筛选 */
.meal-filter-bar {
    display: flex; gap: 6px; padding: 0 10px 8px; overflow-x: auto;
}
.meal-filter-btn {
    padding: 5px 12px; border-radius: 16px; font-size: 0.72rem; font-weight: 600;
    background: #fff; color: #666; border: 1px solid #eee; white-space: nowrap;
}
.meal-filter-btn.active {
    background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; border-color: transparent;
}

/* 周菜单网格 — 对齐 miniprogram day-item / day-date-left */
.week-menu-grid { padding: 4px 0 12px; }
.week-day-block {
    margin: 0 6px 7px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 6px 15px rgba(168, 85, 247, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.035);
    background:
        linear-gradient(180deg, rgba(168, 85, 247, 0.035) 0%, #ffffff 20%),
        #ffffff;
    border: 1px solid rgba(168, 85, 247, 0.1);
}
.week-day-header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 60px;
}
.day-date-left {
    flex-shrink: 0;
    width: 11px;
    min-width: 11px;
    padding: 8px 1.8px;
    background: linear-gradient(180deg, #a855f7, #ec4899);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0 9px 9px 0;
    box-shadow: 2px 0 7px rgba(168, 85, 247, 0.18);
}
.day-name-vertical {
    font-size: 9px;
    font-weight: 500;
    color: #fff;
    opacity: 0.9;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 1.5px;
    line-height: 1.1;
}
.day-meals-grid {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 3px;
    gap: 0;
}
.meal-col {
    flex: 1 1 33.333%;
    width: 33.333%;
    box-sizing: border-box;
    padding: 4px 2px;
    min-width: 0;
    background:
        linear-gradient(180deg, #ffffff 0%, rgba(168, 85, 247, 0.018) 100%),
        #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(168, 85, 247, 0.08);
    box-shadow: 0 3px 9px rgba(168, 85, 247, 0.06);
}
.meal-col-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.62rem; font-weight: 700; color: #888; margin-bottom: 4px; padding: 0 2px;
}
.meal-col-head .minus { color: #ef4444; }
.dish-item {
    display: flex; align-items: center; gap: 3px; padding: 3px 2px;
    border-radius: 6px; margin-bottom: 3px; font-size: 0.62rem;
}
.dish-item.staple { background: #fff7ed; }
.dish-thumb {
    width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
    background: #f3f4f6;
}
.dish-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.dish-add-row { display: flex; gap: 4px; margin-top: 4px; }
.dish-add-btn {
    flex: 1; font-size: 0.58rem; color: #a855f7; text-align: center;
    padding: 3px 0; border: 1px dashed #e9d5ff; border-radius: 6px;
}
.meal-col-empty {
    font-size: 0.58rem; color: #d1d5db; text-align: center;
    padding: 10px 2px 6px; line-height: 1.4;
}

/* 无计划空态 — 对齐小程序 setup-guide-card */
.planner-empty-state {
    padding: 12px 14px 20px;
}
.menu-setup-empty-flow {
    display: flex; flex-direction: column; align-items: center; width: 100%;
}
.setup-guide-card {
    width: 100%; border-radius: 12px; background: #fff; overflow: hidden;
    border: 1px solid rgba(168,85,247,0.14);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.setup-guide-progress { padding: 12px 14px 0; }
.setup-guide-progress-track {
    height: 4px; border-radius: 999px;
    background: rgba(168,85,247,0.12); overflow: hidden;
}
.setup-guide-progress-fill {
    height: 100%; border-radius: 999px; background: #a855f7;
}
.setup-guide-progress-label {
    display: block; margin-top: 6px; font-size: 0.62rem; color: #999;
}
.setup-guide-body { padding: 10px 14px 0; }
.setup-guide-headline {
    font-size: 0.88rem; font-weight: 700; color: #222; line-height: 1.35;
}
.setup-guide-desc {
    margin-top: 5px; font-size: 0.72rem; color: #888; line-height: 1.55;
}
.setup-guide-cta {
    display: flex; align-items: center; justify-content: center;
    margin: 14px 12px 0; min-height: 40px; padding: 0 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(168,85,247,0.32);
}
.setup-guide-cta-loading { opacity: 0.75; }
.setup-guide-cta-text { font-size: 0.78rem; font-weight: 600; color: #fff; }
.setup-guide-cta-secondary {
    display: flex; align-items: center; justify-content: center;
    margin: 10px 12px 0; min-height: 36px; padding: 0 16px;
    border-radius: 20px;
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.28);
}
.setup-guide-cta-secondary-text { font-size: 0.75rem; font-weight: 600; color: #7c3aed; }
.wf-main-content { flex: 1; overflow-y: auto; }
.wf-empty-state { padding: 12px 14px 20px; }
.wf-timeline { display: none; padding: 8px 10px 20px; }
.wf-timeline.show { display: block; }
.setup-guide-roadmap {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 3px 2px; margin-top: 12px; padding: 9px 10px 12px;
    border-top: 1px solid rgba(168,85,247,0.08);
}
.setup-guide-roadmap-item { display: inline-flex; align-items: center; gap: 2px; }
.setup-guide-roadmap-icon { font-size: 0.62rem; font-weight: 700; color: #a855f7; }
.setup-guide-roadmap-dot { font-size: 0.85rem; font-weight: 700; color: #d1d5db; }
.setup-guide-roadmap-label { font-size: 0.6rem; line-height: 1.2; }
.setup-guide-roadmap-done .setup-guide-roadmap-label { color: #aaa; }
.setup-guide-roadmap-current .setup-guide-roadmap-label { color: #a855f7; font-weight: 600; }
.setup-guide-roadmap-pending .setup-guide-roadmap-label { color: #ccc; }
.setup-guide-roadmap-sep { margin: 0 2px; font-size: 0.58rem; color: #ddd; }
.planner-has-plan { display: none; }
.planner-has-plan.show { display: block; }
.week-regenerate-row { display: none; }
.week-regenerate-row.show { display: inline-flex; }
.hw-regenerate-row, .hw-adjust-row { display: none; }
.hw-regenerate-row.show, .hw-adjust-row.show { display: inline-flex; }

/* AI 预览弹窗 */
.ai-preview-overlay {
    position: absolute; inset: 0; z-index: 200; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 16px;
}
.ai-preview-overlay.show { display: flex; }
.ai-preview-modal {
    background: #fff; border-radius: 14px; width: 100%; max-height: 85%;
    display: flex; flex-direction: column; overflow: hidden;
}
.ai-preview-header { padding: 14px 16px 8px; border-bottom: 1px solid #f0f0f0; }
.ai-preview-title { font-size: 0.95rem; font-weight: 700; color: #222; }
.ai-preview-sub { font-size: 0.72rem; color: #888; margin-top: 4px; }
.ai-preview-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.preview-day-title { font-size: 0.82rem; font-weight: 700; color: #333; margin-bottom: 10px; }
.preview-day-section { margin-bottom: 12px; }
.preview-day-section:last-child { margin-bottom: 0; }
.preview-meal-block { margin-bottom: 12px; }
.preview-meal-type { font-size: 0.75rem; font-weight: 700; color: #a855f7; margin-bottom: 6px; }
.preview-meal-item {
    font-size: 0.72rem; color: #444; padding: 5px 8px; margin-bottom: 4px;
    background: #fafafa; border-radius: 6px;
}
.preview-meal-item.staple { background: #fff7ed; }
.preview-meal-item.preview-item-enter,
.preview-task-item.preview-item-enter {
    animation: previewItemIn 0.35s ease forwards;
}
.preview-period-label {
    font-size: 0.72rem; font-weight: 700; color: #888; margin: 8px 0 4px;
}
.preview-task-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.72rem; color: #444; padding: 5px 8px; margin-bottom: 4px;
    background: #fafafa; border-radius: 6px;
}
.preview-task-item.rest { background: #f3f4f6; }
.preview-task-duration {
    flex-shrink: 0; font-size: 0.62rem; font-weight: 600; color: #a855f7;
    background: rgba(168,85,247,0.1); padding: 2px 5px; border-radius: 4px;
}
.preview-task-name { flex: 1; min-width: 0; }
@keyframes previewItemIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.preview-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 28px 12px; text-align: center;
}
.preview-loading-spinner {
    width: 28px; height: 28px; border: 3px solid rgba(168,85,247,0.15);
    border-top-color: #a855f7; border-radius: 50%;
    animation: previewSpin 0.8s linear infinite; margin-bottom: 12px;
}
@keyframes previewSpin { to { transform: rotate(360deg); } }
.preview-loading-text { font-size: 0.72rem; color: #888; line-height: 1.5; }
.ai-preview-footer { padding: 12px 16px; border-top: 1px solid #f0f0f0; }
.ai-preview-cancel {
    width: 100%; padding: 10px; border-radius: 10px; border: none;
    background: #ef4444; color: #fff; font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ai-preview-footer-done {
    display: none; gap: 8px;
}
.ai-preview-footer-done.show { display: flex; }
.ai-preview-regenerate, .ai-preview-confirm {
    flex: 1; padding: 10px 8px; border-radius: 10px; border: none;
    font-size: 0.78rem; font-weight: 600;
}
.ai-preview-regenerate {
    background: #f3f4f6; color: #555;
}
.ai-preview-confirm {
    background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff;
}
.ai-preview-cancel.hidden { display: none; }

/* 房间预览（通用） */
.room-preview-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.room-preview-list { display: flex; flex-direction: row; gap: 10px; white-space: nowrap; }

/* ========== 家务详情 — 对齐 housework-details ========== */
.housework-page .hw-main-content {
    padding: 6px 6px 16px;
    position: relative;
}
.housework-page .room-preview-section {
    background: #fff;
    margin: 0 0 6px;
    border: 1px solid rgba(168, 85, 247, 0.1);
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 5px 14px rgba(168, 85, 247, 0.08), 0 1px 4px rgba(0, 0, 0, 0.035);
}
.housework-page .room-preview-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.055), #ffffff 52%), #ffffff;
}
.housework-page .room-preview-header-left {
    display: flex; align-items: center; gap: 6px; min-width: 0;
}
.housework-page .room-preview-icon-wrap {
    width: 19px; height: 19px; border-radius: 6px;
    background: rgba(168, 85, 247, 0.09);
    display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
}
.housework-page .room-preview-title { font-size: 0.78rem; font-weight: 600; color: #333; }
.housework-page .room-preview-count {
    display: inline-flex; align-items: center; font-size: 0.68rem;
    background: #fff; border: 1px solid rgba(168, 85, 247, 0.12);
    padding: 2px 6px; border-radius: 10px; font-weight: 600;
    box-shadow: 0 1.5px 5px rgba(168, 85, 247, 0.06);
}
.housework-page .room-preview-count-num { color: #a855f7; font-weight: 700; margin-right: 1px; }
.housework-page .room-preview-count-suffix { color: #1a1a1a; }
.housework-page .room-preview-arrow {
    font-size: 1.1rem; color: #999; transition: transform 0.25s ease; display: inline-block;
}
.housework-page .room-preview-arrow.rotated { transform: rotate(90deg); }
.housework-page .room-preview-body {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.housework-page .room-preview-body.expanded { max-height: 220px; }
.housework-page .room-preview-scroll { width: 100%; padding-bottom: 10px; }
.housework-page .room-preview-list { padding: 2px 10px 8px; }
.housework-page .room-card {
    display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
    flex-shrink: 0; width: 80px;
}
.housework-page .room-card-name {
    font-size: 0.62rem; color: #555; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px;
}
.housework-page .room-card-media-item {
    position: relative; width: 80px; height: 60px; border-radius: 6px;
    overflow: hidden; border: 1px solid #e5e7eb; background: #f3f4f6;
}
.housework-page .room-media-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.housework-page .room-media-count {
    position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,0.55);
    color: #fff; font-size: 0.55rem; padding: 1px 4px; border-radius: 6px;
}

.housework-page .hw-top-navigation {
    background:
        radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.11), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #fbf9ff 100%);
    margin: 0 0 6px;
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.08), 0 1px 5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.housework-page .hw-top-navigation .menu-type-switcher {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin: 7px 10px 3px; padding: 2px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.08); border-radius: 999px;
}
.housework-page .hw-top-navigation .menu-type-tab {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 5px 0; font-size: 0.78rem; color: #5f6470; font-weight: 500;
    border-radius: 999px; position: relative;
}
.housework-page .hw-top-navigation .menu-type-tab.active {
    color: #1a1a1a; font-weight: 700; background: #fff;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.12), inset 0 0 0 1px rgba(168, 85, 247, 0.08);
}
.housework-page .hw-top-navigation .menu-type-tab.active::after {
    content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 21px; height: 2.5px;
    background: linear-gradient(90deg, #a855f7, #ec4899); border-radius: 999px;
}
.housework-page .hw-top-navigation .week-navigator {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 10px 7px; background: transparent;
}
.housework-page .hw-top-navigation .nav-arrow {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 5px 9px; background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 999px;
    color: #1a1a1a; font-size: 0.68rem;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04);
}
.housework-page .hw-top-navigation .nav-arrow.disabled { opacity: 0.4; }
.housework-page .hw-top-navigation .arrow-icon { font-size: 0.85rem; font-weight: 300; line-height: 1; }
.housework-page .hw-top-navigation .arrow-text { font-size: 0.68rem; font-weight: 500; }
.housework-page .hw-top-navigation .week-display-container {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; margin: 0 6px; min-width: 0;
}
.housework-page .hw-top-navigation .week-display {
    display: flex; align-items: baseline; justify-content: center;
    padding: 6px 13px; gap: 3px; min-width: 110px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86)), rgba(168,85,247,0.06);
    border: 1px solid rgba(168, 85, 247, 0.12); border-radius: 999px;
    box-shadow: 0 4px 11px rgba(168, 85, 247, 0.1);
}
.housework-page .hw-top-navigation .week-label { font-size: 0.72rem; color: #1a1a1a; font-weight: 600; }
.housework-page .hw-top-navigation .current-week-tag { font-size: 0.58rem; color: #666; }
.housework-page .hw-top-navigation .regenerate-btn-inline {
    padding: 4px 8px; background: linear-gradient(180deg, #fff, rgba(168,85,247,0.04));
    color: #1a1a1a; border-radius: 999px; font-size: 0.62rem; font-weight: 600;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 2px 7px rgba(168, 85, 247, 0.08);
    display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}
.housework-page .hw-top-navigation .week-action-row {
    display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap;
}

.housework-page .task-note-container {
    margin: 4px 0; border-radius: 8px; overflow: hidden; background: #fff;
    border: 1px solid rgba(168, 85, 247, 0.12);
    box-shadow: 0 1px 6px rgba(168, 85, 247, 0.08);
}
.housework-page .task-note-header {
    padding: 6px 10px; border-left: 2.5px solid #a855f7;
    display: flex; align-items: center;
}
.housework-page .note-icon-wrap { margin-right: 8px; font-size: 0.85rem; }
.housework-page .note-title { flex: 1; font-size: 0.78rem; font-weight: 600; color: #1a1a1a; }
.housework-page .note-arrow {
    font-size: 1rem; color: #999; margin-left: 10px;
    transition: transform 0.3s ease; transform: rotate(90deg);
}
.housework-page .note-arrow.rotated { transform: rotate(270deg); }
.housework-page .task-note-content {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 10px;
}
.housework-page .task-note-content.expanded {
    max-height: 500px; padding: 0 10px 6px;
}
.housework-page .note-text { font-size: 0.72rem; color: #666; line-height: 1.8; display: block; }

.housework-page .task-list { padding: 4px 0; }
.housework-page .hw-day-item {
    margin-bottom: 7px; border-radius: 10px; overflow: hidden;
    background: linear-gradient(180deg, rgba(168,85,247,0.035) 0%, #ffffff 18%), #ffffff;
    border: 1px solid rgba(168, 85, 247, 0.1);
    box-shadow: 0 7px 17px rgba(168, 85, 247, 0.09), 0 1.5px 5px rgba(0, 0, 0, 0.04);
}
.housework-page .hw-day-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 8px 5px; position: relative;
}
.housework-page .hw-day-header::after {
    content: ''; position: absolute; bottom: 0; left: 8px; right: 8px; height: 1px;
    background: linear-gradient(90deg, rgba(168,85,247,0.18), rgba(168,85,247,0.04), transparent);
}
.housework-page .day-date { display: flex; align-items: center; gap: 6px; }
.housework-page .date-text { font-size: 0.72rem; font-weight: 700; color: #1a1a1a; }
.housework-page .day-name { font-size: 0.68rem; font-weight: 600; color: #666; }
.housework-page .day-duration-text {
    font-size: 0.64rem;
    font-weight: 700;
    color: #a855f7;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.2;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.28);
    box-shadow: 0 2px 7px rgba(168, 85, 247, 0.1);
}
.housework-page .day-header-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.housework-page .day-count {
    display: flex; align-items: center; font-size: 0.62rem;
    background: #fff; border: 1px solid rgba(168, 85, 247, 0.16);
    padding: 2px 6px; border-radius: 999px; font-weight: 600;
    box-shadow: 0 2px 7px rgba(168, 85, 247, 0.08);
}
.housework-page .day-count-num { color: #a855f7; font-weight: 700; margin: 0 1px; }
.housework-page .hw-schedule-timeline { padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 3px; }

.housework-page .hw-time-block {
    display: flex; align-items: stretch; width: 100%; min-height: 35px;
    border-radius: 6px; overflow: hidden; box-sizing: border-box;
    background: #fff; border: 1px solid rgba(60, 60, 67, 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.housework-page .hw-time-block.work-block {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.2);
}
.housework-page .hw-time-block.rest-block {
    background: #f8f9fb; border-color: rgba(142, 142, 147, 0.22);
}
.housework-page .hw-time-block.highlight-ring {
    border-color: #a855f7; box-shadow: 0 0 0 2px rgba(216, 180, 254, 0.72), 0 0 8px rgba(168, 85, 247, 0.35);
}
.housework-page .hw-block-content {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px;
    padding: 5px 6px 5px 5px;
}
.housework-page .block-icon-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.housework-page .block-type-mark-icon {
    width: 22px; height: 22px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
    background: rgba(59, 130, 246, 0.16);
}
.housework-page .rest-block .block-type-mark-icon { background: #eef0f4; }
.housework-page .block-ref-thumb { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; display: block; }
.housework-page .block-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.housework-page .block-meta-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.housework-page .block-type-chip {
    font-size: 0.58rem; font-weight: 600; padding: 1px 5px; border-radius: 3px;
}
.housework-page .work-block .block-type-chip { color: #1d4ed8; background: rgba(255,255,255,0.65); }
.housework-page .rest-block .block-type-chip { color: #8e8e93; background: #eef0f4; }
.housework-page .block-time-range { font-size: 0.58rem; font-weight: 500; color: #8e8e93; white-space: nowrap; }
.housework-page .block-edit-btn {
  flex-shrink: 0;
  padding: 0.1rem 0.28rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.28);
  color: #2563eb;
  font-size: 0.52rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.housework-page .block-title { font-size: 0.72rem; font-weight: 600; color: #1c1c1e; line-height: 1.3; word-break: break-all; }
.housework-page .rest-block .block-title { color: #8e8e93; font-weight: 500; }
.housework-page .block-duration-pill {
    flex-shrink: 0; align-self: center; margin-right: 5px;
    display: flex; align-items: baseline; gap: 1px;
    padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,0.75);
}
.housework-page .rest-block .block-duration-pill { background: #eef0f4; }
.housework-page .block-duration-num { font-size: 0.68rem; font-weight: 600; color: #1c1c1e; }
.housework-page .rest-block .block-duration-num { color: #8e8e93; }
.housework-page .block-duration-unit { font-size: 0.55rem; color: #8e8e93; }

.housework-page .hw-merged-card { cursor: default; }
.housework-page .hw-day-merge-hint-row {
    display: flex; justify-content: flex-end; padding: 0 8px 4px;
}
.housework-page .hw-day-merge-hint {
    font-size: 0.56rem; font-weight: 500; color: #a855f7; line-height: 1.3;
}
.housework-page .hw-10min-blocks-wrap {
    display: flex; flex-direction: column; gap: 3px;
    padding: 2px 0 2px 8px;
    border-left: 2px solid rgba(168, 85, 247, 0.35);
    margin: 2px 0 2px 4px;
}
.housework-page .hw-time-block.hw-10min-block {
    min-height: 30px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(168, 85, 247, 0.25);
}
.housework-page .hw-time-block.hw-10min-block .block-duration-num { color: #7c3aed; }
.housework-page .hw-time-block.hw-10min-block .block-type-chip { color: #7c3aed; }

.housework-page .hw-top-navigation .day-navigator { display: none; }
.housework-page .hw-top-navigation.day-mode .week-navigator { display: none; }
.housework-page .hw-top-navigation.day-mode .day-navigator { display: flex; }
.housework-page .hw-top-navigation .day-navigator {
    align-items: center; justify-content: space-between; gap: 4px;
}
.housework-page .hw-block-content { position: relative; }
.housework-page .block-actions-col {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    margin-right: 4px; align-self: center;
}
.housework-page .block-adjust-row { display: flex; gap: 3px; }
.housework-page .adjust-btn-simple {
    width: 18px; height: 18px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; cursor: pointer; border: 1px solid rgba(168,85,247,0.25);
    background: #fff; color: #7c3aed; line-height: 1;
}
.housework-page .adjust-btn-remove { color: #e53935; border-color: rgba(229,57,53,0.25); }
.housework-page .adjust-btn-add { color: #7c3aed; }

.adj-preview-hw-tasks { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.adj-preview-hw-task-tag {
    display: block; font-size: 0.52rem; padding: 3px 6px; border-radius: 4px; line-height: 1.35;
    background: rgba(232,245,233,0.85); border: 1px solid rgba(76,175,80,0.25); color: #333;
}
.adj-preview-hw-task-tag .hw-tag-time { color: #666; margin-right: 4px; }

.phone-shell-edit-hw::after { content: '编辑家务演示'; }
.phone-shell-create-hw::after { content: '家务创建演示'; }
#phone-shell-edit-hw .phone-screen { pointer-events: auto; }
#phone-shell-edit-hw .sim-pointer,
#phone-shell-edit-hw .sim-tap-label { pointer-events: none; }
#phone-shell-edit-hw .sim-pointer {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, var(--sim-primary, #a855f7));
    box-shadow: 0 2px 12px rgba(168,85,247,0.6);
    z-index: 420; opacity: 0; transition: opacity 0.2s, transform 0.15s;
}
#phone-shell-edit-hw .sim-pointer.show { opacity: 1; }
#phone-shell-edit-hw .sim-pointer.press { transform: scale(0.85); }
#phone-shell-edit-hw .sim-tap-label { z-index: 421; }
#phone-shell-edit-hw .hw-sim-toast { z-index: 410; }
#phone-shell-edit-hw .hw-time-block.highlight-ring,
#phone-shell-edit-hw .adjust-btn-add.highlight-ring,
#phone-shell-edit-hw .adjust-btn-remove.highlight-ring,
#phone-shell-edit-hw .block-edit-btn.highlight-ring,
#phone-shell-edit-hw .hw-add-block-option.highlight-ring,
#phone-shell-edit-hw .hw-task-edit-btn.highlight-ring,
#phone-shell-edit-hw .hw-td-name-input.highlight-ring,
#phone-shell-edit-hw .hw-task-edit-body textarea.highlight-ring,
#phone-shell-edit-hw .regenerate-btn-inline.highlight-ring,
#phone-shell-edit-hw .menu-type-tab.highlight-ring,
#phone-shell-edit-hw .adj-dim-tag.highlight-ring,
#phone-shell-edit-hw .hw-lib-item.highlight-ring,
#phone-shell-edit-hw .hw-confirm-btn.highlight-ring {
    box-shadow: 0 0 0 2px rgba(168,85,247,0.55) !important;
}
#phone-shell-edit-hw .sim-demo-pressed {
    transform: scale(0.98);
    transition: transform 0.12s ease;
}

/* 旧家务列表样式保留给非 housework-page */
.task-day-section { margin: 0 10px 10px; }
.task-day-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; background: #fff; border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #f3f4f6;
}
.task-day-date { font-size: 0.78rem; font-weight: 700; color: #333; }
.task-day-count { font-size: 0.68rem; color: #888; }
.task-day-body { background: #fff; border-radius: 0 0 12px 12px; padding: 8px 10px 12px; }
.task-day-body.collapsed { display: none; }
.task-card {
    display: flex; gap: 8px; padding: 8px; margin-bottom: 6px;
    border-radius: 10px; background: #f8fafc; border: 1px solid #eef2f7;
}
.task-card.rest { background: #f3f4f6; border-color: #e5e7eb; }
.task-card.highlight-ring { box-shadow: 0 0 0 2px rgba(168,85,247,0.45); }
.task-card-thumb {
    width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
    background: #e5e7eb;
}
.task-card-main { flex: 1; min-width: 0; }
.task-card-tags { display: flex; gap: 4px; margin-bottom: 3px; }
.task-tag {
    font-size: 0.58rem; padding: 1px 5px; border-radius: 4px; font-weight: 600;
}
.task-tag.blue { background: #dbeafe; color: #2563eb; }
.task-card-time { font-size: 0.65rem; color: #888; }
.task-card-name { font-size: 0.75rem; font-weight: 600; color: #222; margin: 2px 0; }
.task-card-duration { font-size: 0.68rem; color: #666; text-align: right; white-space: nowrap; }

/* 工作流时间轴 */
.wf-info-card {
    display: none; margin: 6px 10px 8px; padding: 10px 12px;
    background: #fff; border-radius: 12px; border: 1px solid rgba(60,60,67,0.12);
}
.wf-info-progress {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; font-size: 0.72rem;
}
.wf-info-date { font-weight: 700; color: #1a1a1a; }
.wf-info-completion { color: #666; font-size: 0.68rem; }
.wf-info-stats {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.wf-stat-item {
    flex: 1; min-width: 0; text-align: center; padding: 4px 2px;
    background: #fafafa; border-radius: 6px;
}
.wf-stat-label { display: block; font-size: 0.58rem; color: #888; margin-bottom: 2px; }
.wf-stat-value { font-size: 0.68rem; font-weight: 700; color: #333; }
.wf-stat-value.wf-stat-work { color: #7c3aed; }
.wf-stat-value.work-overtime { color: #FF3B30 !important; font-weight: 700; }
.wf-stat-overtime { font-size: 0.72rem; margin-left: 2px; }

/* 工作流首页 — 对齐 miniprogram info-card + time-block-card */
.wf-home-page .wf-info-card {
    display: block; margin: 6px 10px 8px; padding: 10px 12px;
    background: #fff; border-radius: 12px; border: 1px solid rgba(60,60,67,0.12);
    box-shadow: none;
}
.wf-home-page .task-progress-section {
    display: flex; align-items: center; justify-content: space-between;
}
.wf-home-page .progress-date { font-size: 0.78rem; font-weight: 700; color: #1a1a1a; }
.wf-home-page .progress-right { display: flex; align-items: center; gap: 4px; font-size: 0.66rem; color: #666; }
.wf-home-page .progress-value { font-weight: 700; color: #333; }
.wf-home-page .time-stats-section {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; gap: 6px;
}
.wf-home-page .stat-item-inline {
    display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0;
}
.wf-home-page .stat-label-inline { font-size: 0.58rem; color: #999; }
.wf-home-page .stat-value-inline { font-size: 0.68rem; font-weight: 600; color: #333; }
.wf-home-page .stat-value-inline.work-normal { color: #a855f7; }
.wf-home-page .stat-value-inline.rest { color: #8e8e93; }
.wf-home-page .stat-value-inline.work-overtime { color: #FF3B30; font-weight: 700; }
.wf-home-page .overtime-warning { font-size: 0.68rem; margin-left: 2px; }

.wf-home-page .schedule-timeline {
    padding: 4px 10px 16px; display: flex; flex-direction: column; gap: 6px;
}
.wf-home-page .time-block-card {
    position: relative; display: flex; width: 100%; min-height: 35px;
    border-radius: 6px; overflow: hidden; box-sizing: border-box;
    background: #fff; border: 1px solid rgba(60,60,67,0.1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.wf-home-page .time-block-card .normal-block-content {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px;
    padding: 5px 6px 5px 5px;
}
.wf-home-page .block-icon-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wf-home-page .block-type-mark-icon {
    width: 22px; height: 22px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
}
.wf-home-page .block-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wf-home-page .block-meta-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; }
.wf-home-page .block-tags-slot { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; }
.wf-home-page .block-type-chip {
    font-size: 0.58rem; font-weight: 600; padding: 1px 5px; border-radius: 3px; line-height: 1.2;
}
.wf-home-page .block-region-chip {
    font-size: 0.58rem; font-weight: 500; padding: 1px 5px; border-radius: 3px; line-height: 1.2;
}
.wf-home-page .block-region-chip--ghost { visibility: hidden; }
.wf-home-page .block-time-range { font-size: 0.58rem; font-weight: 500; color: #8e8e93; white-space: nowrap; flex-shrink: 0; }
.wf-home-page .block-title-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.wf-home-page .block-title { font-size: 0.72rem; font-weight: 600; color: #1c1c1e; line-height: 1.3; word-break: break-all; }
.wf-home-page .block-actions-col {
    flex-shrink: 0; display: flex; flex-direction: row; align-items: center; gap: 4px; margin-right: 2px;
}
.wf-home-page .block-duration-pill {
    display: flex; align-items: baseline; gap: 1px; padding: 2px 5px; border-radius: 4px; background: #f2f2f7;
}
.wf-home-page .block-duration-num { font-size: 0.68rem; font-weight: 600; color: #1c1c1e; }
.wf-home-page .block-duration-unit { font-size: 0.55rem; color: #8e8e93; }
.wf-home-page .block-detail-btn {
    flex-shrink: 0; padding: 2px 5px; border-radius: 4px; font-size: 0.52rem; font-weight: 600; line-height: 1.2; cursor: pointer;
    background: rgba(255,255,255,0.86);
}
.wf-home-page .block-adjust-row { display: flex; gap: 3px; }
.wf-home-page .adjust-btn-simple {
    width: 18px; height: 18px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 500; cursor: pointer; background: #f2f2f7; line-height: 1;
}

.wf-home-page .time-block-card.meal-block {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(245,158,11,0.22);
}
.wf-home-page .time-block-card.meal-block .block-type-mark-icon { background: rgba(245,158,11,0.18); }
.wf-home-page .time-block-card.meal-block .block-type-chip { color: #b45309; background: rgba(255,255,255,0.65); }
.wf-home-page .time-block-card.meal-block .block-region-chip { color: #d97706; background: rgba(255,255,255,0.55); }
.wf-home-page .time-block-card.meal-block .block-detail-btn { border: 1px solid rgba(245,158,11,0.28); color: #d97706; }
.wf-home-page .time-block-card.meal-block .block-duration-pill { background: rgba(255,255,255,0.75); }

.wf-home-page .time-block-card.work-block {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59,130,246,0.2);
}
.wf-home-page .time-block-card.work-block .block-type-mark-icon { background: rgba(59,130,246,0.16); }
.wf-home-page .time-block-card.work-block .block-type-chip { color: #1d4ed8; background: rgba(255,255,255,0.65); }
.wf-home-page .time-block-card.work-block .block-region-chip { color: #2563eb; background: rgba(255,255,255,0.55); }
.wf-home-page .time-block-card.work-block .block-detail-btn { border: 1px solid rgba(59,130,246,0.28); color: #2563eb; }
.wf-home-page .time-block-card.work-block .block-duration-pill { background: rgba(255,255,255,0.75); }
.wf-home-page .time-block-card.work-block .adjust-btn-add { color: #2563eb; }
.wf-home-page .time-block-card.work-block.ten-min-sub-block,
.wf-home-page .time-block-card.work-block.merged-block {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(168,85,247,0.25);
}
.wf-home-page .time-block-card.work-block.ten-min-sub-block .block-type-chip,
.wf-home-page .time-block-card.work-block.merged-block .block-type-chip { color: #7c3aed; }
.wf-home-page .time-block-card.work-block.ten-min-sub-block .block-duration-num,
.wf-home-page .time-block-card.work-block.merged-block .block-duration-num { color: #7c3aed; }

.wf-home-page .time-block-card.rest-block {
    background: #f8f9fb; border-color: rgba(142,142,147,0.22);
}
.wf-home-page .time-block-card.rest-block .block-type-mark-icon { background: #eef0f4; }
.wf-home-page .time-block-card.rest-block .block-type-chip { color: #8e8e93; background: #eef0f4; }
.wf-home-page .time-block-card.rest-block .block-title { color: #8e8e93; font-weight: 500; }
.wf-home-page .time-block-card.rest-block .block-time-range { color: #aeaeb2; }
.wf-home-page .time-block-card.rest-block .block-duration-pill { background: #eef0f4; }
.wf-home-page .time-block-card.rest-block .block-duration-num { color: #8e8e93; }

.wf-home-page .time-block-card.active-block {
    border-color: #a855f7; border-width: 2px;
    box-shadow: 0 0 0 2px rgba(255,255,255,1), 0 0 0 4px rgba(216,180,254,0.72), 0 0 8px rgba(168,85,247,0.42);
    animation: wfActiveGlowPulse 1.35s ease-in-out infinite alternate;
}
@keyframes wfActiveGlowPulse {
    from { box-shadow: 0 0 0 2px rgba(255,255,255,0.92), 0 0 0 4px rgba(216,180,254,0.46), 0 0 6px rgba(168,85,247,0.24); }
    to { box-shadow: 0 0 0 2px rgba(255,255,255,1), 0 0 0 4px rgba(216,180,254,0.92), 0 0 12px rgba(168,85,247,0.68); }
}

.wf-home-page .wf-10min-blocks-wrap {
    display: flex; flex-direction: column; gap: 3px;
    padding: 2px 0 2px 8px; margin: 0 0 0 4px;
    border-left: 2px solid rgba(168,85,247,0.35);
}

.wf-fullscreen-overlay {
    position: absolute; inset: 0; z-index: 300; background: #000;
    display: none; overflow: hidden;
}
.wf-fullscreen-overlay.show { display: block; }

.wf-fs-image-wrap {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 8px; overflow: hidden; line-height: 0;
}
.wf-fs-image-wrap.is-placeholder { border: none; width: 60%; opacity: 0.5; }
.wf-fs-image {
    width: 100%; display: block; vertical-align: top;
}

.wf-fs-top-mask {
    position: absolute; top: 0; left: 0; right: 0; height: 52px;
    background: #000; z-index: 1; pointer-events: none;
}
.wf-fs-bottom-mask {
    position: absolute; bottom: 0; left: 0; right: 0; height: 170px;
    background: linear-gradient(to top, #000 0%, #000 40%, transparent 100%);
    pointer-events: none; z-index: 1;
}

.wf-fs-preview-info {
    position: absolute; bottom: 50px; left: 0; right: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 0 20px; pointer-events: none;
}
.wf-fs-preview-info.is-rest {
    top: 0; bottom: 0; justify-content: center;
}
.wf-fs-meal-type {
    font-size: 13px; color: rgba(255, 255, 255, 0.65);
    letter-spacing: 2px;
}
.wf-fs-meal-name {
    font-size: 1.35rem; font-weight: 700; color: #fff;
    text-align: center; line-height: 1.3;
}

.wf-fs-preview-dots {
    position: absolute; bottom: 20px; left: 0; right: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    pointer-events: none;
}
.wf-fs-time-range {
    font-size: 12px; color: rgba(255, 255, 255, 0.5); letter-spacing: 1px;
}

.wf-fullscreen-hint {
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    z-index: 3; font-size: 10px; color: rgba(255, 255, 255, 0.45);
    white-space: nowrap; pointer-events: none;
}


.wf-info-merge-hint-row {
    display: flex; justify-content: flex-end; padding-top: 8px; margin-top: 6px;
    border-top: 1px solid rgba(168,85,247,0.12);
}
.wf-info-merge-hint {
    font-size: 0.56rem; font-weight: 500; color: #a855f7; line-height: 1.35; text-align: right;
}
.wf-10min-blocks-wrap {
    display: flex; flex-direction: column; gap: 3px;
    padding: 2px 0 2px 8px; margin: 2px 0 2px 4px;
    border-left: 2px solid rgba(168,85,247,0.35);
}
.wf-timeline { padding: 8px 10px 20px; }
.wf-task-card {
    display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
    border-radius: 12px; border: 1px solid #eef2f7; background: #fff;
}
.wf-task-card.work { background: #f0f9ff; border-color: #bae6fd; }
.wf-task-card.rest { background: #f3f4f6; }
.wf-task-card.meal { background: #fffbeb; border-color: #fde68a; }
.wf-task-card.highlight-ring { box-shadow: 0 0 0 2px rgba(168,85,247,0.45); }
.wf-task-icon { font-size: 1.1rem; flex-shrink: 0; width: 28px; text-align: center; }
.wf-task-main { flex: 1; }
.wf-task-meta { font-size: 0.65rem; color: #888; margin-bottom: 2px; }
.wf-task-meta .detail-link { color: #2563eb; margin-left: 6px; }
.wf-task-name { font-size: 0.8rem; font-weight: 600; color: #222; }
.wf-task-dur { font-size: 0.72rem; color: #666; white-space: nowrap; }

.highlight-ring { box-shadow: 0 0 0 2px rgba(168,85,247,0.45) !important; }

.sim-added-mark {
    animation: simAddedPulse 0.55s ease-in-out 3;
}
.wm-dish-row.sim-added-mark {
    border-color: rgba(255, 59, 48, 0.75) !important;
}
#phone-shell-edit-hw .hw-time-block.sim-added-mark {
    border-color: rgba(255, 59, 48, 0.75) !important;
}
@keyframes simAddedPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.88); }
}

/* 任务编辑弹窗（对齐小程序 task-edit-modal + task-detail） */
.hw-task-edit-overlay {
    position: absolute; inset: 0; z-index: 210; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; padding: 12px;
}
.hw-task-edit-overlay.show { display: flex; }
.hw-task-edit-modal {
    background: #fff; border-radius: 10px; width: 100%; max-height: 88%;
    display: flex; flex-direction: column; overflow: hidden;
}
.phone-shell-edit-hw .hw-task-edit-modal { max-height: 90%; }
.hw-task-edit-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0; gap: 6px;
}
.hw-task-edit-title {
    font-size: 0.72rem; font-weight: 600; color: #333; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hw-task-edit-header-right {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.hw-task-type-tabs {
    display: flex; background: #f5f5f5; border-radius: 4px; padding: 2px;
}
.hw-task-type-tab {
    padding: 3px 10px; font-size: 0.62rem; color: #666; border-radius: 3px;
}
.hw-task-type-tab.active {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b9d 100%); color: #fff;
}
.hw-task-edit-close {
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; color: #999; flex-shrink: 0;
}
.hw-task-edit-body { flex: 1; overflow-y: auto; padding: 10px 12px; }

.hw-task-detail {
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f3f8 100%);
    border-radius: 6px; padding: 9px; border-top: 1px solid #e3e8f0;
}
.hw-td-section { margin-bottom: 8px; }
.hw-td-section:last-child { margin-bottom: 0; }
.hw-td-section-title {
    display: block; font-size: 0.62rem; color: #333; font-weight: 600; margin-bottom: 4px;
}
.hw-td-cleaning-title { font-size: 0.62rem; color: #111827; }
.hw-td-name-input {
    width: 100%; background: #fff; border: 1px solid #e0e0e0; border-radius: 5px;
    padding: 7px 8px; font-size: 0.62rem; color: #333; font-weight: 500;
    box-sizing: border-box; min-height: 29px; line-height: 1.4;
}
.hw-td-name-input.typing,
.hw-td-cleaning-input.typing,
.hw-td-cleaning-textarea.typing {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.12);
}
.hw-td-desc-display {
    font-size: 0.62rem; color: #333; line-height: 1.45;
    padding: 6px 7px; background: #f5f5f5; border-radius: 5px;
}
.hw-td-media-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.hw-td-media-item {
    width: 66px; height: 66px; border-radius: 4px; overflow: hidden;
    border: 1px solid #e5e7eb; background: #f5f5f5;
}
.hw-td-media-thumb { width: 100%; height: 100%; object-fit: contain; display: block; background: #f5f5f5; }

.hw-td-cleaning-fields {
    background: #fff; border-radius: 5px; padding: 6px 7px; border: 1px solid #e5e7eb;
}
.hw-td-cleaning-item { margin-bottom: 7px; }
.hw-td-cleaning-item:last-child { margin-bottom: 0; }
.hw-td-cleaning-label {
    display: block; font-size: 0.6rem; color: #6b7280; font-weight: 500; margin-bottom: 4px;
}
.hw-td-cleaning-input, .hw-td-cleaning-textarea {
    width: 100%; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 4px;
    padding: 6px 7px; font-size: 0.62rem; color: #333; box-sizing: border-box;
    line-height: 1.4; margin-bottom: 4px;
}
.hw-td-cleaning-input { min-height: 29px; }
.hw-td-cleaning-textarea { min-height: 29px; max-height: 66px; resize: none; }
.hw-td-media-upload-btn {
    width: 62px; height: 62px; border: 1px dashed #d1d5db; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; background: #f9fafb;
}
.hw-td-media-upload-icon { font-size: 1.2rem; color: #9ca3af; line-height: 1; }

.hw-task-rest-tip {
    display: none; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 0; gap: 10px;
}
.hw-task-rest-tip.show { display: flex; }
.hw-rest-icon { font-size: 2rem; }
.hw-rest-text { font-size: 0.72rem; color: #999; }

.hw-task-edit-footer {
    display: flex; border-top: 1px solid #f0f0f0; padding: 7px 12px 9px; gap: 6px;
}
.hw-task-edit-btn {
    flex: 1; height: 32px; border: none; border-radius: 5px;
    font-size: 0.72rem; font-weight: 600; cursor: pointer;
}
.hw-task-edit-btn.cancel { background: #f5f5f5; color: #666; }
.hw-task-edit-btn.confirm {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b9d 100%); color: #fff;
}

.sim-pointer {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    background: #a855f7; box-shadow: 0 2px 12px rgba(168,85,247,0.6);
    pointer-events: none; z-index: 100; opacity: 0; transition: opacity 0.2s;
}
.sim-pointer.show { opacity: 1; }
.sim-pointer.press { transform: scale(0.85); }
.sim-tap-label {
    position: absolute; z-index: 101; background: rgba(30,30,30,0.88);
    color: #fff; font-size: 0.72rem; font-weight: 600; padding: 4px 10px;
    border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none;
}
.sim-tap-label.show { opacity: 1; }

/* ========== 计划菜谱：日菜单 / 筛选周视图 / 底部操作 ========== */
.planner-top-nav .day-navigator { display: none; }
.planner-top-nav.day-mode .week-navigator { display: none; }
.planner-top-nav.day-mode .day-navigator { display: flex; }
.day-navigator { align-items: center; justify-content: space-between; gap: 4px; }
.day-label { font-size: 0.78rem; font-weight: 700; color: #333; }

#week-meal-filter-bar { display: flex; }
.planner-top-nav.day-mode ~ .planner-empty-state,
.planner-top-nav.day-mode ~ #planner-has-plan #week-meal-filter-bar { display: none; }

.wm-dish-delete-btn {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    background: #fff7ed; border: 1px solid #fdba74; color: #ea580c;
    font-size: 0.72rem; font-weight: 700; line-height: 14px; text-align: center;
}
.wm-dish-arrow { color: #ccc; font-size: 0.72rem; flex-shrink: 0; transform: rotate(90deg); }
.wm-dish-row {
    display: flex; align-items: center; gap: 5px; padding: 5px 6px; margin-bottom: 4px;
    border-radius: 8px; background: #fff; border: 1px solid #f0f0f0;
}
.wm-dish-row.staple { background: #fffbeb; border-color: #fde68a; }
.wm-add-dish-btn, .wm-add-staple-btn {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px 8px; border-radius: 14px; font-size: 0.58rem; font-weight: 600; white-space: nowrap;
}
.wm-add-dish-btn { background: #fff; border: 1px solid rgba(168,85,247,0.25); color: #a855f7; }
.wm-add-staple-btn { background: linear-gradient(135deg, #fff9e6, #fffbf0); border: 1px solid rgba(245,158,11,0.4); color: #d97706; }

/* 日菜单 */
.wm-day-menu { padding: 0 6px 8px; }
.wm-day-block {
    margin-bottom: 8px; border-radius: 10px; overflow: hidden;
    background: linear-gradient(180deg, rgba(168,85,247,0.035) 0%, #fff 18%), #fff;
    border: 1px solid rgba(168,85,247,0.1);
    box-shadow: 0 6px 15px rgba(168,85,247,0.08);
}
.wm-day-block-inner { display: flex; align-items: stretch; }
.wm-day-meals { flex: 1; min-width: 0; padding: 6px 8px 8px; }
.wm-day-meal-section { margin-bottom: 10px; }
.wm-day-meal-section:last-child { margin-bottom: 0; }
.wm-meal-title-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px; gap: 4px;
}
.wm-meal-title-left { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 700; color: #333; }
.wm-meal-title-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.wm-meal-clear-btn {
    width: 16px; height: 16px; border-radius: 50%; background: #fff7ed;
    border: 1px solid #fdba74; color: #ea580c; font-size: 0.65rem; line-height: 14px; text-align: center;
}

/* 周菜单·餐次筛选 */
.wm-filtered-layout { padding: 0 6px 8px; }
.wm-filtered-inner { display: flex; align-items: stretch; min-height: 120px; }
.wm-filtered-label-bar {
    width: 11px; flex-shrink: 0; padding: 8px 1.8px;
    background: linear-gradient(180deg, #a855f7, #ec4899);
    border-radius: 0 9px 9px 0;
    display: flex; align-items: center; justify-content: center;
}
.wm-filtered-label-bar .day-name-vertical { font-size: 9px; }
.wm-filtered-columns {
    flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
}
.wm-filtered-col {
    background: #fff; border-radius: 8px; border: 1px solid rgba(168,85,247,0.1);
    padding: 4px 3px; min-width: 0;
}
.wm-filtered-col-head {
    display: flex; align-items: center; justify-content: center; position: relative;
    font-size: 0.62rem; font-weight: 700; color: #555; margin-bottom: 4px; min-height: 18px;
}
.wm-filtered-col-head .wm-meal-clear-btn { position: absolute; right: 0; }
.wm-filtered-col .wm-dish-row { padding: 3px 2px; margin-bottom: 3px; }
.wm-filtered-col .dish-thumb { width: 18px; height: 18px; }
.wm-filtered-col .dish-name { font-size: 0.55rem; }
.wm-filtered-col .wm-dish-delete-btn { width: 14px; height: 14px; font-size: 0.62rem; line-height: 12px; }
.wm-filtered-col .wm-meal-add-row { display: flex; gap: 3px; margin-top: 4px; }
.wm-filtered-col .wm-add-dish-btn, .wm-filtered-col .wm-add-staple-btn { flex: 1; justify-content: center; padding: 2px 0; font-size: 0.52rem; }
.wm-filtered-placeholder {
    display: flex; flex-direction: column; gap: 6px; justify-content: center;
    align-items: stretch; padding: 6px 4px; min-height: 80px;
}
.wm-filtered-placeholder.empty { min-height: 40px; }
.wm-placeholder-btn {
    padding: 6px 4px; border-radius: 14px; text-align: center;
    background: #fff; border: 1px solid rgba(168,85,247,0.22);
}
.wm-placeholder-btn-chat {
    background: linear-gradient(135deg, #f3e8ff 0%, #faf5ff 100%);
    border-color: rgba(168,85,247,0.35);
}
.wm-placeholder-btn-text { font-size: 0.52rem; color: #a855f7; font-weight: 600; line-height: 1.35; display: block; }

/* 底部操作栏 */
.all-view-footer-actions {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    padding: 8px 10px 12px; margin: 4px 10px 8px;
    background: rgba(248,250,252,0.9); border-radius: 10px; border: 1px solid rgba(0,0,0,0.06);
}
.all-view-footer-btn {
    flex: 1; max-width: 150px; padding: 7px 10px; border-radius: 16px; text-align: center;
    background: #fff; border: 1.5px solid rgba(168,85,247,0.22);
}
.all-view-footer-btn-full { max-width: none; flex: 1; }
.all-view-footer-btn-a4 {
    background: linear-gradient(135deg, #e8e0f0 0%, #f3eef8 100%);
    border-color: #9c7bb8;
}
.all-view-footer-btn-text { font-size: 0.68rem; color: #a855f7; font-weight: 600; line-height: 1.35; display: block; }
.all-view-footer-btn-a4 .all-view-footer-btn-text { color: #5e35b1; }

/* 菜品库选择弹窗 */
.wm-lib-select-overlay {
    position: absolute; inset: 0; z-index: 215; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; padding: 10px;
}
.wm-lib-select-overlay.show { display: flex; }
.wm-lib-select-modal {
    background: #fff; border-radius: 10px; width: 100%; max-height: 78%;
    display: flex; flex-direction: column; overflow: hidden;
}
.wm-lib-select-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
}
.wm-lib-select-title { font-size: 0.78rem; font-weight: 600; color: #333; }
.wm-lib-select-close { font-size: 0.95rem; color: #999; }
.wm-lib-select-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.wm-lib-categories {
    width: 72px; flex-shrink: 0; border-right: 1px solid #f0f0f0;
    overflow-y: auto; background: #fafafa;
}
.wm-lib-cat-item {
    padding: 8px 6px; font-size: 0.62rem; color: #666; text-align: center;
    border-left: 2px solid transparent;
}
.wm-lib-cat-item.active { color: #a855f7; font-weight: 600; background: #fff; border-left-color: #a855f7; }
.wm-lib-dishes { flex: 1; overflow-y: auto; padding: 6px; }
.wm-lib-dish-item {
    display: flex; align-items: center; gap: 6px; padding: 6px; margin-bottom: 4px;
    border-radius: 8px; border: 1px solid #f0f0f0;
}
.wm-lib-dish-item.selected { border-color: #a855f7; background: rgba(168,85,247,0.06); }
.wm-lib-dish-item .dish-thumb { width: 28px; height: 28px; }
.wm-lib-dish-item .dish-name { flex: 1; font-size: 0.68rem; }
.wm-lib-dish-add {
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid #a855f7;
    color: #a855f7; font-size: 0.85rem; line-height: 20px; text-align: center;
}
.wm-lib-dish-item.selected .wm-lib-dish-add { background: #a855f7; color: #fff; }
.wm-lib-select-footer {
    padding: 8px 12px; border-top: 1px solid #f0f0f0;
}
.wm-lib-select-confirm {
    width: 100%; height: 32px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff;
    font-size: 0.72rem; font-weight: 600;
}

/* AI 调整弹窗 */
.wm-adjust-overlay {
    position: absolute; inset: 0; z-index: 216; background: rgba(0,0,0,0.5);
    display: none; flex-direction: column; justify-content: flex-end;
}
.wm-adjust-overlay.show { display: flex; }
.wm-adjust-modal {
    background: #fff; border-radius: 12px 12px 0 0; max-height: 82%;
    display: flex; flex-direction: column; overflow: hidden;
}
.wm-adjust-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
}
.wm-adjust-mode-tab {
    font-size: 0.72rem; font-weight: 600; color: #a855f7;
    padding: 4px 10px; background: rgba(168,85,247,0.1); border-radius: 12px;
}
.wm-adjust-close { font-size: 0.95rem; color: #999; }
.wm-adjust-chat { flex: 1; overflow-y: auto; padding: 10px 12px; min-height: 140px; }
.wm-adjust-msg { margin-bottom: 10px; display: flex; gap: 6px; }
.wm-adjust-msg.ai .wm-adjust-bubble {
    background: #f3f4f6; border-radius: 10px; padding: 8px 10px;
    font-size: 0.68rem; color: #444; line-height: 1.5; max-width: 88%;
}
.wm-adjust-msg.user { justify-content: flex-end; }
.wm-adjust-msg.user .wm-adjust-bubble {
    background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff;
    border-radius: 10px; padding: 8px 10px; font-size: 0.68rem; max-width: 78%;
}
.wm-adjust-input-row {
    display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid #f0f0f0;
}
.wm-adjust-input {
    flex: 1; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 6px 10px; font-size: 0.68rem;
}
.wm-adjust-send {
    padding: 6px 12px; border-radius: 16px; border: none;
    background: #a855f7; color: #fff; font-size: 0.68rem; font-weight: 600;
}

/* 删除确认 */
.wm-confirm-overlay {
    position: absolute; inset: 0; z-index: 217; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.wm-confirm-overlay.show { display: flex; }
.wm-confirm-modal {
    background: #fff; border-radius: 10px; padding: 16px 14px 12px; width: 100%;
}
.wm-confirm-text { font-size: 0.75rem; color: #333; line-height: 1.5; margin: 0 0 14px; text-align: center; }
.wm-confirm-actions { display: flex; gap: 8px; }
.wm-confirm-btn {
    flex: 1; height: 32px; border: none; border-radius: 8px; font-size: 0.72rem; font-weight: 600;
}
.wm-confirm-btn.cancel { background: #f5f5f5; color: #666; }
.wm-confirm-btn.ok { background: #a855f7; color: #fff; }

/* 菜品库选择弹窗 — 对齐 recipe-library-select-modal */
.rl-select-overlay {
    position: absolute; inset: 0; z-index: 218; background: rgba(0,0,0,0.5);
    display: none; align-items: center; justify-content: center; padding: 8px;
}
.rl-select-overlay.show { display: flex; }
.rl-select-container {
    background: #fff; border-radius: 10px; width: 100%; height: 82%; max-height: 82%;
    display: flex; flex-direction: column; overflow: hidden;
}
.rl-select-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-bottom: 1px solid #e5e7eb;
}
.rl-select-title { font-size: 0.78rem; font-weight: 600; color: #4f46e5; }
.rl-select-close { font-size: 0.95rem; color: #9ca3af; }
.rl-select-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.rl-select-sidebar {
    width: 72px; flex-shrink: 0; background: #fafafa; border-right: 1px solid #e5e7eb;
    overflow-y: auto; padding: 6px 0;
}
.rl-select-cat-item {
    display: flex; align-items: center; justify-content: center; min-height: 38px;
    padding: 8px 4px; margin: 0 4px 4px; border-radius: 6px; font-size: 0.56rem;
    color: #374151; text-align: center; line-height: 1.35; position: relative; word-break: keep-all;
}
.rl-select-cat-item.active { background: #f0f4ff; color: #4f46e5; font-weight: 600; }
.rl-select-cat-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 16px; border-radius: 0 2px 2px 0; background: #6366f1;
}
.rl-select-dishes { flex: 1; overflow-y: auto; padding: 8px; background: #f8f9fa; }
.rl-select-dish-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px;
    border-radius: 8px; border: 1px solid #e5e7eb; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.rl-select-dish-item.selected { border-color: #6366f1; background: #f0f4ff; }
.rl-select-dish-item .dish-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.rl-select-dish-item .dish-name { flex: 1; font-size: 0.68rem; color: #111827; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-select-dish-add {
    width: 26px; height: 26px; border-radius: 50%; border: 2px solid #e5e7eb;
    color: #6366f1; font-size: 0.9rem; line-height: 22px; text-align: center; flex-shrink: 0; background: #fff;
}
.rl-select-dish-item.selected .rl-select-dish-add { background: #6366f1; border-color: #6366f1; color: #fff; font-size: 0.75rem; font-weight: 600; }
.rl-select-footer {
    border-top: 1px solid #e5e7eb; padding: 6px 8px 8px; background: #fff;
    display: flex; flex-direction: column; gap: 6px;
}
.rl-select-tags-wrap { overflow-x: auto; }
.rl-select-tags { display: flex; gap: 4px; flex-wrap: nowrap; }
.rl-select-tag {
    display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px;
    background: #f0f4ff; border-radius: 12px; font-size: 0.58rem; color: #4f46e5; white-space: nowrap;
}
.rl-select-confirm {
    width: 100%; height: 32px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
    font-size: 0.72rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.rl-select-count { font-size: 0.68rem; opacity: 0.9; }

/* 菜谱库整页 — 对齐 recipe-library */
#edit-screen-recipe-library { flex-direction: column; overflow: hidden; }
#edit-screen-recipe-library .wm-recipe-lib-page { flex: 1; min-height: 0; }
.wm-recipe-lib-page { display: flex; flex: 1; min-height: 0; background: #f8f9fa; }
.wm-recipe-lib-sidebar {
    width: 72px; flex-shrink: 0; background: #fff; border-right: 1px solid #e5e7eb; overflow-y: auto;
}
.wm-recipe-lib-sidebar .rl-decor { padding: 6px 4px 2px; flex-shrink: 0; }
.wm-recipe-lib-sidebar .rl-decor-bottom { padding: 2px 4px 6px; }
.wm-recipe-lib-sidebar .rl-decor-placeholder {
    width: 100%; height: 64px; border-radius: 6px; flex-shrink: 0;
}
.wm-recipe-lib-sidebar .rl-cat-item {
    padding: 10px 4px; font-size: 0.56rem; color: #374151; text-align: center;
    line-height: 1.35; border-bottom: 1px solid #f3f4f6; position: relative;
}
.wm-recipe-lib-sidebar .rl-cat-item.active {
    background: rgba(168,85,247,0.10); color: #a855f7; font-weight: 600;
}
.wm-recipe-lib-sidebar .rl-cat-item.active::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #a855f7;
}
.wm-recipe-lib-sidebar .rl-cat-create {
    margin: 6px 4px 8px; padding: 6px 2px; border: 1px dashed #c4b5fd; border-radius: 6px;
    font-size: 0.52rem; color: #7c3aed; text-align: center; line-height: 1.3;
}
.wm-recipe-lib-content { flex: 1; overflow-y: auto; padding: 6px 0; min-height: 0; background: #f5f5f5; }
.wm-rl-section { margin-bottom: 8px; }
.wm-rl-section-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 8px 6px 8px;
}
.wm-rl-section-title {
    font-size: 0.62rem; color: #fff; background: #e53e3e; padding: 3px 10px; border-radius: 4px;
}
.wm-rl-section-add {
    font-size: 0.58rem; color: #fff; background: #6366f1; padding: 4px 10px; border-radius: 12px;
    box-shadow: 0 1px 4px rgba(99,102,241,0.25);
}
.wm-rl-empty {
    margin: 0 8px 8px; padding: 16px 10px; background: #fff; border-radius: 8px; text-align: center;
    display: flex; flex-direction: column; gap: 4px; font-size: 0.62rem; color: #999;
}
.wm-rl-empty-sub { font-size: 0.55rem; color: #bbb; }
.wm-rl-dish-card {
    display: flex; align-items: center; gap: 6px; margin: 0 8px 6px; padding: 8px;
    background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.wm-rl-dish-card .dish-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.wm-rl-dish-card .dish-name { flex: 1; font-size: 0.68rem; color: #333; min-width: 0; }
.wm-rl-fav { font-size: 0.72rem; color: #ccc; flex-shrink: 0; }
.wm-rl-dish-detail {
    font-size: 0.58rem; color: #6366f1; padding: 2px 6px; border: 1px solid #e0e7ff; border-radius: 4px; flex-shrink: 0;
}

/* AI 调整弹窗 — 对齐 adjust-week-menu-modal */
.adj-overlay {
    position: absolute; inset: 0; z-index: 219; background: rgba(0,0,0,0.5);
    display: none; align-items: flex-start; justify-content: center; padding-top: 6%;
}
.adj-overlay.show { display: flex; }
.adj-container {
    background: #fff; border-radius: 10px; width: 96%; height: 88%; max-height: 88%;
    display: flex; flex-direction: column; overflow: hidden;
}
.adj-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.adj-mode-tab {
    padding: 5px 10px; border-radius: 14px; font-size: 0.62rem; font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff;
    box-shadow: 0 1px 4px rgba(102,126,234,0.25);
}
.adj-close {
    width: 24px; height: 24px; border-radius: 50%; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem; color: #6b7280;
}
.adj-chat-wrap {
    flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fafafa; overflow: hidden;
}
.adj-messages { flex: 1; overflow-y: auto; padding: 10px 10px 6px; min-height: 80px; }
.adj-msg-ai { display: flex; gap: 6px; margin-bottom: 10px; align-items: flex-start; }
.adj-msg-ai .adj-ai-icon { font-size: 0.85rem; flex-shrink: 0; }
.adj-msg-ai .adj-bubble {
    flex: 1; min-width: 0; background: #fff; border-radius: 8px; padding: 8px 10px;
    border: 1px solid #eee; font-size: 0.62rem; color: #444; line-height: 1.5;
    word-break: break-word; overflow-wrap: anywhere;
}
.adj-msg-user {
    display: flex; justify-content: flex-end; align-items: flex-start; gap: 6px;
    margin-bottom: 10px; padding-right: 2px;
}
.adj-msg-user .adj-bubble {
    max-width: 78%; background: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32;
    border-radius: 8px 8px 4px 8px; padding: 8px 10px; font-size: 0.62rem; line-height: 1.5;
    word-break: break-word; overflow-wrap: anywhere;
}
.adj-user-icon {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; font-size: 0.55rem; display: flex; align-items: center; justify-content: center;
}
.adj-intro-text { display: block; margin-bottom: 4px; }
.adj-stream-text { display: block; color: #888; margin-bottom: 4px; font-size: 0.58rem; }
.adj-start-adjust-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.adj-start-adjust-btn {
    padding: 5px 14px; background: #e53935; color: #fff; font-size: 0.6rem; font-weight: 600;
    border: none; border-radius: 14px; cursor: pointer;
}
.adj-preview-block { margin-top: 4px; }
.adj-preview-title { display: block; font-size: 0.58rem; font-weight: 600; color: #666; margin: 6px 0 4px; }
.adj-preview-day { font-size: 0.58rem; font-weight: 600; color: #333; margin: 6px 0 2px; }
.adj-preview-meal-label { font-size: 0.55rem; color: #888; margin: 2px 0 4px; }
.adj-preview-half-row { display: flex; gap: 4px; margin-bottom: 6px; }
.adj-preview-half { flex: 1; min-width: 0; padding: 4px; border-radius: 4px; }
.adj-preview-dishes-half { background: rgba(232,245,233,0.6); }
.adj-preview-staples-half { background: rgba(255,243,224,0.6); }
.adj-preview-half-title { font-size: 0.52rem; color: #999; display: block; margin-bottom: 3px; }
.adj-preview-tag {
    display: block; font-size: 0.52rem; padding: 2px 0; margin: 1px 0; line-height: 1.35;
}
.adj-preview-cat-inner { font-weight: 500; }
.adj-preview-dish-inner { color: #333; }
.adj-preview-cat-meat_main .adj-preview-cat-inner { color: #b8543a; }
.adj-preview-cat-veggie_dish .adj-preview-cat-inner { color: #2d7d46; }
.adj-preview-cat-soup_drink .adj-preview-cat-inner { color: #1976d2; }
.adj-preview-cat-staple_grains .adj-preview-cat-inner { color: #e65100; }
.adj-preview-cat-hot_dish .adj-preview-cat-inner { color: #c62828; }
.adj-preview-cat-appetizer .adj-preview-cat-inner { color: #6a1b9a; }
.adj-preview-cat-noodle_porridge .adj-preview-cat-inner { color: #f57c00; }
.adj-preview-cat-quick_home .adj-preview-cat-inner { color: #5d4037; }
.adj-preview-empty { font-size: 0.52rem; color: #bbb; }
.adj-apply-btn {
    margin-top: 6px; width: 100%; height: 28px; border: none; border-radius: 14px;
    background: #e53935; color: #fff;
    font-size: 0.62rem; font-weight: 600; cursor: pointer;
}
.adj-section {
    flex-shrink: 0; border-top: 1px solid #eee; background: #fafafa; padding: 8px 10px;
}
.adj-section-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.62rem; font-weight: 600; color: #333; margin-bottom: 6px;
}
.adj-toggle { font-size: 0.58rem; color: #6366f1; font-weight: 500; flex-shrink: 0; margin-left: 8px; }
.adj-tag-row {
    display: flex; flex-wrap: wrap; gap: 5px; align-items: flex-start;
}
.adj-dim-tag, .adj-lib-tag {
    display: inline-block; flex-shrink: 0;
    padding: 4px 9px; border-radius: 14px; font-size: 0.55rem; line-height: 1.35;
    white-space: nowrap; cursor: pointer;
}
.adj-lib-tag {
    background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb;
}
.adj-dim-tag {
    background: #f5f5f5; color: #333; border: 1px solid #e8e8e8;
}
.adj-dim-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-color: transparent;
    box-shadow: 0 1px 4px rgba(102,126,234,0.25);
}
.adj-input-area {
    flex-shrink: 0; display: flex; gap: 6px; padding: 6px 10px 4px; background: #fff; border-top: 1px solid #eee;
}
.adj-input-box {
    flex: 1; min-height: 32px; max-height: 56px; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: 6px 8px; font-size: 0.62rem; resize: none; line-height: 1.4; font-family: inherit;
}
.adj-send-btn {
    flex-shrink: 0; align-self: flex-end; padding: 6px 12px; border: none; border-radius: 8px;
    background: #6366f1; color: #fff; font-size: 0.62rem; font-weight: 600;
}
.adj-disclaimer {
    flex-shrink: 0; text-align: center; font-size: 0.52rem; color: #bbb; padding: 2px 0 6px; background: #fff;
}

/* 编辑家务 — 家务库全屏层 */
.hw-lib-overlay {
    position: absolute; inset: 0; z-index: 204; background: #f5f5f5;
    display: none; flex-direction: column; overflow: hidden;
}
.hw-lib-overlay.show { display: flex; }
.hw-lib-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; background: #fff; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.hw-lib-back { font-size: 0.68rem; color: #333; min-width: 36px; }
.hw-lib-title { font-size: 0.72rem; font-weight: 600; color: #1a1a1a; flex: 1; text-align: center; }
.hw-lib-header-right { min-width: 36px; }
.hw-lib-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.hw-lib-sidebar {
    width: 68px; flex-shrink: 0; background: #fafafa; border-right: 1px solid #e5e7eb;
    overflow-y: auto; padding: 4px 0;
}
.hw-lib-cat {
    position: relative;
    display: flex; align-items: center; justify-content: center; min-height: 36px;
    padding: 6px 4px; margin: 0 3px 3px; border-radius: 5px; font-size: 0.54rem;
    color: #374151; text-align: center; line-height: 1.3; word-break: break-all;
}
.hw-lib-cat.active {
    background: rgba(99, 102, 241, 0.1); color: #6366f1; font-weight: 600;
}
.hw-lib-cat.active::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: #6366f1; border-radius: 1px;
}
.hw-lib-items { flex: 1; overflow-y: auto; padding: 6px; background: #fff; }
.hw-lib-section { margin-bottom: 8px; }
.hw-lib-section-header {
    display: flex; align-items: center; padding: 4px 6px 3px 8px; margin-bottom: 4px;
}
.hw-lib-section-title {
    flex: 1; min-width: 0; font-size: 0.58rem; font-weight: 500; color: #fff;
    background: #10b981; padding: 4px 8px; border-radius: 3px;
    display: flex; align-items: center; gap: 4px; overflow: hidden;
}
.hw-lib-section-title::before {
    content: ''; width: 1px; height: 8px; background: rgba(255,255,255,0.6); border-radius: 1px;
}
.hw-lib-section-list { display: flex; flex-direction: column; gap: 5px; padding: 0 4px 4px; }
.hw-lib-item {
    display: flex; align-items: center; gap: 6px; padding: 6px 7px;
    background: #fff; border-radius: 6px; border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.hw-lib-item-thumb {
    width: 42px; height: 32px; border-radius: 4px; object-fit: cover; flex-shrink: 0;
    background: #f5f5f5; display: flex; align-items: center; justify-content: center;
    border: 1px solid #e5e7eb;
}
.hw-lib-item-placeholder { font-size: 1rem; }
.hw-lib-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hw-lib-item-name { font-size: 0.62rem; font-weight: 500; color: #111827; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-lib-item-meta { display: flex; align-items: center; justify-content: flex-end; }
.hw-lib-item-dur {
    font-size: 0.54rem; color: #6366f1; background: #eef2ff;
    padding: 2px 6px; border-radius: 3px; white-space: nowrap;
}
.hw-lib-empty { text-align: center; font-size: 0.62rem; color: #999; padding: 24px 8px; }

/* 编辑家务 — 删除确认（对齐小程序 wx.showModal） */
.hw-confirm-overlay {
    position: absolute; inset: 0; z-index: 220; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 24px 18px;
}
.hw-confirm-overlay.show { display: flex; }
.hw-confirm-modal {
    background: #fff; border-radius: 12px; width: 100%; overflow: hidden;
}
.hw-confirm-title {
    text-align: center; font-size: 0.78rem; font-weight: 600; color: #111;
    padding: 16px 14px 6px;
}
.hw-confirm-text {
    text-align: center; font-size: 0.66rem; color: #666; line-height: 1.55;
    margin: 0; padding: 0 14px 16px;
}
.hw-confirm-actions {
    display: flex; border-top: 1px solid #eee;
}
.hw-confirm-btn {
    flex: 1; height: 42px; border: none; background: #fff;
    font-size: 0.74rem; cursor: pointer;
}
.hw-confirm-btn + .hw-confirm-btn { border-left: 1px solid #eee; }
.hw-confirm-btn.cancel { color: #666; }
.hw-confirm-btn.danger { color: #ef4444; font-weight: 600; }

.hw-action-sheet-overlay {
    position: absolute; inset: 0; z-index: 219; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 18px;
}
.hw-action-sheet-overlay.show { display: flex; }

.hw-add-block-modal-overlay {
    position: absolute; inset: 0; z-index: 219; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 18px;
}
.hw-add-block-modal-overlay.show { display: flex; }
.hw-add-block-modal-panel {
    background: #fff; border-radius: 12px; width: 100%; max-width: 280px;
    max-height: 78vh; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: flex; flex-direction: column;
}
.hw-add-block-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px 8px;
}
.hw-add-block-modal-title { font-size: 0.78rem; font-weight: 600; color: #111827; }
.hw-add-block-modal-close {
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #f3f4f6; color: #6b7280; font-size: 0.72rem;
}
.hw-add-block-common-hint {
    padding: 0 14px 8px; font-size: 0.58rem; line-height: 1.4;
    color: #6366f1; text-align: center;
}
.hw-add-block-modal-body {
    padding: 0 12px 10px; overflow-y: auto; max-height: 52vh; flex: 1; min-height: 0;
}
.hw-add-block-option {
    display: flex; flex-direction: column; align-items: flex-start; width: 100%;
    border: 2px solid #7c5cff !important; border-radius: 10px;
    padding: 10px 12px; margin-bottom: 8px; background: #fff;
    text-align: left; cursor: pointer; box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.14);
}
.hw-add-block-option:active {
    background: rgba(124, 92, 255, 0.08);
    transform: scale(0.99);
}
.hw-add-block-option:last-child { margin-bottom: 2px; }
.hw-add-block-option-title {
    display: block; font-size: 0.7rem; font-weight: 600; color: #7c5cff; margin-bottom: 2px;
}
.hw-add-block-option-desc {
    display: block; font-size: 0.56rem; line-height: 1.35; color: #6b7280;
}
