@charset "UTF-8";

:root {
  --ink: #24212a;
  --muted: #665f69;
  --night: #211923;
  --night-deep: #180f19;
  --background: #faf8f4;
  --paper: #ffffff;
  --line: #e2dbd1;
  --accent: #713d52;
  --gold: #f5cc76;
  --gold-dark: #a16c21;
  --width: 1180px;
  --font: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--background); color: var(--ink); font: 400 1rem/1.8 var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 4px; }
.wrap { width: min(var(--width), calc(100% - 80px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 12px; left: 14px; z-index: 10; padding: 8px 14px; background: var(--paper); }

.site-header { background: var(--night-deep); color: #fff8ea; }
.header-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.1rem; font-weight: 800; white-space: nowrap; }
.brand img { flex: none; }
.main-nav, .footer-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.main-nav a, .footer-links a { font-size: .875rem; font-weight: 600; }
.site-header a:hover, .site-footer a:hover, .main-nav [aria-current="page"] { color: var(--gold); }
.main-nav [aria-current="page"] { text-underline-offset: .5em; text-decoration: underline; }
.menu-toggle { display: none; color: inherit; background: transparent; border: 1px solid #766575; border-radius: 6px; padding: 6px 12px; font-size: .875rem; }
.site-footer { background: var(--night-deep); color: #fff8ea; margin-top: 64px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding-block: 32px; }
.copyright { color: #ccc0c5; font-size: .8125rem; width: 100%; padding-top: 16px; border-top: 1px solid #54434f; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff8ea; }
.hero-image { position: absolute; z-index: -2; right: 0; width: 80%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #211723 8%, #211723 21%, #211723ed 33%, #21172350 60%, #21172300 82%),
              linear-gradient(0deg, #21172369, transparent 40%);
}
.hero-content { min-height: clamp(440px, 40vw, 590px); display: flex; align-items: center; padding-block: 52px; }
.hero-copy { max-width: 470px; }
.hero h1 { color: #fff9ec; font-size: clamp(3.125rem, 5.5vw, 5.25rem); font-weight: 900; line-height: 1.13; letter-spacing: .035em; }
.hero h1 span { display: block; }
.hero p { max-width: 370px; margin-top: 22px; color: #f1e6e7; line-height: 1.85; }
.button { display: inline-block; border: 1px solid transparent; border-radius: 6px; background: var(--night); color: #fff8ea; padding: 10px 19px; font-weight: 700; }
.button:hover { background: var(--accent); color: white; }
.hero-button { background: var(--gold); color: var(--night-deep); margin-top: 24px; }
.hero-button:hover { background: #ffdfa1; color: var(--night-deep); }

.archive { padding-top: 48px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.4; }
.section-heading::before { content: ""; background: var(--gold-dark); width: 4px; height: .85em; border-radius: 2px; }
.archive-layout, .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(216px, 260px); gap: clamp(22px, 3vw, 42px); align-items: start; }
.archive-content, .article-column { min-width: 0; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  min-width: 0;
  width: 100%;
  padding: 9px 13px;
  border: 1px solid #cec4b7;
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
}
.search-form button { flex: none; padding: 8px 18px; border: 1px solid var(--night); border-radius: 6px; background: var(--night); color: #fff8ea; font-weight: 700; }
.search-form button:hover { background: var(--accent); }
.result-info { margin: 10px 0 14px; color: var(--muted); font-size: .875rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.card { min-width: 0; }
.card-link { display: block; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.card-link:hover { border-color: #ad8b98; }
.card-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e5dcd2; }
.card-content { padding: 14px 15px 18px; }
.card h3 { margin-top: 8px; font-size: 1rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.category-label { display: inline-block; color: var(--accent); border-radius: 4px; background: #f2e7ec; padding: 2px 8px; font-size: .8125rem; font-weight: 700; }
a.category-label:hover { text-decoration: underline; }
.category-panel { border: 1px solid var(--line); border-top: 3px solid var(--gold-dark); border-radius: 8px; padding: 16px 19px 8px; background: var(--paper); }
.category-panel h2 { margin-bottom: 8px; font-size: 1rem; }
.category-panel ul, .related ul, .link-list { margin: 0; padding: 0; list-style: none; }
.category-panel li + li { border-top: 1px solid var(--line); }
.category-panel a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding-block: 6px; font-size: .875rem; }
.category-panel a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.category-count { flex: none; color: var(--muted); font-size: .8125rem; }
.empty-state { text-align: center; padding: 24px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.empty-state button { margin-top: 12px; }

.page-wrap { padding-top: 22px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 22px; color: var(--muted); font-size: .875rem; }
.breadcrumb a:hover { text-decoration: underline; }
.page-title { margin-bottom: 24px; }
.page-title h1 { font-size: clamp(1.65rem, 3.3vw, 2.65rem); line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.article-title h1 { margin: 10px 0 12px; }
.article-meta { color: var(--muted); font-size: .875rem; }
.article-image { width: 100%; aspect-ratio: 2.25; object-fit: cover; border-radius: 10px; margin-bottom: 22px; background: #e5dcd2; }
.article-paper, .simple-paper { min-width: 0; padding: clamp(20px, 4vw, 46px); border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow-wrap: anywhere; }
.article-paper { font-size: 1rem; line-height: 1.9; }
.article-paper p { margin: 0 0 1.25em; }
.article-paper > :last-child, .simple-paper > :last-child { margin-bottom: 0; }
.article-paper h2 {
  margin: 2em 0 .9em;
  padding: .6em .7em;
  border-left: 4px solid var(--gold-dark);
  border-radius: 2px 6px 6px 2px;
  background: #f5f0e9;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.5;
}
.article-paper h3 { margin: 1.6em 0 .7em; padding-bottom: .33em; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
.article-paper h4 { margin: 1.35em 0 .55em; font-size: 1rem; }
.article-paper ul, .article-paper ol { padding-inline-start: 1.45em; }
.article-paper a, .simple-paper a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.article-paper a:hover, .simple-paper a:hover:not(.button) { color: var(--ink); }
.article-paper blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--line); }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.4em 0; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 500px; font-size: .9375rem; line-height: 1.65; }
.table-scroll :is(th, td) { border: 1px solid #ddd4c7; padding: 9px 11px; text-align: left; vertical-align: top; }
.table-scroll th { background: #f5f0e9; }
.toc { padding: 15px 19px; margin: 1.5em 0; border: 1px solid var(--line); background: #faf7f2; border-radius: 8px; }
.toc summary { cursor: pointer; font-size: 1rem; font-weight: 700; }
.toc ol { margin: 8px 0 4px; font-size: .9375rem; }
.toc li + li { margin-top: .2em; }
.related { margin-top: 28px; }
.related h2 { font-size: 1.25rem; }
.related li { padding-block: 10px; border-bottom: 1px solid var(--line); }
.related a { color: var(--accent); }
.related a:hover { text-decoration: underline; }
.article-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; gap: 8px; margin-top: 26px; }
.article-navigation a { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px 4px; font-size: .875rem; font-weight: 700; }

.simple-layout { max-width: 830px; }
.simple-paper :is(h2, p) { margin-bottom: .8em; }
.simple-paper h2 { font-size: 1.25rem; }
.simple-paper p + h2 { margin-top: 1.5em; }
.simple-paper .contact-policy { margin-top: 18px; }
.link-list { display: grid; gap: 14px; }
.link-card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold-dark); border-radius: 8px; padding: 18px 22px; }
.link-card h2 { margin-bottom: 4px; font-size: 1.2rem; }
.link-card a { color: var(--accent); text-decoration: underline; text-underline-offset: .22em; }

@media (max-width: 990px) {
  .wrap { width: calc(100% - 48px); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 66px; position: relative; flex-wrap: wrap; }
  .header-inner .brand { padding-block: 10px; font-size: 1rem; }
  .header-inner .brand img { width: 32px; height: 32px; }
  .main-nav { width: 100%; flex-wrap: wrap; gap: 6px 19px; padding-bottom: 12px; }
  .menu-toggle:not([hidden]) { display: inline-block; }
  .menu-toggle:not([hidden]) + .main-nav {
    display: none;
    position: absolute;
    z-index: 2;
    top: 100%;
    left: -18px;
    width: calc(100% + 36px);
    padding: 14px 18px;
    background: var(--night-deep);
  }
  .menu-toggle:not([hidden]) + .main-nav.is-open { display: flex; }
  .hero-image { width: 100%; object-position: 64% 50%; }
  .hero::after { background: linear-gradient(90deg, #211723f0, #21172373), linear-gradient(0deg, #21172370, transparent 65%); }
  .hero-content { min-height: 380px; padding-block: 42px; }
  .hero h1 { font-size: clamp(2.7rem, 9vw, 4rem); }
  .hero p { max-width: 330px; margin-top: 15px; }
  .hero-button { margin-top: 19px; }
  .archive { padding-top: 30px; }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .category-panel { padding: 12px 16px 3px; }
  .article-image { aspect-ratio: 16 / 9; }
  .footer-links { flex-wrap: wrap; gap: 8px 16px; }
  .site-footer { margin-top: 46px; }
}
@media (max-width: 400px) {
  .card-content { padding: 10px 10px 13px; }
  .card h3 { font-size: .9375rem; }
  .category-label { font-size: .75rem; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 記事内の共通囲みボックス */
.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;
  }
}
