/* ======================================================================
 *  每日热量目标 / 三餐分配 daily-calorie-target.css
 *  依赖 calc-common.css 母版，仅补充本页专属结构
 * ====================================================================== */

/* 模式切换分段（2 项）与宏量概览 */
.dct-macros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 4px;
}
.dct-macro {
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}
.dct-macro .name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text-muted);
    margin-bottom: 4px;
}
.dct-macro .g {
    display: block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}
.dct-macro .g small { font-size: 12px; font-weight: 600; color: var(--c-text-muted); margin-left: 1px; }
.dct-macro .kcal {
    display: block;
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--c-text-muted);
}
.dct-macro.is-p .g { color: #d9534f; }
.dct-macro.is-c .g { color: #d9822b; }
.dct-macro.is-f .g { color: #0a8f6a; }

/* 餐次表时间小字 */
.dct-meal-time {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-text-muted);
    margin-top: 2px;
}
.dct-table td, .dct-table th { white-space: nowrap; }
.dct-table td:first-child, .dct-table th:first-child { white-space: normal; }

/* 食物筐 */
.dct-basket { list-style: none; margin: 0; padding: 0; }
.dct-basket li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--c-border);
    font-size: 13.5px;
}
.dct-basket li:last-child { border-bottom: none; }
.dct-basket .k { color: var(--c-text-sub); }
.dct-basket .v { font-weight: 800; color: var(--c-text); white-space: nowrap; }

/* 警告区 */
.dct-warn {
    margin: 14px 0 2px;
    padding: 12px 14px;
    background: rgba(217, 130, 43, 0.09);
    border: 1px solid rgba(217, 130, 43, 0.32);
    border-radius: 12px;
}
.dct-warn-item {
    position: relative;
    font-size: 12.5px;
    line-height: 1.6;
    color: #a85b12;
}
[data-theme="dark"] .dct-warn-item { color: #f0b46f; }
.dct-warn-item + .dct-warn-item { margin-top: 6px; }

/* toast */
.dct-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(16px);
    background: rgba(20, 28, 42, 0.94);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-width: calc(100vw - 32px);
    text-align: center;
}
.dct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-theme="dark"] .dct-toast { background: rgba(226, 232, 240, 0.94); color: #131c31; }

@media (max-width: 560px) {
    .dct-macros { gap: 8px; }
    .dct-macro { padding: 10px 6px; }
    .dct-macro .g { font-size: 18px; }
    .dct-basket li { flex-direction: column; align-items: flex-start; gap: 3px; }
    .dct-basket .v { white-space: normal; }
}
