@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@500;600;700&display=swap');

:root {
  --background: #f8f5ef;
  --paper: #fffdfa;
  --ink: #2d2025;
  --muted: #675c5c;
  --wine: #681f35;
  --wine-dark: #2e1822;
  --gold: #eed5a1;
  --gold-dark: #9d743d;
  --line: #e6ddd2;
  --sans: "Noto Sans JP", "Noto Sans Japanese", "Yu Gothic", Meiryo, sans-serif;
  --serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* { box-sizing: border-box; }
html { background: var(--background); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.8 var(--sans);
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: var(--wine); text-underline-offset: 0.22em; }
a:hover { color: #8c2c48; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
}
.hero a:focus-visible, .site-footer a:focus-visible { outline-color: var(--gold); }
h1, h2, h3 { margin-top: 0; line-height: 1.5; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 64px, 1160px); margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.12em; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip-link:focus { position: absolute; z-index: 3; padding: 8px 16px; background: var(--paper); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { flex: none; }
.main-nav { display: flex; align-items: center; gap: 31px; }
.main-nav a { padding-block: 7px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current], .main-nav a:focus-visible {
  color: var(--wine);
  box-shadow: inset 0 -2px var(--gold-dark);
}
.menu-toggle { display: none; }

.hero { position: relative; isolation: isolate; background: var(--wine-dark); color: var(--paper); }
.hero-picture { position: absolute; z-index: -1; inset: 0 0 0 34%; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.hero-picture::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--wine-dark), #2e18228a 28%, #2e182215 70%), linear-gradient(0deg, #2e182248, transparent 36%);
  content: "";
}
.hero-inner { display: grid; align-items: center; min-height: 490px; padding-block: 56px; }
.hero-copy h1 {
  position: relative;
  margin-bottom: 22px;
  font: 600 clamp(50px, 5.6vw, 84px)/1.18 var(--serif);
  letter-spacing: .025em;
}
.hero-copy h1::after {
  display: block;
  width: 54px;
  height: 2px;
  margin-top: 25px;
  background: var(--gold);
  content: "";
}
.hero-copy p { margin: 0 0 24px; color: #f5e4d7; line-height: 1.95; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--wine);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { color: #fff; background: #4f1828; }
.button-gold { color: var(--wine-dark); background: var(--gold); }
.button-gold:hover { color: var(--wine-dark); background: #f6e0b6; }

.archive-section { padding-block: 53px 73px; }
.archive-layout, .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 36px;
}
.section-title, .page-title {
  color: var(--wine-dark);
  font-family: var(--serif);
  font-weight: 700;
}
.section-title { margin: 0 0 18px; font-size: clamp(29px, 4vw, 36px); }
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 51px;
  overflow: hidden;
  border: 1px solid #d8cabe;
  border-radius: 6px;
  background: var(--paper);
}
.search-form:focus-within { box-shadow: 0 0 0 2px var(--gold-dark); }
.search-form > .icon { position: absolute; left: 15px; color: var(--wine); }
.search-form input { flex: 1; width: 100%; min-width: 0; padding: 10px 9px 10px 42px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-form input:focus-visible { outline: 0; }
.search-form button {
  align-self: stretch;
  padding: 0 19px;
  border: 0;
  background: var(--wine);
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.search-form button:hover { background: #4f1828; }
.search-form button:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.result-info { margin: 13px 0 12px; color: var(--muted); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.article-card:hover { border-color: #b29376; color: var(--wine); box-shadow: 0 7px 18px #3d232d14; }
.card-picture { overflow: hidden; background: #ddcdb9; }
.card-picture img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  transition: transform .25s;
}
.article-card:hover img { transform: scale(1.035); }
.card-copy { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 15px 17px 12px; }
.category-label {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 3px;
  background: #f2e7e0;
  color: var(--wine);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
a.category-label:hover { background: #eddbc9; }
.card-copy h3 { margin: 8px 0 12px; font-size: 17px; line-height: 1.6; }
.card-arrow { align-self: end; margin-top: auto; color: var(--wine); line-height: 1; }
.empty-state { padding: 25px; border: 1px solid var(--line); background: var(--paper); }

.side-panel {
  scroll-margin-top: 16px;
  padding: 19px 19px 13px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-dark);
  border-radius: 6px;
  background: var(--paper);
}
.side-panel h2 { margin: 0 0 9px; color: var(--wine-dark); font: 700 19px/1.5 var(--serif); }
.side-panel ul, .link-list, .related ul { margin: 0; padding: 0; list-style: none; }
.side-panel li + li { border-top: 1px solid var(--line); }
.side-panel a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 13px;
  align-items: center;
  gap: 8px;
  padding-block: 11px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}
.side-panel a:hover, .side-panel a[aria-current] { color: var(--wine); text-decoration: underline; }
.side-panel .icon { color: var(--wine); font-size: 13px; }
.category-count { color: var(--muted); font-variant-numeric: tabular-nums; }

.main-page { padding-block: 23px 72px; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 9px;
  margin: 0 0 19px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
.breadcrumb li + li::before { margin-right: 9px; color: #8c7c70; content: "›"; }
.breadcrumb a { color: #69535b; }
.page-title { margin: 8px 0 24px; font-size: clamp(30px, 4vw, 43px); }
.article-layout > div { min-width: 0; }
.article-paper, .simple-paper, .related {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.article-heading {
  container-type: inline-size;
  padding: clamp(23px, 4vw, 42px) clamp(20px, 4vw, 44px) 25px;
}
.article-heading h1 {
  margin: 12px 0;
  color: var(--wine-dark);
  font: 700 1.625rem/1.47 var(--serif);
  font-size: clamp(1.625rem, 5.5cqi, 2.5rem);
}
.article-meta { margin: 0; color: var(--muted); font-size: 13px; }
.article-cover { width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; background: #ddcdb9; }
.article-body { padding: clamp(24px, 4.5vw, 46px) clamp(20px, 4vw, 44px); line-height: 1.95; }
.article-body > :last-child { margin-bottom: 0; }
.article-body p { margin-bottom: 1.25em; }
.article-body h2 {
  margin: 2.15em 0 .85em;
  padding: .35em 0 .35em .6em;
  scroll-margin-top: 18px;
  border-left: 3px solid var(--wine);
  background: #f5eee7;
  color: var(--wine-dark);
  font: 700 clamp(21px, 3vw, 27px)/1.55 var(--serif);
}
.article-body h3 { margin: 1.75em 0 .65em; color: var(--wine-dark); font-size: 19px; }
.article-body ul, .article-body ol { padding-inline-start: 1.6em; }
.toc { margin: 1.6em 0 2em; padding: 12px 17px; border: 1px solid var(--line); border-radius: 6px; background: #f9f3ea; }
.toc summary { color: var(--wine-dark); font-weight: 700; cursor: pointer; }
.toc ol { margin: 8px 0 2px; font-size: 14px; }
.toc li + li { margin-top: 4px; }
.table-wrap { margin: 1.4em 0 1.8em; }
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.article-body table { width: 100%; min-width: 475px; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.article-body th, .article-body td { padding: 9px 12px; border: 1px solid #dcd1c5; text-align: start; vertical-align: top; }
.article-body th { background: #f1e7de; }
.article-body thead th { background: #e9dbd1; color: var(--wine-dark); }
.related { margin-top: 22px; padding: 20px; }
.related h2 { margin-bottom: 12px; font: 700 21px/1.5 var(--serif); }
.related li + li { margin-top: 7px; }
.article-navigation { display: grid; grid-template-columns: 1fr auto 1fr; gap: 11px; margin-top: 17px; padding-block: 7px; font-size: 14px; }
.article-navigation > :last-child { text-align: right; }

.simple-layout { max-width: 820px; margin-inline: auto; }
.simple-paper { padding: clamp(22px, 4vw, 38px); }
.simple-paper > :last-child { margin-bottom: 0; }
.simple-paper h2 { margin: .7em 0 .45em; color: var(--wine-dark); font: 700 24px/1.45 var(--serif); }
.simple-paper > h2:first-child { margin-top: 0; }
.simple-paper .button { margin-bottom: 1em; }
.simple-paper dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 20px; }
.simple-paper dd { margin: 0; }
.link-list { display: grid; gap: 14px; }
.link-item { border-left: 3px solid var(--gold-dark); }
.link-item h2 { margin-top: 0; }
.link-item p:last-child { margin-bottom: 0; }
.link-subtitle { color: var(--muted); font-size: 13px; letter-spacing: .06em; }

.site-footer { padding: 31px 0 20px; background: var(--wine-dark); color: #ead9ce; }
.site-footer .brand, .site-footer a { color: #f9f0e9; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 23px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 21px; }
.footer-links a { font-size: 13px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin-top: 20px; padding-top: 13px; border-top: 1px solid #ffffff30; font-size: 12px; }

@media (max-width: 950px) {
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 23px; }
  .hero-picture { left: 27%; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 63px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
  .brand { gap: 8px; font-size: 18px; }
  .brand img { width: 32px; height: 32px; }
  .main-nav { grid-column: 1 / -1; padding-bottom: 12px; gap: 7px 19px; flex-wrap: wrap; }
  .site-header.has-menu .main-nav:not(.is-open) { display: none; }
  .site-header.has-menu .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding-inline: 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--wine);
    background: var(--paper);
    font-size: 13px;
    font-weight: 700;
  }
  .hero { display: grid; }
  .hero-picture { position: relative; inset: auto; grid-area: 1 / 1; margin-left: 24%; }
  .hero-picture img { object-position: 53% center; }
  .hero-picture::after { background: linear-gradient(90deg, var(--wine-dark), #2e182255 65%, #2e182219), linear-gradient(0deg, var(--wine-dark), #2e182200 60%); }
  .hero-inner { grid-area: 1 / 1; min-height: 398px; padding-block: 38px 27px; align-items: end; }
  .hero-copy h1 { margin-bottom: 15px; font-size: clamp(43px, 10vw, 64px); text-shadow: 0 1px 14px #24141c85; }
  .hero-copy h1::after { margin-top: 20px; }
  .hero-copy p { margin-bottom: 16px; font-size: 14px; }
  .desktop-break { display: none; }
  .archive-section { padding-block: 34px 47px; }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .article-cover { aspect-ratio: 1.9 / 1; }
  .main-page { padding-bottom: 46px; }
}
@media (max-width: 460px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .article-heading { padding-bottom: 19px; }
  .article-body h3 { font-size: 18px; }
  .footer-links { gap: 7px 13px; }
}
@media (max-width: 550px) {
  .table-wrap::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    content: "表を横にスクロールできます ↔" / "";
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 記事内の共通囲みボックス */
.article-box {
  box-sizing: border-box;
  margin: 1.8em 0;
  padding: 1.2em 1.4em;
  border: 2px solid;
  border-radius: 8px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* ポイント */
.article-box--point {
  background-color: #eff8f7;
  border-color: #178a95;
}

/* 注意 */
.article-box--caution {
  background-color: #fff7ee;
  border-color: #d48735;
}

/* 補足 */
.article-box--note {
  background-color: #f2f6fc;
  border-color: #7393bd;
}

/* 囲みボックスの見出し */
.article-box .article-box__title {
  margin: 0 0 0.6em;
  font-weight: 700;
  font-size: 1em;
}

.article-box--point .article-box__title {
  color: #176a72;
}

.article-box--caution .article-box__title {
  color: #a35c20;
}

.article-box--note .article-box__title {
  color: #45678d;
}

/* ボックス内の最後の段落 */
.article-box p:last-child {
  margin-bottom: 0;
}

/* 黄色マーカー */
.article-marker {
  background: linear-gradient(
    transparent 55%,
    #fff0a6 55%
  );
  padding: 0 0.1em;
}

/* スマートフォン対応 */
@media (max-width: 600px) {
  .article-box {
    padding: 1em 1.1em;
    margin: 1.5em 0;
  }
}
