    :root { color-scheme: dark; --bg:#080d17; --panel:#101826; --panel2:#172234; --line:#334155; --text:#eef4ff; --muted:#a8b3c7; --blue:#5b8cff; --green:#28a86b; --red:#cc4545; }
    * { box-sizing:border-box; }
    body { margin:0; font-family:Inter, Segoe UI, Arial, sans-serif; background:var(--bg); color:var(--text); }
    main { width:min(1880px, calc(100vw - 24px)); margin:0 auto; padding:20px 0 48px; }
    header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
    h1 { margin:0; font-size:28px; }
    h2 { margin:0 0 14px; font-size:24px; }
    h3 { margin:0 0 10px; font-size:18px; }
    button, select, input { font:inherit; }
    button, .button { border:1px solid #3f5d89; background:#1d4ed8; color:white; min-height:38px; padding:8px 14px; border-radius:6px; cursor:pointer; font-weight:700; }
    button.secondary { background:#172234; }
    button:disabled { opacity:.55; cursor:not-allowed; }
    select, input, textarea { width:100%; min-height:38px; border:1px solid #34425a; background:#0d1420; color:var(--text); border-radius:6px; padding:7px 10px; }
    textarea { min-height:96px; resize:vertical; font-family:Consolas, Monaco, monospace; }
    select[multiple] { min-height:92px; }
    label { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; font-weight:700; }
    .panel { border:1px solid var(--line); background:var(--panel); border-radius:8px; padding:16px; margin-bottom:16px; }
    .filter-bar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
    .filter-bar .field-filter { margin-bottom:0; }
    .field-filter { position:relative; display:inline-block; margin-bottom:12px; }
    .field-filter-toggle { background:#172234; border:1px solid #34425a; color:var(--text); min-height:38px; padding:8px 14px; border-radius:6px; cursor:pointer; font-weight:700; }
    .field-filter-menu { position:absolute; z-index:30; top:calc(100% + 4px); left:0; min-width:240px; max-height:320px; overflow:auto; background:#0d1420; border:1px solid #34425a; border-radius:6px; padding:8px; box-shadow:0 8px 24px rgba(0,0,0,.4); }
    .field-filter-menu.hidden { display:none; }
    .field-filter-actions { display:flex; gap:8px; margin-bottom:8px; }
    .field-filter-actions button { min-height:30px; padding:4px 10px; font-size:12px; font-weight:700; }
    .field-filter-group-label { font-size:11px; color:var(--muted); font-weight:800; text-transform:uppercase; margin:8px 0 4px; }
    .field-filter-item { display:flex; align-items:center; gap:8px; padding:4px 6px; border-radius:4px; cursor:pointer; font-weight:600; }
    .field-filter-item:hover { background:#172234; }
    .field-filter-item input { width:auto; min-height:auto; margin:0; }
    .tabs { position:sticky; top:0; z-index:20; display:flex; gap:8px; background:rgba(8,13,23,.96); border-bottom:1px solid var(--line); padding:10px 0; margin-bottom:16px; backdrop-filter:blur(10px); overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .tabs .tab-button { flex:0 0 auto; white-space:nowrap; }
    .tab-button { background:#111a2a; border-color:#334155; color:#cbd5e1; }
    .tab-button.active { background:#2563eb; border-color:#60a5fa; color:#fff; }
    .tab-page.hidden { display:none !important; }
    .section-jump { position:sticky; top:59px; z-index:19; background:rgba(8,13,23,.96); border:1px solid var(--line); border-radius:8px; padding:10px; margin-bottom:16px; backdrop-filter:blur(10px); }
    .section-jump-inner { max-width:420px; }
    .chart-panel { border:1px solid var(--line); background:#ffffff; border-radius:8px; padding:0; margin-bottom:18px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.28); }
    .chart-panel > .collapsible-header { margin:0; padding:12px 16px; background:#f1f5fb; border-bottom:1px solid #dbe3ef; }
    .chart-panel > .collapsible-header .collapsible-title { font-size:16px; }
    .chart-panel > .chart-subtitle { padding:8px 16px 0; margin:0; text-align:left; }
    .chart-panel > .collapsible-body { padding:12px 16px 16px; }
    .chart-canvas { width:100%; height:420px; display:block; }
    /* 0.Overview rule-based diagnosis panel */
    .diag-panel { margin-top:14px; border:1px solid #d8e1ee; border-radius:10px; background:#fff; color:#0b1730; overflow:hidden; }
    .diag-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:11px 14px; background:#eef3fb; border-bottom:1px solid #dbe3ef; }
    .diag-title { margin:0; font-size:15px; font-weight:900; color:#132a4b; }
    .diag-head-right { display:inline-flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .diag-head-right .secondary { min-height:32px; padding:4px 12px; font-size:12px; }
    .diag-window { display:inline-flex; align-items:center; gap:8px; margin:0; color:#475569; font-size:12px; font-weight:800; }
    .diag-window select { width:auto; min-height:32px; padding:4px 8px; background:#fff; color:#0b1730; border-color:#c7d3e6; }
    .diag-body { padding:12px 14px; display:flex; flex-direction:column; gap:9px; }
    .diag-context { color:#334155; font-size:12.5px; font-weight:700; margin-bottom:2px; }
    .diag-tier { display:inline-block; margin-left:8px; padding:1px 9px; border-radius:999px; background:#132a4b; color:#fff; font-weight:900; font-size:11px; }
    .diag-issues { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
    @media (max-width:1100px) { .diag-issues { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
    @media (max-width:640px) { .diag-issues { grid-template-columns:1fr; } }
    .diag-card { border:1px solid #e2e8f0; border-left-width:5px; border-radius:8px; padding:7px 10px; background:#f8fafc; }
    .diag-card-title { font-weight:800; font-size:12.5px; display:flex; align-items:center; gap:7px; line-height:1.25; }
    .diag-pri-tag { font-size:10px; font-weight:900; color:#fff; background:#64748b; border-radius:4px; padding:1px 5px; flex:none; }
    .diag-card-why { color:#334155; font-size:11.5px; margin-top:3px; line-height:1.4; }
    .diag-card-action { color:#0b1730; font-size:11.5px; margin-top:4px; }
    .diag-ai { background:#f5f3ff; border:1px solid #ddd6fe; border-radius:10px; padding:10px 12px; margin:2px 0 8px; }
    .diag-ai-status { font-size:12.5px; color:#5b21b6; font-weight:700; }
    .diag-ai-status.error { color:#dc2626; }
    .diag-ai-head { font-size:12.5px; font-weight:800; color:#5b21b6; margin-bottom:4px; }
    .diag-ai-body { font-size:12.5px; color:#0b1730; line-height:1.5; }
    .diag-ai-body h4 { margin:8px 0 3px; font-size:13px; }
    .diag-ai-body ul { margin:3px 0 3px 18px; } .diag-ai-body p { margin:4px 0; }
    .ai-settings { max-width:760px; }
    .ai-modes { display:flex; flex-direction:column; gap:8px; margin-bottom:6px; }
    .ai-mode { display:flex; gap:10px; align-items:flex-start; font-size:13px; color:var(--text); padding:10px 12px; border:1px solid var(--line); background:var(--panel2); border-radius:8px; cursor:pointer; margin-bottom:0; font-weight:400; }
    .ai-mode input[type="radio"] { width:16px; height:16px; min-height:0; min-width:16px; flex:0 0 16px; margin:2px 0 0; padding:0; accent-color:var(--blue); }
    .ai-mode:has(input:checked) { border-color:var(--blue); background:color-mix(in srgb, var(--blue) 14%, var(--panel2)); }
    .ai-mode span { color:var(--text); }
    .ai-byok { border-top:1px dashed var(--line); margin-top:6px; padding-top:10px; }
    .diag-card-region { border-left-style:dashed; }
    .cla-analysis { border:1px solid #d8e1ee; border-radius:10px; background:#fff; color:#0b1730; overflow:hidden; }
    .diag-cla-card { border-left-width:5px; }
    .diag-cla-card.diag-lvl-strong { border-left-color:#059669; background:#ecfdf5; }
    .diag-cla-card.diag-lvl-effective { border-left-color:#22c55e; background:#f0fdf4; }
    .diag-cla-card.diag-lvl-mixed { border-left-color:#f97316; background:#fff7ed; }
    .diag-cla-card.diag-lvl-negative { border-left-color:#ef4444; background:#fef2f2; }
    .diag-cla-card.diag-lvl-neutral { border-left-color:#64748b; background:#f8fafc; }
    .diag-cla-card .diag-pri-tag { background:#334155; }
    .diag-cla-card.diag-lvl-strong .diag-pri-tag { background:#059669; } .diag-cla-card.diag-lvl-effective .diag-pri-tag { background:#22c55e; } .diag-cla-card.diag-lvl-mixed .diag-pri-tag { background:#f97316; } .diag-cla-card.diag-lvl-negative .diag-pri-tag { background:#ef4444; } .diag-cla-card.diag-lvl-neutral .diag-pri-tag { background:#64748b; }
    .cla-group { margin-top:5px; font-size:11.5px; } .cla-group > b { display:block; margin-bottom:2px; }
    .cla-timeline { position:relative; display:flex; flex-direction:column; gap:10px; padding-left:18px; }
    .cla-timeline::before { content:"Newest → older"; position:absolute; left:0; top:0; bottom:0; width:2px; background:linear-gradient(#2563eb 0 92%, transparent); color:#64748b; font-size:10px; font-weight:900; writing-mode:vertical-rl; text-orientation:mixed; padding-top:8px; }
    .cla-timeline::after { content:""; position:absolute; left:-4px; bottom:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:8px solid #2563eb; }
    .cla-timeline-row { position:relative; display:grid; grid-template-columns:190px minmax(0,1fr); gap:12px; align-items:start; }
    .cla-date-rail { position:relative; border-right:1px solid #d8e1ee; padding-right:12px; display:flex; flex-direction:column; gap:6px; }
    .cla-timeline-dot { position:absolute; left:-25px; top:7px; width:12px; height:12px; border:3px solid #fff; border-radius:50%; background:#2563eb; box-shadow:0 0 0 2px #93c5fd; }
    .cla-date { font-size:13px; font-weight:900; color:#0f2748; }
    .cla-days { color:#64748b; font-size:11px; font-weight:700; }
    .cla-row-main { min-width:0; }
    .cla-row-label { color:#64748b; font-size:10px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; margin:1px 0 5px; }
    .cla-mini-row { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
    .cla-effect-row { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); align-items:stretch; gap:8px; }
    .cla-effect-group { border:1px solid #e2e8f0; border-radius:10px; background:rgba(255,255,255,.72); padding:7px; min-width:0; width:100%; max-width:100%; }
    .cla-effect-group--single, .cla-effect-group--double, .cla-effect-group--many { min-width:0; }
    .cla-effect-group-title { color:#334155; font-size:10px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; margin:0 0 5px; }
    .cla-effect-group .cla-mini-row { margin-bottom:0; flex-wrap:nowrap; gap:6px; overflow-x:visible; padding-bottom:0; }
    .cla-effect-group .cla-mini-card { flex:1 1 0; min-width:0; max-width:none; }
    .cla-effect-group .cla-mini-card { padding:6px 7px; font-size:11px; line-height:1.2; }
    .cla-effect-group .cla-mini-card small { font-size:9px; }
    .cla-effect-group .cla-mini-card b, .cla-effect-group .cla-mini-card span, .cla-effect-group .cla-mini-card em, .cla-effect-group .cla-mini-card small { overflow-wrap:anywhere; }
    .cla-quick-grid { display:grid; grid-template-columns:repeat(4, minmax(150px, 1fr)); gap:8px; }
    .cla-quick-card { padding:8px; min-width:0; }
    .cla-quick-card .diag-card-title { font-size:12px; line-height:1.25; margin-bottom:5px; }
    .cla-quick-card .diag-card-why, .cla-quick-card .diag-card-action { font-size:11.5px; line-height:1.3; }
    .cla-mini-card { display:inline-flex; flex-direction:column; gap:2px; border:1px solid #dbe5f2; border-radius:10px; background:#fff; color:#0b1730; padding:6px 8px; font-size:11.5px; line-height:1.25; max-width:280px; }
    .cla-mini-card--change { background:#f8fafc; }
    .cla-mini-card--up { border-color:#bbf7d0; background:#f0fdf4; }
    .cla-mini-card--down { border-color:#fecaca; background:#fef2f2; }
    .cla-mini-card--small_lift { border-color:#bbf7d0; background:#f0fdf4; }
    .cla-mini-card--meaningful_lift { border-color:#86efac; background:#ecfdf5; }
    .cla-mini-card--strong_lift { border-color:#4ade80; background:#dcfce7; box-shadow:inset 3px 0 0 #16a34a; }
    .cla-mini-card--slight { border-color:#fed7aa; background:#fff7ed; }
    .cla-mini-card--meaningful { border-color:#fecaca; background:#fef2f2; }
    .cla-mini-card--severe { border-color:#fca5a5; background:#fee2e2; box-shadow:inset 3px 0 0 #ef4444; }
    .cla-mini-card--flat { border-color:#e2e8f0; background:#f8fafc; color:#64748b; }
    .cla-mini-card small { color:#9a3412; font-size:10px; font-weight:900; line-height:1; text-transform:uppercase; }
    .cla-mini-card--small_lift small, .cla-mini-card--meaningful_lift small, .cla-mini-card--strong_lift small { color:#047857; }
    .cla-mini-card--meaningful small, .cla-mini-card--severe small { color:#b91c1c; }
    .cla-mini-card em { font-style:normal; font-weight:900; color:#475569; }
    .cla-mini-card--up em { color:#047857; }
    .cla-mini-card--down em { color:#dc2626; }
    .cla-context-tag { display:inline-block; margin-left:5px; color:#64748b; font-size:8.5px; font-style:normal; font-weight:900; letter-spacing:.04em; text-transform:uppercase; opacity:.78; }
    .cmp-analysis { margin-top:12px; border:1px solid #d8e1ee; border-radius:8px; background:#f7f9fd; color:#0b1730; padding:8px 10px; }
    .cmp-analysis .diag-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
    .cmp-analysis .diag-body { padding:8px 2px 2px; }
    .cmp-deep { border-left:4px solid #7c3aed; background:#f6f4fd; }
    .diag-bench-line { font-size:11.5px; margin-top:4px; color:#0b1730; }
    .diag-bench-ok { color:#15803d; font-weight:800; } .diag-bench-warn { color:#b45309; font-weight:800; } .diag-bench-bad { color:#dc2626; font-weight:800; }
    .diag-region-line { font-size:11px; color:#0b1730; margin-top:3px; line-height:1.4; }
    .diag-num { font-weight:800; color:#0b1730; }
    .diag-num-up { color:#15803d; }
    .diag-num-down { color:#dc2626; }
    .diag-card-chart { color:#64748b; font-size:11px; margin-top:4px; font-weight:700; }
    .diag-pri-P0 { border-left-color:#dc2626; background:#fef2f2; } .diag-pri-P0 .diag-pri-tag { background:#dc2626; }
    .diag-pri-P1 { border-left-color:#ea580c; background:#fff7ed; } .diag-pri-P1 .diag-pri-tag { background:#ea580c; }
    .diag-pri-P2 { border-left-color:#d97706; background:#fffbeb; } .diag-pri-P2 .diag-pri-tag { background:#d97706; }
    .diag-pri-P3 { border-left-color:#2563eb; background:#eff6ff; } .diag-pri-P3 .diag-pri-tag { background:#2563eb; }
    .diag-pri-ok { border-left-color:#16a34a; background:#f0fdf4; }
    .diag-healthy { display:flex; flex-wrap:wrap; gap:7px; margin-top:2px; }
    .diag-chip { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; border-radius:999px; padding:3px 10px; font-size:11.5px; font-weight:800; }
    .diag-scorecard { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:8px; margin:2px 0 4px; }
    @media (max-width:820px) { .diag-scorecard { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
    .diag-grade { border:1px solid #e2e8f0; border-left-width:5px; border-radius:8px; padding:8px 11px; background:#f8fafc; display:flex; flex-direction:column; gap:1px; }
    .diag-grade-label { font-size:11px; font-weight:800; color:#64748b; text-transform:uppercase; letter-spacing:.03em; }
    .diag-grade-val { font-size:20px; font-weight:900; line-height:1.05; color:#0b1730; }
    .diag-grade-tag { font-size:12px; font-weight:800; }
    .diag-lvl-great { border-left-color:#15803d; background:#ecfdf3; } .diag-lvl-great .diag-grade-tag { color:#15803d; }
    .diag-lvl-good  { border-left-color:#16a34a; background:#f0fdf4; } .diag-lvl-good  .diag-grade-tag { color:#16a34a; }
    .diag-lvl-warn  { border-left-color:#d97706; background:#fffbeb; } .diag-lvl-warn  .diag-grade-tag { color:#b45309; }
    .diag-lvl-bad   { border-left-color:#dc2626; background:#fef2f2; } .diag-lvl-bad   .diag-grade-tag { color:#dc2626; }
    .diag-compo { color:#334155; font-size:12.5px; background:#eef3fb; border:1px solid #dbe3ef; border-radius:8px; padding:7px 11px; }
    .diag-selfbase { background:#f5f3ff; border-color:#ddd6fe; }
    .diag-weektrend { background:#ecfdf5; border-color:#bbf7d0; }
    .diag-comprange { background:#fffbeb; border-color:#fde68a; }
    .diag-partial { color:#b45309; font-weight:600; }
    .diag-lvl-na { border-left-color:#94a3b8; background:#f1f5f9; } .diag-lvl-na .diag-grade-tag { color:#64748b; }
    .diag-grade-pov { font-size:11px; font-weight:800; margin-top:1px; }
    .diag-dir-up { color:#16a34a; } .diag-dir-down { color:#dc2626; } .diag-dir-flat { color:#64748b; }
    .chart-expand-btn { min-height:30px; padding:4px 10px; font-size:12px; white-space:nowrap; }
    .chart-modal-backdrop { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(2,6,23,.74); backdrop-filter:blur(4px); }
    .chart-modal { width:min(96vw, 1500px); max-height:94vh; border:1px solid #d8e1ee; border-top:4px solid var(--accent, #5b8cff); border-radius:12px; background:#fff; color:#0b1730; box-shadow:0 24px 70px rgba(0,0,0,.45); overflow:hidden; }
    .chart-modal-head { display:flex; align-items:center; gap:12px; padding:12px 16px; background:#f1f5fb; border-bottom:1px solid #dbe3ef; }
    .chart-modal-title { flex:1; color:#111827; font-size:18px; font-weight:900; }
    .chart-modal-body { padding:14px 18px 18px; }
    .chart-modal .chart-canvas { height:min(72vh, 680px); }
    .chart-tooltip-host { position:relative; }
    .chart-tooltip { position:absolute; z-index:20; min-width:160px; max-width:260px; padding:8px 10px; border-radius:6px; background:rgba(17,24,39,.92); color:#fff; font-size:12px; line-height:1.35; pointer-events:none; box-shadow:0 8px 24px rgba(15,23,42,.24); }
    .chart-tooltip-title { font-weight:800; margin-bottom:5px; }
    .chart-tooltip-row { display:flex; align-items:center; gap:5px; white-space:nowrap; }
    .chart-tooltip-dot { width:9px; height:9px; border-radius:2px; flex:none; box-shadow:0 0 0 1px rgba(255,255,255,.65); }
    .summary-section { --section-accent:#4f83ff; --section-accent-soft:#eef4ff; background:#f3f6fb; color:#0b1730; border:1px solid color-mix(in srgb, var(--section-accent) 28%, #d8e1ee); border-left:5px solid var(--section-accent); border-radius:8px; padding:0 6px 10px; margin-bottom:18px; overflow:hidden; }
    .summary-section--daily { --section-accent:#4f83ff; --section-accent-soft:#edf4ff; }
    .summary-section--monthly { --section-accent:#8b5cf6; --section-accent-soft:#f4efff; }
    .summary-section--weekly { --section-accent:#14b8a6; --section-accent-soft:#ecfdf8; }
    .summary-section-head { padding:14px 12px 12px; margin:0 -6px 12px; background:linear-gradient(90deg, color-mix(in srgb, var(--section-accent) 18%, #fff), var(--section-accent-soft)); border-bottom:1px solid color-mix(in srgb, var(--section-accent) 25%, #d8e1ee); }
    .summary-section-head h2 { margin:0 0 2px; color:#132a4b; font-size:16px; letter-spacing:1.8px; text-transform:uppercase; }
    .summary-chart-grid { display:grid; grid-template-columns:repeat(4, minmax(220px, 1fr)); gap:14px; }
    .summary-chart-grid .chart-panel { margin-bottom:0; box-shadow:none; }
    .summary-chart-grid .chart-panel > .chart-subtitle { padding:0 18px; text-align:left; }
    .summary-chart-grid .chart-canvas { height:270px; }
    .summary-compare-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:12px; margin:12px 0 14px; }
    .summary-compare-context { grid-column:1 / -1; color:#475569; font-size:12px; font-weight:700; padding:0 2px; }
    .summary-compare-card { border:1px solid #d8e1ee; border-top:3px solid var(--accent, #4f83ff); border-radius:10px; background:#fff; box-shadow:0 1px 4px rgba(15,23,42,.08); padding:12px 14px; min-height:78px; }
    .summary-compare-label { color:#475569; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
    .summary-compare-value { color:#0b1730; font-size:22px; line-height:1.1; font-weight:900; margin-top:6px; }
    .summary-compare-delta { font-size:12px; font-weight:800; margin-top:6px; }
    .tier1-panel { margin-top:10px; border:1px solid #bfd7ff; border-left:4px solid #4f83ff; border-radius:10px; background:linear-gradient(180deg,#fff,#f8fbff); color:#0b1730; overflow:hidden; box-shadow:0 1px 4px rgba(15,23,42,.07); }
    .tier1-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:8px 12px; background:#eef4ff; border-bottom:1px solid #d8e6ff; }
    .tier1-head h3 { margin:0; font-size:14px; font-weight:900; color:#132a4b; }
    .tier1-actions { display:flex; align-items:center; gap:8px; }
    .tier1-actions .secondary { min-height:28px; padding:3px 10px; font-size:11px; }
    .tier1-body { padding:6px 10px; display:flex; flex-direction:column; gap:6px; }
    .tier1-grid { display:grid; grid-template-columns:1.45fr repeat(3, minmax(180px, .9fr)); gap:7px; }
    .tier1-main-card, .tier1-mix-card, .tier1-scenario-card, .tier1-scenario-note { border:1px solid #d8e1ee; border-radius:8px; background:#fff; padding:5px 9px; }
    .tier1-main-card { border-top:3px solid #4f83ff; }
    .tier1-mix-core { border-top:3px solid #64748b; }
    .tier1-mix-new { border-top:3px solid #22c55e; }
    .tier1-mix-revival { border-top:3px solid #fb7185; }
    .tier1-card-label { color:#17345d; font-size:10px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; }
    .tier1-chip-row { display:flex; align-items:center; gap:8px; min-width:0; white-space:nowrap; }
    .tier1-chip-row-main { gap:7px; }
    .tier1-chip-label { color:#17345d; font-size:10px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; flex:none; }
    .tier1-chip { display:inline-flex; align-items:center; gap:3px; padding:2px 7px; border-radius:999px; background:#f8fafc; color:#0f2748; font-size:11px; line-height:1.2; flex:none; }
    .tier1-chip b { font-weight:900; }
    .tier1-chip-strong { background:#eef4ff; color:#0b1730; font-size:12px; font-weight:900; }
    .tier1-chip-muted { background:transparent; color:#94a3b8; padding-left:0; padding-right:0; }
    .tier1-chip-good { background:#dcfce7; color:#047857; font-weight:900; }
    .tier1-chip-bad { background:#fee2e2; color:#b91c1c; font-weight:900; }
    .tier1-mix-card { display:flex; align-items:center; min-height:30px; }
    .tier1-main-card { display:flex; align-items:center; gap:10px; min-height:30px; overflow:hidden; }
    .tier1-main-card > .tier1-card-label { flex:none; }
    .tier1-main-card > .tier1-main-value { flex:none; font-size:15px; }
    .tier1-main-card > .muted { flex:1; min-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#94a3b8; font-size:11px; }
    .tier1-main-card > .positive, .tier1-main-card > .negative { flex:none; white-space:nowrap; }
    .tier1-scenarios { display:flex; flex-direction:column; gap:7px; }
    .tier1-scenario-note { background:#f8fafc; font-size:11.5px; line-height:1.3; }
    .tier1-scenario-list { display:grid; grid-template-columns:repeat(5, minmax(150px, 1fr)); gap:7px; }
    .tier1-scenario-card { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; }
    .tier1-scenario-card span { color:#475569; font-weight:800; }
    .tier1-scenario-card b { text-align:right; }
    .tier1-plan-card { border:1px solid #d8e1ee; border-radius:9px; background:#fff; padding:7px 8px; font-size:11px; display:flex; flex-direction:column; gap:5px; }
    .tier1-plan-top { display:flex; align-items:center; justify-content:space-between; gap:6px; color:#0b1730; }
    .tier1-plan-top strong { font-size:15px; line-height:1; }
    .tier1-plan-desc { color:#475569; line-height:1.25; min-height:0; }
    .tier1-plan-rows { display:flex; flex-direction:column; gap:2px; }
    .tier1-plan-rows span { display:flex; justify-content:space-between; gap:8px; }
    .tier1-plan-rows em { color:#475569; font-style:normal; font-weight:800; }
    .tier1-plan-gap { border-top:1px solid rgba(15,23,42,.10); padding-top:4px; font-weight:900; }
    .tier1-plan-risk { color:#b45309; font-weight:800; line-height:1.25; }
    .tier1-lift-hard em { color:#b91c1c; }
    .tier1-lift-medium em { color:#b45309; }
    .tier1-lift-easy em { color:#047857; }
    .tier1-whatif { border:1px solid #d8e1ee; border-radius:8px; background:#fff; padding:7px 9px; }
    .tier1-whatif-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:12px; margin-bottom:6px; }
    .tier1-whatif-grid { display:grid; grid-template-columns:repeat(3, minmax(250px, 1fr)); gap:6px; }
    .tier1-whatif-row { display:grid; grid-template-columns:minmax(92px, 1fr) 62px 48px 64px 48px; align-items:center; gap:6px; border:1px solid #eef2f7; border-radius:7px; padding:5px 7px; margin:0; font-size:11px; }
    .tier1-whatif-name em { display:block; color:#64748b; font-style:normal; font-size:10px; font-weight:700; margin-top:1px; }
    .tier1-whatif-row label { display:flex; flex-direction:column; gap:2px; margin:0; color:#64748b; font-size:9px; font-weight:800; line-height:1; }
    .tier1-whatif-row label span { white-space:nowrap; }
    .tier1-whatif-input { width:58px; min-height:24px; padding:2px 5px; font-size:11px; text-align:right; background:#fff; color:#0b1730; border:1px solid #cbd5e1; border-radius:6px; }
    .tier1-whatif-row strong { text-align:right; color:#0f2748; }
    .tier1-whatif-help { margin-top:5px; color:#64748b; font-size:10.5px; }
    .tier1-ok { background:#f0fdf4; border-color:#86efac; color:#047857; }
    .tier1-warn { background:#fffbeb; border-color:#fcd34d; color:#92400e; }
    .tier1-bad { background:#fff1f2; border-color:#fecdd3; color:#be123c; }
    .summary-load-error { border:1px solid #fecaca; border-left:4px solid #ef4444; border-radius:10px; background:#fff7f7; color:#991b1b; padding:12px 14px; font-size:13px; line-height:1.45; }
    .summary-detail-chart-grid { display:grid; grid-template-columns:repeat(4, minmax(220px, 1fr)); gap:14px; margin-top:14px; }
    .summary-detail-chart-grid .chart-panel { margin-bottom:0; box-shadow:none; }
    .summary-detail-chart-grid .chart-canvas { height:250px; }
    .summary-change-section { --section-accent:#64748b; --section-accent-soft:#f8fafc; background:#f3f6fb; color:#0b1730; border:1px solid #d8e1ee; border-left:5px solid var(--section-accent); border-radius:8px; padding:0 6px 10px; margin-bottom:18px; overflow:hidden; }
    .summary-change-grid { display:grid; grid-template-columns:2fr 1.25fr; gap:14px; }
    .summary-change-card { border:1px solid #d8e1ee; border-left:4px solid var(--card-accent, #64748b); border-radius:10px; background:#fff; box-shadow:0 1px 6px rgba(15,23,42,.08); padding:14px 16px; }
    .summary-change-card--done { --card-accent:#14b8a6; grid-row:span 2; }
    .summary-change-card--wip { --card-accent:#f97316; }
    .summary-change-card--planning { --card-accent:#8b5cf6; }
    .summary-change-card--risk { --card-accent:#ef4444; }
    .summary-change-diagnostic { grid-column:1 / -1; }
    .summary-change-card h3 { display:flex; align-items:center; gap:8px; margin:0 0 10px; color:#0b1730; font-size:14px; font-weight:900; }
    .summary-change-entry { display:grid; grid-template-columns:120px 1fr; gap:8px; padding:6px 0; border-top:1px solid #eef2f7; }
    .summary-change-entry:first-of-type { border-top:0; padding-top:0; }
    .summary-change-date { color:#0f2748; font-size:11px; font-weight:900; line-height:1.8; white-space:nowrap; }
    .summary-change-chips { display:flex; flex-wrap:wrap; gap:5px; align-items:flex-start; }
    .summary-change-chip { display:inline-flex; align-items:center; border:1px solid #dbe5f2; border-radius:12px; background:#f8fafc; color:#0b1730; padding:3px 8px; font-size:12px; line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
    .summary-change-extra { margin-top:8px; border-top:1px solid #eef2f7; padding-top:8px; }
    .summary-change-extra > summary { cursor:pointer; color:#284d7a; font-size:12px; font-weight:900; }
    .summary-change-entry--extra { opacity:.9; }
    .summary-change-icon { width:18px; text-align:center; }
    .summary-table-collapsible { margin-top:14px; border:1px solid #d8e1ee; border-radius:10px; background:#fff; overflow:hidden; box-shadow:0 1px 4px rgba(15,23,42,.08); }
    .summary-table-head { display:flex; align-items:center; gap:12px; padding:10px 12px; background:#f1f5fb; border-bottom:1px solid #dbe3ef; }
    .summary-table-head h3 { flex:1; margin:0; color:#132a4b; font-size:14px; font-weight:900; }
    .summary-table-head button { min-height:30px; padding:4px 10px; font-size:12px; white-space:nowrap; }
    .summary-table-wrap { margin-top:14px; }
    .summary-table-collapsible .summary-table-wrap { margin-top:0; }
    .summary-data-table { border-color:#d8e1ee; background:#fff; }
    .summary-data-table table { font-size:12px; }
    .summary-data-table th { background:#284d7a; color:#fff; }
    .summary-data-table td { color:#0b1730; background:#fff; border-color:#e0e7f0; }
    .summary-data-table th:first-child { background:#284d7a; color:#fff; }
    .summary-data-table td:first-child { background:#fff; color:#0b1730; }
    .summary-data-table .summary-days-col { width:64px; }
    .summary-data-table .summary-delta-col { width:54px; padding-left:2px; padding-right:2px; white-space:nowrap; }
    .summary-cell-value { font-weight:800; line-height:1.2; }
    .summary-cell-delta { margin-top:2px; font-size:11px; line-height:1.15; white-space:nowrap; }
    .summary-cell-delta:empty { display:none; }
    .summary-delta-up { color:#059669; font-weight:800; }
    .summary-delta-down { color:#dc2626; font-weight:800; }
    .change-log-grid { display:grid; grid-template-columns:repeat(2, minmax(240px, 1fr)); gap:12px; margin-top:14px; }
    .change-log-card { border:1px solid #334155; background:#0d1420; border-radius:8px; padding:12px; }
    .change-log-card h3 { margin:0 0 8px; font-size:16px; color:#dbeafe; }
    .compare-filter-grid { display:grid; grid-template-columns:repeat(2, minmax(280px, 1fr)); gap:14px; }
    .compare-filter-card { border:1px solid #334155; border-radius:10px; background:#0d1420; padding:12px; }
    .compare-filter-card h3 { margin:0 0 10px; color:#dbeafe; }
    .compare-summary { display:grid; grid-template-columns:repeat(2, minmax(220px, 1fr)); gap:12px; margin-bottom:14px; }
    .compare-summary-card { border:1px solid #d8e1ee; background:#fff; color:#0b1730; border-radius:10px; padding:12px; }
    .compare-summary-card b { display:block; margin-bottom:6px; color:#132a4b; }
    .compare-group-title { color:#dbeafe; margin:18px 0 8px; font-size:18px; font-weight:900; }
    .map-compare-table .compare-metric-col { width:25%; }
    .map-compare-table th:first-child,
    .map-compare-table td:first-child { width:25%; text-align:left; }
    .map-compare-table td.compare-win { color:#064e3b; font-weight:900; }
    .map-compare-table td.compare-win-light { background:#ecfdf5; }
    .map-compare-table td.compare-win-medium { background:#bbf7d0; }
    .map-compare-table td.compare-win-strong { background:#86efac; }
    @media (max-width:900px) { .compare-filter-grid, .compare-summary { grid-template-columns:1fr; } }
    .change-log-card ul { margin:0; padding-left:18px; line-height:1.45; }
    .change-log-card li { margin:6px 0; }
    .change-log-date { color:#93c5fd; font-weight:800; }
    .change-log-entry { border-top:1px solid #26364f; padding-top:10px; margin-top:10px; }
    .change-log-entry:first-of-type { border-top:0; padding-top:0; margin-top:0; }
    .filters { display:grid; gap:12px; }
    .filter-row { display:grid; gap:12px; align-items:end; }
    .filter-row.two { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .filter-row.three { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
    .filter-row.four { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
    .status { color:var(--muted); min-height:24px; margin:8px 0 0; }
    .actions { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
    .compare-prev-wrap { display:inline-flex; align-items:center; gap:6px; }
    .compare-prev-wrap input { width:60px; min-height:38px; }
    .compare-prev-label { margin:0; color:var(--muted); font-weight:700; }
    .inline-check { display:inline-flex; align-items:center; gap:6px; min-height:38px; color:var(--muted); font-weight:800; margin:0; }
    .inline-check input { width:auto; min-height:0; }
    .hidden { display:none !important; }
    .section-title { background:#c9d8f2; color:#07101c; padding:14px 16px; margin:-16px -16px 14px; font-size:22px; font-weight:800; }
    .table-wrap { overflow:visible; border:1px solid var(--line); background:#090f1a; width:100%; }
    /* Scrollable table body with a frozen header (Daily/Weekly Chart tables). */
    .table-wrap--scroll { overflow:auto; max-height:68vh; }
    .table-wrap--scroll thead th { position:sticky; z-index:2; top:0; }
    .table-wrap--scroll thead tr.group-head th { top:0; z-index:3; }
    .table-wrap--scroll thead tr.group-head + tr th { top:26px; }
    .table-wrap--scroll.summary-data-table thead tr.group-head th { top:0; z-index:4; }
    .table-wrap--scroll.summary-data-table thead tr:not(.group-head) th { top:26px; z-index:3; }
    table { border-collapse:collapse; width:100%; table-layout:fixed; font-size:10px; line-height:1.2; }
    th, td { border:1px solid #d1d5db55; padding:3px 4px; text-align:right; overflow:hidden; text-overflow:clip; white-space:normal; word-break:normal; }
    th { background:#0f172a; color:white; text-align:center; font-weight:800; }
    td:first-child, th:first-child { text-align:left; background:#0f172a; color:white; font-weight:800; }
    #officialMapsTable table { font-size:12px; line-height:1.35; }
    #officialMapsTable th, #officialMapsTable td { padding:6px 8px; white-space:nowrap; text-overflow:ellipsis; }
    #officialMapsTable .table-wrap--scroll { max-height:72vh; }
    #officialMapsTable .official-maps-data-table { border-color:#d8e1ee; background:#fff; }
    #officialMapsTable .official-maps-data-table th { background:#284d7a; color:#fff; }
    #officialMapsTable .official-maps-data-table td { color:#0b1730; background:#fff; border-color:#e0e7f0; }
    #officialMapsTable .official-maps-data-table th:first-child { background:#284d7a; color:#fff; }
    #officialMapsTable .official-maps-data-table td:first-child { background:#fff; color:#0b1730; }
    #officialMapsTable .official-maps-data-table thead th { top:0 !important; z-index:5; }
    .group-head th { color:white; font-size:14px; padding:4px; }
    .total-row td { background:#334155 !important; color:white !important; font-weight:900; }
    .ai-box { background:#0c1320; border:1px solid #2d405f; border-radius:8px; padding:16px; line-height:1.55; color:#e8eefb; }
    .ai-box h3 { color:#93c5fd; margin-top:0; }
    .ai-box ul { padding-left:22px; }
    .collapsible-header { display:flex; align-items:center; gap:12px; margin-bottom:8px; }
    .collapsible-title { cursor:pointer; }
    .collapsible-toggle { white-space:nowrap; }
    /* Overview sub-table cards (Active User, New & Revival User, …): each is a self-contained
       group — accent header bar on top, then fields + table + AI analysis nested inside. */
    .map-table-block { border:1px solid var(--line); background:var(--panel2); border-radius:10px; margin-bottom:18px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.28); }
    .map-table-block > .collapsible-header { margin:0; padding:12px 16px; background:#0d1526; border-bottom:1px solid var(--line); }
    .map-table-block > .collapsible-header .collapsible-title { font-size:17px; font-weight:800; color:#eaf1ff; letter-spacing:.2px; }
    .map-table-block > .collapsible-body { padding:16px; }
    .map-table-block > .collapsible-body > .filter-bar { margin-bottom:12px; padding-bottom:12px; border-bottom:1px dashed #2b3a55; }
    .map-table-block > .collapsible-body .ai-collapsible { margin-top:16px; border-top:1px dashed #2b3a55; padding-top:12px; }
    .table-accent-dot { width:12px; height:12px; border-radius:3px; flex:none; box-shadow:0 0 0 3px rgba(255,255,255,.06); }
    .chart-subtitle { color:#475569; font-size:13px; text-align:center; margin:2px 0 8px; line-height:1.4; }
    /* Performance-chart group accordions */
    .chart-group { margin-bottom:14px; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
    .chart-group-header { margin:0; padding:12px 16px; gap:12px; }
    .chart-group-header .collapsible-title { font-size:18px; }
    .chart-group-body { padding:12px; background:#0b1220; }
    .chart-group-body .chart-panel { margin-bottom:12px; }
    .chart-group-body .chart-panel:last-child { margin-bottom:0; }
    /* Table section: keep the blue title bar bleeding to the panel edges, toggle on the right. */
    .section-collapsible-header { background:#c9d8f2; margin:-16px -16px 14px; padding-right:12px; gap:0; }
    .section-collapsible-header .section-title { flex:1; margin:0; }
    .ai-collapsible { margin-top:18px; }
    .ai-collapsible-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .ai-collapsible-title { font-size:1.17em; font-weight:700; color:#dbeafe; cursor:pointer; }
    .ai-toggle { white-space:nowrap; }
    .ai-collapsible .ai-box { margin-top:10px; }
    .admin-sheet { border:1px solid #334155; background:#0d1420; border-radius:8px; padding:12px; margin-bottom:12px; }
    .admin-sheet-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
    .admin-sheet-title { font-weight:800; color:#dbeafe; }
    .admin-accordion { border:1px solid var(--line); background:#0d1420; border-radius:8px; margin-bottom:12px; }
    .admin-accordion > summary { cursor:pointer; padding:14px 16px; font-weight:800; font-size:16px; color:#dbeafe; list-style:none; display:flex; align-items:center; gap:10px; }
    .admin-accordion > summary::-webkit-details-marker { display:none; }
    .admin-accordion > summary::before { content:"\25b8"; color:var(--muted); transition:transform .15s; }
    .admin-accordion[open] > summary::before { transform:rotate(90deg); }
    .admin-accordion[open] > summary { border-bottom:1px solid var(--line); }
    .admin-accordion-body { padding:16px; }
    .fc-group { border:1px solid #3a4a63; background:#0b1119; border-radius:8px; padding:12px; margin-bottom:14px; }
    .fc-group-head { display:flex; gap:12px; align-items:flex-end; margin-bottom:10px; }
    .fc-group-head .grow { flex:1; }
    .fc-color { max-width:64px; padding:2px; min-height:38px; }
    .fc-table { width:100%; border-collapse:collapse; }
    .fc-table th { text-align:left; font-size:11px; color:var(--muted); text-transform:uppercase; padding:4px 6px; border-bottom:1px solid #26354b; white-space:nowrap; }
    .fc-table td { padding:3px 6px; vertical-align:middle; }
    .fc-table input, .fc-table select { min-height:30px; padding:3px 6px; width:100%; }
    .fc-transform { display:flex; gap:4px; }
    .fc-transform select { width:96px; flex:none; }
    .fc-transform input { width:56px; flex:none; }
    .fc-x { min-height:30px; padding:2px 9px; }
    .admin-group, .admin-perm { border:1px solid #334155; background:#0b1119; border-radius:8px; padding:12px; margin-bottom:12px; }
    .admin-perm-title { font-weight:800; color:#dbeafe; margin-bottom:10px; }
    .admin-perm-restriction { margin-top:14px; }
    .admin-perm-restriction > label { display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:700; color:var(--text); margin-bottom:0; }
    .admin-perm-restriction > label > input { width:auto; min-height:auto; margin:0; }
    .admin-perm-restriction > [data-region-wrap] > label { display:block; font-size:12px; color:var(--muted); font-weight:700; margin:0 0 6px; }
    .admin-checks { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:6px; }
    .admin-checks label { display:flex; align-items:center; gap:6px; font-weight:600; margin:0; color:var(--text); }
    .admin-checks input { width:auto; min-height:auto; margin:0; }
    .muted { color:var(--muted); }
    .user { display:flex; align-items:center; gap:10px; color:var(--muted); }
    .user img { width:28px; height:28px; border-radius:50%; }
    @media (max-width: 1300px) { .summary-chart-grid, .summary-detail-chart-grid { grid-template-columns:repeat(2, minmax(220px, 1fr)); } .summary-change-grid { grid-template-columns:1fr; } .summary-change-card--done { grid-row:auto; } }
    @media (max-width: 900px) { .filter-row.two, .filter-row.three, .filter-row.four, .summary-chart-grid, .summary-detail-chart-grid, .tier1-grid, .tier1-scenario-list { grid-template-columns:1fr; } .summary-change-entry, .cla-timeline-row { grid-template-columns:1fr; } .cla-date-rail { border-right:0; border-bottom:1px solid #d8e1ee; padding:0 0 8px; } .cla-effect-row { grid-template-columns:repeat(2, minmax(0, 1fr)); } .cla-quick-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } .cla-timeline { padding-left:14px; } .cla-timeline-dot { left:-21px; } header { align-items:flex-start; flex-direction:column; } }
    @media (max-width: 560px) { main { width:100%; padding:12px 8px 36px; } .panel { padding:12px; } .tabs { margin-left:-8px; margin-right:-8px; padding:8px; } .tab-button { min-height:34px; padding:7px 10px; font-size:12px; } .diag-head { align-items:flex-start; } .diag-head-right { width:100%; justify-content:flex-start; } .cla-analysis .diag-body { padding:10px 8px; } .cla-timeline { padding-left:12px; gap:8px; } .cla-timeline::before { font-size:9px; } .cla-timeline-dot { left:-19px; width:10px; height:10px; } .cla-effect-row { grid-template-columns:1fr; } .cla-mini-card { max-width:none; width:100%; } .cla-effect-group .cla-mini-card { width:auto; max-width:none; } .cla-date-rail { gap:4px; } }
    @media (max-width: 560px) { .cla-quick-grid { grid-template-columns:1fr; } }
  
