/* ============================================================
   色温对照表 · 照明色卡手册 / 衬线标题 + 渐变色尺
   前缀 cct- · 暖纸白 + 琥珀 + 深棕 + 青灰，浅色默认；深色整套覆盖
   ============================================================ */
.cct-page, .cct-modal, .cct-toast {
    --cct-bg: #fbf7ee;
    --cct-bg2: #f3e9d7;
    --cct-panel: #fffdf8;
    --cct-panel2: #f7f1e5;
    --cct-ink: #3b3226;
    --cct-sub: #7c7161;
    --cct-line: #e8dcc6;
    --cct-line2: #d7c4a2;
    --cct-amber: #c47a12;
    --cct-amber-deep: #96590a;
    --cct-amber-soft: #fbeacb;
    --cct-slate: #4b6b7a;
    --cct-green: #4d7a55;
    --cct-red: #b84d38;
    --cct-shadow: 0 18px 42px rgba(94, 72, 35, .12);
    --cct-shadow-sm: 0 3px 12px rgba(94, 72, 35, .08);
    --cct-serif: Georgia, "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
    --cct-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] .cct-page, :root[data-theme="dark"] .cct-modal, :root[data-theme="dark"] .cct-toast {
    --cct-bg: #16130f;
    --cct-bg2: #211b13;
    --cct-panel: #1c1813;
    --cct-panel2: #262017;
    --cct-ink: #f2e8d6;
    --cct-sub: #b6a68c;
    --cct-line: #383021;
    --cct-line2: #54462d;
    --cct-amber: #e9b45c;
    --cct-amber-deep: #f5cf8c;
    --cct-amber-soft: #352712;
    --cct-slate: #8fb6c9;
    --cct-green: #8dc79a;
    --cct-red: #ef9079;
    --cct-shadow: 0 18px 42px rgba(0, 0, 0, .5);
    --cct-shadow-sm: 0 3px 12px rgba(0, 0, 0, .34);
}
.cct-page {
    background: radial-gradient(1000px 420px at 86% -10%, var(--cct-bg2), transparent 62%), var(--cct-bg);
    color: var(--cct-ink); padding: 0 0 58px; min-height: 60vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px; line-height: 1.82;
}
.cct-wrap { max-width: 1160px; margin: 0 auto; padding: 18px 16px 0; }
.cct-page .detail-breadcrumb { font-size: 13px; color: var(--cct-sub); margin: 10px 0 18px; }
.cct-page .detail-breadcrumb a { color: var(--cct-sub); text-decoration: none; }
.cct-page .detail-breadcrumb a:hover { color: var(--cct-amber); }
.cct-page .detail-breadcrumb .current { color: var(--cct-amber); font-weight: 700; }
.cct-page .detail-breadcrumb .sep { margin: 0 8px; opacity: .55; }

