/* チャパス — shared stylesheet. Tokens first; contrast checked by script (all text ≥ 6:1). */
:root {
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --ink: #26261f;
  --ink-soft: #4f5246;
  --line: #ddd6c3;
  --brand: #3d5a36;
  --brand-strong: #2c4427;
  --brand-tint: #e9efdf;
  --accent: #7d4a1f;
  --note: #f7eddc;
  --footer-bg: #24331f;
  --footer-ink: #e8e4d6;
  --footer-soft: #c9d3bb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(38, 38, 31, .06), 0 6px 20px rgba(38, 38, 31, .06);
  --max: 1120px;
  --measure: 760px;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--brand-strong); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--measure); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1.2; display: block; color: var(--brand-strong); }
.brand-tag { font-size: .8rem; color: var(--ink-soft); line-height: 1.4; display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  text-decoration: none; color: var(--ink); font-size: .95rem; border-radius: var(--radius-sm);
}
.site-nav a:hover { background: var(--brand-tint); color: var(--brand-strong); }
.site-nav a[aria-current="page"] { color: var(--brand-strong); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); }
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; z-index: 50; }
}

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--ink-soft); padding-top: 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); display: inline-flex; min-height: 44px; align-items: center; }

/* Typography */
h1, h2, h3 { font-family: var(--serif); line-height: 1.45; color: var(--brand-strong); letter-spacing: .03em; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); margin: .4em 0 .5em; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); margin: 2.2em 0 .7em; padding-bottom: .35em; border-bottom: 2px solid var(--brand-tint); }
h3 { font-size: 1.18rem; margin: 1.8em 0 .5em; }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.4em; }
li { margin-bottom: .4em; }
strong { color: var(--brand-strong); }
.lead { font-size: 1.08rem; }
.muted { color: var(--ink-soft); font-size: .92rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 700;
}
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-strong); border: 2px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--brand-tint) 0%, var(--bg) 70%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 40px; align-items: center; }
.hero h1 { margin-top: .2em; }
.hero-eyebrow { color: var(--accent); font-weight: 700; font-size: .95rem; margin-bottom: 0; }
.hero-art { justify-self: center; width: min(320px, 70vw); }
.hero-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; padding-top: 56px; padding-bottom: 64px; }
}

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section > .wrap > h2:first-child { margin-top: 0; }
.section-intro { max-width: var(--measure); }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 1.12rem; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); height: 100%; transition: border-color .15s; }
.card-link:hover { border-color: var(--brand); color: var(--ink); }
.card-link .card-label { font-size: .8rem; color: var(--accent); font-weight: 700; }
.card-link .card-title { font-family: var(--serif); font-weight: 700; color: var(--brand-strong); font-size: 1.12rem; line-height: 1.5; margin: 4px 0 8px; }
.card-link .card-text { font-size: .93rem; color: var(--ink-soft); margin: 0 0 12px; flex: 1; }
.card-link .card-more { font-size: .9rem; color: var(--brand); font-weight: 700; }
.card-photo { margin: -20px -20px 16px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.value-num { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-strong); align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }

/* Article */
.article { padding-bottom: 48px; }
.article-body { max-width: var(--measure); }
.byline { font-size: .85rem; color: var(--ink-soft); margin: -.4em 0 1.4em; }
.byline span + span::before { content: "／"; margin: 0 .4em; }
.article-hero { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figure.inline-photo { margin: 1.6em 0; }
figure.inline-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 1.6em 0 2em; }
.toc-title { font-weight: 700; margin: 0 0 .3em; color: var(--brand-strong); }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 0; }
.toc a { display: inline-block; min-height: 44px; line-height: 1.6; padding: 10px 0; }

.box { border-radius: var(--radius); padding: 16px 20px; margin: 1.6em 0; border-left: 5px solid; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin-bottom: .3em; display: block; }
.tip { background: var(--brand-tint); border-color: var(--brand); }
.tip .box-title { color: var(--brand-strong); }
.note { background: var(--note); border-color: var(--accent); }
.note .box-title { color: var(--accent); }

.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--brand-tint); color: var(--brand-strong); white-space: nowrap; }
.info-table th { width: 32%; background: var(--brand-tint); color: var(--brand-strong); }
@media (max-width: 560px) {
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 0; }
}

ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 0 52px; margin-bottom: 1.1em; min-height: 40px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem;
}

/* FAQ */
.faq { margin: 2em 0; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.faq-q { font-family: var(--serif); font-weight: 700; color: var(--brand-strong); margin: 0 0 .4em; font-size: 1.05rem; }
.faq-q::before { content: "Q. "; color: var(--accent); }
.faq-a { margin: 0; }
.faq-a::before { content: "A. "; font-weight: 700; color: var(--brand); }

/* Related + CTA */
.related { margin-top: 3em; }
.back-hub { margin-top: 1.6em; }
.cta-band { background: var(--brand-strong); color: #fff; }
.cta-band .wrap { padding-top: 40px; padding-bottom: 40px; text-align: center; }
.cta-band h2 { color: #fff; border: 0; margin: 0 0 .4em; padding: 0; }
.cta-band p { margin: 0 auto 1.2em; max-width: 640px; }
.cta-band .btn { background: #fff; color: var(--brand-strong); }
.cta-band .btn:hover { background: var(--brand-tint); color: var(--brand-strong); }

/* Hub */
.hub-section { scroll-margin-top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
.hub-section h2 { margin-top: 0; display: flex; align-items: center; gap: 12px; border: 0; padding: 0; }
.hub-section h2 img { width: 40px; height: 40px; flex: none; }
h2[id], h3[id] { scroll-margin-top: 96px; }

/* Contact */
.contact-card { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 24px; margin: 1.6em 0; }
.contact-card p { margin-bottom: .6em; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 0; font-size: .92rem; }
.site-footer a { color: var(--footer-ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: #fff; }
.footer-grid h2 { font-family: var(--sans); font-size: .95rem; color: #fff; border: 0; margin: 0 0 .4em; padding: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0; }
.footer-soft { color: var(--footer-soft); }
.copyright { border-top: 1px solid rgba(232, 228, 214, .2); padding-top: 16px; padding-bottom: 24px; color: var(--footer-soft); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cta-band, .toc { display: none; } }

/* keep short Japanese phrases together in headings */
.nb { display: inline-block; }
