@font-face {
  font-family: "Inter Variable";
  src: url("./fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: "Inter Variable", ui-sans-serif, system-ui, "Hiragino Sans", Meiryo, sans-serif;
  color: #e2e8f0;
  background: #162036;
  --canvas: #162036;
  --surface: #202c48;
  --layer: #2b3751;
  --field: #162036;
  --ink: #e2e8f0;
  --muted: #90a1b9;
  --line: rgb(255 255 255 / 10%);
  --line-quiet: rgb(255 255 255 / 5%);
  --accent: #8ec5ff;
  --warm: #ffb900;
  --video: #ff637e;
  --focus: #8ec5ff;
  --radius: 16px;
  --control: 12px;
  --rail-width: 288px;
  --page-gutter: 40px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100dvh; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select, label:has(input[type="radio"]) { cursor: pointer; }
a { color: inherit; }
button { text-align: left; }
h1, h2, h3, p, dl, dd, ol, ul, fieldset { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 6; left: 16px; top: 10px; transform: translateY(-160%); background: var(--surface); padding: 12px; }
.skip:focus { transform: none; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: .81rem; line-height: 1.55; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 65px;
  padding-inline: 16px var(--page-gutter);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.top-location { font-size: 18px; line-height: 28px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { border: 0; border-radius: var(--control); background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--layer); color: var(--ink); }
.menu-toggle { display: grid; place-items: center; width: 36px; height: 36px; flex: none; }
.menu-icon { display: block; width: 15px; height: 1.5px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
.top-actions, .form-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top-actions { margin-left: auto; flex-wrap: nowrap; }
.topbar .button, .workspace-header .button { min-height: 30px; padding: 5px 11px; font-size: 12px; line-height: 18px; }
.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--control);
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.45;
  font-weight: 600;
  white-space: nowrap;
}
.button.primary { background: #50a2ff; color: #162036; }
.button.primary:hover { background: #8ec5ff; }
.button.outline { background: rgb(255 255 255 / 5%); border-color: var(--line); }
.button.outline:hover { background: rgb(255 255 255 / 10%); }
.button:disabled { cursor: wait; opacity: .65; }
.text-button { padding: 4px 2px; border: 0; background: none; font-size: .875rem; line-height: 1.5; color: var(--muted); text-decoration: none; }
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: 100dvh; }
.workspace { display: flex; flex-direction: column; min-width: 0; }
.shell.rail-collapsed { grid-template-columns: minmax(0, 1fr); }
.rail-collapsed .navigation { display: none; }
.navigation {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 0 16px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 76px; flex: none; padding-inline: 4px; color: #fff; font-size: 20px; text-decoration: none; }
.brand img { width: auto; height: 36px; }
.brand small { font-size: 13px; font-weight: 500; color: var(--muted); }
.dataset-card, .navigation-add {
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid #284882;
  border-radius: var(--control);
  background: #21355b;
  text-decoration: none;
  font-size: 14px;
}
.dataset-card:hover { border-color: #50a2ff; }
.dataset-card strong, .dataset-card small { display: block; line-height: 18px; }
.dataset-card strong { color: #fff; font-weight: 600; }
.dataset-card small { color: var(--muted); font-size: 12px; }
.dataset-symbol, .navigation-add > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--layer);
  color: var(--accent);
}
.navigation-add {
  min-height: 58px;
  margin-top: 4px;
  border-style: dashed;
  border-color: rgb(255 255 255 / 15%);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.navigation-add:hover { background: var(--layer); color: var(--ink); }
.navigation-add > span { color: inherit; font-size: 18px; }
.navigation nav { display: grid; gap: 4px; margin-top: 20px; }
.navigation nav a, .navigation nav button, .navigation-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--control);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.navigation nav a:hover, .navigation nav button:hover, .navigation-footer a:hover,
.navigation nav a[aria-current="page"] { background: var(--layer); color: var(--ink); }
.navigation-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.navigation-footer a span { font-size: 20px; }
.workspace-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  border-bottom: 1px solid var(--line);
}
.workspace-strip > .text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--accent); font-size: 12px; }
.workspace-strip .glyph-chevron { transform: rotate(-135deg); }
.workspace-footer { border-top: 1px solid var(--line); color: var(--muted); text-align: center; padding: 24px var(--page-gutter); }
.workspace-footer nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; line-height: 20px; }
.workspace-footer a { text-decoration: none; }
.workspace-footer a:hover { color: var(--ink); text-decoration: underline; }
.workspace-footer p { margin-top: 16px; font-size: 12px; line-height: 16px; }

