/* ============================================================
   hair-color-care-cost-calc · 染发烫发与护发项目价格
   视觉主题：沙龙奶油墙 + 玫瑰棕 + 香槟金 + 镜面高光
   ============================================================ */

.hcc-root {
    --u-bg: #f7f2ec;
    --u-surface: #fffdfa;
    --u-surface-2: #f5ede5;
    --u-line: #e8dcd0;
    --u-line-strong: #d6c4b2;
    --u-ink: #2b211d;
    --u-ink-2: #5c4b43;
    --u-ink-3: #8c7a71;
    --u-accent: #8c4a3f;
    --u-accent-2: #6e362e;
    --u-accent-soft: #f6e9e5;
    --u-good: #2f7d5c;
    --u-good-soft: #e6f2ec;
    --u-warn: #a9680a;
    --u-warn-soft: #fbeedb;
    --u-bad: #b03a2e;
    --u-bad-soft: #fbe9e7;
    --hcc-gold: #c9a227;
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(201, 162, 39, .10), transparent 60%),
        radial-gradient(70% 50% at 0% 0%, rgba(140, 74, 63, .08), transparent 60%),
        var(--u-bg);
    background-attachment: fixed;
}

:root[data-theme="dark"] .hcc-root {
    --u-bg: #14100e;
    --u-surface: #1d1815;
    --u-surface-2: #271f1b;
    --u-line: #332a25;
    --u-line-strong: #463a33;
    --u-ink: #f2ebe6;
    --u-ink-2: #c9b8b0;
    --u-ink-3: #9a8880;
    --u-accent: #d98f7f;
    --u-accent-2: #f0b6a8;
    --u-accent-soft: #2c1f1b;
    --u-good: #4ec99a;
    --u-good-soft: #13291f;
    --u-warn: #e5a445;
    --u-warn-soft: #2c2214;
    --u-bad: #f08a7d;
    --u-bad-soft: #2d1a17;
    --hcc-gold: #e0bd57;
}

/* ---------------- 首屏 ---------------- */
.hcc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 26px;
    align-items: stretch;
    margin-bottom: 24px;
}

.hcc-kicker {
    background: var(--u-accent-soft);
    color: var(--u-accent-2);
}

.hcc-hero-copy {
    background: var(--u-surface);
    border: 1px solid var(--u-line);
    border-radius: var(--u-r-lg);
    padding: 26px 28px;
    box-shadow: var(--u-shadow-1);
    border-top: 4px solid var(--u-accent);
}

.hcc-hero-copy .uk-hero__title { margin-bottom: 10px; }
.hcc-hero-copy .uk-hero__lead { margin-bottom: 16px; }

.hcc-hero-note {
    margin: 14px 0 0;
    font-size: var(--u-fs-xs);
    color: var(--u-ink-3);
}

.hcc-hero-art {
    position: relative;
    background:
        linear-gradient(160deg, var(--u-surface) 0%, var(--u-surface-2) 100%);
    border: 1px solid var(--u-line);
    border-radius: var(--u-r-lg);
    box-shadow: var(--u-shadow-1);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
}

.hcc-hero-art::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55), transparent 62%);
    pointer-events: none;
}
:root[data-theme="dark"] .hcc-hero-art::after {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .10), transparent 62%);
}

.hcc-swatches {
    display: flex;
    gap: 6px;
}
.hcc-swatches span {
    width: 26px;
    height: 46px;
    border-radius: 6px;
    background: var(--c);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    border: 1px solid rgba(0, 0, 0, .08);
}

