/* ツールページ共通の部品（読み込み枠・お知らせ・表・判定タグ・保存ボタン） */
.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.dropzone {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 28px 16px;
  text-align: center;
}
.dropzone p { margin: 6px 0; }
.dropzone-title { font-weight: 700; font-size: 1.1rem; }
.dropzone.is-dragover { background: #e3ecfb; border-style: solid; }
/* label をボタンとして使うので、キーボード操作中は input のフォーカスを label に表示する */
.dropzone:has(input:focus-visible) .button { outline: 3px solid var(--accent); outline-offset: 2px; }

.message:empty { display: none; }
.message { margin: 12px 0; font-weight: 700; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (width < 480px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 8px; }
}

.notice { padding: 10px 14px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-info { background: var(--bg-soft); color: var(--fg); font-weight: 400; border-inline-start: 4px solid var(--accent); }

h4 { font-size: 1rem; margin: 16px 0 6px; }

/* 表 */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(420px, 70vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  container-type: inline-size;
}
table { border-collapse: separate; border-spacing: 0; inline-size: 100%; font-size: .9rem; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
thead th { position: sticky; inset-block-start: 0; z-index: 1; background: var(--bg-soft); white-space: nowrap; }

.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.tag-lost, .tag-ng { background: var(--bad-bg); color: var(--bad); }
.tag-windows, .tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-fixed { background: #e3ecfb; color: #174ea6; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-empty { background: var(--bg-soft); color: var(--muted); }

.outputs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.output button { inline-size: 100%; }
.output p { margin: 4px 0 0; }

/* 入力欄 */
.field { display: grid; gap: 4px; margin-block: 10px; }
.field label, .field .label { font-weight: 700; }
textarea, input[type="text"], input[type="number"], input[type="month"] {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-inline-size: 100%;
}
input[type="text"], input[type="number"], input[type="month"] { min-block-size: 44px; }
textarea { inline-size: 100%; min-block-size: 8em; resize: vertical; }
input[type="checkbox"], input[type="radio"] { inline-size: 1.2em; block-size: 1.2em; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; margin-inline-end: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs button[aria-pressed="false"] { background: var(--bg); color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block: 12px; }
