:root {
  --ink: #25312e;
  --muted: #61706c;
  --line: #dce3e0;
  --soft: #f5f7f6;
  --green: #18745f;
  --green-dark: #0f5a49;
  --green-soft: #e8f4f0;
  --red: #a43a34;
  --red-soft: #fbefee;
  --orange: #8a5a11;
  --orange-soft: #fff5df;
  --blue: #2b6388;
  --blue-soft: #edf5fa;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
a { color: var(--green-dark); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button, input, select { min-height: 42px; }
:focus-visible { outline: 3px solid #e4a52e; outline-offset: 2px; }
[hidden] { display: none !important; }

.content-width { width: min(760px, calc(100% - 32px)); margin-inline: auto; }
.wide-width { width: min(1100px, calc(100% - 32px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid #e6ebe9; }
.header-inner { width: min(760px, calc(100% - 32px)); min-height: 54px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-name { color: var(--green); font-weight: 750; text-decoration: none; }
.header-inner span { color: var(--muted); font-size: .83rem; }

.intro { padding: 28px 0 18px; }
h1, h2, h3 { line-height: 1.42; }
h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 3vw, 1.95rem); letter-spacing: -.025em; }
h2 { margin: 0 0 16px; font-size: 1.32rem; }
h3 { margin: 0 0 8px; font-size: 1.04rem; }
.intro > p { margin: 0 0 12px; color: #4e5d59; }
.official-line { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 14px; padding: 10px 13px; border-left: 4px solid var(--orange); background: var(--orange-soft); color: #6b4a0f; font-size: .91rem; }
.privacy-line { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 10px; padding: 10px 13px; border-left: 4px solid var(--green); background: var(--green-soft); color: #275047; font-size: .91rem; }
.verified { margin-top: 10px !important; color: var(--muted) !important; font-size: .82rem; }

.checker { margin-top: 14px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.input-tabs { display: flex; gap: 0; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.input-tab { flex: 0 0 auto; padding: 9px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.input-tab.is-active { border-color: var(--green); color: var(--green-dark); font-weight: 700; }
.input-panel > p:first-child { margin-top: 0; }

.drop-zone, .folder-box, .file-box { padding: 27px 18px; border: 1px dashed #9ab7ae; border-radius: 7px; background: #f8fbfa; text-align: center; }
.drop-zone { display: grid; justify-items: center; gap: 7px; }
.drop-zone.is-dragging { border-color: var(--green); background: var(--green-soft); }
.drop-zone small, .support-note { color: var(--muted); }
.file-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 7px 15px; border: 1px solid var(--green); border-radius: 6px; background: #fff; color: var(--green-dark); cursor: pointer; font-weight: 700; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.input-state { min-height: 1.5em; color: var(--green-dark); font-size: .9rem; }

.primary-actions, .button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.primary-actions { margin-top: 20px; }
button { padding: 8px 16px; border: 1px solid var(--green); border-radius: 6px; background: #fff; color: var(--green-dark); cursor: pointer; font-weight: 650; }
button:hover { background: var(--green-soft); }
button:disabled { cursor: wait; opacity: .55; }
.primary-button { background: var(--green); color: #fff; }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border-color: #aebbb6; color: var(--ink); }
.text-button { border-color: transparent; }
.progress-wrap { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.progress-wrap progress { flex: 1; height: 11px; accent-color: var(--green); }
.progress-wrap span { min-width: 145px; color: var(--muted); font-size: .85rem; text-align: right; }
.status { margin-top: 15px; padding: 10px 12px; border-radius: 6px; font-size: .92rem; }
.status--info { background: var(--blue-soft); color: var(--blue); }
.status--success { background: var(--green-soft); color: var(--green-dark); }
.status--error { background: var(--red-soft); color: var(--red); }

.results { scroll-margin-top: 15px; margin-top: 35px; }
.result-fixed-note { margin: 4px 0 20px; padding: 10px 13px; border-left: 4px solid var(--blue); background: var(--blue-soft); color: #234b63; font-size: .9rem; }
.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.summary-grid > div { padding: 15px; border-right: 1px solid var(--line); background: var(--soft); }
.summary-grid > div:last-child { border-right: 0; }
.summary-grid strong { display: block; font-size: 1.5rem; line-height: 1.25; }
.summary-grid span { color: var(--muted); font-size: .8rem; }
.summary-grid .summary-included { background: var(--green-soft); }
.summary-grid .summary-not-included { background: var(--red-soft); }
.summary-grid .summary-undetermined { background: var(--orange-soft); }
.summary-grid .summary-mismatch { background: var(--blue-soft); }

.result-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 22px 0 8px; }
.result-tools .field { display: grid; gap: 4px; }
.result-tools label { font-size: .86rem; font-weight: 650; }
.visible-count { color: var(--muted); font-size: .88rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f1f4f3; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.file-cell { min-width: 190px; max-width: 320px; overflow-wrap: anywhere; font-family: Consolas, "SFMono-Regular", monospace; font-size: .82rem; }
.standard-cell { min-width: 170px; }
.status-label { white-space: nowrap; font-weight: 750; }
.status-label--included { color: var(--green); }
.status-label--not-included { color: var(--red); }
.status-label--undetermined { color: var(--orange); }
.cell-note { margin-top: 5px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.ext-mismatch { color: var(--red); font-weight: 700; }
.details-cell { width: 78px; white-space: nowrap; }
.details-toggle { padding: 2px 0; border: 0; background: transparent; color: var(--green-dark); font: inherit; font-weight: 650; cursor: pointer; }
.details-toggle:hover { text-decoration: underline; }
.details-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.has-open-details td { border-bottom-color: transparent; }
.detail-row > td { padding: 0 11px 14px; background: #f7faf8; overflow-wrap: anywhere; }
.result-detail-panel { padding: 14px 16px; border-left: 3px solid var(--green); background: #fff; }
.detail-list { display: grid; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .82rem; }
.detail-list code { padding: 1px 5px; border-radius: 3px; background: #eef2f0; color: var(--muted); font-size: .76rem; }
.detail-page-link { display: inline-block; margin-top: 4px; font-size: .85rem; }
.load-more { display: block; margin: 15px auto 0; }
.result-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 25px; }
.result-action-grid section { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.result-action-grid p { margin: 0 0 13px; color: var(--muted); font-size: .88rem; }
.button-row button { background: #fff; }

.guide { padding: 60px 0 65px; }
.guide h2 { margin-top: 2.3em; padding: 8px 12px; border-left: 4px solid var(--green); background: var(--soft); }
.guide h2:first-child { margin-top: 0; }
.guide p, .guide li { color: #45534f; }
.guide code { padding: .1em .34em; border-radius: 4px; background: #f0f3f2; font-family: Consolas, monospace; }
.limit-list { padding-left: 22px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 13px 3px; cursor: pointer; font-weight: 650; }
.faq p { margin: 0; padding: 0 3px 14px; }
.source-list { padding-left: 22px; }
.cross-link-box { margin: 14px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }

.legal-page h2 { margin-top: 1.8em; }

.site-footer { border-top: 1px solid var(--line); background: var(--soft); }
.footer-inner { width: min(760px, calc(100% - 32px)); margin-inline: auto; padding: 27px 0; color: var(--muted); font-size: .84rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 15px; }
.noscript { margin: 0; padding: 10px; background: var(--red-soft); color: var(--red); text-align: center; }

@media (max-width: 820px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-grid > div { border-bottom: 1px solid var(--line); }
  .summary-grid > div:nth-child(3n) { border-right: 0; }
  .result-action-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 0; padding: 9px 0; }
  .intro { padding-top: 21px; }
  .checker { width: calc(100% - 20px); padding: 16px 13px; }
  .input-tab { padding: 8px 11px; font-size: .87rem; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid > div, .summary-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .summary-grid > div:nth-child(2n) { border-right: 0; }
  .primary-actions > *, .button-row > * { width: 100%; }
  .progress-wrap { align-items: stretch; flex-direction: column; }
  .progress-wrap span { text-align: left; }
  .table-wrap { border: 0; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: grid; gap: 12px; }
  tbody tr { padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
  tbody td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px; padding: 6px 0; border: 0; text-align: left; }
  tbody td::before { color: var(--muted); font-size: .78rem; font-weight: 650; }
  tbody td:nth-child(1)::before { content: "ファイル名"; }
  tbody td:nth-child(2)::before { content: "判定"; }
  tbody td:nth-child(3)::before { content: "検出した形式"; }
  tbody td:nth-child(4)::before { content: "確信度"; }
  tbody td:nth-child(5)::before { content: "拡張子"; }
  tbody td:nth-child(6)::before { content: "詳細"; }
  .file-cell { min-width: 0; max-width: none; }
  tbody tr.has-open-details { border-radius: 7px 7px 0 0; }
  tbody tr.detail-row { margin-top: -13px; padding: 0; border-top: 0; border-radius: 0 0 7px 7px; }
  tbody tr.detail-row td { display: block; padding: 0 12px 12px; }
  tbody tr.detail-row td::before { content: none; }
  .result-detail-panel { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
