html { scrollbar-gutter: stable; }
body {
  font-family: "Segoe UI", "Meiryo", sans-serif;
  background: #f4f6f8;
  color: #222;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}
h1 { font-size: 22px; }
h2 { font-size: 18px; }
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
label { display: block; margin-top: 12px; font-weight: 600; font-size: 14px; }
.sub-label { font-weight: 400; color: #666; font-size: 12px; }
textarea, input[type=text] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
textarea { height: 100px; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
button, .btn-link, label.btn-primary, label.btn-secondary {
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
  box-sizing: border-box;
  vertical-align: middle;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1e4fca; }
.btn-secondary { background: #e5e7eb; color: #222; }
.btn-secondary:hover { background: #d1d5db; }
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button:disabled:hover { background: #e5e7eb; }
.error {
  background: #fde8e8;
  color: #b91c1c;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
table { border-collapse: collapse; width: 100%; margin-top: 10px; }
td, th {
  border: 1px solid #ddd;
  padding: 8px 12px;
  text-align: left;
  font-size: 14px;
}
th { background: #f0f2f5; width: 40%; }
.ppk-highlight { font-size: 20px; font-weight: bold; color: #2563eb; }
img { width: 100%; border-radius: 4px; margin-top: 10px; }
.file-chip {
  color: #888;
  font-size: 13px;
  font-style: italic;
}
.file-chip.selected {
  padding: 7px 12px;
  border: 1px solid #2563eb;
  border-radius: 4px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 600;
  font-style: normal;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.page-footer {
  margin-top: 8px;
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: #888;
}
.page-footer a {
  color: #888;
  text-decoration: underline;
  margin: 0 8px;
}
.help-section { margin-bottom: 20px; }
.help-section:last-child { margin-bottom: 0; }
.help-section h3 { font-size: 15px; margin: 0 0 6px 0; }
.help-section p { margin: 0 0 6px 0; font-size: 14px; line-height: 1.7; }
.help-section ul { margin: 6px 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
p.scroll-hint { margin: 4px 0 0 0; text-align: right; font-size: 12px; line-height: 1.5; color: #666; }
.scroll-hint-part { white-space: nowrap; }
/* 折りたたみ式のカード（<details class="fold">）。件数の多い明細の表を、見出し（summary）のクリックで開閉する。
   初期状態（open の有無）はテンプレート側で行数から決める。ほかのツールでも同じクラスで使える */
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▶"; display: inline-block; width: 1.4em; font-size: 14px; color: #2563eb; }
details.fold[open] > summary::before { content: "▼"; }
details.fold > summary h2 { display: inline; margin: 0; }
details.fold > summary:hover h2 { color: #2563eb; }
.fold-hint { display: block; margin: 4px 0 0 1.4em; font-size: 12px; color: #666; }
details.fold[open] .fold-hint { display: none; }

/* 入力カード先頭の注意書き（機密情報を入力しないこと）。6ツール共通 */
.data-caution {
  background: #fff8e6;
  color: #7a4b00;
  border-left: 4px solid #e0a100;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 0 0 14px 0;
  font-size: 13px;
  line-height: 1.6;
}
.data-caution a { color: inherit; }