.hcc-brush { width: 78px; height: auto; }
.hcc-brush-body { fill: var(--u-accent); }
.hcc-brush-band { fill: var(--hcc-gold); }
.hcc-brush-handle { fill: #2b211d; }
:root[data-theme="dark"] .hcc-brush-handle { fill: #d9cec7; }
.hcc-brush-dot { fill: var(--hcc-gold); opacity: .55; }

.hcc-hero-readout {
    width: 100%;
    text-align: center;
    background: var(--u-surface-2);
    border: 1px solid var(--u-line);
    border-radius: var(--u-r);
    padding: 12px 14px;
}
.hcc-hero-readout span { display: block; font-size: var(--u-fs-xs); color: var(--u-ink-3); margin-bottom: 4px; }
.hcc-hero-readout b {
    display: block;
    font-family: var(--u-mono);
    font-size: 26px;
    letter-spacing: -.02em;
    color: var(--u-accent-2);
}
.hcc-hero-readout small { font-size: 11.5px; color: var(--u-ink-3); }

/* ---------------- 项目清单 ---------------- */
.hcc-panel { position: relative; }
.hcc-mt { margin-top: 14px; }

.hcc-items { min-width: 720px; }
.hcc-items td { padding: 8px 10px; }
.hcc-items .hcc-name {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}
.hcc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.hcc-items select,
.hcc-items input {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--u-line-strong);
    border-radius: 9px;
    background: var(--u-surface);
    color: var(--u-ink);
    font-family: inherit;
    font-size: var(--u-fs-xs);
}
.hcc-items select:focus,
.hcc-items input:focus {
    outline: none;
    border-color: var(--u-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--u-accent) 16%, transparent);
}
.hcc-items input[readonly] {
    background: var(--u-surface-2);
    color: var(--u-ink-2);
}
.hcc-items .num { font-family: var(--u-mono); white-space: nowrap; }
.hcc-items .hcc-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: var(--u-surface-2);
    overflow: hidden;
    margin-top: 5px;
}
.hcc-items .hcc-bar i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--u-accent);
    border-radius: 999px;
}

.hcc-row-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hcc-hint { font-size: var(--u-fs-xs); color: var(--u-ink-3); margin: 10px 0 0; }
.hcc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--u-line);
}

/* ---------------- 染发对比 ---------------- */
.hcc-compare2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.hcc-cmp {
    border: 1px solid var(--u-line);
    border-radius: var(--u-r);
    padding: 16px 18px;
    background: var(--u-surface-2);
}
.hcc-cmp h3 { font-size: var(--u-fs-base); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.hcc-cmp h3 b { font-family: var(--u-mono); font-size: 20px; color: var(--u-accent-2); margin-left: auto; }
.hcc-cmp--win { border-color: color-mix(in srgb, var(--u-good) 40%, transparent); background: var(--u-good-soft); }
.hcc-cmp--win h3 b { color: var(--u-good); }
.hcc-cmp dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: var(--u-fs-xs); }
.hcc-cmp dt { color: var(--u-ink-3); }
.hcc-cmp dd { margin: 0; text-align: right; font-family: var(--u-mono); color: var(--u-ink); }
.hcc-cmp .hcc-cmp-note { margin: 10px 0 0; font-size: var(--u-fs-xs); color: var(--u-ink-3); line-height: 1.7; }

/* ---------------- 占比 ---------------- */
.hcc-structure {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.hcc-donut { display: flex; justify-content: center; }
.hcc-donut svg { width: 100%; max-width: 220px; height: auto; }
.hcc-donut circle { transition: stroke-dasharray .3s ease; }
.hcc-donut .hcc-donut-hole { fill: var(--u-surface); }
.hcc-donut .hcc-donut-label { fill: var(--u-ink); font-size: 13px; font-weight: 700; }
.hcc-donut .hcc-donut-sub { fill: var(--u-ink-3); font-size: 10.5px; }

.hcc-bars { display: grid; gap: 10px; }
.hcc-bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 92px; gap: 10px; align-items: center; font-size: var(--u-fs-xs); }
.hcc-bar-row span:first-child { color: var(--u-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcc-bar-track { height: 10px; border-radius: 999px; background: var(--u-surface-2); overflow: hidden; }
.hcc-bar-track i { display: block; height: 100%; border-radius: 999px; background: var(--u-accent); }
.hcc-bar-row b { text-align: right; font-family: var(--u-mono); color: var(--u-ink); }

/* ---------------- 规则 ---------------- */
.hcc-rules { gap: 14px; }
.hcc-rule {
    background: var(--u-surface-2);
    border: 1px solid var(--u-line);
    border-radius: var(--u-r);
    padding: 16px 18px;
}
.hcc-rule-no {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--u-accent);
    color: #fff;
    font-weight: 700;
    font-size: var(--u-fs-xs);
    margin-bottom: 8px;
}
.hcc-rule h3 { font-size: var(--u-fs-base); margin-bottom: 6px; }
.hcc-rule p { margin: 0; font-size: var(--u-fs-sm); line-height: 1.78; color: var(--u-ink-2); }

.hcc-example {
    margin-top: 16px;
    background: var(--u-accent-soft);
    border: 1px solid color-mix(in srgb, var(--u-accent) 22%, transparent);
    border-radius: var(--u-r);
    padding: 16px 18px;
}
.hcc-example h3 { font-size: var(--u-fs-base); margin-bottom: 8px; color: var(--u-accent-2); }
.hcc-example p { margin: 0 0 8px; font-size: var(--u-fs-sm); line-height: 1.85; color: var(--u-ink-2); }
.hcc-example p:last-child { margin-bottom: 0; }
.hcc-example b { color: var(--u-accent-2); }
.hcc-example-note { font-size: var(--u-fs-xs) !important; color: var(--u-ink-3) !important; }

/* ---------------- A4 打印稿 ---------------- */
.hcc-sheet-wrap { padding: 0; overflow: hidden; }
.hcc-sheet-head {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--u-surface-2);
    border-bottom: 1px solid var(--u-line);
}
.hcc-sheet-head p { margin: 6px 0 0; font-size: var(--u-fs-sm); color: var(--u-ink-3); }
.hcc-sheet-acts { display: flex; flex-wrap: wrap; gap: 8px; }

