*{box-sizing:border-box}body{margin:0;background:#f4f5fa;color:#35486e;font:12px system-ui}main{padding:18px 8px;max-width:100%;overflow:clip}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:white;border:1px solid #dce3f2;border-radius:7px;padding:15px;margin-bottom:20px}input,select,button{font:inherit;color:inherit;border:1px solid #d7e0f2;border-radius:4px;background:white;padding:10px;max-width:100%}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}.primary{background:#3159dc;color:white}.sizes{display:flex;align-items:center;gap:6px;margin-left:auto;flex-wrap:wrap}.sizes input{padding:0;width:100px;accent-color:#3159dc}#grid{--card-width:200px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--card-width)),1fr));gap:14px;align-items:start}.card{width:100%;max-width:calc(var(--card-width) * 1.35);min-width:0;background:white;border:1px solid #dce3f2;border-radius:4px;overflow:hidden}.photo{aspect-ratio:1;position:relative;background:#e9edf4;overflow:hidden}.photo img{width:100%;height:100%;object-fit:contain;display:block}.rank{position:absolute;top:7px;left:7px;background:#273248df;color:white;border-radius:3px;padding:3px 5px}.info{padding:9px}.shop{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px}.name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:18px;height:36px;margin:5px 0;color:#7b8aa8}.bottom{display:flex;justify-content:space-between;gap:5px;flex-wrap:wrap;font-size:11px}.system{margin-top:8px;border-top:1px solid #edf0f6;padding-top:7px;line-height:1.6;color:#687ca2}.up{color:#e64965}.down{color:#15956a}.note,#summary{color:#7b8aa8}a{color:inherit;text-decoration:none}.card:hover{border-color:#9aafe5;box-shadow:0 4px 16px #30467815}dialog{width:min(700px,95vw);max-height:90vh;overflow:auto;border:1px solid #dce3f2;border-radius:10px;padding:24px;color:#35486e}dialog::backdrop{background:#15243e70}.close{float:right}#error{color:#bd3048;white-space:pre-wrap}#preview{overflow:auto;max-height:280px}td,th{text-align:left;padding:8px;border-bottom:1px solid #edf0f6}progress{width:100%}#replaceLabel{display:block;margin:15px 0}#replaceLabel[hidden]{display:none}#confirm{margin-top:12px}@media(max-width:600px){#grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,max(145px,calc(var(--card-width)*.65))),1fr));gap:8px}.card{max-width:100%}.sizes{margin-left:0}#search{width:100%}}

.name{display:block;white-space:nowrap;text-overflow:ellipsis;height:18px;line-height:18px;margin:3px 0 7px}.bottom{flex-wrap:nowrap;align-items:center;gap:4px}.bottom>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bottom>span:last-child{flex-shrink:0;white-space:nowrap}.info{padding:8px 9px}.new{color:#3159dc}
body{background:#f5f7ff;color:#192a50}.nav{position:fixed;inset:0 auto 0 0;width:185px;background:linear-gradient(145deg,#10192c,#080e1c);color:#d7e2ff;padding:16px 10px}.nav h2{font-size:21px;margin:0}.nav p{margin:4px 0 30px 25px;color:#7c92b8}.nav>div{padding:15px 9px;margin:4px 0;border-radius:6px}.nav small{color:#6c7d9c;font-size:10px}.nav .active{background:#2050dc;color:white}main{margin-left:185px;padding:18px;overflow:visible}header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}header h1{font-size:25px;margin:0}header p{margin:5px 0;color:#7081a3}.toolbar{margin-bottom:14px}.panel{background:#fff;border:1px solid #e0e6f4;border-radius:12px;padding:15px;margin-bottom:14px;min-width:0}.panel h2{font-size:16px;margin:0 0 14px}.panel h2 small{font-size:11px;font-weight:400;color:#8490aa}#metrics{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}.metric{padding:14px 10px;border:1px solid #e1e9fa;border-radius:8px;background:#f7faff;min-width:0}.metric b{font-size:25px;display:block;margin:0 0 6px;color:#173c87}.metric small{display:block;color:#8591a8;margin-top:8px}.analytics{display:grid;grid-template-columns:1.2fr 1fr .85fr;gap:14px}.chart{height:230px;width:100%;min-width:0}#samples{font-size:11px;color:#8390a8}.direction,.watch{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #eef1fa;cursor:pointer}.direction.selected{background:#edf3ff}.direction:hover,.watch:hover{background:#f5f8ff}.watch img{width:43px;height:48px;object-fit:contain}.watch span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.watch small{display:block;color:#7182a0;white-space:normal}.filter{padding:7px 10px;margin:3px;border-radius:6px;background:#f5f7fc}.filter.selected{background:#2355ef;color:white}.up{color:#15956a}.down{color:#df4661}.name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;height:36px}.card .system{font-size:10px}.card .system br{display:none}#drawer{position:fixed;right:0;top:0;bottom:0;width:min(425px,100vw);z-index:10;background:#fff;box-shadow:-8px 0 36px #18315620;padding:20px;overflow:auto;border-left:1px solid #dce3f2}#drawerClose{float:right}#productDetail{clear:both;padding-top:15px}#productDetail img{width:125px;height:150px;object-fit:contain;float:left;margin:0 15px 15px 0}#productDetail h3{font-size:16px;line-height:1.6}#productDetail p{line-height:1.9}#historyChart{clear:both}.detailstats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;clear:both}.detailstats div{padding:12px;background:#f4f7ff;border-radius:7px}.detailstats b{display:block;font-size:19px}#updated{color:#7182a0}@media(max-width:1500px){#metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.analytics{grid-template-columns:1fr 1fr}.analytics>section:last-child{grid-column:1/-1}#watch{display:flex;gap:15px;flex-wrap:wrap}.watch{max-width:30%}}@media(max-width:900px){.nav{width:65px;padding:10px 5px}.nav h2{font-size:14px}.nav p,.nav small{display:none}.nav>div{font-size:10px;padding:12px 4px}main{margin-left:65px;padding:10px}.analytics{grid-template-columns:1fr}.analytics>section:last-child{grid-column:auto}#watch{display:block}.watch{max-width:100%}}@media(max-width:600px){.nav{display:none}main{margin:0;padding:8px}#metrics{grid-template-columns:repeat(2,minmax(0,1fr))}header h1{font-size:20px}#updated{display:none}.metric b{font-size:23px}}
header{padding:0 0 5px}header p{font-weight:600;color:#35486e}.headerActions{display:flex;align-items:center;gap:20px}.toolbar{gap:9px;flex-wrap:wrap}#metrics{grid-template-columns:repeat(6,minmax(0,1fr))}.metric{display:flex;gap:10px;align-items:flex-start;background:linear-gradient(135deg,#f7faff,#fff);padding:18px 12px}.metricIcon{font-size:26px;color:#2563eb;background:#eaf2ff;border-radius:50%;padding:5px}.metric b{color:#15234a;font-size:26px}.metric small{color:#6d7d99}.analytics{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:16px}.analytics>section:last-child{grid-column:auto}#watch{display:block}.watch{max-width:100%;padding:12px 0}.watch img{width:52px;height:65px;border-radius:5px}.watch span{white-space:nowrap}.watch small{line-height:1.6}.directionsTable{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}.directionsTable th,.directionsTable td{padding:8px 5px;text-align:center;border-bottom:1px solid #eef1fa}.directionsTable th:first-child,.directionsTable td:first-child{text-align:left;width:21%}.directionsTable th{background:#f4f7ff;color:#687a9d}.directionsTable small{display:block;font-size:10px}.directionsTable tbody tr{cursor:pointer}.directionsTable tr:hover,.directionsTable tr.selected{background:#edf3ff}.spark{width:100%;height:40px;display:block}.panel h2{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#clearCategory{margin-left:auto;font-size:11px;padding:5px 8px}#watchTabs{display:flex;gap:8px;margin-bottom:8px}#watchTabs button{flex:1;background:#f3f6ff;padding:8px 4px}#watchTabs button.selected{background:#2456f5;color:white;border-color:#2456f5}.filterNote,.emptyWatch{font-size:11px;color:#8290a8;line-height:1.7}.filterNote{margin:8px 0 0}.analytics .note{font-size:10px}.sizes button{padding:8px}#search{min-width:170px;flex:1}#weeks,#window{max-width:210px}#metrics .metric{min-height:115px}@media(max-width:1450px){#metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}.directionsTable{font-size:11px}.metric b{font-size:25px}}@media(max-width:1000px){.analytics{grid-template-columns:1fr}.analytics>section:last-child{grid-column:auto}.headerActions{gap:8px}}@media(max-width:600px){#metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:12px 8px;gap:5px}.metricIcon{font-size:20px}.metric b{font-size:23px}.headerActions{flex-direction:column;align-items:flex-end}header{align-items:flex-start}.directionsTable{font-size:10px}.directionsTable td,.directionsTable th{padding:6px 2px}.directionsTable th:first-child{width:22%}}
.visitLink{display:inline-flex;align-items:center;justify-content:center;background:#2456f5;color:white!important;padding:11px 18px;border-radius:7px;margin:8px 0 18px;font-size:14px;font-weight:600;clear:both}.tagDetails{clear:both;background:#f6f8ff;padding:12px;margin:14px 0;border-radius:7px}.tagChip{display:inline-block;padding:3px 8px;background:#e9efff;color:#3158a8;border-radius:4px;margin:3px}#tagEditor input{display:block;width:100%;margin:7px 0}#directions{max-height:405px;overflow:auto}.directionsTable th{position:sticky;top:0;z-index:1}.directionsTable tr.selected td:first-child:before{content:'✓ ';color:#2456f5}
#crossControls{display:flex;flex-wrap:wrap;align-items:center;gap:8px}#crossTags select{margin:2px}.crossTable{overflow:auto;max-height:380px}.crossTable table{width:100%;border-collapse:collapse}.crossTable th{position:sticky;top:0;background:#f4f7ff}.crossTable td,.crossTable th{white-space:nowrap}
.crossLayout{display:grid;grid-template-columns:minmax(300px, .9fr) minmax(0,1.6fr);gap:14px}.crossList,#crossDetail{min-width:0;background:#fff;border:1px solid #dfe7fa;border-radius:10px;padding:12px}.crossBadge,.crossStatus strong{color:#204ab0;background:#eaf1ff;border-radius:5px;padding:4px 6px}.crossStatus{display:flex;align-items:center;gap:12px;background:#f0f6ff;padding:12px;border-radius:8px}.crossStatus strong{font-size:16px}.crossMetrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:12px 0}.crossMetrics>div,.crossEvidence>section{border:1px solid #dfe7fa;border-radius:8px;padding:9px;min-width:0}.crossMetrics small,.crossProducts small{display:block;color:#647798}.crossMetrics b{display:block;color:#1e4bd5;font-size:19px;margin:5px 0}.crossEvidence{display:grid;grid-template-columns:1.1fr 1fr;gap:8px}.crossEvidence h4,#crossDetail h3{margin:0 0 8px}.crossEvidence ul{padding-left:19px;line-height:1.7}.crossEvidence li{margin-bottom:5px}#crossChart{height:215px}.crossProducts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.crossProducts button{text-align:left;overflow:hidden}.crossProducts img{display:block;width:100%;height:100px;object-fit:contain;background:#f4f7ff;border-radius:5px}.crossProducts b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:5px 0}.crossProducts small{white-space:normal}.crossTable td:first-child button{max-width:190px;overflow:hidden;text-overflow:ellipsis}@media(max-width:1150px){.crossLayout{grid-template-columns:1fr}.crossMetrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.crossEvidence{grid-template-columns:1fr}.crossProducts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.crossTable .crossSelected{background:#edf3ff}.crossBadge[data-state="头部表现增强"],.crossBadge[data-state="覆盖扩大"],.crossStatus[data-state="头部表现增强"],.crossStatus[data-state="覆盖扩大"]{color:#147542;background:#eaf8ef}.crossBadge[data-state="信号分化"],.crossStatus[data-state="信号分化"]{color:#925b13;background:#fff5df}.crossBadge[data-state="整体减弱"],.crossStatus[data-state="整体减弱"]{color:#ac2844;background:#fcecf0}.crossBadge[data-state="样本不足"],.crossBadge[data-state="数据不可比"]{color:#64748b;background:#eef1f7}

/* Cross-analysis workspace */
.marketViews{display:flex;gap:12px;border-bottom:1px solid #dbe4f8;background:#fff;margin-bottom:14px;border-radius:8px}
.marketViews button{border:0;border-bottom:3px solid transparent;border-radius:0;padding:12px 20px;font-weight:700}
.marketViews .selected{color:#0859f8;border-bottom-color:#0859f8}
.crossLayout{grid-template-columns:minmax(0,35fr) minmax(0,65fr);align-items:start}
.crossList{padding:0;border:0;background:none}
#crossDetail{padding:15px}
.crossHeading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.crossHeading h2,.crossHeading h3,#crossDetail .crossHeading h3{margin:0;color:#13234b}
#crossDimensions{display:flex;gap:2px}
#crossDimensions button,#crossClear,.crossFilterGroup button{padding:5px 8px;border-radius:8px;background:#f2f6ff}
#crossDimensions button[aria-pressed=true],.crossFilterGroup button[aria-pressed=true]{background:#1161fa;color:#fff;border-color:#1161fa}
#crossControls{display:block}
.crossFilterGroup{display:grid;grid-template-columns:35px minmax(0,1fr);align-items:start;gap:6px;padding:9px 0;border-bottom:1px solid #edf2fa}
.crossFilterGroup b{padding-top:5px}
.crossFilterGroup>div{display:flex;flex-wrap:wrap;gap:5px}
.crossTable{max-height:340px;overflow:auto}
.crossTable table{table-layout:fixed;font-size:11px}
.crossTable th:first-child{width:25%}.crossTable th:nth-child(2){width:21%}.crossTable th:last-child{width:21%}
.crossTable td,.crossTable th{padding:7px 3px;white-space:normal;overflow-wrap:anywhere;text-align:center}
.crossTable td:first-child,.crossTable th:first-child{text-align:left}
.crossTable td:first-child button{border:0;background:transparent;text-align:left;padding:2px;max-width:100%;font-weight:700;overflow-wrap:anywhere}
.crossTable tr{cursor:pointer}.crossTable tr:hover{background:#f3f7ff}
.crossTable i{font-style:normal;background:#e8efff;color:#1e4ac9;border-radius:50%;padding:1px 4px}
.crossBadge{display:inline-block;font-size:10px;padding:3px 4px}
.crossDelta{display:flex;align-items:center;gap:3px;justify-content:center;flex-wrap:wrap}
.crossSpark{width:45px;height:20px;color:#179259;vertical-align:middle}
.crossSpark path{fill:none;stroke:currentColor;stroke-width:2}.crossSpark circle{fill:currentColor}
.crossLow{display:block;margin-top:9px;color:#5d7096}
.crossStatus strong{flex:none;background:transparent;color:inherit;padding:0}.crossStatus span{line-height:1.6}
.crossMetrics>div{background:#fbfcff}.crossMetrics b{white-space:nowrap}.crossMetrics i{font-size:15px;font-style:normal;margin-right:5px;color:#4081fa}
.crossMetrics small:last-child{margin-top:4px}
.crossEvidence ul{list-style:none;padding:0;margin:0}
.crossEvidence li{padding:6px;background:#f6f8fc;border-radius:5px}
.crossEvidence li:before{content:'✓ ';color:#18804a}
.crossRep{margin-top:15px}.crossRep a{color:#115df1;font-weight:700}.crossRep small{font-weight:400;color:#607295}
.crossProducts{grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr))}
.crossProducts button{min-width:0;padding:5px;box-shadow:0 2px 4px #293d8010}
.crossProducts .crossSpark{display:block;width:70px;margin:4px 0;color:#2563eb}
.crossPhoto{position:relative;aspect-ratio:1.55;background:#f0f3fa;border-radius:5px;overflow:hidden;display:grid;place-items:center;color:#6f809e}
.crossProducts img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.crossProducts img[hidden]{display:none}
.crossPhoto i{position:absolute;top:5px;left:5px;background:#bf451f;color:#fff;font-style:normal;padding:2px 6px;border-radius:5px}
.crossWorkflow{background:#edf3ff}.crossWorkflow h3{margin:0;color:#134ab5}
.crossWorkflow ol{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;margin-bottom:0;padding-left:22px;font-weight:700}
.crossEmpty{padding:14px 0;color:#647798}
@media(max-width:1100px){.crossLayout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.crossStatus{align-items:flex-start;flex-direction:column}.marketViews button{padding:10px}.crossMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
