* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f6f8;
  color: #1f2937;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: #2f5cff; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 10px 14px; }
.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #d9dee7; background: rgba(245, 246, 248, 0.96); backdrop-filter: blur(10px); }
h1 { margin: 0 0 4px; font-size: 20px; line-height: 1.15; }
h2 { margin: 0 0 10px; font-size: 18px; }
h3 { margin: 0 0 8px; font-size: 15px; }
.subtle { color: #667085; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.panel { border: 1px solid #d9dee7; border-radius: 12px; background: #fff; padding: 8px; }
.link-list { display: grid; gap: 7px; }
.link-row { display: grid; grid-template-columns: minmax(220px, 1fr) 80px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; background: #f8fafc; }
.count { color: #667085; text-align: right; font-variant-numeric: tabular-nums; }
.browser { display: grid; gap: 12px; }
.browser-controls { display: grid; grid-template-columns: auto auto minmax(220px, 1fr) minmax(180px, 240px) auto auto auto auto; gap: 8px; align-items: center; }
.browser-controls button, .browser-controls select { border: 1px solid #d9dee7; border-radius: 9px; background: #fff; color: #1f2937; font: inherit; font-size: 13px; padding: 8px 10px; }
.browser-controls select[multiple] { min-height: 76px; }
.browser-controls button { cursor: pointer; font-weight: 700; }
.browser-controls button:disabled { cursor: not-allowed; opacity: 0.45; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.filter-panel { display: grid; gap: 10px; align-content: start; }
.filter-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 800; }
.filter-group { display: grid; gap: 12px; margin-bottom: 12px; }
.filter-group-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.filter-group-head button, .add-group { width: auto; border: 1px solid #d9dee7; border-radius: 9px; background: #fff; color: #1f2937; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 10px; }
.adder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.adder select, .adder button, .case-search { border: 1px solid #d9dee7; border-radius: 9px; background: #fff; color: #1f2937; font: inherit; font-size: 13px; padding: 8px 10px; }
.adder button { cursor: pointer; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.chip { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 5px 9px; background: #eef2ff; color: #3446a3; font-size: 12px; font-weight: 700; }
.chip button { width: auto; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 900; padding: 0; }
.viewer { display: grid; gap: 12px; margin-top: 12px; }
.case-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.case-tile { display: grid; gap: 5px; }
.case-tile-title { font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-frame { width: 100%; min-height: 560px; border: 1px solid #d9dee7; border-radius: 12px; background: #fff; }
.case-list { display: grid; gap: 6px; margin-top: 14px; }
.case-link { display: grid; grid-template-columns: 80px 90px 110px 110px minmax(240px, 1fr); gap: 8px; padding: 8px 10px; border: 1px solid #eef1f5; border-radius: 9px; background: #fff; align-items: center; font-size: 13px; }
.pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.good { background: #e9f8ef; color: #147a3f; }
.bad { background: #fff0ee; color: #b42318; }
.warn { background: #fff6db; color: #915f00; }
.case-content { display: grid; grid-template-columns: 482px minmax(0, 1fr); gap: 8px; align-items: start; }
.image-panel { display: grid; gap: 5px; }
.images { display: grid; grid-template-columns: repeat(4, 112px); gap: 6px; justify-content: start; }
figure { margin: 0; min-width: 0; }
img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 1px solid #dfe4ec; background: #f0f2f5; }
figcaption { overflow: hidden; margin-top: 3px; color: #667085; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.difficulty { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: #667085; font-size: 11px; }
.result-stack { display: grid; gap: 8px; }
.top-result-grid { display: grid; grid-template-columns: minmax(360px, 1fr) 220px; gap: 8px; align-items: start; }
.metric-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.metric-table th, .metric-table td { border-bottom: 1px solid #eef1f5; padding: 3px 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.metric-table th { color: #667085; font-weight: 800; }
.metric-table td.correct { background: #e9f8ef; color: #147a3f; font-weight: 800; }
.metric-table td.wrong { background: #fff0ee; color: #b42318; font-weight: 800; }
.score-grid { display: grid; gap: 5px; }
.section-title { margin: 0 0 4px; font-size: 12px; font-weight: 900; }
.shot-pair { display: grid; gap: 1px; }
.shot-value { display: flex; justify-content: space-between; gap: 4px; padding: 1px 4px; border-radius: 5px; }
.shot-kind { color: #667085; font-weight: 800; }
.shot-value.correct { background: #e9f8ef; color: #147a3f; }
.shot-value.wrong { background: #fff0ee; color: #b42318; }
.header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.annotation-control { display: inline-flex; gap: 7px; align-items: center; justify-content: end; font-size: 12px; font-weight: 800; white-space: nowrap; }
.annotation-control select { border: 1px solid #d9dee7; border-radius: 9px; background: #fff; color: #1f2937; font: inherit; font-size: 12px; padding: 6px 8px; }
.annotation-status { min-width: 44px; color: #667085; font-size: 11px; font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prob { color: #667085; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .grid, .filter-grid, .case-grid, .case-content, .top-result-grid { grid-template-columns: 1fr; } .images { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .wrap { padding: 10px; } .case-link, .browser-controls, .adder, .header-row { grid-template-columns: 1fr; } .annotation-control { justify-content: start; } .images { grid-template-columns: repeat(3, minmax(0, 1fr)); } .case-frame { min-height: 1100px; } }
