/* A bounded page keeps the media tiles close to the source platform's size. */
body{max-width:1200px;margin:0 auto}
header{padding:16px 20px}
aside{left:max(0px,calc((100vw - 1200px)/2));width:70px}
main{margin-left:80px;padding-right:16px}
.channel-main{max-width:1200px;margin:0 auto;padding:0 20px 30px}
.toolbar{flex-wrap:wrap;gap:12px;padding-bottom:14px}
.filters{gap:6px;justify-content:flex-start}
.filters select{max-width:156px;padding-left:9px;font-size:12px}
.filters input{width:145px;font-size:12px}
#cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.video-frame{aspect-ratio:9/16}
.video-poster,.video-frame video{object-fit:contain}
.video-overlay{left:7px;right:7px;bottom:5px}
.video-overlay .product-card{padding:4px;gap:4px;margin:4px 0}
.video-overlay .product-image{width:24px;height:24px}
.video-overlay .product-card strong{font-size:10px}
.video-overlay .product-card small{font-size:9px;margin-top:1px}
.video-overlay .product-button{font-size:9px;padding:3px 4px}
.video-author{gap:4px;font-size:11px;margin-bottom:4px;white-space:nowrap;overflow:hidden}
.video-author .avatar{width:20px;height:20px}
.video-author .channel-link{overflow:hidden;text-overflow:ellipsis}
.video-overlay .caption{font-size:10px;line-height:14px;margin-bottom:2px}
.card .rankline{font-size:10px;padding:6px;min-height:28px}
.rank-tag{width:22px;height:22px;font-size:12px}
.card-bottom{min-height:34px;padding:4px 6px}
.nine.card .identity{gap:5px}
.nine.card .avatar{width:24px;height:24px}
.nine.card .nine-grid{gap:2px}
.nine.card .author,.nine.card .caption{font-size:11px}
dialog{width:min(1160px,96vw);max-width:1200px;padding:28px 24px}
#detailContent{grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:24px}
.preview-media{max-width:300px;position:static;margin:0 auto}
.preview-media video{width:100%;height:auto;max-height:min(520px,65vh);object-fit:contain;background:#111}
.preview-info h2{font-size:17px;margin-bottom:10px}
.preview-info h3{margin:16px 0 10px}
.metric{padding:12px;gap:6px}
.metric strong{font-size:19px}
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.preview-media .product-card{padding:5px;gap:5px}
.preview-media .product-image{width:28px;height:28px}
.preview-media .product-card strong{font-size:11px}
.preview-media .product-card small{font-size:10px}
.download-video{display:block;text-align:center;background:#f2f5f8;border:1px solid #dce2e8;padding:8px;border-radius:6px;margin-top:10px;color:#354a60}
.download-video:hover{background:#e9eef4}
.download-hint{display:block;color:#89909b;font-size:10px;margin:5px 0;text-align:center}
.trend-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.trend-heading select{font:inherit;border:1px solid #e3e7eb;background:#fff;border-radius:6px;padding:6px 9px}
@media(max-width:1000px){#cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:800px){main{margin-left:0;padding:0 14px 24px}aside{display:none}#cards{grid-template-columns:repeat(3,minmax(0,1fr))}#detailContent{grid-template-columns:1fr}.preview-media{max-width:280px}.heading{height:auto;min-height:50px;flex-wrap:wrap;gap:8px}.heading>span{max-width:none}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){#cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}dialog{padding:28px 14px}.filters select{max-width:150px}}

#summary{font-size:16px;line-height:1.8}
.nine-grid,.nine-grid img,.nine-grid a{cursor:default}
.author-save{border:1px solid #f0c48e;background:#fff7ec;color:#b76500;border-radius:7px;padding:7px 12px;font:inherit}
.author-save[aria-pressed=true]{background:#fff0d9}
.authors-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.trend-point{cursor:default;outline:none}
.trend-point .trend-tip{visibility:hidden;pointer-events:none}
.trend-point:hover .trend-tip,.trend-point:focus .trend-tip{visibility:visible}
.trend-tip rect{fill:#243449;opacity:.95}
.trend svg .trend-tip text{fill:white;font-size:12px}
dialog{width:min(1160px,88vw);max-width:1200px;padding:0;overflow:visible;background:transparent;max-height:94vh}
.detail-scroll{overflow:auto;max-height:94vh;background:white;border-radius:12px;padding:28px 24px}
#close{position:fixed;right:auto;width:40px;height:40px;display:grid;place-items:center;background:#fff;color:#333;border:1px solid #ddd;border-radius:50%;font-size:28px;z-index:10;box-shadow:0 2px 10px #0003}
@media(max-width:600px){dialog{width:94vw}.detail-scroll{padding:48px 14px 24px}#summary{font-size:16px}.channel-main .heading{height:auto;gap:12px;padding:12px 0;flex-wrap:wrap}}

/* Keep the list stable while fetching a new filter combination. */
#cards[aria-busy="true"]{opacity:.65;pointer-events:none}
#boardLoading:not([hidden]){position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:20;margin:0;padding:10px 20px;border-radius:8px;background:#fff;color:#203a62;box-shadow:0 4px 20px #19396324;font-size:14px}
