:root {
  color-scheme: light;
  --ink: #171719;
  --muted: #73737b;
  --soft: #f3f4f6;
  --line: #e3e5e9;
  --panel: #ffffff;
  --accent: #ff3158;
  --accent-soft: #ffe6ec;
  --violet: #7565ff;
  --violet-soft: #eceaff;
  --live: #7447ff;
  --shadow: 0 18px 45px rgba(18, 18, 26, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: #eef0f3; }
body { margin: 0; color: var(--ink); background: #eef0f3; min-width: 320px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(117, 101, 255, .35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  color: #fff;
  background: #121216;
  border-bottom: 1px solid #29292f;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: 18px; letter-spacing: .02em; }
.brand small { display: block; color: #9d9da7; font-size: 12px; margin-top: 3px; }
.brand-mark { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #1d1d24; overflow: hidden; flex-shrink: 0; }
.brand-mark svg { display: block; }
.update-state { display: flex; align-items: center; gap: 8px; color: #cacad1; font-size: 13px; }
.update-state time { color: #fff; font-variant-numeric: tabular-nums; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #50d890; box-shadow: 0 0 0 5px rgba(80,216,144,.12); }

.shell { display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: calc(100vh - 76px); }
.filters { background: #19191f; color: #fff; padding: 24px 22px; border-right: 1px solid #2b2b32; position: sticky; top: 76px; height: calc(100vh - 76px); overflow: auto; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.text-button { color: #9a9aa4; background: none; border: 0; font-size: 13px; padding: 5px; }
.text-button:hover { color: #fff; }
.search-box { position: relative; display: block; margin-bottom: 26px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; fill: none; stroke: #8b8b95; stroke-width: 1.8; }
.search-box input { width: 100%; height: 42px; border: 1px solid #35353d; background: #232329; color: #fff; border-radius: 10px; padding: 0 12px 0 39px; font-size: 14px; }
.search-box input::placeholder { color: #787884; }
fieldset { border: 0; padding: 0; margin: 0 0 25px; }
legend, .select-label { display: block; color: #aaaab3; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); background: #232329; border: 1px solid #35353d; border-radius: 10px; padding: 3px; }
.segmented button { border: 0; color: #aaaab3; background: transparent; padding: 8px 3px; border-radius: 7px; font-size: 13px; }
.segmented button.is-active { color: #fff; background: #3b3b45; box-shadow: inset 0 0 0 1px #4c4c57; }
.filters select { width: 100%; height: 40px; border: 1px solid #35353d; background: #232329; color: #f2f2f4; border-radius: 9px; padding: 0 10px; margin-bottom: 25px; font-size: 14px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-filter button { border: 1px solid #3a3a43; background: #232329; color: #aaaab3; border-radius: 999px; padding: 7px 10px; font-size: 12px; }
.tag-filter button.is-active { color: #fff; background: rgba(117,101,255,.23); border-color: #7565ff; }
.standard-note { margin-top: 28px; border-top: 1px solid #33333b; padding-top: 18px; color: #b1b1ba; font-size: 13px; line-height: 1.6; }
.standard-note strong { color: #fff; }
.standard-note p { margin: 6px 0 0; }

.workspace { padding: 26px 28px 48px; min-width: 0; }
.board-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.rank-tabs { display: flex; gap: 8px; }
.rank-tab { min-width: 174px; text-align: left; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.65); padding: 12px 15px; color: #62626b; }
.rank-tab span { display: block; color: inherit; font-size: 16px; font-weight: 760; }
.rank-tab small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.rank-tab.is-active { color: var(--ink); background: #fff; border-color: #fff; box-shadow: var(--shadow); }
.rank-tab.is-active::after { content: ""; display: block; width: 34px; height: 3px; border-radius: 3px; background: var(--accent); margin-top: 10px; }
.view-actions { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.view-actions select { height: 38px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; color: var(--ink); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: grid; place-items: center; }
.icon-button svg { width: 18px; fill: #4e4e56; }
.icon-button[aria-pressed="true"] { background: var(--ink); }
.icon-button[aria-pressed="true"] svg { fill: #fff; }

.board-meta { display: flex; justify-content: space-between; gap: 20px; align-items: end; padding: 26px 2px 16px; }
.board-meta strong { display: block; font-size: 20px; }
.board-meta div span { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
#resultCount { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); font-size: 13px; }
.trend-notice { border: 1px solid #d7d2ff; background: var(--violet-soft); border-radius: 12px; padding: 12px 15px; margin-bottom: 15px; color: #5d50c9; font-size: 14px; }
.trend-notice strong { margin-left: 8px; color: #302a71; }

.content-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.content-grid.is-compact { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.content-card { background: var(--panel); border: 1px solid rgba(223,225,229,.9); border-radius: 16px; overflow: hidden; box-shadow: 0 9px 26px rgba(22,22,28,.055); min-width: 0; transition: transform .18s ease, box-shadow .18s ease; }
.content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.media-wrap { position: relative; aspect-ratio: 4/3; background: #dfe2e7; overflow: hidden; cursor: zoom-in; }
.media-wrap img, .media-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-wrap video { background: #09090b; cursor: pointer; }
.media-shade { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent,rgba(0,0,0,.56)); pointer-events: none; }
.rank-badge { position: absolute; left: 12px; top: 12px; min-width: 34px; height: 34px; border-radius: 10px; padding: 0 8px; display: grid; place-items: center; color: #fff; background: rgba(17,17,20,.8); font-weight: 800; backdrop-filter: blur(8px); }
.content-card:nth-child(-n+3) .rank-badge { background: var(--accent); }
.type-badge { position: absolute; right: 12px; top: 12px; padding: 7px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: #3a3a42; font-size: 12px; font-weight: 750; }
.type-badge.live { color: #fff; background: rgba(116,71,255,.9); }
.video-status { position: absolute; left: 12px; bottom: 11px; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.video-status::before { content: "▶"; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); backdrop-filter: blur(6px); font-size: 10px; }
.card-body { padding: 15px 16px 16px; }
.card-title { font-size: 16px; line-height: 1.45; margin: 0; min-height: 46px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.card-stats { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 13px; }
.likes strong { display: block; color: var(--accent); font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.likes span, .trend-value span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.trend-value { text-align: right; }
.trend-value strong { color: var(--violet); font-size: 14px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.card-tags span { border-radius: 999px; padding: 5px 8px; background: var(--soft); color: #606069; font-size: 11px; }
.card-tags span.tag-priority { color: #b12142; background: var(--accent-soft); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.card-actions button, .card-actions a { height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; display: grid; place-items: center; font-size: 13px; font-weight: 680; }
.card-actions a { color: #fff; background: var(--ink); border-color: var(--ink); }
.content-grid.is-compact .card-title { font-size: 14px; min-height: 40px; }
.content-grid.is-compact .card-body { padding: 12px; }
.content-grid.is-compact .card-actions { grid-template-columns: 1fr; }
.content-grid.is-compact .card-actions button { display: none; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 7px 0 0; }
.empty-icon { display: block; font-size: 38px; margin-bottom: 10px; }

.detail-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 40px 100px rgba(0,0,0,.35); overflow: auto; }
.detail-dialog::backdrop { background: rgba(10,10,13,.72); backdrop-filter: blur(4px); }
.dialog-close { position: sticky; float: right; top: 14px; margin: 14px 14px -52px 0; z-index: 4; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(10,10,12,.72); color: #fff; font-size: 25px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(300px,.95fr); min-height: 560px; }
.detail-media { background: #111116; min-height: 520px; display: grid; place-items: center; }
.detail-media img, .detail-media video { width: 100%; height: 100%; max-height: 78vh; object-fit: contain; }
.detail-info { padding: 42px 34px 30px; }
.detail-kicker { color: var(--accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.detail-info h2 { font-size: 25px; line-height: 1.35; margin: 12px 0 8px; }
.detail-author { color: var(--muted); font-size: 14px; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0; }
.metric-box { border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.metric-box strong { display: block; font-size: 20px; }
.metric-box span { color: var(--muted); font-size: 12px; }
.detail-section { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 17px; }
.detail-section strong { font-size: 14px; }
.detail-section p { color: #4f4f57; line-height: 1.7; margin: 7px 0 0; font-size: 14px; }
.original-link { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 750; margin-top: 22px; }

.novelty-badge { position: absolute; right: 12px; bottom: 11px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; color: #fff; background: linear-gradient(135deg, #ff8a00, var(--accent)); box-shadow: 0 6px 16px rgba(255,49,88,.35); }
.cluster-badge { position: absolute; left: 54px; top: 12px; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(117,101,255,.88); backdrop-filter: blur(6px); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.card-footer .card-actions { margin-top: 0; flex: 1; }
.score-badge { flex-shrink: 0; padding: 6px 10px; border-radius: 9px; background: var(--violet-soft); color: var(--violet); font-size: 12px; font-weight: 750; white-space: nowrap; }
.score-badge.is-provisional { background: #f4f4f5; color: #8a8a93; }
.precision { font-style: normal; margin-left: 5px; padding: 1px 6px; border-radius: 6px; background: #fdf0d7; color: #b76b00; font-size: 10px; font-weight: 700; }
.trend-value .up { color: #12a066; }

.expand-bar { display: flex; justify-content: center; margin: 22px 0 6px; }
.expand-bar button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 11px 26px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); }

.watching-box { margin-top: 26px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(255,255,255,.6); padding: 18px 20px; }
.watching-box[hidden] { display: none; }
.watching-box h3 { margin: 0; font-size: 15px; }
.watching-hint { margin: 6px 0 14px; color: var(--muted); font-size: 12.5px; }
.watch-list { display: grid; gap: 8px; }
.watch-item { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 14px; }
.watch-state { font-size: 11px; font-weight: 750; border-radius: 999px; padding: 4px 8px; text-align: center; background: var(--soft); color: #62626b; }
.watch-state.precision_limited { background: #fdf0d7; color: #b76b00; }
.watch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.watch-likes { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.detail-score { display: flex; gap: 18px; align-items: center; margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; background: #faf9ff; }
.detail-score.is-provisional { background: #fafafa; }
.score-total { font-size: 34px; line-height: 1; }
.score-total strong { color: var(--violet); }
.detail-score.is-provisional .score-total strong { color: #9a9aa4; }
.score-total span { color: var(--muted); font-size: 14px; }
.score-dims { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.dim-row { display: grid; grid-template-columns: 64px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; color: #57575f; }
.dim-row em { font-style: normal; color: var(--muted); text-align: right; }
.dim-bar { display: flex; gap: 3px; }
.dim-bar i { width: 100%; height: 7px; border-radius: 4px; background: #e7e5ea; }
.dim-bar i.on { background: var(--violet); }
.detail-score.is-provisional .dim-bar i.on { background: #b4b4bd; }
.score-method { margin: 8px 2px 0; color: var(--muted); font-size: 12px; }
.obs-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.obs-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.obs-table td { padding: 8px; border-bottom: 1px solid #f0f0f2; font-variant-numeric: tabular-nums; }
.tag-mini { padding: 1px 6px; border-radius: 6px; background: #fdf0d7; color: #b76b00; font-size: 10px; font-weight: 700; }

@media (max-width: 1100px) {
  .content-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .content-grid.is-compact { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .content-grid, .content-grid.is-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .topbar { height: auto; min-height: 68px; padding: 13px 16px; }
  .update-state span:not(.pulse-dot) { display: none; }
  .shell { display: block; }
  .filters { position: static; height: auto; padding: 16px; border-right: 0; }
  .filter-heading, .standard-note { display: none; }
  .search-box { margin-bottom: 15px; }
  fieldset, .filters select { margin-bottom: 14px; }
  .tag-filter { max-height: 82px; overflow: auto; }
  .workspace { padding: 18px 14px 36px; }
  .board-toolbar { align-items: stretch; flex-direction: column; }
  .rank-tabs { width: 100%; }
  .rank-tab { min-width: 0; flex: 1; }
  .view-actions { justify-content: flex-end; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-media { min-height: 360px; }
  .detail-info { padding: 28px 22px; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .content-grid, .content-grid.is-compact { grid-template-columns: 1fr; }
  .rank-tab { padding: 10px; }
  .rank-tab small { display: none; }
  .board-meta { align-items: start; }
  .board-meta div span { max-width: 250px; }
  .media-wrap { aspect-ratio: 1/1; }
}
