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

:root {
  color-scheme: light;
  font: 16px/1.75 "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: #231f1b;
  background: #f6f3ee;
  --ink: #231f1b;
  --quiet: #625950;
  --cream: #f6f3ee;
  --paper: #fffcf7;
  --line: #ded6cb;
  --ember: #a43824;
  --bright: #ff9873;
  --night: #191613;
}

*, *::before, *::after { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
main { flex: 1; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a43824; outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 10; top: 12px; left: 12px; padding: 8px 14px; background: var(--paper); color: var(--ink); }

.site-header { background: var(--night); color: #fff7ed; border-bottom: 1px solid #42332c; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.header-inner { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 1rem; font-weight: 800; letter-spacing: .025em; text-decoration: none; }
.brand img { flex: none; border: 1px solid #ad5641; border-radius: 8px; }
.main-nav, .footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.main-nav a, .footer-links a { text-decoration: none; font-size: .875rem; font-weight: 600; }
.main-nav a { padding: 9px 1px; border-bottom: 2px solid transparent; color: #ded4ca; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--bright); border-color: var(--bright); }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--bright); }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 444px; overflow: hidden; background: #231610; color: #fff7ed; border-bottom: 4px solid #a43824; }
.hero-image { position: absolute; z-index: -2; inset: 0 0 0 auto; width: min(82%, 1440px); height: 100%; object-fit: cover; object-position: 54% 8%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #231610 12%, rgba(32,20,16,.98) 25%, rgba(32,20,16,.77) 42%, rgba(32,20,16,.12) 68%, rgba(19,12,10,.16) 100%), linear-gradient(0deg, rgba(25,15,13,.38), transparent 45%); }
.hero-inner { padding-block: 51px 54px; }
.hero h1 { font-size: clamp(2.8rem, 5.2vw, 4.65rem); line-height: 1.15; font-weight: 900; letter-spacing: .015em; width: fit-content; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: #ffad8c; }
.hero p { margin-top: 20px; color: #f4dfd1; font-size: 1rem; line-height: 1.85; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 45px; padding: 9px 16px; border: 1px solid var(--ember); border-radius: 5px; background: var(--ember); color: #fffaf4; text-decoration: none; font-size: .875rem; font-weight: 700; }
.button:hover { background: #7d2618; border-color: #7d2618; }
.hero-button { margin-top: 26px; color: #26150e; background: #ffab87; border-color: #ffab87; }
.hero-button:hover { color: #26150e; background: #ffd0bc; border-color: #ffd0bc; }

.archive { padding-block: 46px 76px; scroll-margin-top: 20px; }
.archive-layout, .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 36px; align-items: start; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 1.75rem; font-weight: 800; line-height: 1.4; }
.section-title::before { width: 4px; height: 1.12em; border-radius: 3px; background: var(--ember); content: ""; }
.search-form { display: flex; min-height: 49px; border: 1px solid #cdbfb2; border-radius: 6px; background: var(--paper); }
.search-form:focus-within { outline: 2px solid var(--ember); outline-offset: 2px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; outline: 0; border-radius: 6px 0 0 6px; color: var(--ink); background: transparent; }
.search-form input::placeholder { color: var(--quiet); }
.search-form button { display: grid; place-items: center; min-width: 50px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ember); }
.search-form button:hover { background: #f4e7dd; }
.search-icon { display: block; position: relative; width: 14px; height: 14px; margin: -3px 4px 0 0; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { position: absolute; width: 7px; height: 2px; inset: 10px auto auto 9px; background: currentColor; transform: rotate(48deg); transform-origin: left center; content: ""; }
.result-info { margin: 12px 0 13px; color: var(--quiet); font-size: .8125rem; font-weight: 600; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.article-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.article-card:hover { border-color: #b28170; box-shadow: 0 4px 15px #41312612; }
.article-card img { width: 100%; aspect-ratio: 2.18; object-fit: cover; background: #352d28; }
.card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 9px; padding: 17px 18px 16px; }
.category-label { display: inline-block; max-width: 100%; width: fit-content; border-radius: 3px; background: #f3e4d9; color: #823220; padding: 3px 9px; font-size: .75rem; font-weight: 700; line-height: 1.6; text-decoration: none; }
a.category-label:hover { text-decoration: underline; }
.card-body h3 { font-size: 1.0875rem; line-height: 1.6; font-weight: 800; overflow-wrap: anywhere; text-wrap: pretty; }
.card-more { margin-top: auto; padding-top: 4px; font-size: .8125rem; font-weight: 700; color: var(--ember); }
.card-more span { margin-left: 8px; }
.empty-state { padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.empty-state .button { margin-top: 12px; }
.category-panel { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--ember); border-radius: 6px; background: var(--paper); }
.category-panel h2 { padding: 16px 17px 12px; font-size: 1.125rem; font-weight: 800; }
.category-panel ul { padding: 0 17px 7px; margin: 0; list-style: none; }
.category-panel li { border-top: 1px solid #e8e0d8; }
.category-panel a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; color: var(--ink); font-size: .875rem; font-weight: 600; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.category-panel a:hover, .category-panel a[aria-current] { color: var(--ember); }
.category-panel small { display: grid; place-items: center; flex-shrink: 0; min-width: 24px; padding: 3px 5px; border-radius: 4px; color: #614c42; background: #f3eae1; font-size: .72rem; font-variant-numeric: tabular-nums; }

.inner-page { min-height: 61vh; padding-block: 22px 68px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 23px; color: var(--quiet); font-size: .8125rem; font-weight: 500; }
.breadcrumb a { color: var(--ember); }
.page-title { margin-bottom: 25px; }
.page-title h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.38; font-weight: 900; }
.page-title p { margin-top: 8px; color: var(--quiet); }
.article-column { min-width: 0; }
.article-paper, .simple-paper { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.article-heading { padding: 30px 34px 24px; }
.article-heading h1 { margin: 12px 0 14px; font-size: clamp(1.65rem, 3.1vw, 2.375rem); line-height: 1.38; font-weight: 900; overflow-wrap: anywhere; text-wrap: balance; }
.article-meta { color: var(--quiet); font-size: .8125rem; }
.article-cover { width: 100%; aspect-ratio: 2.62; object-fit: cover; background: #352d28; }
.article-body { padding: 27px 34px 36px; font-size: 1rem; line-height: 1.95; overflow-wrap: anywhere; }
.article-body p { margin: 0 0 1.22em; }
.article-body p:last-child { margin-bottom: 0; }
.article-body a, .simple-paper p a { color: #8d2e1d; }
.article-body a:hover, .simple-paper p a:hover { color: #5e2116; }
.article-body h2 { margin: 2em 0 .75em; padding: .45em .65em; border-left: 4px solid var(--ember); border-radius: 0 4px 4px 0; background: #f0e7de; font-size: 1.35rem; line-height: 1.55; font-weight: 800; scroll-margin-top: 20px; }
.article-body h3 { margin: 1.55em 0 .7em; border-bottom: 1px solid var(--line); padding-bottom: .35em; font-size: 1.12rem; font-weight: 800; line-height: 1.6; }
.article-body blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--line); }
.article-body hr { border: 0; border-bottom: 1px solid var(--line); }
.article-body ul, .article-body ol { margin-block: 0 1.25em; padding-inline-start: 1.55em; }
.article-body .toc { margin: 1.55em 0; padding: .9em 1.1em; border: 1px solid var(--line); border-radius: 6px; background: #f8f1e8; }
.toc summary { cursor: pointer; font-weight: 800; }
.article-body .toc ol { margin: .5em 0 0; font-size: .9375rem; }
.toc li { padding-block: 3px; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: 5px; }
.table-scroll table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .9375rem; line-height: 1.65; }
.table-scroll th, .table-scroll td { border: 1px solid var(--line); padding: .63em .72em; vertical-align: top; text-align: left; }
.table-scroll thead th { background: #eee3d7; }
.table-scroll tr > :first-child { border-left: 0; }
.table-scroll tr > :last-child { border-right: 0; }
.table-scroll tr:last-child td { border-bottom: 0; }

.related { margin-top: 24px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.related h2 { font-size: 1.125rem; font-weight: 800; }
.related ul { margin: 9px 0 0; padding: 0; list-style: none; }
.related li + li { border-top: 1px solid var(--line); }
.related a { display: block; padding-block: 8px; text-decoration: none; font-size: .9375rem; }
.related a:hover, .article-navigation a:hover { text-decoration: underline; }
.related a span { color: var(--ember); }
.article-navigation { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 20px; font-size: .875rem; font-weight: 700; text-align: center; }
.article-navigation a { padding: 8px 3px; color: var(--ember); text-decoration: none; }

.simple-layout { width: min(820px, calc(100% - 64px)); }
.simple-paper { padding: 24px 28px 30px; }
.simple-paper h2 { font-size: 1.2rem; margin-bottom: .45em; }
.simple-paper p + h2 { margin-top: 1.1em; }
.simple-paper .button { margin-top: 16px; }
.external-list { margin: 0; padding: 0; list-style: none; }
.external-list li + li { margin-top: 14px; }
.external-card { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 115px; padding: 16px 20px; border: 1px solid var(--line); border-left: 3px solid #b34a35; border-radius: 5px; text-decoration: none; }
.external-card:hover { background: #f9efe6; }
.external-card strong, .external-card small, .external-description { display: block; }
.external-card strong { font-size: 1.125rem; }
.external-card small { color: var(--ember); font-size: .8125rem; }
.external-description { margin-top: 4px; }
.external-arrow { flex-shrink: 0; color: var(--ember); font-size: 1.4rem; }

.site-footer { padding-block: 26px 20px; background: var(--night); color: #f0dfd1; }
.footer-links { gap: 10px 19px; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--bright); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 12px; border-top: 1px solid #43372f; color: #c7b7aa; font-size: .8125rem; }
.footer-bottom small { font-size: inherit; }

@media (max-width: 900px) {
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr) 218px; gap: 22px; }
  .wrap { width: calc(100% - 48px); }
  .simple-layout { width: min(820px, calc(100% - 48px)); }
  .main-nav { gap: 16px; }
  .hero-image { width: 100%; }
  .hero::after { background: linear-gradient(90deg, #231610 6%, rgba(32,20,16,.86) 33%, rgba(32,20,16,.19) 78%), linear-gradient(0deg, rgba(25,15,13,.38), transparent 53%); }
}

@media (max-width: 700px) {
  .wrap, .simple-layout { width: calc(100% - 32px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 4px; padding-top: 12px; }
  .main-nav { gap: 13px; }
  .main-nav a { padding-block: 5px 6px; font-size: .8125rem; }
  .hero { min-height: 391px; align-items: flex-end; }
  .hero-image { object-position: 67% top; }
  .hero-inner { padding-block: 37px 25px; }
  .hero::after { background: linear-gradient(0deg, #231610 0%, rgba(35,22,16,.96) 20%, rgba(31,18,15,.6) 59%, rgba(31,18,15,.05) 100%), linear-gradient(90deg, rgba(31,18,15,.48), transparent 90%); }
  .hero h1 { font-size: clamp(2.25rem, 8.8vw, 3.8rem); }
  .hero p { margin-top: 15px; max-width: 33em; font-size: .9375rem; }
  .desktop-break { display: none; }
  .hero-button { margin-top: 16px; }
  .archive { padding-block: 28px 42px; }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .section-title { margin-bottom: 14px; font-size: 1.5rem; }
  .inner-page { padding-block: 16px 42px; }
  .breadcrumb { margin-bottom: 15px; }
  .article-heading { padding: 19px 19px 17px; }
  .article-cover { aspect-ratio: 2; }
  .article-body { padding: 19px 19px 26px; line-height: 1.9; }
  .article-body h2 { font-size: 1.2rem; }
  .simple-paper { padding: 18px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 16px; }
}

@media (max-width: 475px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card-body { padding: 14px 15px; }
  .external-card { padding: 12px 13px; }
}

@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;
  }
}
