
:root{--primary:#2563eb;--primary-dark:#1d4ed8;--bg:#f1f5f9;--card:#fff;--border:#e2e8f0;--text:#1e293b;--muted:#64748b;--shadow:0 1px 3px rgba(0,0,0,.08);--danger:#dc2626;--success:#059669}
*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--bg);color:var(--text);padding:24px}h1{text-align:center;margin-bottom:8px;font-size:26px;font-weight:700}h1 span{color:var(--primary)}.subtitle{text-align:center;color:var(--muted);font-size:14px;margin-bottom:18px}.wrap{max-width:1400px;margin:0 auto}.brand-tabs{display:flex;gap:8px;justify-content:center;margin-bottom:18px;flex-wrap:wrap}.brand-tab,.btn{padding:10px 20px;border-radius:8px;border:1px solid var(--border);background:#fff;cursor:pointer;font-size:14px;font-weight:600;color:var(--muted);transition:all .2s}.brand-tab:hover,.btn:hover{border-color:var(--primary);color:var(--primary)}.brand-tab.active,.btn.primary{background:var(--primary);color:#fff;border-color:var(--primary);box-shadow:0 2px 8px rgba(37,99,235,.25)}.btn.danger{color:var(--danger);border-color:#fecaca;background:#fff}.toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-bottom:24px}.btn input{display:none}.card{background:var(--card);border-radius:12px;box-shadow:var(--shadow);padding:24px;margin-bottom:24px}h2{font-size:18px;margin-bottom:16px;color:var(--text);display:flex;align-items:center;gap:8px}h2 .badge{font-size:12px;padding:3px 10px;border-radius:20px;background:#dbeafe;color:var(--primary);font-weight:600}.tabs{display:flex;gap:6px;margin-bottom:14px;border-bottom:1px solid var(--border);padding-bottom:8px}.tab-btn{border:0;background:transparent;padding:8px 12px;cursor:pointer;color:var(--muted);font-weight:600;border-radius:6px}.tab-btn.active{background:#eff6ff;color:var(--primary)}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px;min-width:760px}th,td{padding:9px 10px;text-align:center;border:1px solid var(--border)}th{background:#f8fafc;font-weight:600;color:var(--muted);font-size:12px}td input,td select{width:100%;border:1px solid transparent;background:transparent;text-align:center;font-size:13px;color:var(--text);padding:6px;outline:none;border-radius:4px}td input:focus,td select:focus{background:#eff6ff;border-color:var(--primary)}td.month{font-weight:600;background:#f8fafc;width:58px}.empty-cell{color:#cbd5e1;font-style:italic}.note{color:var(--muted);font-size:13px;margin-top:10px;line-height:1.6}.formula{background:#f8fafc;padding:14px 18px;border-radius:10px;font-size:13px;color:var(--muted);margin-bottom:16px;line-height:1.8;border-left:3px solid var(--primary)}.formula strong{color:var(--text)}.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}@media(max-width:900px){.chart-grid{grid-template-columns:1fr}}.chart-box{position:relative;height:340px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:24px}@media(max-width:900px){.grid-2{grid-template-columns:1fr}}.panel{border:1px solid var(--border);border-radius:10px;padding:16px}.panel h3{font-size:15px;margin-bottom:12px}.input-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}@media(max-width:700px){.input-grid{grid-template-columns:1fr}}.input-group label{display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.input-group input,.input-group select{width:100%;padding:9px;border:1px solid var(--border);border-radius:7px}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}@media(max-width:900px){.kpi-grid{grid-template-columns:repeat(2,1fr)}}.kpi{border:1px solid var(--border);border-radius:10px;padding:14px;background:#fff}.kpi .label{font-size:12px;color:var(--muted)}.kpi .value{font-size:22px;font-weight:700;margin-top:6px}.small{font-size:12px;color:var(--muted)}.status{padding:10px 12px;border-radius:8px;background:#f8fafc;color:var(--muted);font-size:13px;margin-bottom:12px}.status.error{background:#fef2f2;color:#991b1b}.status.success{background:#ecfdf5;color:#065f46}.modal{position:fixed;inset:0;background:rgba(15,23,42,.48);display:none;align-items:center;justify-content:center;padding:20px;z-index:20}.modal.show{display:flex}.modal-box{background:#fff;border-radius:12px;max-width:860px;width:100%;max-height:82vh;overflow:auto;padding:22px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.preview-list{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:12px}.preview-item{background:#f8fafc;border-radius:8px;padding:10px;font-size:13px}.err-list{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;font-size:12px;color:#991b1b;max-height:180px;overflow:auto;margin-top:10px;line-height:1.7}.warn-list{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:10px 12px;font-size:12px;color:#92400e;max-height:140px;overflow:auto;margin-top:10px;line-height:1.7}.data-source{text-align:center;color:var(--muted);font-size:12px;margin-top:8px}.hidden{display:none!important}.rank-table td:first-child{width:60px;font-weight:700}.rank-table tr.link-row{cursor:pointer}.rank-table tr.link-row:hover td{background:#eff6ff}.rank-table tr.picked td{background:#dbeafe}.danger-text{color:var(--danger)}.mini-table{min-width:420px}.crumb{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.crumb .seg{background:#eff6ff;color:var(--primary);border-radius:16px;padding:4px 12px;font-size:12px;font-weight:600}.crumb .seg.dim{background:#f1f5f9;color:var(--muted)}.guide-item{border-left:3px solid var(--primary);background:#f8fafc;border-radius:8px;padding:12px 16px;margin-bottom:10px;font-size:13px;line-height:1.8}.guide-item strong{color:var(--text)}.guide-item .src{display:inline-block;font-size:11px;border-radius:10px;padding:1px 8px;margin-right:6px;font-weight:700}.src.ga4{background:#dbeafe;color:#1d4ed8}.src.gsc{background:#dcfce7;color:#047857}
@media print{body{background:#fff;padding:0}.no-print{display:none!important}.card{box-shadow:none;break-inside:avoid;margin-bottom:12px}}
.rep-wrap{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;color:#1e293b;background:#fff;padding:28px;max-width:1100px;margin:0 auto}
.rep-wrap h1{font-size:24px;text-align:center;margin-bottom:4px}
.rep-wrap .rep-sub{text-align:center;color:#64748b;font-size:13px;margin-bottom:18px}
.rep-meta{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:20px}
.rep-meta span{background:#eff6ff;color:#1d4ed8;border-radius:14px;padding:4px 14px;font-size:12px;font-weight:600}
.rep-wrap h2{font-size:17px;margin:22px 0 10px;border-left:4px solid #2563eb;padding-left:10px}
.rep-wrap table{width:100%;border-collapse:collapse;font-size:12px;margin-bottom:8px}
.rep-wrap th,.rep-wrap td{border:1px solid #e2e8f0;padding:6px 8px;text-align:center}
.rep-wrap th{background:#f8fafc;color:#64748b;font-size:11px}
.rep-wrap img{width:100%;border:1px solid #e2e8f0;border-radius:8px;margin:6px 0 4px}
.rep-note{font-size:12px;color:#64748b;line-height:1.8}
.rep-foot{margin-top:26px;border-top:1px solid #e2e8f0;padding-top:14px;font-size:12px;color:#475569;line-height:1.9}
.rep-brand-block{page-break-after:always;margin-bottom:30px}
.rep-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:8px 0 4px}
.rep-kpi{border:1px solid #e2e8f0;border-radius:8px;padding:8px;text-align:center}
.rep-kpi .l{font-size:11px;color:#64748b}
.rep-kpi .v{font-size:16px;font-weight:700;margin-top:2px}
#brandTabs{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.brand-tab[data-tip]{position:relative}
.brand-tab[data-tip]:hover::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);width:max-content;max-width:220px;padding:6px 9px;border-radius:6px;background:#0f172a;color:#fff;font-size:12px;font-weight:500;line-height:1.3;box-shadow:0 4px 12px rgba(15,23,42,.2);z-index:5}
.brand-tab[data-tip]:hover::before{content:"";position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);border:5px solid transparent;border-top-color:#0f172a;z-index:5}
.operation-toast{position:fixed;right:24px;bottom:92px;width:min(380px,calc(100vw - 32px));padding:16px 18px;background:#fff;border:1px solid #dbeafe;border-left:4px solid var(--primary);border-radius:16px;box-shadow:0 12px 40px #0f172a26;z-index:80;opacity:0;transform:translateY(14px);visibility:hidden;transition:opacity .2s,transform .2s,visibility .2s}.operation-toast.show{opacity:1;transform:translateY(0);visibility:visible}.operation-toast.success{border-left-color:var(--success)}.toast-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:700;margin-bottom:8px}.icon-close{border:0;background:transparent;color:#64748b;cursor:pointer;font-size:22px;line-height:1;padding:4px;border-radius:6px}.icon-close:hover{background:#f1f5f9;color:#0f172a}.operation-toast .status{background:none;margin:0;padding:0;line-height:1.7}.toast-meta{font-size:11px;color:#94a3b8;margin-top:8px}.back-top{position:fixed;right:24px;bottom:24px;width:52px;height:52px;display:grid;place-items:center;border:0;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;cursor:pointer;box-shadow:0 6px 22px #2563eb40;transition:transform .2s,box-shadow .2s;z-index:60}.back-top:hover{transform:translateY(-3px);box-shadow:0 10px 28px #2563eb55}.back-top:focus-visible,.icon-close:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}.back-top svg{width:24px;height:24px}.assistant-box{max-width:1100px;max-height:90vh;padding:0}.assistant-header{position:sticky;top:0;z-index:2;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--border)}.assistant-header h2{margin:0}.assistant-box #aiHelperCard{box-shadow:none;margin:0;padding:24px}.error-dialog{z-index:100}.error-dialog .modal-box{max-width:680px}.error-details{white-space:pre-wrap;overflow-wrap:anywhere;max-height:48vh;overflow:auto;background:#fef2f2;border:1px solid #fecaca;color:#991b1b;border-radius:10px;padding:14px;font-family:inherit;font-size:13px;line-height:1.8}.date-digits{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:8px}.period-group{margin:14px 0}.period-group .small{line-height:1.7}@media(max-width:600px){.operation-toast{right:16px;bottom:84px}.back-top{right:16px;bottom:16px;width:48px;height:48px}.assistant-header{padding:16px}.assistant-box #aiHelperCard{padding:16px}}@media(prefers-reduced-motion:reduce){.operation-toast,.back-top{transition:none}}

/* V1.3.0 页面主题。只作用于 #report / 操作弹窗；不得扩展到 .rep-wrap。 */
body { background:#f3f5f9; padding:32px 24px; }
#report { max-width:1440px; --primary:#2458d6; --primary-dark:#1d46ad; --text:#17243b; --muted:#738198; --border:#e7ecf3; --shadow:0 4px 24px rgba(22,38,69,.035); }
#report .app-header { display:flex; align-items:flex-start; justify-content:space-between; gap:32px; padding:8px 4px 24px; }
#report .app-heading { flex:1; min-width:0; }
#report .eyebrow { color:#71809a; font-size:10px; font-weight:700; letter-spacing:2.4px; margin-bottom:12px; }
#report h1 { text-align:left; font-size:28px; line-height:1.5; letter-spacing:-.7px; margin-bottom:8px; font-weight:750; }
#report h1 #brandTitle { color:#17243b; }
#report h1 .badge { display:inline-flex; vertical-align:middle; font-size:10px; color:#6b7b96; background:#e8edf5; border:1px solid #dce4ef; border-radius:6px; padding:3px 7px; letter-spacing:.2px; margin-left:6px; }
#report .subtitle { text-align:left; margin:0; max-width:900px; font-size:12px; color:#7b879c; line-height:1.9; }
#report .author-credit { flex:none; padding:6px 0 0 24px; border-left:1px solid #dce3ed; display:flex; flex-direction:column; gap:5px; }
#report .credit-label { font-size:9px; font-weight:700; letter-spacing:1.6px; color:#94a0b3; }
#report .credit-name { font-size:13px; font-weight:650; color:#42516a; }
#report .credit-mail { font-size:11px; color:#7b8aa1; text-decoration:none; }
#report .credit-mail:hover { color:var(--primary); text-decoration:underline; }
#report .workspace-controls { background:#fff; border:1px solid #e7ecf3; border-radius:16px; padding:18px 22px; box-shadow:0 4px 24px #16264505; margin-bottom:24px; }
#report .brand-section { display:flex; align-items:center; gap:20px; padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid #edf0f5; }
#report .control-caption { font-size:11px; color:#91a0b4; font-weight:600; white-space:nowrap; }
#report .brand-tabs { flex:1; justify-content:flex-start; align-items:center; margin:0; gap:10px; }
#report #brandTabs { justify-content:flex-start; gap:6px; }
#report .brand-tab { padding:8px 14px; border:1px solid transparent; border-radius:8px; color:#738198; background:#f6f8fb; font-size:12px; box-shadow:none; }
#report .brand-tab:hover { background:#eef3fb; color:var(--primary); }
#report .brand-tab.active { background:#eaf0ff; color:var(--primary); border-color:#dce7ff; box-shadow:none; }
#report #addBrandBtn { padding:8px 12px; font-size:12px; border:1px dashed #d4deed; color:#7f8ea5; background:transparent; }
#report .toolbar { margin:0; justify-content:space-between; align-items:flex-start; gap:20px; }
#report .action-group { display:flex; flex-direction:column; gap:8px; min-width:0; }
#report .action-group-label { font-size:10px; letter-spacing:.5px; font-weight:600; color:#96a2b4; }
#report .action-buttons { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
#report .btn, :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .btn { border-radius:9px; padding:10px 15px; font-size:12px; line-height:1.4; border-color:#e0e6ef; color:#52627b; background:#fff; box-shadow:0 1px 2px #182b4905; }
#report .btn:hover, :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .btn:hover { background:#f7f9fd; border-color:#bed0ed; color:#2458d6; }
#report .btn.primary, :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .btn.primary { background:#2458d6; border-color:#2458d6; color:#fff; box-shadow:0 3px 9px #2458d61f; }
#report .btn.primary:hover, :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .btn.primary:hover { background:#1d46ad; color:#fff; }
#report .btn.danger { color:#a85860; border-color:#efdadc; background:#fffafb; }
#report .btn.danger:hover { color:#b42338; background:#fff1f3; border-color:#eebbc4; }
#report .btn:focus-visible, #report .brand-tab:focus-visible { outline:3px solid #cbdcff; outline-offset:3px; }
#report .btn:disabled, :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .btn:disabled { opacity:.5; cursor:not-allowed; box-shadow:none; }
#report .card { border:1px solid #e7ecf3; border-radius:16px; padding:26px 28px; box-shadow:0 4px 24px #16264505; margin-bottom:24px; }
#report .card h2 { font-size:15px; line-height:1.7; color:#26364e; font-weight:700; letter-spacing:.1px; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
#report h2 .badge { background:#f0f4fa; color:#8190a8; font-size:10px; font-weight:500; padding:3px 8px; border-radius:6px; }
#report .tabs { gap:8px; padding-bottom:12px; margin-bottom:18px; border-color:#edf1f6; }
#report .tab-btn { padding:8px 14px; font-size:12px; font-weight:600; border-radius:8px; }
#report .tab-btn.active { background:#edf2ff; color:#2458d6; }
#report .table-wrap { border:1px solid #e8edf4; border-radius:11px; scrollbar-width:thin; scrollbar-color:#d6dfec transparent; }
#report .table-wrap table { border:0; color:#42516a; font-size:12px; }
#report .table-wrap th, #report .table-wrap td { border:0; border-bottom:1px solid #edf1f6; padding:11px 13px; }
#report .table-wrap th { background:#f6f8fc; color:#8491a7; font-size:11px; font-weight:600; position:sticky; top:0; z-index:1; }
#report .table-wrap tr:last-child td { border-bottom:0; }
#report .table-wrap tbody tr:nth-child(even):not(.picked) td { background:#fbfcfe; }
#report .table-wrap td.month { background:#f7f9fc; color:#687892; font-weight:600; }
#report td input { font-size:12px; border-radius:6px; padding:5px 7px; font-variant-numeric:tabular-nums; }
#report td input:focus { background:#edf3ff; border-color:#acc7fc; }
#report #metricsTable td:nth-child(n+3), #report #trafficTable td:not(:first-child), #report #metricsTable td:nth-child(n+3) input, #report #trafficTable td:not(:first-child) input { text-align:right; }
#report #metricsTable td:nth-child(2) { text-align:left; color:#75849b; }
#report #metricsTab .table-wrap { max-height:560px; }
#report .rank-table td { text-align:right; font-variant-numeric:tabular-nums; }
#report .rank-table td:first-child { text-align:center; color:#8b98ad; font-weight:500; width:54px; }
#report .rank-table td:nth-child(2), #report #urlCountryTable td:nth-child(3) { text-align:left; overflow-wrap:anywhere; }
#report .rank-table tr.link-row:hover td { background:#eef4ff; }
#report .rank-table tr.picked td { background:#e8f0ff; color:#295ec1; }
#report :has(> .rank-table).table-wrap { max-height:520px; }
#report .note { color:#8c99ad; font-size:11px; line-height:1.9; margin-top:14px; }
#report .formula { background:#f7f9fc; color:#8290a6; border-left:2px solid #cbd9ee; border-radius:9px; padding:12px 16px; font-size:11px; line-height:1.9; }
#report .formula strong { color:#5b6d88; font-weight:600; }
#report .chart-grid { gap:24px; }
#report .chart-grid .card { min-width:0; }
#report .chart-box { height:330px; }
#report #crumbStatus { background:transparent; padding:0 3px; }
#report .crumb { gap:8px; margin-bottom:7px; }
#report .crumb .seg { background:#e9eef7; color:#7687a2; font-size:10px; font-weight:500; padding:5px 10px; border-radius:6px; }
#report #rankSortLabel { color:#94a0b3; font-size:10px; }
#report .input-group label { color:#8b98ac; font-size:10px; font-weight:600; margin-bottom:7px; }
#report .input-group input, #report .input-group select { background:#fbfcfe; color:#52627b; border-color:#e3e9f2; border-radius:8px; padding:10px 12px; font-size:12px; min-height:38px; }
#report .input-group input:focus, #report .input-group select:focus { outline:0; border-color:#9ab7ed; box-shadow:0 0 0 3px #edf3ff; }
#report .small { color:#96a2b4; font-size:10px; }
#report .panel { border-color:#edf1f6; border-radius:12px; background:#fafbfd; padding:20px; }
#report .panel h3 { font-size:12px; color:#7d8da4; margin-bottom:14px; }
#report .kpi-grid { gap:10px; }
#report .kpi { background:#fff; border-color:#e8edf4; border-radius:10px; padding:16px 12px; }
#report .kpi .label { color:#8a98ae; font-size:10px; line-height:1.7; }
#report .kpi .value { font-size:21px; font-weight:700; color:#304764; letter-spacing:-.5px; line-height:1.5; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#report .data-source { color:#97a2b3; font-size:10px; line-height:1.9; margin-top:12px; }
#report .footer-credit { border-top:1px solid #e2e8f1; padding:16px 0 8px; margin-top:22px; display:flex; justify-content:center; flex-wrap:wrap; align-items:center; gap:8px; }
#report .footer-credit a { color:#8392a9; text-decoration:none; }
#report .footer-credit a:hover { color:#2458d6; }
:is(#exportModal,#previewModal,#brandPickerModal,#aiHelperModal,#errorModal).modal { background:rgba(22,34,56,.4); backdrop-filter:blur(4px); }
:is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .modal-box { border-radius:18px; padding:28px; box-shadow:0 20px 100px #12224030; }
:is(#exportModal,#previewModal,#brandPickerModal,#aiHelperModal,#errorModal) h2 { font-size:17px; font-weight:700; color:#26364e; }
:is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .note { font-size:12px; color:#8491a7; line-height:1.9; }
:is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .input-group label { color:#7f8da4; font-weight:600; }
:is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .input-group input { border-radius:8px; border-color:#e3e9f2; font-size:13px; }
:is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .modal-actions { padding-top:18px; border-top:1px solid #edf1f6; gap:10px; }
#aiHelperModal .assistant-box { border-radius:18px; box-shadow:0 20px 100px #12224030; }
#aiHelperModal .assistant-header { padding:20px 28px; }
#aiHelperModal #aiHelperCard { padding:24px 28px; border:0; border-radius:0; margin:0; box-shadow:none; }
#aiHelperModal .guide-item { border-left-color:#cbd9ee; background:#f7f9fc; color:#7a899f; border-radius:10px; font-size:12px; }
#aiHelperModal #aiPrompts pre { max-height:440px; overflow:auto; }
.operation-toast { border-radius:14px; box-shadow:0 10px 40px #16264520; }
.back-top { width:48px; height:48px; background:#2458d6; box-shadow:0 5px 20px #2458d630; }
@media(max-width:1100px) {
  #report h1 { font-size:24px; }
  #report .app-header { gap:24px; }
  #report .toolbar { gap:16px; }
  #report .author-credit { padding-left:16px; }
  #report .kpi-grid { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:760px) {
  body { padding:20px 14px; }
  #report .app-header { flex-direction:column; gap:14px; padding:2px 4px 20px; }
  #report h1 { font-size:22px; letter-spacing:-.4px; }
  #report .author-credit { border-left:0; padding:0; flex-direction:row; align-items:center; flex-wrap:wrap; gap:8px; }
  #report .credit-label { letter-spacing:1px; }
  #report .workspace-controls { padding:16px; }
  #report .brand-section { flex-direction:column; align-items:flex-start; gap:10px; }
  #report .brand-tabs { width:100%; }
  #report .toolbar { justify-content:flex-start; }
  #report .card { padding:20px 18px; border-radius:14px; margin-bottom:18px; }
  #report .card h2 { margin-bottom:16px; font-size:14px; }
  #report .chart-grid { grid-template-columns:1fr; gap:0; }
  #report .grid-2 { gap:14px; }
  #report .chart-box { height:300px; }
  :is(#exportModal,#previewModal,#brandPickerModal,#errorModal) .modal-box { padding:20px; }
}
@media(max-width:480px) {
  #report .action-group { width:100%; }
  #report .action-buttons .btn { flex:1; text-align:center; }
  #report .toolbar-danger { width:auto; }
  #report .panel { padding:14px; }
  #report .kpi { padding:14px 10px; }
  #report .kpi .value { font-size:19px; }
}
@media print {
  body { background:#fff; padding:0; }
  #report .card { box-shadow:none; }
}
/* 页面主题结束：报告样式保留在上方原样迁移区。 */
/* V1.3.1 展示细节：图表等高、统一自定义弹窗、报告独立主题。 */
#report .chart-grid > .card { display:flex; flex-direction:column; height:100%; margin-bottom:0; }
#report .chart-grid { align-items:stretch; margin-bottom:24px; }
#report .chart-grid .chart-box { flex:0 0 340px; margin-top:auto; min-width:0; }
#report .chart-grid h2 { line-height:1.6; }
#report #dataReportText { border:1px solid #e3e9f2; border-left:3px solid #a8bde7; background:#f8fafd; border-radius:12px; padding:22px 24px; font-size:14px; line-height:2; color:#43536c; overflow-wrap:anywhere; }
.modal .modal-box { border:1px solid #e3e9f2; border-radius:20px; box-shadow:0 24px 100px #12224030; color:#334155; }
.modal :is(.btn,.brand-tab) { border-radius:10px; font-size:13px; padding:10px 18px; }
.modal .btn.primary { background:#2458d6; border-color:#2458d6; color:#fff; }
.modal .modal-box h2 { line-height:1.6; flex-wrap:wrap; }
.modal :is(.note,.small,.guide-item) { color:#66758b; line-height:1.85; }
.modal .input-group :is(input:not([type=checkbox]):not([type=radio]),select) { padding:10px 12px; background:#f8fafd; border:1px solid #dce4ef; border-radius:9px; color:#334155; font-family:inherit; }
.modal :is(#brandPickerList,#exportBrands) label { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:9px; background:#f7f9fc; line-height:1.6; font-size:13px; cursor:pointer; }
.modal input:is([type=checkbox],[type=radio]) { accent-color:#2458d6; flex:none; }
.modal .preview-list { gap:12px; }
.modal .preview-item { padding:16px; border:1px solid #e3e9f2; background:#f8fafd; border-radius:11px; line-height:1.8; }
.modal :is(.warn-list,.err-list) { padding:14px 16px; border-radius:11px; line-height:1.85; }
#aiHelperModal #aiHelperCard { color:#43536c; }
#aiHelperModal .guide-item { color:#52637b; padding:16px 20px; font-size:13px; }
#aiHelperModal #aiPrompts pre { font-family:inherit; color:#43536c; line-height:1.9; border:1px solid #dfe7f2; background:#f8fafd; border-radius:12px; padding:20px; }
.operation-toast { padding:18px 20px; border:1px solid #dfe7f2; border-left:0; border-radius:18px; box-shadow:0 12px 48px #172b4d24; background:#fff; color:#334155; }
.operation-toast.success { border-left:0; }
.operation-toast .toast-heading { color:#26364e; font-size:14px; gap:12px; }
.operation-toast .status { font-size:13px; color:#52637b; background:transparent; }
.operation-toast .toast-meta { display:flex; align-items:center; gap:7px; margin-top:12px; padding-top:10px; border-top:1px solid #edf1f6; color:#8392a9; font-variant-numeric:tabular-nums; }
.toast-indicator { width:7px; height:7px; border-radius:50%; background:#2458d6; }
.operation-toast.success .toast-indicator { background:#0f766e; }
@media(max-width:760px) {
  #report .chart-grid > .card { height:auto; margin-bottom:24px; }
  #report .chart-grid { margin-bottom:0; }
  #report #dataReportText { padding:18px; font-size:13px; }
  .modal .preview-list { grid-template-columns:1fr; }
}
/* 报告主题：仅在离屏 PDF/PNG 容器内生效，不改导出取数或分页算法。 */
.rep-wrap { padding:36px 40px; color:#23324a; background:#fff; }
.rep-brand-block { margin-bottom:0; }
.rep-wrap h1 { font-size:27px; font-weight:750; line-height:1.45; text-align:left; margin:0 0 10px; padding-bottom:16px; border-bottom:3px solid #2458d6; color:#172b4d; }
.rep-wrap .rep-sub { text-align:left; font-size:11px; line-height:1.8; color:#68788f; margin-bottom:18px; }
.rep-wrap a { color:#2458d6; text-decoration:none; }
.rep-wrap .rep-meta { justify-content:flex-start; gap:8px; margin-bottom:26px; }
.rep-wrap .rep-meta span { background:#f0f4fa; color:#435775; border-radius:6px; padding:7px 10px; font-size:10px; line-height:1.6; overflow-wrap:anywhere; }
.rep-wrap h2 { display:block; font-size:15px; line-height:1.65; margin:30px 0 12px; padding:10px 14px; border-left:3px solid #2458d6; border-radius:0 7px 7px 0; background:#f0f4fa; color:#233b60; overflow-wrap:anywhere; }
.rep-wrap .rep-table { min-width:0; table-layout:fixed; font-size:11px; width:100%; margin:10px 0 14px; }
.rep-wrap .rep-table :is(th,td) { padding:9px 7px; border:1px solid #e1e7ef; line-height:1.6; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; vertical-align:middle; }
.rep-wrap .rep-table th { background:#eaf0f8; color:#435775; font-size:10px; font-weight:700; }
.rep-wrap .rep-table tbody tr:nth-child(even) td { background:#f8fafd; }
.rep-wrap .rep-table td:first-child { color:#233b60; font-weight:600; }
.rep-wrap .rep-metrics { font-size:9px; }
.rep-wrap .rep-metrics :is(th,td) { padding:8px 3px; }
.rep-wrap .rep-metrics :is(th,td):first-child { width:94px; font-size:10px; background:#f0f4fa; text-align:left; padding-left:8px; }
.rep-wrap .rep-metrics :is(th,td):last-child { background:#edf3fc; font-weight:700; }
.rep-wrap .rep-traffic { font-size:10px; }
.rep-wrap .rep-traffic :is(th,td):first-child { width:44px; }
.rep-wrap .rep-traffic :is(th,td):last-child { background:#edf3fc; font-weight:700; }
.rep-wrap .rep-urls th:first-child { width:64px; font-size:9px; }
.rep-wrap .rep-urls :is(th,td):nth-child(2) { width:30%; text-align:left; word-break:break-all; }
.rep-wrap .rep-urls:has(th:nth-child(10)) :is(th,td):nth-child(2) { width:9%; word-break:normal; }
.rep-wrap .rep-urls:has(th:nth-child(10)) :is(th,td):nth-child(3) { width:28%; text-align:left; word-break:break-all; }
.rep-wrap img { display:block; width:100%; border:1px solid #e1e7ef; border-radius:10px; padding:8px; margin:12px 0; background:#fff; }
.rep-wrap .rep-note { font-size:11px; line-height:1.9; color:#5b6d85; overflow-wrap:anywhere; }
.rep-wrap div.rep-note { padding:20px; background:#f8fafd; border:1px solid #e1e7ef; border-left:3px solid #a8bde7; border-radius:9px; font-size:12px; }
.rep-wrap .rep-foot { padding:20px; margin-top:30px; border:1px solid #dfe7f2; border-top:2px solid #a8bde7; background:#f8fafd; border-radius:8px; font-size:10px; line-height:1.95; color:#66758b; overflow-wrap:anywhere; }
.rep-wrap .rep-foot strong { color:#334a6b; }
.modal .date-digits input { padding:9px 6px !important; font-variant-numeric:tabular-nums; }
.modal .date-digits input[aria-label$="年"] { min-width:82px; }
/* V1.3.2 教程、品牌管理与导出细节。 */
.assistant-header-actions { display:flex; align-items:center; gap:14px; flex-shrink:0; }
#aiHelperModal .tutorial-download { display:inline-flex; align-items:center; text-decoration:none; color:#2458d6; background:#f0f4ff; border-color:#dce7ff; white-space:nowrap; }
.modal input:is([type=checkbox],[type=radio]) { width:16px; height:16px; min-width:16px; padding:0; margin:0; flex:0 0 16px; }
#exportModal .export-dialog { max-width:760px; }
#exportModal .note { color:#66758b; font-size:13px; margin-bottom:22px; }
#exportModal .export-options { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:22px; }
#exportModal .export-brand-list { display:flex; flex-direction:column; gap:8px; max-height:260px; overflow:auto; padding:0; }
#exportModal .export-brand-list label { margin:0; min-width:0; overflow-wrap:anywhere; border:1px solid #e3e9f2; }
#exportModal .export-period { padding:14px 16px; border:1px solid #e3e9f2; border-radius:10px; background:#f8fafd; line-height:1.9; color:#52637b; overflow-wrap:anywhere; }
#report .brand-item { display:inline-flex; position:relative; }
#report .brand-delete { position:absolute; top:-8px; right:-8px; width:22px; height:22px; border-radius:50%; border:1px solid #e1e7ef; background:#fff; color:#8b98ad; font-size:17px; line-height:18px; cursor:pointer; opacity:0; pointer-events:none; box-shadow:0 2px 6px #172b4d14; transition:opacity .15s,color .15s; z-index:6; }
#report .brand-item:hover .brand-delete,#report .brand-item:focus-within .brand-delete { opacity:1; pointer-events:auto; }
#report .brand-delete:hover { color:#dc2626; border-color:#fecaca; background:#fff5f5; }
#report .brand-delete:focus-visible { opacity:1; pointer-events:auto; outline:2px solid #93c5fd; outline-offset:2px; }
.rep-wrap .rep-foot { padding:18px 0 0; border:0; border-top:1px solid #dfe7f2; border-radius:0; background:transparent; box-shadow:none; }
body:has(.modal.show) .operation-toast { z-index:19; }
@media(hover:none) { #report .brand-delete { opacity:1; pointer-events:auto; } }
@media(max-width:600px) { #exportModal .export-options { grid-template-columns:1fr; gap:18px; } .assistant-header { gap:10px; } .assistant-header-actions { gap:8px; } #aiHelperModal .tutorial-download { padding:8px 10px; font-size:12px; } }
/* V1.4.0：版权、前景水印与非必要样式降级。 */
.compat-panel { display:none; max-width:720px; margin:64px auto; padding:32px; border:1px solid #dfe7f2; border-radius:16px; background:#fff; color:#334155; font:14px/1.9 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; }
.compat-panel h1 { font-size:22px; text-align:left; margin-bottom:16px; }
.compat-panel p { margin-top:12px; overflow-wrap:anywhere; }
.compat-blocked .compat-panel,.noscript-notice { display:block; }
.compat-pending #report,.compat-pending .modal,.compat-pending .operation-toast,.compat-pending .back-top,.compat-blocked #report,.compat-blocked .modal,.compat-blocked .operation-toast,.compat-blocked .back-top { display:none !important; }
.ai-prompt-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:12px 0; }
#aiHelperModal .ai-prompt-actions .btn { padding:9px 15px !important; margin:0 !important; font-size:13px !important; }
#report .credit-designer { display:flex; flex-direction:column; gap:5px; }
#report .author-credit { max-width:240px; gap:10px; align-self:center; padding-top:0; }
#report .credit-support { display:flex; flex-direction:column; gap:2px; font-size:10px; line-height:1.6; color:#8392a9; }
.rep-wrap .rep-designed { font-size:9px; letter-spacing:1px; color:#52637b; }
#report .rank-scroll { max-height:520px; }
.modal { -webkit-backdrop-filter:blur(4px); }
.no-has .operation-toast { z-index:19; }
.rep-wrap .rep-brand-block { position:relative; }
.rep-wrap .rep-watermark { position:absolute; top:0; right:0; bottom:0; left:0; z-index:2; pointer-events:none; }
.rep-wrap .rep-cross-country :is(th,td):nth-child(2) { width:9%; word-break:normal; }
.rep-wrap .rep-cross-country :is(th,td):nth-child(3) { width:28%; text-align:left; word-break:break-all; }
@media(max-width:760px) { #report .author-credit { max-width:none; align-self:flex-start; gap:22px; } .compat-panel { margin:24px auto; padding:22px; } }
