:root {
  --atlas-bg: #090909;
  --atlas-surface: #111110;
  --atlas-surface-soft: #171614;
  --atlas-ink: #f4f0e8;
  --atlas-muted: #aaa49b;
  --atlas-line: rgba(244, 240, 232, 0.14);
  --atlas-gold: #d9a85c;
}

body.atlas-page {
  --bg: var(--atlas-bg);
  --surface: var(--atlas-surface);
  --surface-strong: var(--atlas-surface-soft);
  --ink: var(--atlas-ink);
  --muted: var(--atlas-muted);
  --line: var(--atlas-line);
  margin: 0;
  background: var(--atlas-bg);
  color: var(--atlas-ink);
}

.atlas-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.72), transparent);
}

.atlas-header-inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.atlas-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--atlas-ink);
  text-decoration: none;
}

.atlas-brand strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.35rem;
}

.atlas-brand span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.atlas-global-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.atlas-global-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.atlas-global-nav a:hover,
.atlas-global-nav a[aria-current="page"] { color: var(--accent, var(--atlas-gold)); }

.atlas-page .shell {
  width: 100%;
  margin: 0;
  padding: 0 0 72px;
}

.atlas-page .hero {
  position: relative;
  width: 100%;
  min-height: min(680px, 82svh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  padding: 150px max(24px, calc((100vw - 1160px) / 2)) 58px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.58) 46%, rgba(5, 5, 5, 0.14) 78%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.16) 44%, rgba(5, 5, 5, 0.9) 100%),
    var(--hero-image) center / cover no-repeat;
}

.atlas-page .hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.atlas-page .hero > div:first-child { max-width: 860px; }

