/* ===== 基本リセット・共通 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  color: #333;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

h1, h2 {
  color: #2c5f2d;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  border-left: 4px solid #2c5f2d;
  padding-left: 8px;
}

/* ===== セクション間スペース ===== */
section,
.count-area {
  margin-top: 32px;
}

/* ===== ヘッダー ===== */
.page-header {
  margin-bottom: 16px;
}

.lead {
  font-size: 0.95rem;
  color: #555;
}

/* ===== 掲載基準 ===== */
.criteria ul {
  margin-top: 8px;
  padding-left: 1.4em;
  font-size: 0.9rem;
}

.criteria li {
  margin-bottom: 4px;
}

/* ===== 絞り込み ===== */
.filter-area {
  background: #f7faf5;
  border: 1px solid #d8e3d2;
  border-radius: 12px;
  padding: 16px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-top: 8px;
}

.filter-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  font-size: 0.9rem;
  color: #355636;
}

.filter-controls select {
  min-width: 180px;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.9rem;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #fff;
}

#filter-reset {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #2c5f2d;
  border-radius: 8px;
  background: #2c5f2d;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#filter-reset:hover {
  background: #244d24;
  border-color: #244d24;
}

.filter-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #5c705d;
}

/* ===== 件数表示 ===== */
.count-area {
  font-size: 0.9rem;
  color: #555;
}

/* ===== テーブル ===== */
.table-area {
  overflow-x: auto;
}

#distillery-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 8px;
}

#distillery-table th {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
}

#distillery-table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  white-space: normal;
  word-break: break-all;
}

/* 列ごとの幅制御 */
#distillery-table th:nth-child(1),
#distillery-table td:nth-child(1) { white-space: nowrap; }  /* No. */
#distillery-table th:nth-child(2),
#distillery-table td:nth-child(2) { min-width: 160px; }     /* 蒸留所名 */
#distillery-table th:nth-child(3),
#distillery-table td:nth-child(3) { white-space: nowrap; }  /* 所在地 */
#distillery-table th:nth-child(4),
#distillery-table td:nth-child(4) { white-space: nowrap; }  /* 地域 */
#distillery-table th:nth-child(5),
#distillery-table td:nth-child(5) { min-width: 140px; }     /* 原料植物 */
#distillery-table th:nth-child(7),
#distillery-table td:nth-child(7) { white-space: nowrap; }  /* 確認元 */
#distillery-table th:nth-child(8),
#distillery-table td:nth-child(8) { white-space: nowrap; }  /* 確認状態 */

#distillery-table thead {
  background-color: #2c5f2d;
  color: #fff;
}

#distillery-table tbody tr:nth-child(even) {
  background-color: #f6f9f4;
}

#distillery-table tbody tr:hover {
  background-color: #e8f0e4;
}

/* ===== 出典・注意・更新履歴 ===== */
.sources ul,
.notice ul {
  margin-top: 8px;
  padding-left: 1.4em;
  font-size: 0.88rem;
}

.sources li,
.notice li {
  margin-bottom: 4px;
}

.changelog dl {
  margin-top: 8px;
  font-size: 0.88rem;
}

.changelog dt {
  font-weight: bold;
  margin-top: 8px;
}

.changelog dd {
  margin-left: 1em;
}

@media (max-width: 720px) {
  .filter-controls {
    gap: 10px;
  }

  .filter-controls label,
  .filter-controls select,
  #filter-reset {
    width: 100%;
    min-width: 0;
  }
}
