:root {
  --leaf: #0d6b4a;
  --leaf-deep: #084b34;
  --mist: #e4f0e2;
  --paper: #f8faf3;
  --straw: #f3e88e;
  --ink: #12261e;
  --ink-soft: #4b6157;
  --sakura: #f2a3b7;
  --display: "Zen Antique Soft", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --answer: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --question: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 2; overflow-wrap: anywhere; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sakura); outline-offset: 3px; }

.bar {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; justify-content: space-between;
  padding: 16px var(--gutter);
  font-size: .875rem; font-weight: 500; color: var(--leaf-deep);
}
.bar a { text-decoration: none; }
.bar a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ファーストビュー */
.hero { height: 100svh; }
.js .hero { height: 220svh; }
.hero__stage { position: sticky; top: 0; height: 100svh; min-height: 560px; overflow: hidden; background: var(--mist); }
.hero__petals { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__frame {
  position: absolute; right: 10vw; bottom: 0;
  height: 87svh; width: min(39vw, 62svh);
}
/* アーチの背後に細い線を重ねる */
.hero__frame::before {
  content: ""; position: absolute; inset: -16px 16px 0 -16px;
  border: 1px solid var(--leaf); border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.hero__arch { position: relative; height: 100%; overflow: hidden; border-radius: 999px 999px 0 0; }
.hero__arch img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 46% 50%; }
.hero__name {
  position: absolute; left: calc(100% + 1.2vw); bottom: 2.5vh;
  writing-mode: vertical-rl;
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 300;
  font-size: clamp(3rem, 5.4vw, 5.5rem); line-height: 1; white-space: nowrap;
  color: var(--leaf-deep);
}
.hero__seal {
  position: absolute; left: -82px; bottom: 9vh;
  width: 164px; height: 164px; border-radius: 50%;
  background: var(--paper);
}
.hero__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__ring text { font-family: var(--sans); font-size: 45px; font-weight: 500; fill: var(--leaf); }
.hero__flower { position: absolute; inset: 27%; width: 46%; height: 46%; }
.hero__stamens line { stroke: #c23a63; stroke-width: 1.2; }
.hero__stamens circle { fill: #c8912a; }
.hero__copy { position: absolute; top: 50%; left: var(--gutter); transform: translateY(-50%); }
.hero__issue { margin-bottom: 1.6rem; font-size: .875rem; font-weight: 500; line-height: 1.7; color: var(--leaf); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: min(4.3vw, 10vh); line-height: 1.34; color: var(--leaf-deep); }
.ln { display: block; overflow: hidden; }
.ln > span { display: block; }
.hero__who { margin-top: 1.6rem; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); }
.hero__who b { font-family: var(--display); font-weight: 400; font-size: 1.75rem; color: var(--ink); }
.hero__flood { position: absolute; inset: 0; z-index: 10; background: var(--leaf); clip-path: circle(0 at 70% 50%); }

@media (prefers-reduced-motion: no-preference) {
  .js .ln > span { transform: translateY(104%); animation: slide 1.1s cubic-bezier(.16, 1, .3, 1) .25s forwards; }
  .js .ln:nth-child(2) > span { animation-delay: .4s; }
  .js .ln:nth-child(3) > span { animation-delay: .55s; }
  .js .hero__issue, .js .hero__who, .js .hero__name, .js .hero__seal { opacity: 0; animation: show 1s ease 1.1s forwards; }
  .js .hero__arch { clip-path: inset(100% 0 0 0); animation: open 1.5s cubic-bezier(.65, 0, .15, 1) forwards; }
  .js .hero__arch img { transform: scale(1.14); animation: settle 2.2s cubic-bezier(.16, 1, .3, 1) forwards; }
  .js .hero__ring { animation: turn 30s linear infinite; }
}
@keyframes slide { to { transform: none; } }
@keyframes show { to { opacity: 1; } }
@keyframes open { to { clip-path: inset(0); } }
@keyframes settle { to { transform: none; } }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero { height: 100svh; }
}

/* リード */
.lead { background: var(--leaf); color: #fff; padding: clamp(64px, 12vh, 130px) var(--gutter); }
.lead > * { max-width: 50rem; margin-inline: auto; text-align: left; }
.lead > p { font-family: var(--display); font-size: clamp(1.375rem, 2.9vw, 2.125rem); line-height: 1.8; }
.lead dl { margin-top: 2.5rem; font-size: .9375rem; line-height: 1.8; color: var(--mist); }
.lead dl div { display: flex; gap: 1em; }
.lead dt { flex: none; min-width: 2.5em; font-weight: 700; color: var(--straw); }

/* 問いと答え */
.qa { max-width: calc(42.5rem + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 11vh, 120px) var(--gutter); }
.qa h2 {
  padding-left: 2em; text-indent: -2em;
  font-family: var(--question); font-weight: 700;
  font-size: 1rem; line-height: 1.9;
  color: var(--leaf-deep);
}
.qa h2::before { content: "――"; display: inline-block; width: 2em; text-indent: 0; }
.qa__a { margin: 2.2rem 0 0; }
.qa__a p + p { margin-top: 1.25em; }
.qa__a > p:not(.who):not(.qa__end) { font-family: var(--answer); font-weight: 500; font-size: 1.0625rem; }
.qa__end { font-family: var(--display); font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.75; color: var(--leaf); }
.qa--last { padding-bottom: clamp(88px, 16vh, 160px); }

/* 年表 */
.years { background: var(--mist); overflow: clip; }
.years__pin { padding: clamp(56px, 9vh, 96px) 0; }
.years h3 { padding: 0 var(--gutter); font-family: var(--display); font-weight: 400; font-size: clamp(1.625rem, 3.6vw, 2.75rem); line-height: 1.4; color: var(--leaf-deep); }
.years__track { display: flex; gap: clamp(24px, 4vw, 64px); width: max-content; margin-top: clamp(32px, 7vh, 72px); padding: 0 var(--gutter); }
.years__track li { position: relative; width: clamp(260px, 30vw, 420px); padding-top: 26px; border-top: 2px solid var(--leaf); }
.years__track li::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--leaf); }
.years__track b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.15; color: var(--leaf); }
.years__track span { display: block; margin-top: .8rem; line-height: 1.8; }
.js .years.is-pinned .years__pin { position: sticky; top: 0; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
html:not(.js) .years, .years:not(.is-pinned) { overflow-x: auto; }

/* 大きな言葉 */
.voice { background: var(--leaf); color: #fff; padding: clamp(80px, 17vh, 180px) var(--gutter); }
.voice p { max-width: 50rem; margin: 0 auto; text-align: left; font-family: var(--display); font-size: clamp(1.25rem, 5vw, 3.25rem); line-height: 1.6; text-wrap: balance; }
.voice--straw { background: var(--straw); color: var(--leaf-deep); }

/* 男女の視点 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 2em 0; }
.qa__a .split p { margin: 0; padding: 22px 24px; background: var(--mist); font-size: .9375rem; line-height: 1.8; }
.qa__a .split p + p { background: var(--leaf); color: #fff; }
.split b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.5; margin-bottom: .3rem; }

/* 審査の仕組み */
.blind { margin: 2.2em 0; padding: 28px clamp(20px, 4vw, 36px); background: var(--mist); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: clamp(8px, 2vw, 20px); align-items: end; }
.flow__part svg { display: block; width: 100%; max-width: 170px; }
.flow__people { fill: var(--leaf-deep); }
.flow__bottles path { fill: var(--leaf); }
.flow__arrow { width: 32px; margin-bottom: 2.1rem; fill: none; stroke: var(--leaf); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.qa__a .flow p { margin-top: .75rem; font-size: .9375rem; line-height: 1.5; }
.flow b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 2.6vw, 1.625rem); line-height: 1.4; color: var(--leaf-deep); }
.blind__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(13, 107, 74, .3); }
.blind h3 { font-size: .9375rem; font-weight: 700; line-height: 1.6; color: var(--leaf-deep); }
.blind li { margin-top: .4rem; line-height: 1.6; font-size: .9375rem; }
.blind li { display: flex; gap: .5em; }
.blind li::before { content: "✓"; flex: none; font-weight: 700; color: var(--leaf); }
.blind__hidden li::before { content: "✕"; color: #a33a55; }

/* 65本 */
.diamond { padding: clamp(64px, 12vh, 130px) var(--gutter); background: var(--leaf-deep); color: #fff; }
.diamond > * { max-width: 68rem; margin-inline: auto; }
.diamond__from { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.875rem); line-height: 1.5; }
.diamond__num { display: flex; align-items: baseline; gap: .1em; margin-top: .4rem; font-family: var(--display); line-height: 1.05; color: var(--straw); }
.diamond__num b { font-weight: 400; font-size: clamp(5.5rem, 17vw, 13rem); font-variant-numeric: tabular-nums; }
.diamond__num span { font-size: clamp(1.5rem, 3.4vw, 2.75rem); }
.diamond__bar { position: relative; height: 16px; margin-top: 1.5rem; border-radius: 8px; background: rgba(228, 240, 226, .2); }
.diamond__bar i { position: relative; display: block; width: 1.625%; min-width: 8px; height: 100%; border-radius: 8px; background: var(--straw); }
.diamond__bar em {
  position: absolute; top: 50%; right: -9px;
  width: 18px; height: 18px;
  background: #fff; box-shadow: 0 0 20px 7px rgba(243, 232, 142, .75);
  transform: translateY(-50%) rotate(45deg);
}
.diamond.is-counting .diamond__bar em { transform: translateY(-50%) rotate(45deg) scale(0); }
.diamond__bar em { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.diamond__scale { display: flex; justify-content: space-between; margin-top: .75rem; font-size: .875rem; color: var(--mist); }
.diamond__text { margin-top: 1.5rem; font-size: clamp(1.0625rem, 2vw, 1.3125rem); line-height: 1.8; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 2.2em; }
.stats li { padding: 22px 24px; background: var(--mist); }
.qa__a .stats p { margin: 0; }
.stats__what { font-size: .9375rem; font-weight: 700; line-height: 1.6; color: var(--leaf-deep); }
.qa__a .stats .stats__num { margin-top: .5rem; font-family: var(--display); font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.2; color: var(--leaf); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats__num small { font-size: 1.0625rem; }
.qa__a .stats .stats__note { margin-top: .4rem; font-size: .875rem; line-height: 1.6; color: var(--ink-soft); }

/* 品種と料理 */
.pair { margin: 2.2em 0; }
.pair__tabs { display: flex; gap: 8px; }
.pair__tabs button {
  padding: 8px 26px; border: 2px solid var(--leaf); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--leaf);
  font-family: var(--display); font-size: 1.25rem;
}
.pair__tabs [aria-selected="true"] { background: var(--leaf); color: #fff; }
.pair__panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pair__panel[hidden] { display: none; }
#p-dunaj { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pair figcaption { margin-top: .5rem; text-align: center; font-size: .9375rem; font-weight: 500; line-height: 1.5; }
#p-dunaj figure { max-width: 240px; }

/* 集合写真 */
.group { max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.group img { width: 100%; }
.group figcaption { margin-top: .5rem; font-size: .8125rem; color: var(--ink-soft); }

/* 呉越同舟 */
.goetsu { background: var(--mist); }
.goetsu__inner {
  max-width: calc(42.5rem + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(56px, 10vh, 100px) var(--gutter);
}
.goetsu__word {
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--leaf); width: fit-content;
  font-family: var(--display); font-weight: 400; font-size: clamp(1.875rem, 3.4vw, 2.625rem); line-height: 1.3; letter-spacing: .1em;
  color: var(--leaf-deep);
}
.goetsu .qa__a { margin-top: 1.5rem; }

/* 原文PDF */
.papers { background: var(--mist); padding: clamp(64px, 11vh, 120px) var(--gutter); text-align: center; }
.papers h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 3.8vw, 2.75rem); line-height: 1.4; color: var(--leaf-deep); }
.papers__note { margin-top: .6rem; font-size: .9375rem; line-height: 1.8; color: var(--ink-soft); }
.papers__list { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 5vw, 64px); margin-top: 2.5rem; }
.paper { display: block; width: min(300px, 78vw); text-decoration: none; font-weight: 700; color: var(--leaf-deep); line-height: 1.6; }
.paper img { width: 100%; margin-bottom: 14px; box-shadow: 0 10px 26px rgba(8, 75, 52, .22); transition: transform .25s; }
.paper:hover img { transform: translateY(-6px) rotate(-1deg); }

.reader { width: min(1100px, 94vw); height: 92vh; max-height: none; padding: 0; border: 0; background: var(--leaf-deep); color: #fff; }
.reader[open] { display: flex; flex-direction: column; }
.reader::backdrop { background: rgba(8, 40, 28, .78); }
.reader__bar { display: flex; align-items: center; gap: 20px; padding: 10px 18px; font-size: .9375rem; }
.reader__bar h2 { flex: 1; font-size: 1rem; font-weight: 700; }
.reader__bar button { padding: 6px 18px; border: 0; border-radius: 999px; background: var(--straw); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.reader iframe { flex: 1; width: 100%; border: 0; background: #fff; }

.onward { display: grid; grid-template-columns: 1fr 1fr; }
.onward a { display: block; padding: 34px var(--gutter); text-align: center; text-decoration: none; font-weight: 700; color: #fff; background: var(--leaf); transition: background-color .2s; }
.onward a + a { background: var(--leaf-deep); }
.onward a:hover { background: var(--ink); }

.end { padding: 40px var(--gutter) 88px; background: var(--ink); color: var(--mist); font-size: .8125rem; line-height: 1.8; }
.end p { max-width: 68rem; margin: 0 auto; }
.end p + p { margin-top: .9em; }

/* 現在の質問番号（狭い画面） */
.pill {
  display: none; position: fixed; z-index: 30; right: 14px; bottom: 14px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--leaf-deep); color: #fff; font-size: .8125rem; line-height: 1.5;
  opacity: 0; transition: opacity .3s;
}
.pill.is-on { opacity: 1; }

@media (max-width: 1240px) {
  .pill { display: block; }
}

@media (max-width: 860px) {
  .js .hero { height: 190svh; }
  .hero__frame { top: 66px; right: 7vw; bottom: auto; width: 68vw; height: 50svh; }
  .hero__frame::before { inset: -10px 10px 10px -10px; border-bottom: 1px solid var(--leaf); }
  .hero__arch { border-radius: 999px 999px 0 0; }
  .hero__name { left: auto; right: calc(100% + 12px); bottom: 0; font-size: 2.75rem; }
  .hero__seal { left: auto; right: -14px; bottom: -44px; width: 100px; height: 100px; }
  .hero__copy { top: auto; bottom: 26px; left: var(--gutter); right: var(--gutter); transform: none; }
  .hero__issue { margin-bottom: .5rem; font-size: .75rem; }
  .hero h1 { font-size: clamp(1.75rem, 8.4vw, 3rem); }
  .hero__who { margin-top: .6rem; font-size: .9375rem; }
  .hero__who b { font-size: 1.375rem; }
  .years__track { flex-direction: column; width: auto; }
  .years__track li { width: auto; }
  .split, .blind__lists, .stats { grid-template-columns: minmax(0, 1fr); }
  .onward { grid-template-columns: minmax(0, 1fr); }
}

/* 話し手の名前 */
.who { width: fit-content; font-family: var(--sans); margin-bottom: .8rem; line-height: 1.5; }
.who i { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--leaf); color: #fff; font-style: normal; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; }
.qa__a .who + p { margin-top: 0; }

/* ページの一番上へ */
.totop {
  position: fixed; z-index: 30; right: 24px; bottom: 24px;
  display: grid; place-items: center; align-content: center; gap: 1px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--leaf-deep); color: #fff; text-decoration: none;
  box-shadow: 0 6px 18px rgba(8, 75, 52, .25);
  opacity: 0; pointer-events: none; transition: opacity .3s, background-color .2s;
}
.totop.is-on { opacity: 1; pointer-events: auto; }
html:not(.js) .totop { opacity: 1; pointer-events: auto; }
.totop:hover { background: var(--leaf); }
.totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.totop span { font-size: .625rem; font-weight: 700; line-height: 1; letter-spacing: .08em; }

@media (max-width: 1240px) {
  .totop { right: 14px; bottom: 58px; width: 48px; height: 48px; }
  .totop svg { width: 18px; height: 18px; }
}