.atlas-page .eyebrow,
.atlas-page .toolbar-label {
  color: var(--accent, var(--atlas-gold));
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.atlas-page .hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.atlas-page .hero .eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.atlas-page .hero h1 {
  max-width: 880px;
  margin: 0 0 22px;
  color: var(--atlas-ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.beer-page .hero h1 span:last-child {
  margin-top: 14px;
  color: rgba(244, 240, 232, 0.72);
  font-family: "BIZ UDPGothic", "Yu Gothic", sans-serif;
  font-size: 0.25em;
  font-weight: 700;
  line-height: 1.5;
}

.atlas-page .hero .lead {
  max-width: 660px;
  color: rgba(244, 240, 232, 0.78);
  font-size: 1rem;
  line-height: 2;
}

.atlas-page .hero-stats {
  min-width: 140px;
  min-height: 112px;
  display: grid;
  align-content: center;
  padding: 0 0 0 24px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: transparent;
}

.atlas-page .hero-stats span {
  color: var(--accent, var(--atlas-gold));
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 3.25rem;
  font-weight: 600;
  line-height: 1;
}

.atlas-page .hero-stats small { color: rgba(244, 240, 232, 0.66); }

.beer-page .hero-stats > div {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.atlas-page .drink-index,
.atlas-page .app-grid,
.atlas-page > .shell > .map-panel,
.atlas-page > .shell > .toolbar,
.atlas-page > .shell > .list-head,
.atlas-page > .shell > .sake-list,
.atlas-page > .shell > .drink-list {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.atlas-page .drink-index {
  position: relative;
  z-index: 2;
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--atlas-line);
  border-radius: 0;
  background: var(--atlas-bg);
}

.atlas-page .drink-index a {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--atlas-line);
  border-radius: 0;
  background: transparent;
  color: var(--atlas-muted);
  font-size: 0.82rem;
  text-align: center;
}

.atlas-page .drink-index a:first-child { color: var(--atlas-ink); }
.atlas-page .drink-index a:last-child { border-right: 0; }

.atlas-page .drink-index a[aria-current="page"] {
  background: transparent;
  color: var(--accent, var(--atlas-gold));
  box-shadow: inset 0 -2px 0 var(--accent, var(--atlas-gold));
}

.atlas-page .drink-index a:not([aria-current="page"]):hover {
  border-color: var(--atlas-line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--atlas-ink);
}

.atlas-page .app-grid { gap: 0; }

.atlas-page .map-panel,
.atlas-page .list-panel,
.atlas-page .toolbar,
.atlas-page .list-head {
  border: 0;
  border-bottom: 1px solid var(--atlas-line);
  border-radius: 0;
  background: transparent;
}

.atlas-page .map-panel { margin-top: 0; padding-top: 64px; }

.atlas-page .panel-head,
.atlas-page .list-head {
  padding: 28px 0 20px;
}

.atlas-page .map-panel > .panel-head { padding-top: 0; }

.atlas-page h2 {
  color: var(--atlas-ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.35;
}

.atlas-page .ghost-button,
.atlas-page .region-button,
.atlas-page .style-button,
.atlas-page .filter-button {
  min-height: 40px;
  border: 1px solid var(--atlas-line);
  border-radius: 2px;
  background: var(--atlas-surface-soft);
  color: var(--atlas-muted);
}

.atlas-page .ghost-button[aria-pressed="true"],
.atlas-page .region-button[aria-pressed="true"],
.atlas-page .style-button[aria-pressed="true"],
.atlas-page .filter-button[aria-pressed="true"] {
  border-color: var(--accent, var(--atlas-gold));
  background: var(--accent, var(--atlas-gold));
  color: #111;
}

.atlas-page .map-wrap { min-height: 350px; padding-inline: 0; }
.atlas-page #japan-map { width: min(100%, 640px); max-height: 430px; }
.atlas-page .prefecture { fill: #302e2b; stroke: #0b0b0a; }
.atlas-page .prefecture:hover,
.atlas-page .prefecture:focus { fill: color-mix(in srgb, var(--accent, var(--atlas-gold)) 58%, #302e2b); }
.atlas-page .prefecture.is-selected { fill: var(--accent, var(--atlas-gold)); }
.atlas-page .region-buttons { padding: 20px 0 28px; border-top: 1px solid var(--atlas-line); }

.atlas-page .toolbar,
.beer-page .beer-search {
  margin-top: 0;
  padding: 34px 0;
}

.atlas-page .toolbar { grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr); }
.beer-page .list-panel { padding-bottom: 0; }
.beer-page .beer-search { padding-bottom: 18px; }
.beer-page .style-filter,
.beer-page .hint-row { padding-inline: 0; }

.atlas-page .search input,
.beer-page .beer-search input {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 2px;
  background: #0d0d0c;
  color: var(--atlas-ink);
}

.atlas-page .search input:focus,
.beer-page .beer-search input:focus {
  border-color: var(--accent, var(--atlas-gold));
  outline: none;
}

.atlas-page .count-pill {
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent, var(--atlas-gold)) 18%, transparent);
  color: var(--accent, var(--atlas-gold));
}

.atlas-page .sake-list,
.atlas-page .drink-list,
.beer-page .beer-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: var(--atlas-line);
}

.atlas-page .sake-list,
.atlas-page .drink-list { margin-top: 0; }
.beer-page .beer-list { border-top: 1px solid var(--atlas-line); }

.atlas-page .sake-card,
.atlas-page .drink-card,
.beer-page .beer-card {
  min-height: 100%;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: var(--atlas-surface);
  transition: background 160ms ease;
}

.atlas-page .sake-card:hover,
.atlas-page .drink-card:hover,
.beer-page .beer-card:hover {
  transform: none;
  border-color: transparent;
  background: #181714;
}

.beer-page .beer-card::before { display: none; }
.beer-page .beer-image-wrap::after { display: none; }

.atlas-page .sake-card img,
.atlas-page .drink-card img,
.beer-page .beer-card img {
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.atlas-page .specs div {
  border-color: var(--atlas-line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.025);
}

.atlas-page .actions a,
.beer-page .affiliate-link,
.beer-page .secondary-affiliate-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid var(--atlas-line);
  border-radius: 2px;
  background: transparent;
  color: var(--atlas-ink);
  text-decoration: none;
}

.atlas-page .actions a.market-link,
.beer-page .affiliate-link {
  border-color: var(--accent, var(--atlas-gold));
  background: var(--accent, var(--atlas-gold));
  color: #111;
}

.atlas-page .actions a.source-link,
.beer-page .source-link { color: var(--atlas-muted); }

@media (max-width: 900px) {
  .atlas-global-nav { display: none; }
  .atlas-page .hero { min-height: 620px; }
  .atlas-page .drink-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .atlas-page .drink-index a { min-height: 58px; border-bottom: 1px solid var(--atlas-line); }
  .atlas-page .sake-list,
  .atlas-page .drink-list,
  .beer-page .beer-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .atlas-header-inner,
  .atlas-page .drink-index,
  .atlas-page .app-grid,
  .atlas-page > .shell > .map-panel,
  .atlas-page > .shell > .toolbar,
  .atlas-page > .shell > .list-head,
  .atlas-page > .shell > .sake-list,
  .atlas-page > .shell > .drink-list {
    width: min(100% - 28px, 1160px);
  }

  .atlas-header-inner { min-height: 68px; }
  .atlas-brand span { display: none; }

  .atlas-page .hero {
    min-height: 590px;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 118px 14px 34px;
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.38) 0%, rgba(5, 5, 5, 0.76) 48%, rgba(5, 5, 5, 0.96) 100%),
      var(--hero-image) center / cover no-repeat;
  }

  .atlas-page .hero h1 { font-size: 2.65rem; }
  .atlas-page .hero .lead { font-size: 0.9rem; line-height: 1.8; }
  .atlas-page .hero-stats { min-height: 58px; grid-template-columns: auto 1fr; gap: 10px; align-items: end; padding-left: 16px; }
  .atlas-page .hero-stats span { font-size: 2.1rem; }
  .atlas-page .map-panel { padding-top: 44px; }
  .atlas-page .panel-head,
  .atlas-page .list-head { align-items: flex-start; flex-direction: column; }
  .atlas-page .toolbar { grid-template-columns: 1fr; }
  .atlas-page .sake-card,
  .atlas-page .drink-card,
  .beer-page .beer-card { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .atlas-page .sake-card img,
  .atlas-page .drink-card img,
  .beer-page .beer-card img { width: 96px; max-height: 160px; }
}
