/*
 * トークン（ui-foundation）。値はここから選ぶ。
 *   中立色: ink 見出し / body 本文 / sub 補足 / line 罫 / paper 地 / white 面
 *   素材色: kraft（コーヒー袋のクラフト紙。お試し欄だけに使う）
 *   店の色: yanaka 藍 / maruyama 森  ※章の目印。ボタンや意味色には使わない
 *   リンク: link 青
 *   文字: 14 / 16 / 18 / 24 / 32 / 56（ヒーロー縦書きのみ）
 *   余白: 4・8 の倍数（8 / 16 / 24 / 32 / 48 / 64 / 96）
 *   角丸: 4（操作）/ 12（面）
 * 見せ場はヒーローの縦書き1か所だけ。ほかは静かに。
 */
:root {
  --ink: #2b211c;
  --body: #463a33;
  --sub: #6b5f57;
  --line: #ddd6cc;
  --paper: #fbfaf8;
  --white: #ffffff;
  --kraft: #e6d7bb;
  --kraft-edge: #c9b088;
  --yanaka: #6b2f3a; /* ワインのような深い赤 */
  --yanaka-soft: #e9edf3;
  --maruyama: #5b6748; /* 苔のような緑 */
  --maruyama-soft: #eaf0e8;
  --link: #1d5fd1;
  --link-hover: #1747a6;
  --r-control: 4px;
  --r-surface: 12px;
  --font-body: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-head: var(--font-body); /* 書体は明朝1つに統一。見出しは太さで差をつける */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 2;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
strong { color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pr { margin: 0 0 16px; color: var(--sub); font-size: 14px; text-align: center; }

/* ---------- ヒーロー（見せ場：縦書き） ---------- */
.hero {
  position: relative;
  display: flex;
  min-height: min(100svh, 860px);
  color: var(--white);
  overflow: hidden;
}
.hero-photo { position: absolute; inset: 0; margin: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
/* 文字を読ませるため、写真の上下だけ暗くする */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,20,16,0.45) 0%, rgba(28,20,16,0.05) 35%, rgba(28,20,16,0.05) 50%, rgba(28,20,16,0.8) 100%);
}
.hero-text {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 48px 24px 40px;
}
.hero-title {
  align-self: flex-end;
  writing-mode: vertical-rl;
  margin: 0;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 64px; font-weight: 900; line-height: 1.2; letter-spacing: 0.16em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
}
.hero-side { max-width: 28em; }
.hero-lead { margin: 0 0 4px; color: var(--white); font-size: 18px; font-weight: 700; line-height: 1.8; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.hero-note { margin: 0 0 24px; color: #e9e2db; font-size: 14px; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: #efe9e3; color: var(--ink); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--r-control);
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #000; color: var(--white); }
.btn-line { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }

/* ---------- 本文 ---------- */
main { padding-bottom: 64px; }
.prose { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.prose p { margin: 0 0 24px; }
h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 32px; font-weight: 900; line-height: 1.45;
}
h3 { margin: 0 0 16px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.6; }
section.prose, .toc { margin-top: 96px; }

.toc { max-width: 680px; margin-left: auto; margin-right: auto; padding: 0 16px; }
.toc h2 { font-family: var(--font-body); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 24px; border-left: 2px solid var(--line); }
.toc li { padding: 4px 0; }

.pull {
  margin: 40px 0 !important;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 24px; font-weight: 900; line-height: 1.7;
}

/* ---------- 店の章：写真1枚＋一言。地は白、店の色は印と細い線だけ ---------- */
.shop-yanaka { --shop: var(--yanaka); }
.shop-maruyama { --shop: var(--maruyama); }
.shop { max-width: 1080px; margin: 0 auto; padding: 96px 16px 0; }
.shop-head { margin-bottom: 48px; text-align: center; }
.shop-name { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--shop); font-size: 16px; font-weight: 700; letter-spacing: 0.08em; }
.shop-head h2 { margin: 0; }
.shop-head::after { content: ""; display: block; width: 48px; height: 2px; margin: 24px auto 0; background: var(--shop); }

.fact { display: grid; grid-template-columns: 3fr 2fr; align-items: center; gap: 48px; margin: 0 0 64px; }
.fact img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fact-rev img { order: 2; }
.fact figcaption h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 24px; font-weight: 900; line-height: 1.5; }
.fact figcaption p { margin: 0; }
.fact figcaption small { display: block; margin-top: 8px; color: var(--sub); font-size: 12px; }

