:root { --text:#222; --muted:#666; --line:#d9d9d9; --bg:#fff; --th:#f4f4f4; --stripe:#fafafa; --accent:#6b1d2a; --chip-red:#6b1d2a; --chip-white:#8a6d1f; --chip-spark:#3b5b8c; --chip-fort:#7a4a1a; --chip-sweet:#9a3d6a; }
body { font-family: sans-serif; margin: 0; color: var(--text); }
main#main { padding: 16px 16px 40px; max-width: 1400px; 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.9rem; }
.toolbar select, .toolbar input, .toolbar button { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.toolbar input[type="search"] { min-width: 12rem; }
.toolbar button { cursor: pointer; }
.muted { color: var(--muted); font-size: 0.9rem; }
.error { color: #b00020; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table.wine-table { border-collapse: collapse; width: 100%; min-width: 1100px; background: var(--bg); }
table.wine-table th, table.wine-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; font-size: 0.88rem; }
table.wine-table th { background: var(--th); text-align: left; white-space: nowrap; }
table.wine-table tbody tr.row-main { cursor: pointer; }
table.wine-table tbody tr.row-main:hover { background: #f7f0f1; }
table.wine-table tbody tr.row-main.is-focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: #f7f0f1;
}
table.wine-table .col-no { width: 3rem; white-space: nowrap; }
table.wine-table .col-img { width: 72px; }
table.wine-table img.thumb,
.card img.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  display: block;
}
.card-head { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; }
.card img.thumb { width: 72px; height: 72px; border-radius: 8px; }
table.wine-table .foreign { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; line-height: 1.4; color: #fff; white-space: nowrap; }
.chip.red { background: var(--chip-red); }
.chip.white { background: var(--chip-white); }
.chip.spark { background: var(--chip-spark); }
.chip.fort { background: var(--chip-fort); }
.chip.sweet { background: var(--chip-sweet); }
.chip.cat { background: #555; }
.detail { background: #fbf8f6; font-size: 0.86rem; line-height: 1.55; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  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 dt { color: var(--muted); font-size: 0.78rem; margin: 0; }
.detail dd { margin: 2px 0 0; }
.detail-grid > .grape-cell {
  transition: background-color .15s ease, box-shadow .15s ease;
}
.detail-grid > .grape-cell a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.detail-grid > .grape-cell:hover {
  background: #f7f0f1;
  box-shadow: inset 0 0 0 2px #6b1d2a;
}
.detail-grid > .grape-cell:hover a { text-decoration: underline; }
.card dd.grape-cell { padding: 6px 8px; border-radius: 8px; }
.card dd.grape-cell a { color: var(--accent); text-decoration: none; font-weight: 600; }
.card dd.grape-cell:hover { background: #f7f0f1; box-shadow: inset 0 0 0 2px #6b1d2a; }
.card.is-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-list { display: none; }
@media (max-width: 860px) {
  .table-wrap { display: none; }
  .card-list { display: grid; gap: 12px; }
  .card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
  .card h2 { font-size: 1.02rem; margin: 4px 0 2px; }
  .card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .card .place { font-size: 0.85rem; color: var(--muted); }
  .card .feature { margin: 8px 0; font-size: 0.92rem; line-height: 1.5; }
  .card dl { display: grid; grid-template-columns: 7em 1fr; gap: 4px 8px; margin: 8px 0 0; font-size: 0.86rem; }
  .card dt { color: var(--muted); }
  .card dd { margin: 0; }
  .hint { display: none; }
}