@font-face {
  font-family: "Zen Maru Gothic";
  src: url("ZenMaruGothic-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Zen Maru Gothic";
  src: url("ZenMaruGothic-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf5e7;
  --cream: #fffaec;
  --ink: #3c382a;
  --muted: #5e5b45;
  --forest: #385536;
  --deep-forest: #29412a;
  --wood: #774b2b;
  --line: #e3d5bb;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", Meiryo, sans-serif;
  --wood-grain: repeating-linear-gradient(176deg, transparent 0 14px, #98704516 15px 16px, transparent 17px 34px, #fff7df50 36px 37px, transparent 38px 49px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 500 16px/1.78 var(--round);
  background: radial-gradient(ellipse at 8% 3%, #e7eccf 0, transparent 35rem), radial-gradient(ellipse at 96% 42%, #ededd5 0, transparent 35rem), var(--paper);
}
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid #52724a; outline-offset: 4px; }
a, summary { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, strong { font-weight: 700; }
.wrap { width: min(1150px, calc(100% - 80px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: -100px; left: 1rem; z-index: 2; padding: .5rem 1rem; background: var(--cream); }
.skip:focus { top: 1rem; }
:target { scroll-margin-top: 1.5rem; }

.site-header { display: flex; align-items: center; justify-content: center; min-height: 76px; }
.header-nav { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 4vw, 48px); }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #405239; text-decoration: none; font-weight: 700; white-space: nowrap; }
.header-nav a:hover, .header-nav [aria-current="page"] { text-decoration: underline; text-underline-offset: .4em; }
.home-link { justify-content: center; width: 44px; }
.leaf-pair { position: relative; width: 35px; height: 35px; border-radius: 50%; background: #dbe5c6; display: block; }
.leaf-pair::before, .leaf-pair::after { position: absolute; content: ""; width: 10px; height: 17px; border-radius: 95% 6% 95% 6%; }
.leaf-pair::before { top: 6px; left: 18px; transform: rotate(15deg); background: #537650; }
.leaf-pair::after { top: 12px; left: 9px; transform: rotate(-56deg); background: #7a965e; }

.hero {
  padding: 12px;
  border: 1px solid #d6c6a5;
  border-radius: 29px;
  background: var(--wood-grain), radial-gradient(ellipse at 20% 35%, #fff8e2, #f1e2c2);
  box-shadow: 0 10px 34px #5e4d2d22, inset 0 1px #fffdf0;
}
.hero-photo { overflow: hidden; border-radius: 20px; border: 1px solid #6c683950; background: #d7e1ad; }
.hero-photo img { width: 100%; height: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; border-radius: 24px; border: 1px solid #385332; margin-top: 16px; padding: 8px 17px; color: #fffdf1; background: linear-gradient(155deg, #5e7951, #3d5b39 60%); box-shadow: 0 3px 0 #29412b; text-decoration: none; font-weight: 700; }
.button:hover { background: var(--deep-forest); }
.button--wood { border-color: #775032; background: var(--wood-grain), linear-gradient(145deg, #9a6c45, #805331); box-shadow: 0 3px 0 #694429; }
.button--wood:hover { background: #704a2e; }

.signposts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 29px; }
.sign {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 126px;
  padding: 13px 14px;
  border: 1px solid #d8c4a1;
  border-radius: 17px 22px 17px 21px;
  background: var(--wood-grain), linear-gradient(153deg, #fff1d4, #ead6ad);
  box-shadow: 0 4px 0 #d7c39e, inset 0 1px #fffaf0;
  text-decoration: none;
}
.sign--pond { background: var(--wood-grain), linear-gradient(153deg, #edf2d6, #d8e4c0); border-color: #c9d2a8; box-shadow: 0 4px 0 #cbd3ad, inset 0 1px #fffaf0; }
.sign--leaf { background: var(--wood-grain), linear-gradient(153deg, #f3ecd2, #e5e0bb); border-color: #d3ceaa; box-shadow: 0 4px 0 #d0c7a8, inset 0 1px #fffaf0; }
.sign:hover { outline: 1px solid #8e895f; outline-offset: -1px; }
.sign div { flex: 1; min-width: 0; }
.sign strong, .sign-caption { display: block; }
.sign strong { color: #375031; font-size: clamp(1rem, 1.45vw, 1.33rem); line-height: 1.35; white-space: nowrap; }
.sign-caption { margin-top: .24em; color: #57563b; font-size: .76rem; line-height: 1.42; text-wrap: pretty; word-break: auto-phrase; }
.sign-arrow { font-size: .85rem; color: #68664a; }

.spot {
  --spot-size: 82px;
  display: block;
  flex: 0 0 auto;
  width: var(--spot-size);
  height: var(--spot-size);
  background-image: url("forest-signs.webp");
  background-repeat: no-repeat;
  background-size: 300% auto;
  background-position-y: center;
}
.spot--boat { background-position-x: left; }
.spot--book { background-position-x: center; }
.spot--lens { background-position-x: right; }
.sign .spot { --spot-size: clamp(101px, 10vw, 146px); height: calc(var(--spot-size) * .74); }

.content-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.panel, .related, .guide-block { border: 1px solid var(--line); border-radius: 23px; background: var(--cream); }
.panel { display: flow-root; padding: 20px 23px; }
.panel--pond { background: radial-gradient(ellipse at 98% 4%, #dae6c0, transparent 66%), var(--cream); }
.panel--paper { background: radial-gradient(ellipse at 98% 4%, #f3dfb8, transparent 66%), var(--cream); }
.panel h2, .feature h2, .related h2, .guide-block h2 { color: var(--forest); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.36; }
.panel p { margin-top: 7px; text-wrap: pretty; word-break: auto-phrase; }
.panel .status { clear: both; margin-top: 13px; padding-top: 9px; border-top: 1px dashed #cbbf9a; color: var(--muted); font-size: .9rem; }
.panel-spot {
  --spot-size: clamp(108px, 11.5vw, 154px);
  float: right;
  height: calc(var(--spot-size) * .74);
  margin-inline-start: clamp(10px, 2vw, 21px);
  margin-block-end: 4px;
}

.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); min-height: 275px; margin: 33px 0 21px; overflow: hidden; border: 1px solid #c7b47f; border-radius: 26px; background: var(--wood-grain), #eee1c1; box-shadow: 0 6px 24px #6b4d2920; }
.feature-illustration { min-height: 235px; background: #63704a url("forest-study.webp") center 56% / cover no-repeat; }
.feature-copy { padding: clamp(22px, 4vw, 43px); align-self: center; }
.feature-copy p { margin-top: 11px; }
.related { padding: 20px 24px; }
.related h2 { font-size: 1.25rem; }
.related dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; margin: 9px 0 0; }
.related dt { font-weight: 700; }
.related dd { font-size: .82rem; color: var(--muted); margin: 0; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 17px 0 30px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.site-footer a { text-underline-offset: .25em; }

.guide-story { width: min(1010px, 100%); margin-inline: auto; }
.guide-cover { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); min-height: 330px; border: 1px solid #d3c09a; border-radius: 28px; overflow: hidden; background: var(--wood-grain), #f6eacb; box-shadow: 0 9px 31px #5e4d2d24; }
.guide-cover-copy { align-self: center; padding: clamp(25px, 4.6vw, 55px); container-type: inline-size; }
.guide-cover h1 { color: var(--forest); font-size: clamp(1.3rem, 11.75cqi, 2.32rem); line-height: 1.33; }
.guide-cover h1 span { display: block; white-space: nowrap; }
.guide-cover p { margin-top: 13px; }
.guide-cover-image { width: 100%; height: 100%; min-height: 290px; object-fit: cover; object-position: center 52%; }
.guide-toc { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin: 23px 0; }
.guide-toc a { display: inline-flex; align-items: center; min-height: 42px; border-radius: 20px; border: 1px solid #ccd1ab; padding: 5px 16px; background: #ebedd5; color: #46583b; font-weight: 700; font-size: .91rem; text-decoration: none; }
.guide-toc a:hover { background: #dce5c4; }
.guide-block { position: relative; padding: clamp(22px, 4vw, 44px); margin: 15px 0; box-shadow: inset 5px 0 #ece0bb; }
.section-heading { display: flex; align-items: center; gap: 10px; min-height: 57px; margin-bottom: 8px; }
.section-heading .spot { --spot-size: 55px; }
.guide-mobile-break { display: none; }
.guide-block > p { max-width: 70ch; }
.race-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; margin: 19px 0 16px; list-style: none; }
.race-flow li { position: relative; border: 1px solid #ddccac; border-radius: 16px; background: var(--wood-grain), #f4e8cc; padding: 15px 13px; }
.race-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -19px; top: 43%; color: #6d744b; }
.race-flow strong { display: block; color: var(--wood); }
.race-flow p { margin-top: 5px; font-size: .87rem; }
.wood-note { border: 1px solid #ccd8b1; border-radius: 16px; background: #e7edd2; padding: 12px 14px; color: #425439; }
.wood-note strong { margin-right: .35em; }
.payout-figure { margin: 18px 0; }
.payout-figure figcaption { margin-bottom: 8px; color: var(--wood); font-weight: 700; }
.payout-grid, .publication-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payout, .publication-grid div { padding: 15px; border: 1px solid #dcccab; border-radius: 16px; background: #f3e4c9; }
.payout--cover, .publication-grid div:nth-child(2) { border-color: #d0dab5; background: #e8eed4; }
.payout h3, .publication-grid h3 { color: var(--forest); font-size: 1.17rem; }
.payout h3 small { color: var(--muted); font-size: .84rem; }
.payout p { font-size: .86rem; }
.payout strong { display: block; margin-top: 6px; color: #754d2b; font-size: clamp(1.2rem, 2.55vw, 1.72rem); font-variant-numeric: tabular-nums; }
.payout--cover strong { color: #486241; }
.figure-note { margin-top: 9px; color: var(--muted); font-size: .83rem; }
.worked-example { border: 1px solid #ddcfb4; border-radius: 13px; padding: 11px 14px; }
.worked-example summary { color: var(--forest); font-weight: 700; cursor: pointer; }
.worked-example > div { padding-top: 9px; }
.worked-example p { font-size: .9rem; }
.example-table { width: 100%; border-spacing: 0; margin: 10px 0; border: 1px solid #e1d5bb; border-radius: 9px; overflow: hidden; text-align: left; font-size: .88rem; }
.example-table th, .example-table td { padding: 5px 8px; }
.example-table thead { background: #eee4c9; }
.example-table tbody tr + tr > * { border-top: 1px solid #e1d5bb; }
.evidence-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 15px 0 0; }
.evidence-list div { border-left: 3px solid #b3c291; padding: 12px 15px; background: #f2f1db; border-radius: 0 12px 12px 0; }
.evidence-list dt { margin-bottom: 3px; color: var(--forest); font-weight: 700; }
.evidence-list dd { margin-left: 0; font-size: .92rem; }
.publication-start { border: 1px solid #ddccac; border-radius: 14px; padding: 8px 12px; background: var(--wood-grain), #f4e8cc; color: var(--wood); text-align: center; font-weight: 700; }
.publication-step { margin: 6px 0; color: var(--muted); text-align: center; font-size: .91rem; }
.publication-grid { margin-top: 6px; }
.publication-grid p { font-size: .88rem; }

@media (max-width: 940px) {
  .wrap { width: calc(100% - 52px); }
  .sign .spot { --spot-size: clamp(73px, 9.4vw, 96px); }
  .sign { padding-inline: 9px; }
  .signposts { gap: 11px; }
}

@media (max-width: 730px) {
  .wrap { width: calc(100% - 28px); }
  .site-header { min-height: 60px; }
  .header-nav { gap: clamp(8px, 3.9vw, 26px); }
  .header-nav a { font-size: .9rem; }
  .home-link { width: 37px; }
  .leaf-pair { scale: .88; }
  .hero { padding: 7px; border-radius: 23px; }
  .hero-photo { border-radius: 16px; }
  .button { margin-top: 10px; min-height: 43px; font-size: .88rem; }
  .signposts { gap: 8px; margin: 16px 0 20px; }
  .sign { flex-direction: column; justify-content: center; min-height: 107px; gap: 2px; padding: 6px 3px 8px; text-align: center; border-radius: 13px 15px 13px 16px; }
  .sign div { flex: 0 auto; }
  .sign .spot { --spot-size: min(118px, 100%); height: auto; aspect-ratio: 1.35; }
  .sign strong { font-size: clamp(.81rem, 3.5vw, 1.07rem); }
  .sign-caption, .sign-arrow { display: none; }
  .content-pair { grid-template-columns: 1fr; gap: 11px; }
  .panel { padding: 15px 16px 16px; }
  .panel-spot { --spot-size: clamp(101px, 30vw, 134px); }
  .feature { grid-template-columns: 1fr; margin-top: 22px; }
  .feature-illustration { min-height: clamp(185px, 54vw, 300px); }
  .feature-copy { padding: 20px 17px 25px; }
  .related { padding: 17px; }
  .site-footer { font-size: .72rem; margin-top: 22px; }

  .guide-cover { grid-template-columns: 1fr; }
  .guide-cover-copy { padding: 19px 20px 23px; }
  .guide-cover h1 { font-size: clamp(1.66rem, 7vw, 2.03rem); }
  .guide-cover p { margin-top: 9px; font-size: .93rem; }
  .guide-cover-image { order: -1; height: clamp(185px, 57vw, 330px); min-height: 0; }
  .guide-toc { gap: 6px; margin: 15px 0 12px; }
  .guide-toc a { font-size: .79rem; min-height: 34px; padding: 4px 8px; }
  .guide-block { padding: 19px 14px 20px; }
  .section-heading { gap: 5px; }
  .section-heading .spot { --spot-size: 42px; }
  .guide-block h2 { font-size: clamp(1.23rem, 5.6vw, 1.65rem); }
  .race-flow { grid-template-columns: 1fr; gap: 13px; }
  .race-flow li:not(:last-child)::after { content: "↓"; top: auto; bottom: -19px; right: 25px; }
  .payout-grid, .publication-grid { gap: 6px; }
  .payout, .publication-grid div { padding: 10px 7px; }
  .payout strong { font-size: clamp(.88rem, 3.8vw, 1.34rem); white-space: nowrap; }
  .evidence-list { grid-template-columns: 1fr; gap: 8px; }
  .evidence-list div { padding: 9px 11px; }
}

@media (max-width: 520px) {
  .guide-mobile-break { display: initial; }
  .worked-example summary { font-size: clamp(.875rem, 4.4vw, 1rem); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