.trial { margin: 0 auto; max-width: 720px; padding: 32px 0 0; border-top: 1px solid var(--line); }
.trial h3 { margin: 0 0 24px; text-align: center; font-family: var(--font-head); font-size: 20px; font-weight: 900; }
.trial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; padding: 0; list-style: none; }
.trial-grid li { display: grid; gap: 8px; align-content: start; }
.trial-img {
  display: grid; place-items: center; aspect-ratio: 1 / 1;
  background: var(--white); border: 1px solid var(--line);
  color: var(--sub); font-size: 12px;
}
.trial-img img { width: 100%; height: 100%; object-fit: contain; }
.trial-name { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.6; }
.trial-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; border: 1px solid var(--ink); color: var(--ink);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.trial-link:hover { background: var(--ink); color: var(--white); }
.official-link { margin: 24px 0 0; text-align: center; font-size: 14px; }

/* ---------- 味の地図（2軸） ---------- */
.map-section { margin-top: 96px; }
.chart-wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.chart-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-filter label { cursor: pointer; }
.chart-filter input { position: absolute; opacity: 0; }
.chart-filter span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  color: var(--ink); font-size: 14px; font-weight: 700;
}
.chart-filter input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chart-filter input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }

/* 印：やなか＝丸、丸山＝三角（色だけに頼らない） */
.mark { display: inline-block; width: 14px; height: 14px; flex: none; }
.mark-yanaka { background: var(--yanaka); border-radius: 50%; }
.mark-maruyama { background: var(--maruyama); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.chart-filter input:checked + span .mark { outline: 2px solid var(--white); outline-offset: 1px; }

.chart {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat,
    var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
}
.axis-label { position: absolute; color: var(--sub); font-size: 14px; font-weight: 700; line-height: 1; }
.axis-top { top: 12px; left: 50%; transform: translateX(-50%); }
.axis-bottom { bottom: 12px; left: 50%; transform: translateX(-50%); }
.axis-left { left: 12px; top: 50%; transform: translateY(-140%); }
.axis-right { right: 12px; top: 50%; transform: translateY(-140%); }
.plot { position: absolute; inset: 40px 56px 40px 32px; }

.pt {
  position: absolute;
  display: flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 2px 4px;
  transform: translate(-7px, -50%);
  background: none; border: 0; border-radius: var(--r-control);
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  cursor: pointer;
}
.pt-flip { flex-direction: row-reverse; transform: translate(calc(-100% + 7px), -50%); }
.pt-label { padding: 0 2px; background: rgba(255,255,255,0.85); }
.pt:hover .pt-label, .pt[aria-pressed="true"] .pt-label { text-decoration: underline; }
.pt[aria-pressed="true"] .mark { transform: scale(1.4); }
.pt-yanaka[aria-pressed="true"] .pt-label { background: var(--yanaka); color: var(--white); text-decoration: none; }
.pt-maruyama[aria-pressed="true"] .pt-label { background: var(--maruyama); color: var(--white); text-decoration: none; }
.pt-dim { opacity: 0.15; cursor: default; }

.chart-detail { min-height: 120px; margin-top: 16px; }
.chart-hint { margin: 0; padding: 24px; color: var(--sub); font-size: 14px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-surface); }
.detail-card { padding: 24px; background: var(--white); border-left: 6px solid var(--shop); border-radius: var(--r-control); }
.detail-yanaka { --shop: var(--yanaka); }
.detail-maruyama { --shop: var(--maruyama); }
.detail-shop { margin: 0; color: var(--shop); font-size: 14px; font-weight: 700; }
.detail-card h3 { margin: 0 0 4px; font-family: var(--font-head); font-size: 24px; font-weight: 900; }
.detail-note { margin: 0 0 16px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chart-note { margin: 8px 0 0; color: var(--sub); font-size: 14px; }
.chart-note .mark { margin: 0 4px 0 0; vertical-align: -1px; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; min-height: 56px; color: var(--ink); font-weight: 700; cursor: pointer; }
details p { margin: 0 0 16px !important; }

/* ---------- 締め ---------- */
.closing {
  display: grid; grid-template-columns: 2fr 3fr; align-items: center; gap: 48px;
  max-width: 960px; margin: 96px auto 0; padding: 0 16px;
}
.closing-photo { border-radius: var(--r-surface); aspect-ratio: 4 / 5; object-fit: cover; }
.closing-grid { margin-top: 24px; }
.closing-grid li { grid-template-rows: auto auto 1fr auto; }
.closing-grid .shop-name { margin: 0; }

.about { color: var(--sub); font-size: 14px; }
.about h2 { font-family: var(--font-body); font-size: 18px; }
.about ul { padding-left: 20px; }

footer { padding: 48px 16px; border-top: 1px solid var(--line); color: var(--sub); font-size: 14px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }

/* ---------- スマホ ---------- */
@media (max-width: 800px) {
  .hero { min-height: 100svh; }
  .hero-text { padding: 32px 16px 32px; }
  .hero-title { font-size: 52px; }
  .hero-lead { font-size: 16px; }
  h2 { font-size: 24px; }
  section.prose, .map-section, .closing { margin-top: 64px; }
  .shop { padding-top: 64px; }
  .shop-head { margin-bottom: 32px; }
  .fact { grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px; }
  .fact-rev img { order: 0; }
  .fact img { margin: 0 -16px; width: calc(100% + 32px); max-width: none; }
  .fact figcaption h3 { font-size: 20px; }
  .trial-grid { gap: 16px; }
  /* 地図：スマホでは名前を隠して点だけ。押すと下に説明 */
  .chart { aspect-ratio: 1 / 1; }
  .plot { inset: 36px 24px 36px 24px; }
  .pt-label { display: none; }
  .pt, .pt-flip { min-width: 36px; min-height: 36px; justify-content: center; transform: translate(-50%, -50%); }
  .axis-left, .axis-right { font-size: 12px; transform: translateY(-130%); }
  .axis-bottom, .axis-top { font-size: 12px; }
  .closing { grid-template-columns: 1fr; gap: 24px; }
  .closing-photo { aspect-ratio: 16 / 9; }
}
.trial-grid li { grid-template-rows: auto 1fr auto; }
@media (max-width: 800px) {
  .chart-filter { gap: 6px; }
  .chart-filter span { min-height: 40px; padding: 0 12px; font-size: 13px; }
}
/* 商品画像の大きさで列が広がらないように固定。画像は比率を保ったまま枠に収める（Amazon の規約：加工・比率変更をしない） */
.trial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trial-img { width: 100%; overflow: hidden; }

.chart-note .legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }
.chart-note .legend .mark { margin: 0; }

/* 楽天の画像リンク：規約で「指定サイズ以外への変更」は禁止。240px のまま表示し、枠では縮めない */
.trial-img.rakuten-pict { aspect-ratio: auto; display: flex; justify-content: center; align-items: center; min-height: 244px; overflow: visible; border: 0; background: none; }
.trial-img.rakuten-pict img { width: auto; height: auto; object-fit: none; }
@media (max-width: 800px) {
  /* 2列だと 240px が入らないので、スマホはお試しを1列に */
  .trial-grid { grid-template-columns: minmax(0, 1fr); }
  .trial-grid .trial-img:not(.rakuten-pict) { max-width: 244px; margin: 0 auto; width: 100%; }
}
@media (max-width: 800px) { .closing-grid { row-gap: 48px; } }
