/* region.html 専用。grape-style.css は品種ページのまま触らない。 */
:root {
  --text: #222;
  --muted: #666;
  --line: #d9d9d9;
  --bg: #fff;
  --th: #f4f4f4;
  --stripe: #fafafa;
  --accent: #6b1d2a;
}
body { font-family: sans-serif; margin: 0; color: var(--text); }
main#main { padding: 16px 16px 40px; max-width: 1280px; margin: 0 auto; }
h1 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); margin: 8px 0 12px; }
th { font-weight: 500; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 8px 0 16px;
}
.toolbar label { font-size: 0.95rem; }
.toolbar select,
.toolbar button {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.toolbar button { cursor: pointer; }
.toolbar button:hover { background: #f3f3f3; }
.muted { color: var(--muted); font-size: 0.9rem; }
.error { color: #b00020; }
.hint { font-size: 0.92rem; color: var(--muted); }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.region-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 980px;
  background: var(--bg);
}
table.region-table th,
table.region-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
  font-size: 0.92rem;
}
table.region-table th { background: var(--th); text-align: left; white-space: nowrap; }
table.region-table tbody tr:nth-child(4n+3) { background: var(--stripe); }
table.region-table tbody tr.is-focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: #f7f0f1;
}
table.region-table tbody tr.row-main { cursor: pointer; }
table.region-table tbody tr.row-main:hover { background: #f7f0f1; }
table.region-table .col-no { width: 3rem; white-space: nowrap; }
table.region-table .col-img { width: 72px; }
table.region-table .foreign,
.card .place { color: var(--muted); font-size: 0.85rem; }

img.flag {
  width: 64px;
  height: 42px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  display: block;
}
.wine-detail { background: #fbf8f6; font-size: 0.88rem; }
.wine-detail p { margin: 10px 0 4px; }
.wine-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 4px 0; list-style: none; }
.wine-links a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  background: #fff;
  border: 1px solid #ece6e2;
}
.wine-links a:hover {
  background: #f7f0f1;
  box-shadow: inset 0 0 0 2px #6b1d2a;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin: 4px 0 8px;
  border: 1px solid #ece6e2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.detail-grid > div {
  padding: 10px 12px;
  border-right: 1px solid #eee8e4;
  border-bottom: 1px solid #eee8e4;
}
.detail-grid dt { color: var(--muted); font-size: 0.78rem; margin: 0; }
.detail-grid dd { margin: 2px 0 0; }
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #fff;
  background: var(--accent);
  white-space: nowrap;
}
.card-list { display: none; }
.card.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 860px) {
  main#main { padding: 12px 12px 32px; }
  .table-wrap { display: none; }
  .card-list { display: grid; gap: 12px; }
  .card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
  }
  .card-head {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: start;
  }
  .card h2 { font-size: 1.05rem; margin: 0 0 6px; line-height: 1.3; }
  .card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .card .feature { margin: 8px 0; font-size: 0.92rem; line-height: 1.5; }
  .card dl {
    display: grid;
    grid-template-columns: 6.2em 1fr;
    gap: 4px 8px;
    margin: 8px 0 0;
    font-size: 0.88rem;
  }
  .card dt { color: var(--muted); }
  .card dd { margin: 0; }
  .hint { display: none; }
}
