:root {
  color-scheme: light;
  --ink: #202922;
  --dark: #17221d;
  --muted: #525e53;
  --paper: #fbf8f1;
  --surface: #fffdf8;
  --line: #ded8ca;
  --accent: #94522d;
  --brass: #e6c391;
  --font: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--font); }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; text-wrap: pretty; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .21em; }
a:hover { text-decoration-thickness: .13em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #a86434; outline-offset: 3px; }
.wrap { width: min(1140px, calc(100% - 72px)); margin-inline: auto; }
.visually-hidden, .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: 2; inset: .65rem auto auto .65rem; padding: .65rem 1rem; background: white; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .025em; }
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.38rem;
  aspect-ratio: 1;
  border-radius: 4px;
  color: #ffedda;
  background: #8a4529;
  font-size: 1.2rem;
  line-height: 1;
}
.main-nav { display: flex; align-items: center; align-self: stretch; gap: clamp(1.1rem, 2.8vw, 2.35rem); }
.main-nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; padding: .15rem 0 0; color: var(--ink); font-size: .875rem; font-weight: 700; text-decoration: none; }
.main-nav a:is(:hover, [aria-current="page"]) { color: var(--accent); border-color: var(--accent); }
.menu-toggle { display: none; }

.hero { position: relative; isolation: isolate; background: var(--dark); color: var(--surface); overflow: hidden; }
.hero-image { position: absolute; z-index: -2; inset: 0 0 0 auto; width: min(100%, 1120px); height: 100%; object-fit: cover; object-position: center 55%; }
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #17221d 8%, #17221d 24%, rgba(23,34,29,.93) 35%, rgba(23,34,29,.38) 68%, rgba(23,34,29,.12)),
              linear-gradient(0deg, rgba(23,34,29,.33), transparent 58%);
}
.hero-inner { min-height: 470px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 3.75rem; }
.hero h1 { font-size: clamp(2.15rem, 5.1vw, 4.8rem); font-weight: 800; letter-spacing: .035em; line-height: 1.15; }
.hero h1 span { display: block; margin-top: .12em; }
.hero p { max-width: 28rem; margin-top: 1.35rem; color: #f5eadd; line-height: 1.9; }
.button { display: inline-flex; align-items: center; gap: .85rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 5px; background: var(--dark); color: white; text-decoration: none; font-weight: 700; }
.button:hover { background: #2c3c31; }
.hero-button { margin-top: 1.65rem; background: var(--brass); color: #2c2319; }
.hero-button:hover { background: #f0d5ae; }

.section, .interior { padding-bottom: clamp(3.5rem, 6vw, 5.5rem); }
.section { padding-top: clamp(2.25rem, 5vw, 3.7rem); }
.section-title { position: relative; padding-left: .82rem; border-left: 4px solid var(--accent); font-size: clamp(1.45rem, 2.7vw, 2rem); font-weight: 800; }
.category-title { margin-block: 0 1.65rem; }
.archive-layout, .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 286px); gap: clamp(1.5rem, 3vw, 2.45rem); align-items: start; }
.section .archive-layout { margin-top: 1.4rem; }
.search-form { display: flex; gap: .6rem; }
.search-form input { min-width: 0; flex: 1; padding: .65rem .85rem; border: 1px solid #b9b5a7; border-radius: 5px; background: var(--surface); color: var(--ink); }
.search-form input::placeholder { color: var(--muted); }
.search-form button { padding: .65rem 1.25rem; border-radius: 5px; border: 0; background: var(--dark); color: white; font-weight: 700; }
.search-form button:hover { background: #2c3c31; }
.result-info { margin: .85rem 0 .7rem; font-size: .875rem; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.15rem; }
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-card:hover { border-color: #aa7657; box-shadow: 0 4px 14px #35291c15; }
.card-image { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: #ded6c3; }
.card-content { flex: 1; display: grid; justify-items: start; align-content: start; grid-template-rows: auto 1fr auto; gap: .6rem; padding: 1rem 1.05rem 1.15rem; }
.card-content h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.55; overflow-wrap: anywhere; }
.category-label {
  width: fit-content;
  padding: .13rem .58rem;
  border-radius: 3px;
  background: #f1e5d6;
  color: #67371f;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.65;
  text-decoration: none;
}
a.category-label:hover { text-decoration: underline; }
.card-action { color: var(--accent); font-size: .82rem; font-weight: 700; }
.card-action span { padding-left: .12rem; }
.empty-state { border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; border-radius: 8px; }
.empty-state p { margin-bottom: .75rem; }

.category-panel { padding: 1.05rem 1.15rem .65rem; border: 1px solid var(--line); border-top: 3px solid #a56b44; background: var(--surface); border-radius: 7px; }
.category-panel h2 { font-size: 1rem; font-weight: 800; margin-bottom: .65rem; }
.category-panel ul, .related ul, .links-list { margin: 0; padding: 0; list-style: none; }
.category-panel li { border-top: 1px solid var(--line); }
.category-panel a { display: flex; align-items: center; justify-content: space-between; gap: .65rem; color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 600; padding-block: .65rem; }
.category-panel a:is(:hover,[aria-current="page"]) { color: var(--accent); }
.category-count { display: grid; place-items: center; min-width: 1.55rem; padding-inline: .2rem; height: 1.55rem; border-radius: 1rem; background: #f0ebe0; color: var(--muted); font-size: .73rem; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; margin: 1rem 0 1.15rem; color: var(--muted); font-size: .82rem; }
.breadcrumb a { color: var(--accent); }
.article-paper, .simple-paper { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.article-header, .article-body, .simple-paper { padding-inline: clamp(1.15rem, 4.1vw, 3rem); }
.article-header { padding-top: clamp(1.4rem, 3.5vw, 2.6rem); }
.article-header h1 { margin: .7rem 0 .65rem; font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.65rem); overflow-wrap: anywhere; }
.reading-time { margin-bottom: 1.35rem; color: var(--muted); font-size: .84rem; }
.article-photo { width: 100%; height: auto; background: #ded6c3; }
.article-body { padding-block: clamp(1.4rem, 3vw, 2.1rem) clamp(2rem, 4vw, 3.15rem); }
.article-body, .simple-body { line-height: 1.95; overflow-wrap: anywhere; }
.article-body p, .article-body ul, .article-body ol, .simple-body p { margin: 0 0 1.15em; }
.article-body > :last-child, .simple-body > :last-child { margin-bottom: 0; }
.article-body h2, .simple-body h2 { margin: 2em 0 .85em; border-bottom: 2px solid var(--line); padding: 0 0 .47em; font-size: clamp(1.25rem, 2.5vw, 1.55rem); }
.simple-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 1.6em 0 .65em; font-size: 1.15rem; }
.article-body li + li { margin-top: .3em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body blockquote { margin-inline: 0; padding-left: 1rem; border-left: 3px solid var(--line); }
.toc { margin: 1.5rem 0; padding: .85rem 1.15rem; border: 1px solid var(--line); border-radius: 6px; background: #f7f2e7; }
.toc summary { font-weight: 800; cursor: pointer; }
.toc ol:last-child { margin: .65rem 0 0; }
.toc a { color: #6e442d; }
.table-scroll { max-width: 100%; overflow-x: auto; margin-block: 1.25em; border: 1px solid var(--line); border-radius: 5px; }
.article-body table { width: 100%; min-width: 32rem; border-collapse: collapse; background: var(--surface); font-size: .91rem; line-height: 1.7; }
.article-body th, .article-body td { padding: .65em .8em; vertical-align: top; text-align: left; }
.article-body th { background: #ede6d7; font-weight: 700; }
.article-body :is(th, td) + :is(th, td) { border-left: 1px solid var(--line); }
.article-body tbody tr { border-top: 1px solid var(--line); }
.article-body tbody tr:nth-child(even) { background: #f8f4eb; }
.related { margin-top: 2.05rem; }
.related .section-title { font-size: 1.15rem; margin-bottom: .8rem; }
.related ul { border-top: 1px solid var(--line); }
.related li { border-bottom: 1px solid var(--line); }
.related a { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .75rem .15rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.related a:hover { color: var(--accent); text-decoration: underline; }
.article-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; margin-top: 1.4rem; font-size: .86rem; }
.article-navigation > :last-child { text-align: right; }

.simple-paper { max-width: 800px; padding-block: clamp(1.5rem, 4vw, 2.8rem); }
.links-list li { padding: .85rem 1.15rem; background: #f7f2e7; border: 1px solid var(--line); border-radius: 6px; }
.links-list li + li { margin-top: .75rem; }
.links-list a { font-weight: 800; }
.links-list p { margin: .25rem 0 0; }
.site-footer { background: var(--dark); color: var(--surface); border-top: 1px solid #304139; }
.footer-inner { padding-block: 2rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1.35rem; }
.footer-inner p { margin-top: .65rem; color: #d2d0c2; font-size: .78rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; justify-content: flex-end; }
.footer-links a { color: inherit; font-size: .83rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 42px); }
  .hero::after { background: linear-gradient(90deg, #17221d 4%, rgba(23,34,29,.93) 26%, rgba(23,34,29,.42) 71%, rgba(23,34,29,.24)); }
  .hero-inner { min-height: 395px; }
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 1.25rem; }
}

@media (max-width: 740px) {
  .archive-layout, .article-layout { grid-template-columns: minmax(0, 1fr); }
  .category-panel { margin-top: .6rem; }
  .footer-inner { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 630px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 60px; flex-wrap: wrap; gap: 0 .35rem; }
  .brand { min-height: 60px; gap: .5rem; font-size: .85rem; }
  .brand-mark { width: 1.95rem; font-size: 1.05rem; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .3rem; padding: .46rem .55rem; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: transparent; font-size: .72rem; }
  .main-nav { display: none; width: 100%; flex-wrap: wrap; gap: .15rem 1rem; padding-bottom: .65rem; }
  .main-nav.is-open { display: flex; }
  .main-nav a { min-height: 39px; }
  .hero-image { object-position: 62% center; }
  .hero::after { background: linear-gradient(90deg, rgba(23,34,29,.97), rgba(23,34,29,.7) 58%, rgba(23,34,29,.43)); }
  .hero-inner { min-height: 338px; padding-block: 2.65rem; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero p { max-width: 24rem; margin-top: .95rem; }
  .hero-button { margin-top: 1.25rem; }
  .footer-inner .brand { min-height: auto; }
}

@media (max-width: 470px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: .95rem; }
  .search-form { gap: .45rem; }
  .search-form input { padding-inline: .6rem; }
  .search-form button { padding-inline: .8rem; }
}


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