:root {
  color-scheme: dark;
  --bg: #090908;
  --surface: #151311;
  --surface-strong: #211c17;
  --ink: #f6efe4;
  --muted: #baa992;
  --line: #3b3329;
  --gold: #d8ad5a;
  --rice: #f2dfbc;
  --green: #6fb98c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(216, 173, 90, 0.18), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(111, 185, 140, 0.12), transparent 34%),
    linear-gradient(180deg, #100d0a 0%, var(--bg) 52%, #0b0a09 100%);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a,
button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero,
.toolbar,
.list-head,
.sake-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 19, 17, 0.94);
}

.hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(9, 9, 8, 0.96), rgba(9, 9, 8, 0.74)),
    url("./assets/masumi-karakuchi.jpg") center right / cover no-repeat;
  overflow: hidden;
}

.eyebrow,
.toolbar-label {
  margin: 0 0 8px;
  color: #a8e0bc;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 3rem;
  line-height: 1.18;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.9;
}

.hero-stats {
  min-width: 120px;
  min-height: 92px;
  display: grid;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 28, 23, 0.9);
}

.hero-stats span {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
}

.hero-stats small,
.search span {
  color: var(--muted);
}

.drink-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(216, 173, 90, 0.28);
  border-radius: 8px;
  background: rgba(12, 10, 8, 0.78);
}

.drink-index a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(33, 28, 23, 0.84);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.drink-index a:first-child {
  color: var(--rice);
}

.drink-index a[aria-current="page"] {
  border-color: rgba(216, 173, 90, 0.8);
  background: var(--gold);
  color: #17100a;
}

.drink-index a:not([aria-current="page"]):hover {
  border-color: rgba(216, 173, 90, 0.58);
  color: var(--rice);
}

.map-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 19, 17, 0.94);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 10px;
}

.ghost-button,
.region-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.ghost-button {
  min-height: 40px;
  padding: 8px 14px;
}

.ghost-button[aria-pressed="true"],
.region-button[aria-pressed="true"] {
  border-color: rgba(216, 173, 90, 0.8);
  background: var(--gold);
  color: #17100a;
  font-weight: 800;
}

.map-wrap {
  position: relative;
  min-height: 330px;
  padding: 0 18px 4px;
}

#japan-map {
  display: block;
  width: min(100%, 560px);
  height: auto;
  max-height: 390px;
  margin: 0 auto;
}

.prefecture {
  fill: #373029;
  stroke: #100e0c;
  stroke-width: 0.8;
  cursor: pointer;
  transition: fill 160ms ease, opacity 160ms ease;
}

.prefecture:hover,
.prefecture:focus {
  fill: #8f6327;
  outline: none;
}

.prefecture.is-selected {
  fill: var(--green);
}

.map-status {
  position: absolute;
  right: 18px;
  bottom: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.region-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 18px;
}

.region-button {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
}

.search {
  display: grid;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 800;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f0d0b;
  color: var(--ink);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button,
.actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
}

.filter-button {
  padding: 9px 12px;
  cursor: pointer;
}

.filter-button[aria-pressed="true"],
.actions a.market-link {
  border-color: rgba(216, 173, 90, 0.7);
  background: var(--gold);
  color: #17100a;
  font-weight: 800;
}

.actions a.source-link {
  color: var(--muted);
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
}

.count-pill {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(216, 173, 90, 0.18);
  color: var(--rice);
  font-weight: 800;
}

.sake-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
  gap: 12px;
  margin-top: 12px;
}

.sake-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(216, 173, 90, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(33, 28, 23, 1), rgba(20, 17, 14, 1));
}

.image-wrap {
  display: grid;
  align-items: start;
  justify-items: center;
}

.sake-card img {
  width: 150px;
  max-height: 230px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.sake-meta,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sake-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(111, 185, 140, 0.16);
  color: #afe4c2;
  font-size: 0.82rem;
}

.brewery {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.note {
  color: var(--muted);
  font-size: 0.94rem;
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.specs div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
}

dd {
  margin: 0;
  font-weight: 800;
}

.taste {
  display: grid;
  gap: 6px;
}

.star-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  color: var(--gold);
  font-size: 0.9rem;
}

.star-row span:first-child {
  color: var(--muted);
}

.actions {
  margin-top: 14px;
}

.actions a {
  padding: 9px 12px;
  font-size: 0.9rem;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--ink);
}

@media (max-width: 780px) {
  .hero,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 2.25rem;
  }

  .sake-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero,
  .toolbar,
  .list-head,
  .panel-head {
    padding: 18px;
  }

  .map-wrap {
    min-height: 270px;
    padding-inline: 8px;
  }

  .sake-card {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .sake-card img {
    width: 100px;
    max-height: 160px;
  }

  .specs {
    grid-template-columns: 1fr;
  }
}