main { flex: 1; width: 100%; max-width: 1440px; min-width: 0; padding: 32px var(--page-gutter) 32px; margin-inline: auto; outline: none; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.workspace-header { display: flex; align-items: flex-start; gap: 12px; min-height: 117px; padding: 20px; }
.workspace-title { flex: 1; min-width: 0; }
h1 { color: #fff; font-size: 18px; font-weight: 700; line-height: 28px; overflow-wrap: anywhere; }
.summary { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 18px; }
.folder-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 1px 6px; border: 1px solid var(--line-quiet); border-radius: 8px; color: var(--ink); background: var(--layer); font-size: 11px; line-height: 16px; }
.header-symbol {
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  background: var(--layer);
  border: 1px solid var(--line-quiet);
  border-radius: var(--control);
  color: var(--warm);
}
.header-symbol > .glyph { transform: scale(1.28); }
.workspace-actions { flex: none; }

.glyph { transform: scale(1.15); }
.workspace-actions { flex: none; }

.glyph { display: inline-block; position: relative; flex: none; width: 16px; height: 16px; color: inherit; }
.glyph-folder { height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
.glyph-folder::before { content: ""; position: absolute; left: -1.5px; top: -4px; width: 8px; height: 4px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.glyph-help { display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
.glyph-ranking { border-bottom: 1.5px solid currentColor; }
.glyph-ranking::before, .glyph-ranking::after { content: ""; position: absolute; bottom: 3px; width: 3px; border-radius: 1px; background: currentColor; }
.glyph-ranking::before { left: 2px; height: 6px; }
.glyph-ranking::after { left: 7px; height: 10px; box-shadow: 5px 2px 0 -.3px currentColor; }
.glyph-chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.glyph-file, .glyph-video { height: 18px; width: 14px; border: 1.5px solid currentColor; border-radius: 3px; }
.glyph-video { color: var(--video); }
.glyph-video::before { content: ""; position: absolute; left: 4px; top: 4px; border-block: 3px solid transparent; border-left: 4px solid currentColor; }

.command-bar { display: flex; align-items: center; gap: 8px; margin-block: 12px; min-height: 50px; padding: 6px 8px; }
.command-label { display: grid; width: 36px; height: 36px; place-items: center; margin-right: auto; color: var(--muted); }
.ranking-toolbar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.select-wrap { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.select-wrap::after { content: ""; position: absolute; top: calc(50% - 4px); right: 9px; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); pointer-events: none; }
.select-wrap select { min-height: 34px; max-width: 100%; padding: 4px 23px 4px 8px; appearance: none; background: var(--field); border: 1px solid var(--line); border-radius: var(--control); font-size: 12px; }
.data-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.search-wrap { display: flex; align-items: center; gap: 9px; width: min(36%, 218px); min-height: 34px; padding-inline: 10px; background: var(--field); border: 1px solid var(--line); border-radius: var(--control); color: var(--muted); }
.search-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-wrap input { flex: 1; width: 100%; min-width: 0; min-height: 32px; border: 0; padding: 2px 0; background: transparent; outline: 0; font-size: 12px; }
.search-wrap input::placeholder { color: var(--muted); }
.search-icon { width: 12px; height: 12px; position: relative; flex: none; border: 1.5px solid currentColor; border-radius: 50%; }
.search-icon::after { position: absolute; content: ""; width: 5px; height: 1.5px; background: currentColor; transform: rotate(45deg); bottom: -2px; right: -4px; }
.notice { margin: 0 0 12px; padding: 9px 11px; color: var(--ink); background: var(--layer); border: 1px solid var(--line); border-radius: var(--control); font-size: .875rem; }

.list-head, .folder-row { display: grid; grid-template-columns: 36px 28px minmax(0, 1fr) 86px 112px 24px; column-gap: 14px; align-items: center; padding-inline: 16px; }
.list-head { min-height: 30px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line-quiet); }
.list-head > span:first-child { text-align: center; white-space: nowrap; }
.list-head-name { grid-column: span 2; }
.is-sort-column { color: var(--accent); }
.folder-list, .file-list { list-style: none; padding: 0; }
.folder-list-item + .folder-list-item, .file-row + .file-row { border-top: 1px solid var(--line-quiet); }
.folder-row { border: 0; width: 100%; background: transparent; min-height: 56px; padding-block: 7px; }
.folder-row:hover { background: var(--layer); }
.folder-list-item:last-child .folder-row { border-radius: 0 0 var(--radius) var(--radius); }
.folder-row:focus-visible { outline-offset: -3px; }
.folder-row-links { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 0 16px 5px 108px; }
.folder-row-links a { color: var(--accent); display: inline-flex; align-items: center; min-height: 25px; font-size: 12px; text-underline-offset: 3px; }
.rank { font-size: .84rem; font-weight: 600; color: var(--muted); text-align: center; }
.folder-symbol { display: grid; place-items: center; width: 28px; height: 30px; color: var(--warm); }
.folder-identity, .file-info { min-width: 0; display: grid; gap: 3px; }
.folder-name, .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-name { font-size: 14px; font-weight: 600; }
.row-meta, .file-meta { color: var(--muted); font-size: 12px; line-height: 16px; }
.metric-value { font-size: .94rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-value.sorted { color: var(--accent); }
.metric-label { display: none; }
.row-disclosure { display: grid; place-items: center; color: var(--muted); }
.list-footnote { padding: 12px 2px; color: var(--muted); font-size: .75rem; }
.empty { padding: 23px 16px; }
.empty h2 { font-size: 1rem; }
.empty p { margin: 6px 0 13px; font-size: .875rem; color: var(--muted); line-height: 1.65; }

.folder-detail { display: grid; gap: 12px; }
.evidence-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 50px; padding: 6px 16px; }
.evidence-values, .evidence-value { display: flex; align-items: baseline; }
.evidence-values { gap: 17px; }
.evidence-value { gap: 6px; }
.evidence-value dt { font-size: .78rem; color: var(--muted); }
.evidence-value dd { font-size: 1rem; font-weight: 650; color: var(--accent); }
.evidence-value + .evidence-value { border-left: 1px solid var(--line); padding-left: 17px; }
.evidence-context { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.evidence-context > * { font-size: 12px; }
.file-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 17px; min-height: 57px; padding: 7px 22px; }
.file-row:first-child { min-height: 60px; }
.file-row:last-child { min-height: 61px; }
.file-name { font-size: 14px; font-weight: 600; }
.file-empty { padding: 17px 16px; font-size: .875rem; color: var(--muted); }
.detail-manage { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }

dialog { width: min(calc(100% - 28px), 570px); max-height: min(92dvh, 860px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 56px #050a0ec0; overflow: auto; }
dialog::backdrop { background: #08121cbb; }
.dialog-head, .dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.18rem; font-weight: 680; }
.dialog-head p { font-size: .81rem; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.close-button { border: 0; background: transparent; width: 40px; height: 40px; flex: none; text-align: center; border-radius: var(--control); font-size: 1.4rem; }
.close-button:hover { background: var(--layer); }
.dialog-body { display: grid; gap: 14px; padding: 17px 18px; }
.dialog-body label { display: grid; gap: 5px; font-size: .875rem; font-weight: 600; }
.dialog-body input:not([type="file"]), .dialog-body textarea { width: 100%; min-width: 0; min-height: 42px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--control); background: var(--field); font-size: 1rem; font-weight: 400; }
.dialog-body textarea { resize: vertical; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.field-grid > label { display: block; }
.field-grid input { display: block; margin-top: 5px; }
.optional { color: var(--muted); font-size: .75rem; font-weight: 400; }
details summary { font-size: .875rem; cursor: pointer; width: fit-content; padding-block: 4px; }
.files-field { margin-top: 7px; }
.field-help { font-size: .76rem; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.field-help a, .prose p a { color: var(--accent); }
.form-error { color: #ffc0c7; font-size: .875rem; line-height: 1.55; }
.dialog-foot { justify-content: flex-end; border-top: 1px solid var(--line); }
.prose p { font-size: .95rem; line-height: 1.75; }
#mobile-menu { inset: 0 auto 0 0; margin: 0; width: min(85vw, var(--rail-width)); max-width: none; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
.mobile-links { display: grid; gap: 4px; padding: 13px; }
.mobile-links a, .mobile-links button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 11px; text-decoration: none; color: var(--ink); font-size: .9rem; border-radius: var(--control); }
.mobile-links a:hover, .mobile-links button:hover, .mobile-links a[aria-current="page"] { background: var(--layer); }


@media (max-width: 1200px) {
  .list-head, .folder-row { grid-template-columns: 32px 28px minmax(0, 1fr) 62px 98px 16px; gap: 9px; }
  .folder-row-links { padding-left: 94px; }
}
@media (max-width: 1023px) {
  :root { --page-gutter: 24px; }
  .shell { display: block; }
  .navigation { display: none; }
  .workspace { min-height: 100dvh; }
  .topbar { padding-inline: var(--page-gutter); }
  main { padding-top: 24px; }
}
@media (max-width: 560px) {
  :root { --page-gutter: 16px; }
  .topbar { gap: 10px; }
  .top-location { font-size: 16px; line-height: 24px; }
  .top-actions .search-x { display: none; }
  .topbar .button { min-height: 36px; padding-inline: 8px; }
  .workspace-header { min-height: 125px; gap: 8px; padding: 16px 15px; }
  .workspace-header h1 { font-size: 16px; line-height: 24px; }
  .workspace-header .button { white-space: normal; max-width: 106px; }
  .summary { max-width: 190px; }
  .workspace-footer { min-height: 129px; }
  .command-bar { gap: 6px; padding: 6px 7px; }
  .command-label { width: 24px; }
  .ranking-toolbar { flex: none; gap: 5px; }
  .ranking-toolbar select { width: 102px; text-overflow: ellipsis; }
  .search-wrap { width: auto; min-width: 0; flex: 1; gap: 8px; }
  .list-head { display: none; }
  .folder-row { grid-template-columns: 22px 24px minmax(0, 1fr) 42px 63px 12px; padding-inline: 8px; gap: 5px; }
  .folder-row-links { padding-left: 64px; }
  .folder-row-links a { min-height: 32px; }
  .folder-symbol { width: 24px; }
  .folder-symbol .glyph { scale: .82; }
  .folder-name { font-size: 13px; }
  .file-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .metric-value { font-size: 13px; }
  .metric-label { display: block; font-size: 10px; line-height: 14px; color: var(--muted); }
  .evidence-bar { padding-inline: 12px; }
  .evidence-values { gap: 10px; }
  .evidence-value + .evidence-value { padding-left: 10px; }
  .evidence-value dd { font-size: 14px; }
  .file-row { padding-inline: 16px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-head, .dialog-body, .dialog-foot { padding-inline: 13px; }
}
@media (max-width: 355px) {
  .ranking-toolbar select { width: 90px; }
  .folder-row { grid-template-columns: 20px 22px minmax(0, 1fr) 37px 59px 10px; }
}