.hcc-sheet {
    margin: 0;
    padding: 26px 28px;
    background: #fff;
    color: #2b211d;
    font-size: 13px;
    line-height: 1.7;
}
.hcc-sheet .uk-table { min-width: 0; color: #2b211d; }
.hcc-sheet .uk-table th,
.hcc-sheet .uk-table td { border-bottom: 1px solid #e2d8cd; padding: 8px 10px; font-size: 12.5px; }
.hcc-sheet .uk-table thead th { background: #f5ede5; color: #6d5b52; }

.hcc-sheet-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 2px solid #8c4a3f;
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.hcc-sheet-top h3 { font-size: 18px; margin: 0 0 4px; color: #2b211d; }
.hcc-sheet-top p { margin: 0; font-size: 12.5px; color: #6d5b52; }
.hcc-sheet-meta { display: grid; gap: 4px; font-size: 12px; color: #6d5b52; text-align: right; }
.hcc-sheet-meta b { color: #2b211d; font-family: var(--u-mono); }

.hcc-sheet-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 12.5px;
    color: #5c4b43;
    margin-bottom: 12px;
}
.hcc-sheet-info b { color: #2b211d; }

.hcc-sheet-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.hcc-sheet-summary > div { background: #f5ede5; border-radius: 8px; padding: 9px 12px; }
.hcc-sheet-summary span { display: block; font-size: 11.5px; color: #6d5b52; }
.hcc-sheet-summary b { font-family: var(--u-mono); font-size: 16px; color: #2b211d; }

.hcc-sheet-notes { margin-top: 14px; font-size: 11.5px; color: #6d5b52; line-height: 1.8; }
.hcc-sheet-notes p { margin: 0 0 5px; }
.hcc-sheet-notes b { color: #2b211d; }

.hcc-sheet-foot {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px dashed #cdbcae;
    font-size: 11px;
    color: #8c7a71;
}

.hcc-comments { margin-top: 22px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
    .hcc-hero { grid-template-columns: minmax(0, 1fr); }
    .hcc-structure { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
    .hcc-hero-copy { padding: 18px 16px; }
    .hcc-swatches span { width: 20px; height: 36px; }
    .hcc-sheet { padding: 18px 16px; }
    .hcc-sheet-head { padding: 16px; }
    .hcc-bar-row { grid-template-columns: 78px minmax(0, 1fr) 78px; }
}

/* ---------------- 打印 ---------------- */
@media print {
    .hcc-hero-art,
    .hcc-row-tools,
    .hcc-actions,
    .hcc-sheet-acts,
    .hcc-comments,
    .hcc-sheet-head { display: none !important; }
    /* 只打印 A4 预算单：隐藏除打印区外的全部内容 */
    .hcc-root .uk-shell > *:not(.hcc-sheet-wrap) { display: none !important; }
    .hcc-sheet-wrap {
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    .hcc-root { background: #fff !important; }
    .hcc-sheet { padding: 0; }
}