.cct-hero { display: grid; grid-template-columns: 1.04fr .96fr; gap: 24px; align-items: stretch; margin-bottom: 20px; }
.cct-hero > * { min-width: 0; }
.cct-kicker { display: inline-block; font: 700 10.5px var(--cct-mono); letter-spacing: 1.7px; color: var(--cct-amber); border-bottom: 1px solid var(--cct-line2); padding-bottom: 5px; margin-bottom: 14px; }
.cct-page h1 { font: 800 33px/1.28 var(--cct-serif); margin: 0 0 13px; letter-spacing: -.5px; }
.cct-sub { font-size: 14.5px; line-height: 2; color: var(--cct-sub); margin: 0 0 18px; }
.cct-sub b { color: var(--cct-ink); }
.cct-hero-entry { background: var(--cct-panel); border: 1px solid var(--cct-line2); border-radius: 8px; padding: 14px 16px; box-shadow: var(--cct-shadow-sm); }
.cct-hero-entry > label { display: block; font: 700 12px var(--cct-serif); margin-bottom: 8px; }
.cct-hero-entry input[type="range"] { width: 100%; accent-color: var(--cct-amber); }
.cct-hero-entry-row { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.cct-hero-entry-row > span { font: 700 14px var(--cct-mono); color: var(--cct-sub); }
.cct-input { width: 100%; box-sizing: border-box; border: 1px solid var(--cct-line2); background: var(--cct-panel2); color: var(--cct-ink); border-radius: 6px; padding: 9px 11px; font: 600 13.5px var(--cct-mono); outline: none; }
.cct-input--num { width: 110px; flex: none; }
.cct-input:focus { border-color: var(--cct-amber); }
.cct-unit { font: 600 12px var(--cct-mono); color: var(--cct-sub); }
.cct-btn {
    border: 1px solid var(--cct-line2); background: var(--cct-panel); color: var(--cct-ink);
    border-radius: 6px; padding: 9px 15px; font-size: 13.5px; font-weight: 680; cursor: pointer;
    font-family: inherit; transition: transform .12s, background .12s;
}
.cct-btn:hover { transform: translateY(-1px); border-color: var(--cct-amber); }
.cct-btn--main { background: var(--cct-amber); border-color: var(--cct-amber-deep); color: #fff; }
:root[data-theme="dark"] .cct-btn--main { color: #241605; }
.cct-btn-ai { border-color: var(--cct-slate); }
.cct-btn-ai:hover { background: var(--cct-amber-soft); }

.cct-swatch { background: var(--cct-panel); border: 1px solid var(--cct-line2); border-radius: 8px; padding: 16px; box-shadow: var(--cct-shadow); display: flex; flex-direction: column; }
.cct-swatch-head { display: flex; justify-content: space-between; font: 700 10.5px var(--cct-mono); letter-spacing: 1.4px; color: var(--cct-sub); border-bottom: 1px dashed var(--cct-line2); padding-bottom: 8px; }
.cct-swatch-head b { color: var(--cct-amber); }
.cct-swatch-chip { flex: 1; min-height: 168px; border-radius: 6px; margin: 12px 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 12px; border: 1px solid rgba(0,0,0,.08); transition: background .18s; }
.cct-swatch-chip span { background: rgba(28,24,18,.72); color: #fff; font: 700 13px var(--cct-mono); padding: 4px 9px; border-radius: 4px; }
.cct-swatch-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cct-swatch-meta > div { border: 1px solid var(--cct-line); border-radius: 5px; padding: 8px 10px; background: var(--cct-panel2); }
.cct-swatch-meta span { display: block; font-size: 11px; color: var(--cct-sub); }
.cct-swatch-meta b { font: 700 12.5px var(--cct-mono); }
.cct-ruler { height: 22px; border-radius: 4px; border: 1px solid var(--cct-line2); position: relative; cursor: pointer; }
.cct-ruler i { position: absolute; top: -4px; width: 3px; height: 30px; background: var(--cct-ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--cct-panel); transition: left .15s; }
.cct-ruler-labels { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font: 600 10px var(--cct-mono); color: var(--cct-sub); }

.cct-body { display: grid; grid-template-columns: 282px 1fr; gap: 20px; align-items: start; }
.cct-body > * { min-width: 0; }
.cct-panel { background: var(--cct-panel); border: 1px solid var(--cct-line2); border-radius: 8px; padding: 18px; box-shadow: var(--cct-shadow-sm); position: sticky; top: 14px; }
.cct-panel h2, .cct-main h2 { font: 800 19px var(--cct-serif); margin: 0 0 4px; }
.cct-hint { font-size: 12.5px; color: var(--cct-sub); margin: 0 0 16px; line-height: 1.75; }
.cct-field { margin-bottom: 15px; }
.cct-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.cct-label em { font-style: normal; font: 500 11px var(--cct-mono); color: var(--cct-sub); text-align: right; }
.cct-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.cct-presets button { border: 1px solid var(--cct-line2); background: var(--cct-panel2); color: var(--cct-sub); border-radius: 999px; padding: 5px 11px; font: 600 11.5px var(--cct-mono); cursor: pointer; }
.cct-presets button:hover, .cct-presets button.is-on { border-color: var(--cct-amber); color: var(--cct-amber); }
.cct-inline { display: flex; align-items: center; gap: 8px; }
.cct-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cct-actions .cct-btn--main { grid-column: 1 / -1; }
.cct-actions--row { display: flex; flex-wrap: wrap; margin: 12px 0; }
.cct-err { color: var(--cct-red); font-size: 12.5px; margin: 10px 0 0; }
.cct-err[hidden] { display: none; }
.cct-ai { margin-top: 14px; border-top: 1px dashed var(--cct-line2); padding-top: 12px; }
.cct-ai-status { font-size: 11.5px; line-height: 1.7; color: var(--cct-sub); margin: 0 0 6px; }
.cct-ai-box { font-size: 12.5px; line-height: 1.8; }
.cct-ai-box p { margin: 4px 0; }
.cct-main { display: flex; flex-direction: column; gap: 18px; }
.cct-scenes, .cct-rooms, .cct-wb, .cct-compare { background: var(--cct-panel); border: 1px solid var(--cct-line2); border-radius: 8px; padding: 18px; box-shadow: var(--cct-shadow-sm); }
.cct-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cct-section-head span { font: 600 11.5px var(--cct-mono); color: var(--cct-sub); }
.cct-scroll { overflow-x: auto; margin-top: 12px; }
.cct-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 600px; }
.cct-table th { text-align: left; font: 700 10.5px var(--cct-mono); letter-spacing: .5px; color: var(--cct-sub); border-bottom: 2px solid var(--cct-line2); padding: 8px 9px; }
.cct-table td { border-bottom: 1px solid var(--cct-line); padding: 8px 9px; }
.cct-table tbody tr { cursor: pointer; }
.cct-table tbody tr:hover { background: var(--cct-panel2); }
.cct-table td:nth-child(2), .cct-table td:nth-child(5) { font-family: var(--cct-mono); }
.cct-chip { display: inline-block; width: 46px; height: 16px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); vertical-align: middle; }
.cct-tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font: 700 10.5px var(--cct-mono); background: var(--cct-amber-soft); color: var(--cct-amber-deep); }
.cct-room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.cct-room { border: 1px solid var(--cct-line); border-left: 4px solid var(--cct-amber); border-radius: 5px; padding: 11px 12px; background: var(--cct-panel2); }
.cct-room b { font: 700 14px var(--cct-serif); }
.cct-room em { font-style: normal; display: block; font: 700 12px var(--cct-mono); color: var(--cct-amber); margin: 3px 0; }
.cct-room p { font-size: 11.5px; line-height: 1.75; color: var(--cct-sub); margin: 0; }
.cct-wb-box { margin-top: 14px; background: var(--cct-panel2); border: 1px solid var(--cct-line); border-radius: 6px; padding: 14px 16px; }
.cct-wb-box b { font: 700 15px var(--cct-serif); }
.cct-wb-box p { font-size: 13px; line-height: 1.9; margin: 6px 0 0; }
.cct-mini { border: 0; background: transparent; color: var(--cct-red); cursor: pointer; font-size: 12px; }

.cct-modal[hidden] { display: none !important; }
.cct-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(44, 32, 18, .6); }
.cct-sheet { width: min(530px, 100%); max-height: 86vh; overflow: auto; background: var(--cct-panel); border: 1px solid var(--cct-line2); border-radius: 8px; padding: 20px; box-shadow: var(--cct-shadow); }
.cct-sheet-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--cct-amber); padding-bottom: 10px; margin-bottom: 12px; }
.cct-sheet-head b { font: 800 13px var(--cct-mono); letter-spacing: .6px; }
.cct-modal-x { border: 0; background: transparent; color: var(--cct-sub); font-size: 24px; line-height: 1; cursor: pointer; }
.cct-sheet p { font-size: 13.5px; line-height: 1.9; margin: 6px 0; }
.cct-sheet-acts { margin-top: 16px; text-align: right; }
.cct-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(18px); z-index: 10000; background: var(--cct-ink); color: var(--cct-panel); padding: 9px 18px; border-radius: 5px; font: 600 13px var(--cct-mono); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.cct-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 980px) {
    .cct-hero, .cct-body { grid-template-columns: 1fr; }
    .cct-panel { position: static; }
    .cct-page h1 { font-size: 27px; }
}
@media (max-width: 560px) {
    .cct-wrap { padding: 12px 10px 0; }
    .cct-swatch-meta { grid-template-columns: 1fr; }
    .cct-ruler-labels { font-size: 9px; }
    .cct-table { min-width: 560px; }
}
