:root {
  color-scheme: dark;
  --bg: #090908;
  --surface: #151311;
  --surface-strong: #211c17;
  --ink: #f4efe7;
  --muted: #b9aa99;
  --line: #3d332b;
  --accent: #38a172;
  --accent-deep: #2f9168;
  --amber: #f2aa3b;
  --amber-soft: #3a2a14;
  --map-fill: #373029;
  --map-active: #59b784;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(242, 170, 59, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(56, 161, 114, 0.14), transparent 34%),
    linear-gradient(180deg, #0f0c0a 0%, var(--bg) 46%, #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;
}

button,
a {
  font: inherit;
}

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

.hero {
  position: relative;
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(9, 9, 8, 0.96) 0%, rgba(9, 9, 8, 0.78) 44%, rgba(9, 9, 8, 0.2) 100%),
    url("./assets/beer-hero-glasses.png") center right / cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 104px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--amber));
}

.eyebrow {
  margin: 0 0 8px;
  color: #9be1bf;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 12px;
  padding-top: 24px;
  font-size: 2.85rem;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-size: 1.24rem;
  line-height: 1.35;
  font-weight: 800;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.16rem;
  line-height: 1.32;
  font-weight: 800;
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.9;
}

.hero-stats {
  display: grid;
  grid-template-columns: 118px;
  gap: 10px;
}

.hero-stats div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 28, 23, 0.86);
  backdrop-filter: blur(8px);
}

.hero-stats span {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
}

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

.drink-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid rgba(242, 170, 59, 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: #f4d7a3;
}

.drink-index a[aria-current="page"] {
  border-color: rgba(242, 170, 59, 0.82);
  background: var(--amber);
  color: #17100a;
}

.drink-index a:not([aria-current="page"]):hover {
  border-color: rgba(242, 170, 59, 0.58);
  color: #f4d7a3;
}

.app-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: start;
}

.map-panel,
.list-panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 19, 17, 0.94);
}

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

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

.ghost-button {
  padding: 10px 16px;
}

.ghost-button[aria-pressed="true"],
.region-button[aria-pressed="true"],
.style-button[aria-pressed="true"] {
  border-color: var(--accent-deep);
  background: var(--accent);
  color: #ffffff;
}

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

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

.prefecture {
  fill: var(--map-fill);
  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(--map-active);
}

.map-status {
  margin: 0;
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.region-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
}

.region-button,
.style-button {
  padding: 9px 12px;
  font-size: 0.9rem;
}

.style-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 14px;
}

.beer-search {
  display: grid;
  gap: 7px;
  padding: 0 20px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.beer-search input:focus {
  border-color: var(--amber);
  outline: none;
}

.count-pill {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #ffd88f;
  font-weight: 700;
}

.hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hint-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
}

.beer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}

.beer-card {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgba(242, 170, 59, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(33, 28, 23, 1), rgba(23, 19, 16, 1));
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}

.beer-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--amber), var(--accent));
  opacity: 0.86;
}

.beer-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 170, 59, 0.58);
}

.beer-image-wrap {
  position: relative;
  display: grid;
  align-items: start;
}

.beer-image-wrap::after {
  content: "";
  position: absolute;
  inset: 18% -8px -8px 20%;
  border-radius: 999px;
  background: rgba(242, 170, 59, 0.18);
  filter: blur(18px);
}

.beer-card img {
  position: relative;
  z-index: 1;
  width: 132px;
  max-height: 190px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

.beer-body {
  position: relative;
}

.beer-meta,
.market-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.beer-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 161, 114, 0.16);
  color: #9be1bf;
}

.beer-meta .abv-tag {
  border: 1px solid rgba(98, 180, 255, 0.45);
  background: rgba(98, 180, 255, 0.14);
  color: #acd8ff;
}

.beer-meta .furusato-tag {
  border: 1px solid rgba(242, 170, 59, 0.55);
  background: rgba(242, 170, 59, 0.16);
  color: #ffd88f;
}

.brewery-name {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.brewery-name span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #9be1bf;
  font-size: 0.75rem;
  font-weight: 700;
}

.beer-pitch {
  margin-bottom: 10px;
  color: #ffd88f;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
}

.official-note {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.65;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.spec-row span {
  padding: 5px 9px;
  border: 1px solid rgba(242, 170, 59, 0.35);
  border-radius: 999px;
  background: rgba(242, 170, 59, 0.09);
  color: #ffd88f;
  font-size: 0.8rem;
  font-weight: 700;
}

.item-name {
  display: -webkit-box;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-name::before {
  content: "購入候補";
  display: inline-block;
  margin-right: 6px;
  color: #ffd88f;
  font-size: 0.78rem;
  font-weight: 700;
}

.market-row {
  margin-bottom: 12px;
  font-weight: 700;
}

.rating-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.star-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.star-row > span {
  color: var(--muted);
  font-size: 0.86rem;
}

.stars {
  display: flex;
  gap: 3px;
}

.stars span:not(.sr-only) {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--amber);
  font-size: 1.05rem;
  line-height: 1;
}

.affiliate-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.secondary-affiliate-link {
  display: inline-flex;
  width: fit-content;
  margin-left: 8px;
  color: #ffd88f;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.secondary-affiliate-link:hover {
  text-decoration: underline;
}

.source-link {
  display: inline-flex;
  width: fit-content;
  margin-right: 8px;
  margin-bottom: 8px;
  color: #9be1bf;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

  h1 {
    font-size: 2.25rem;
  }

  .hero-stats {
    grid-template-columns: 118px;
  }

  .map-wrap {
    min-height: 350px;
  }

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

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

  .hero {
    min-height: auto;
    padding: 24px 18px;
    background:
      linear-gradient(180deg, rgba(9, 9, 8, 0.9) 0%, rgba(9, 9, 8, 0.78) 48%, rgba(9, 9, 8, 0.94) 100%),
      url("./assets/beer-hero-glasses.png") center / cover no-repeat;
  }

  h1 {
    font-size: 1.78rem;
    line-height: 1.32;
  }

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

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

  .beer-card img {
    width: 92px;
    max-height: 150px;
  }

  .star-row {
    grid-template-columns: 1fr;
  }

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