:root {
  color-scheme: light;
  --ink: #26323c;
  --muted: #556672;
  --line: #d8e0e4;
  --pale: #f6f8f9;
  --accent: #24547a;
  --accent-dark: #183e5d;
  --paper: #fff;
  --focus: #f2ad48;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f2f5f6; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; font-size: 15px; line-height: 1.65; }
.container { width: min(1220px, calc(100% - 36px)); margin: 0 auto; }
.site-header { background: #fdfefe; border-bottom: 1px solid var(--line); padding: 34px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; color: var(--accent); font-size: 12px; font-weight: 700; margin: 0 0 8px; }
h1, h2 { line-height: 1.35; letter-spacing: .015em; }
h1 { margin: 0; font-size: clamp(23px, 3vw, 32px); font-weight: 740; }
.heading-sub { font-weight: 450; white-space: nowrap; }
.lead { margin: 12px 0 6px; color: var(--muted); }
.collection-summary { margin: 0; font-size: 13px; color: var(--muted); }
main.container { padding-top: 28px; padding-bottom: 36px; }
.panel { padding: clamp(18px, 2.5vw, 30px); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(32,48,62,.035); }
h2 { font-size: 21px; margin: 0 0 8px; }
.section-description, .results-summary { color: var(--muted); margin: 0 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label:first-child { font-weight: 650; }
.field small, .field-foot small { color: var(--muted); font-size: 12px; }
.field.wide { margin-bottom: 24px; }
input[type="text"], input[type="search"], input[type="number"], select { width: 100%; color: var(--ink); background: white; border: 1px solid #abbcc6; border-radius: 6px; padding: 10px 12px; min-height: 44px; font: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; row-gap: 18px; }
.row-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.choice-set { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.choice-set label, .check-option { cursor: pointer; font-weight: 450; }
.check-option { margin-top: 5px; font-size: 13px; }
.search-footer { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: end; gap: 20px; }
.display-options, .button-row { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.display-options > label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.display-options select { min-height: 40px; width: auto; }
.button { min-height: 43px; border: 1px solid var(--accent); padding: 9px 17px; cursor: pointer; border-radius: 6px; background: white; color: var(--accent); font-weight: 650; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.button:hover:not(:disabled) { background: #eaf1f5; }
.button.primary { color: white; background: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); }
.button:disabled { opacity: .43; cursor: not-allowed; }
.button.small { min-height: 36px; padding: 6px 11px; font-size: 13px; }
.status { font-size: 14px; color: #314656; background: #e7f1f6; border: 1px solid #c4dae7; border-radius: 6px; padding: 10px 16px; margin: 0 0 18px; }
.status.error { color: #8a2929; background: #fff0ef; border-color: #e8b4ae; }
.status.success { color: #274832; background: #e9f5ec; border-color: #c9dfcc; }
.results-panel { padding-bottom: 12px; }
.results-header { display: flex; justify-content: space-between; align-items: start; gap: 15px; flex-wrap: wrap; }
.results-summary { margin: 0 0 16px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 13.5px; }
article { overflow-wrap: anywhere; }
th, td { padding: 13px 11px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #e9eef1; color: #2a3d4b; font-size: 12.5px; position: sticky; top: 0; z-index: 1; }
tbody tr:nth-child(even) { background: #f9fbfc; }
tbody tr:hover { background: #eef5f8; }
td { overflow-wrap: anywhere; }
td:nth-child(1), td:nth-child(2) { white-space: nowrap; }
th:nth-child(1) { width: 13%; }
th:nth-child(2) { width: 13%; }
th:nth-child(3) { width: 8%; }
th:nth-child(4) { width: 40%; }
th:nth-child(5) { width: 13%; }
th:nth-child(6) { width: 13%; }
.article-text { white-space: pre-wrap; }
.row-hint { margin-top: 4px; color: var(--muted); font-size: 11px; }
.empty-message { padding: 24px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.pagination { padding: 19px 0 8px; }
.pagination-buttons { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; }
.page-indicator { font-size: 13px; padding: 0 8px; color: var(--muted); }
.about { padding: 8px 4px 5px; color: var(--muted); font-size: 13px; }
.about h2 { font-size: 17px; color: var(--ink); }
.about p { margin: 7px 0 12px; }
.about .note { font-size: 12px; }
a { color: #1a557d; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #123a58; }
.site-footer { padding: 18px 0 22px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.file-label { display: block; margin: 10px 0 4px; font-weight: 650; }
.file-panel h2 { font-size: 18px; }
.file-panel code { font-family: ui-monospace, monospace; }
@media (max-width: 800px) {
  .site-header { padding: 26px 0 22px; }
  .panel { padding: 16px; }
  .fields-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .search-footer { align-items: stretch; }
  .display-options { flex-wrap: wrap; }
  .button-row { width: 100%; }
  .button-row button { flex: 1; }
  .table-wrap { overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { padding: 10px 0 14px; border-top: 1px solid var(--line); }
  td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; white-space: normal !important; font-size: 13px; }
  td::before { content: attr(data-label); font-size: 12px; color: var(--muted); font-weight: 650; padding-top: 1px; }
  td:nth-child(4) { padding: 10px 0; }
  th:nth-child(n) { width: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
