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

:root {
  color-scheme: light;
  --ink: #211b2c;
  --plum: #231a36;
  --olive: #dcf78e;
  --paper: #f8f7f3;
  --white: #fff;
  --line: #e0dce7;
  --muted: #5c5566;
  --violet: #5c3c87;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  background: var(--paper);
  color: var(--ink);
}
img { display: block; max-width: 100%; }
a { color: var(--violet); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .13em; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.45; overflow-wrap: anywhere; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #9167c2; outline-offset: 3px; }
.wrap { width: min(1184px, calc(100% - 88px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
a.skip-link:focus-visible {
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  z-index: 3;
  clip-path: none;
  padding: .55rem .85rem;
  background: var(--white);
}

.site-header { position: relative; z-index: 1; background: var(--plum); color: var(--white); border-bottom: 1px solid #433852; }
.header-inner, .footer-inner, .footer-end { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; font-size: 1rem; font-weight: 800; white-space: nowrap; }
.brand img { border-radius: 8px; flex: none; }
.main-nav, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem clamp(1rem, 2.2vw, 2.35rem); }
.main-nav a, .footer-links a, .footer-end a { color: inherit; text-decoration: none; font-size: .875rem; font-weight: 600; }
.main-nav a:hover, .main-nav [aria-current], .footer-links a:hover, .footer-end a:hover { color: var(--olive); }
.menu-toggle { display: none; }

.hero { background: var(--plum); color: var(--white); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.7rem, 4vw, 3.7rem);
  padding-block: clamp(3rem, 6vw, 5.25rem);
}
.hero h1 {
  font-size: clamp(2.2rem, 4.1vw, 3.75rem);
  font-weight: 850;
  line-height: 1.27;
  letter-spacing: -.045em;
}
.hero h1 strong { color: var(--olive); font-weight: inherit; }
.hero-copy p { max-width: 30em; margin: 1.25rem 0 1.8rem; color: #e5dfeb; line-height: 1.9; }
.hero-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid #5b4b6f;
  border-radius: 16px;
  box-shadow: 0 16px 35px #150c24a0;
  background: #372b42;
}
.hero-photo img { width: 100%; height: auto; aspect-ratio: 1.73; object-fit: cover; }
.hero-photo figcaption {
  position: absolute;
  inset: auto auto .8rem .8rem;
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .4rem .66rem;
  border-radius: 5px;
  color: var(--white);
  background: #231a36ee;
  font-size: .76rem;
  font-weight: 650;
}
.caption-dot { width: .48rem; height: .48rem; background: var(--olive); border-radius: 50%; }

.button {
  display: inline-flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: .55rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .875rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button-accent { color: var(--plum); background: var(--olive); }
.button-accent:hover { background: #edfbc4; }
.button-outline { color: var(--violet); background: var(--white); border-color: var(--line); }
.button-outline:hover { background: #f0ebf7; }

.areas-section { padding-block: 2.2rem 2.5rem; background: #efebf5; border-bottom: 1px solid #e3dcec; }
.areas-section h2, .archive-section h2 { font-size: clamp(1.35rem, 2.3vw, 1.7rem); font-weight: 850; letter-spacing: -.025em; }
.area-list { display: grid; gap: .65rem; }
.areas-section .area-list { grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); margin-top: 1rem; }
.area-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  gap: .65rem;
  padding: .45rem .75rem;
  border: 1px solid #e1dbe9;
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.area-link:hover, .area-link[aria-current] { background: #f5f1fb; border-color: #bca9d3; color: var(--violet); }
.area-count { display: grid; place-items: center; min-width: 1.5rem; min-height: 1.5rem; padding-inline: .26rem; border-radius: 1rem; background: #ece5f5; color: #554074; font-size: .73rem; font-weight: 800; }

.archive-section { padding-block: 3rem 4.4rem; }
.archive-section h2 { margin-bottom: 1rem; }
.search-form { display: flex; gap: .5rem; max-width: 39rem; width: 100%; }
.search-form input, .search-form button { min-height: 48px; border-radius: 7px; }
.search-form input { min-width: 0; flex: 1; padding: .55rem .85rem; color: var(--ink); border: 1px solid #c9c2d3; background: var(--white); }
.search-form button { padding: .55rem 1.25rem; flex: none; border: 0; background: var(--plum); color: var(--white); font-weight: 750; cursor: pointer; }
.search-form button:hover { background: var(--violet); }
.result-info { margin-block: .8rem 1rem; color: var(--muted); font-size: .875rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.article-card:hover { border-color: #b69ccf; box-shadow: 0 8px 22px #38274f1a; }
.article-card:hover h3 { color: var(--violet); }
.card-photo { width: 100%; aspect-ratio: 1.95; object-fit: cover; background: #e4ddeb; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: .62rem; padding: 1.1rem; }
.category-label { display: inline-block; padding: .23rem .58rem; border-radius: 5px; background: #ede6f6; color: #513675; font-size: .75rem; font-weight: 800; text-decoration: none; }
a.category-label:hover { background: #ded0ef; }
.card-body h3 { font-size: 1.09rem; font-weight: 800; }
.card-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: .875rem;
}
.card-arrow { align-self: end; margin-top: auto; color: var(--violet); font-size: 1.35rem; line-height: 1; }
.empty-state { padding: 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.empty-state .button { margin-top: .6rem; }

.inner-page { padding-block: 1.4rem 4rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .28rem .55rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .82rem; }
.breadcrumb li + li::before { content: "›"; margin-inline-end: .55rem; color: #786986; }
.page-title { margin-block: 1.55rem 1.6rem; }
.page-title h1 { font-size: clamp(1.8rem, 3.6vw, 2.65rem); font-weight: 850; letter-spacing: -.035em; }
.article-title { max-width: 51rem; }
.article-title h1 { margin-top: .55rem; }
.article-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(230px, 280px); gap: clamp(1.35rem, 3vw, 2.4rem); }
.article-column { min-width: 0; }
.article-cover {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  background: #e4ddeb;
}
.article-cover img { width: 100%; aspect-ratio: 2.45; object-fit: cover; }
.article-cover figcaption { position: absolute; right: .6rem; bottom: .6rem; padding: .2rem .5rem; border-radius: 3px; color: var(--white); background: #231a36ee; font-size: .72rem; }
.article-paper, .simple-paper {
  min-width: 0;
  margin-top: 1.3rem;
  padding: clamp(1.1rem, 4vw, 2.65rem);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.article-paper p + p, .simple-paper p + p { margin-top: 1em; }
.article-paper h2, .simple-paper h2 { margin: 2em 0 .7em; font-size: 1.35rem; font-weight: 800; }
.article-paper h2 { scroll-margin-top: 1rem; padding: .62rem .75rem; border-left: 4px solid var(--violet); background: #f0ecf6; }
.article-paper h3 { margin: 1.55em 0 .55em; font-size: 1.13rem; font-weight: 800; }
.article-paper h4 { margin: 1.3em 0 .5em; font-size: 1.02rem; }
.article-paper blockquote { margin: 1rem 0; padding: .65rem 1rem; border-left: 3px solid var(--line); }
.article-paper a { overflow-wrap: anywhere; }
.article-paper .toc { margin: 1.6rem 0; padding: .8rem 1.1rem; border: 1px solid #e4dbea; border-radius: 8px; background: #faf8fc; }
.toc summary { color: var(--plum); font-weight: 800; cursor: pointer; }
.toc ol { margin: .5rem 0 0; padding-inline-start: 1.5rem; }
.toc li + li { margin-top: .2rem; }
.table-scroll { max-width: 100%; margin-block: 1.2rem; overflow-x: auto; border: 1px solid #e1dbe9; border-radius: 7px; }
.table-scroll table { width: 100%; min-width: 34rem; border-collapse: collapse; text-align: left; font-size: .9rem; }
.table-scroll th, .table-scroll td { padding: .62rem .75rem; vertical-align: top; border: 1px solid #e5dfeb; }
.table-scroll th { background: #eee8f5; font-weight: 800; }
.table-scroll tr:nth-child(even) td { background: #fbf9fd; }
.side-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f0ebf5; }
.side-panel h2 { margin-bottom: .75rem; font-size: 1rem; font-weight: 800; }
.related { margin-top: 1.45rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.related h2 { font-size: 1.12rem; }
.related a { display: block; margin-top: .55rem; }
.article-navigation { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: .35rem; margin-top: 1.25rem; text-align: center; }
.article-navigation a { padding: .55rem .3rem; border: 1px solid var(--line); border-radius: 7px; background: var(--white); font-size: .875rem; font-weight: 700; text-decoration: none; }
.article-navigation a:hover { background: #eee7f6; }

.simple-layout { max-width: 61rem; min-height: 370px; }
.simple-paper h2:first-child { margin-top: 0; }
.simple-paper .button { margin-block: 1rem .4rem; }
.contact-note { color: var(--muted); font-size: .85rem; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.link-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.1rem, 3vw, 1.7rem); border: 1px solid var(--line); border-top: 4px solid var(--violet); border-radius: 11px; background: var(--white); }
.link-card h2 { font-size: 1.25rem; font-weight: 850; }
.link-card p { margin: .65rem 0 1rem; color: var(--muted); }
.link-card .button { margin-top: auto; }

.site-footer { padding-block: 2rem 1.2rem; background: var(--plum); color: var(--white); }
.footer-inner { padding-bottom: 1.25rem; border-bottom: 1px solid #50425f; }
.footer-end { margin-top: .8rem; color: #ded6e9; }
.footer-end small { font-size: .75rem; }
.footer-end a { font-size: .75rem; white-space: nowrap; }

@media (max-width: 980px) {
  .wrap { width: calc(100% - 56px); }
  .header-inner { gap: 1rem; }
  .brand { font-size: .92rem; }
  .main-nav, .footer-links { gap: .55rem 1rem; }
  .card-grid { gap: .9rem; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 61px; }
  .header-inner .brand img { width: 30px; height: 30px; }
  .menu-toggle {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    min-height: 40px;
    padding: .25rem .5rem;
    border: 1px solid #6c5d7a;
    border-radius: 6px;
    background: none;
    color: var(--white);
    white-space: nowrap;
    font-size: .75rem;
    cursor: pointer;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .3rem .8rem;
    border: 1px solid #665573;
    border-radius: 7px;
    background: var(--plum);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .55rem .2rem; }
  .main-nav a + a { border-top: 1px solid #50425f; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.1rem 1.9rem; }
  .hero h1 { font-size: clamp(2rem, 7.6vw, 3rem); }
  .hero-copy p { margin: .8rem 0 1.1rem; }
  .hero-photo img { aspect-ratio: 1.9; }
  .areas-section { padding-block: 1.45rem 1.6rem; }
  .areas-section .area-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); }
  .archive-section { padding-block: 1.9rem 3rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-cover img { aspect-ratio: 1.95; }
  .article-paper { margin-top: 1rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .85rem; }
}
@media (max-width: 480px) {
  .card-grid, .link-grid { grid-template-columns: 1fr; }
  .article-title h1 { font-size: 1.6rem; }
  .footer-links { column-gap: 1rem; }
}
@media (max-width: 360px) {
  .header-inner { gap: .5rem; }
  .header-inner .brand { gap: .45rem; font-size: .84rem; }
  .menu-toggle { min-width: 40px; justify-content: center; font-size: 1rem; }
  .menu-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::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;
  }
}
