/* 記事の共通デザイン。色・ロゴ・メニューはトップの home.css を共用します。
   写真は最大1040px、文章は720px。サイドバーを置かない1カラムです。 */
.journal-page { --reading-width: 720px; --image-width: 1040px; }
.journal-header, .journal-footer {
  width: min(calc(100% - 64px), 1120px);
  margin-inline: auto;
}
.journal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.journal-header .wordmark { flex-shrink: 0; }
.journal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.journal-nav a { padding: 10px 0; color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
.journal-nav a:hover { color: var(--accent); }
.journal-main { padding-top: 28px; overflow-wrap: anywhere; }
.article-breadcrumb, .archive-header, .article-photo {
  width: min(calc(100% - 64px), var(--image-width));
  margin-inline: auto;
}
.article-breadcrumb { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .65rem; }
.article-breadcrumb a { min-height: 36px; display: inline-flex; align-items: center; }
.article-breadcrumb span { align-self: center; }
.article-breadcrumb a:hover { color: var(--accent); }
.archive-header { padding: 58px 0 48px; border-bottom: 1px solid var(--line); }
.archive-kicker { margin-bottom: 22px; color: var(--accent); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; }
.archive-title { max-width: 960px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.55; letter-spacing: .025em; }
.archive-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.article-body, .walk-text { width: min(calc(100% - 64px), var(--reading-width)); margin: 64px auto 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1rem; line-height: 2.2; letter-spacing: .035em; }
.article-body p + p, .walk-text p + p { margin-top: 24px; }
.article-body h2 { margin: 64px 0 24px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 500; line-height: 1.8; }
.article-lead { font-size: 1.06rem; }
.article-photo { margin-block: 76px; }
.article-photo img { width: 100%; height: auto; max-height: none; border-radius: 6px; background: transparent; }
.article-photo-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: zoom-in; }
.article-viewer-frame { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.article-viewer-tools { display: flex; justify-content: flex-end; gap: 8px; }
.article-viewer-tools button { position: static; padding-inline: 14px; font-size: .78rem; }
.article-viewer-tools button:disabled { opacity: .5; }
.article-viewer-photo { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.article-viewer-photo figcaption { text-align: center; font-size: .78rem; color: #b3c3c8; }
.article-viewer-stage { display: flex; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.article-viewer-stage img { flex: none; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; }
.article-viewer-stage.is-zoomed img { max-width: none; max-height: none; }
.article-viewer-stage .photo-lightbox-status { margin: auto; text-align: center; }
.article-photo figcaption { margin-top: 14px; color: var(--muted); font-size: .65rem; line-height: 1.9; letter-spacing: .035em; }
.article-cover { margin-top: 48px; }
.walk-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.walk-caption > span:first-child { color: var(--accent); letter-spacing: .09em; }
.walk-entry { margin-top: 104px; }
.walk-entry .article-photo { margin-block: 0; }
.walk-text { margin-top: 36px; }

/* 色の解説も文章の流れに沿った1列。見た目だけでなく文章でも色を説明します。 */
.color-notes { width: min(calc(100% - 64px), var(--reading-width)); margin: 64px auto; border-top: 1px solid var(--line); }
.color-note { position: relative; padding: 24px 0 24px 66px; border-bottom: 1px solid var(--line); }
.color-swatch { position: absolute; left: 0; top: 29px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; }
.color-note:nth-child(1) .color-swatch { background: #092433; }
.color-note:nth-child(2) .color-swatch { background: #608399; }
.color-note:nth-child(3) .color-swatch { background: #dbe9ef; }
.color-note strong { display: block; margin-bottom: 6px; font-size: .64rem; font-weight: 500; letter-spacing: .13em; }
.color-note p { color: var(--muted); font-family: "Yu Mincho", serif; font-size: .86rem; }

/* 広告は本文と写真の間の独立した余白に置きます。現在は表示用のダミー枠です。 */
.journal-page .ad-area { width: min(calc(100% - 64px), var(--reading-width)); margin: 88px auto; }
.journal-page .ad-placeholder { display: grid; place-items: center; min-height: 160px; border-block: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .57rem; letter-spacing: .18em; }
.article-equipment { width: min(calc(100% - 64px), var(--reading-width)); margin: 76px auto 0; padding: 32px; background: var(--soft); }
.article-equipment .archive-kicker { margin-bottom: 12px; }
.article-equipment h2 { font-family: "Yu Mincho", serif; font-size: 1.3rem; font-weight: 400; }
.equipment-links { display: grid; gap: 0; margin-top: 24px; }
.equipment-links a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding: 18px 0; border-top: 1px solid var(--line); font-size: .78rem; }
.equipment-links a:hover { color: var(--accent); }
.equipment-links span, .affiliate-note { color: var(--muted); font-size: .65rem; }
.affiliate-note { margin-top: 18px; }
.article-footer { width: min(calc(100% - 64px), var(--image-width)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; margin: 88px auto 0; padding: 36px 0; border-top: 1px solid var(--line); }
.article-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: .76rem; }
.article-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.journal-footer { padding-top: 32px; border-top: 1px solid var(--line); }
.journal-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }

/* 共通本文：見出し・文章・写真・リンクを自由な順で並べます。
   article-content は記事の種類に依存しません。写真だけの記事でも同じ構造を使えます。 */
.article-content { margin-top: 48px; }
.article-content > :is(p, h2, h3, ul, ol, blockquote, hr, .article-toc, .product-card) {
  width: min(calc(100% - 64px), var(--reading-width));
  margin-inline: auto;
}
.article-content > :is(p, h2, h3, ul, ol, blockquote) {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1rem;
  line-height: 2.2;
  letter-spacing: .035em;
}
.article-content > p { margin-top: 24px; }
.article-content > h2 {
  margin-top: 76px;
  margin-bottom: 24px;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 500;
  line-height: 1.8;
  scroll-margin-top: 32px;
}
.article-content > h3 { margin-top: 40px; font-size: 1.15rem; }
.article-content > :is(ul, ol, blockquote) { margin-block: 24px; }
.article-content strong { font-weight: 700; }
.article-content > p a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.article-content > .article-disclosure {
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--muted);
  font-family: inherit;
  font-size: .72rem;
  line-height: 1.9;
  letter-spacing: .015em;
}
.article-content > .article-cover { margin-top: 0; }
.article-content > hr { margin-block: 64px; border: 0; border-top: 1px solid var(--line); }
.article-content > hr + h2 { margin-top: 0; }

/* 記事の表。多列やセル結合のある表は通常の表組みで表示する。 */
.article-content .article-table-scroll {
  max-width: 820px; margin: 32px auto; overflow-x: auto;
}
.article-content > .article-table-scroll { width: calc(100% - 40px); }
.article-content table {
  --table-rule: var(--line);
  --table-heading: var(--soft);
  width: 100%; border-collapse: collapse;
  font-size: 1rem; line-height: 1.65; font-variant-numeric: tabular-nums;
}
@supports (color: light-dark(white, black)) {
  .article-content table {
    --table-rule: light-dark(#dedfe1, #41454a);
    --table-heading: light-dark(#f2f3f4, #2b2e33);
  }
}
.article-content caption {
  padding-bottom: 20px; color: var(--ink); text-align: start;
  font-size: clamp(1.125rem, 2vw, 1.25rem); font-weight: 700;
  line-height: 1.35; letter-spacing: -.035em;
}
.article-content table :is(th, td) {
  min-width: 6rem; padding: 18px 12px; border-top: 1px solid var(--table-rule);
  text-align: start; vertical-align: top; white-space: normal; overflow-wrap: anywhere;
}
.article-content thead th { background: var(--table-heading); color: var(--ink); }
.article-content tbody th { color: var(--muted); font-size: .84rem; font-weight: 600; }
/* レンズ単体など、行見出しと値が1つずつ並ぶ表。 */
.article-content table:not(:has(thead, tr > :nth-child(3))) tbody th:first-child { width: 38%; }
.article-content table a { color: var(--accent); text-decoration: underline; }

/* 見出し1行・各行3セルの比較表だけ、項目名の下に2機種を並べる。 */
.article-content table:has(> thead > tr:only-child > th:first-child + th + th:last-child):not(:has(
  [rowspan], [colspan], tfoot, table, tr > :nth-child(4),
  tbody > tr > :last-child:not(:nth-child(3)), tbody > tr > :first-child:not(th),
  tbody > tr > th:not(:first-child)
)) {
  display: block;
  & > :is(caption, thead, tbody) { display: block; }
  & tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(12px, 4vw, 40px);
  }
  & :is(th, td) { min-width: 0; border: 0; text-align: center; }
  & thead tr { position: relative; border-radius: 14px; background: var(--table-heading); }
  & thead th { padding: 15px 12px; background: transparent; font-size: clamp(.92rem, 2.3vw, 1.24rem); font-weight: 650; }
  & thead th:first-child {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);
  }
  & tbody tr { padding: 19px 0 22px; border-bottom: 1px solid var(--table-rule); }
  & tbody :is(th, td) { padding: 0 6px; }
  & tbody th { grid-column: 1 / -1; margin-bottom: 9px; }
}
.article-toc { margin-block: 44px; padding-block: 20px; border-block: 1px solid var(--line); }
.article-toc summary { width: fit-content; padding: 6px 0; color: var(--accent); font-size: .82rem; cursor: pointer; }
.article-toc ol { margin: 16px 0 0; padding-left: 1.4em; font-size: .82rem; }
.article-toc li { padding-block: 4px; }
.article-toc a { display: inline-block; padding-block: 5px; }
.article-toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
/* 商品画像は a の最初に img を1枚置く。画像がなければ左列の幅は0。 */
.product-card {
  margin-block: 28px 32px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
}
.product-card > a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); row-gap: 8px;
  padding: clamp(16px, 2.7vw, 26px); border-radius: inherit;
}
.product-card > a > img {
  grid-column: 1; grid-row: 1 / span 2; align-self: center;
  width: clamp(76px, 12vw, 128px); height: auto; aspect-ratio: 1; object-fit: contain;
  padding: 8px; margin-inline-end: clamp(14px, 2.6vw, 28px);
  border-radius: 5px; background: #f4f5f3;
}
.product-card > a > strong {
  grid-column: 2; grid-row: 1; align-self: end;
  font-size: 1rem; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere;
}
.product-card > a > span {
  grid-column: 2; grid-row: 2; align-self: start;
  color: var(--accent); font-size: .78rem; line-height: 1.65; overflow-wrap: anywhere;
}
.product-card:hover, .product-card:focus-within { border-color: var(--accent); }
.product-card > a:is(:hover, :focus-visible) > span { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  .journal-header, .journal-footer, .article-breadcrumb, .archive-header, .article-body, .walk-text,
  .color-notes, .article-equipment, .article-footer, .journal-page .ad-area { width: calc(100% - 44px); }
  .journal-header { padding-block: 24px; flex-wrap: wrap; }
  .journal-nav { display: none; }
  .journal-header .site-menu { top: max(27px, env(safe-area-inset-top)); }
  .journal-main { padding-top: 20px; }
  .journal-main[id] { scroll-margin-top: 94px; }
  .article-breadcrumb { font-size: .61rem; }
  .archive-header { padding: 34px 0 32px; }
  .archive-kicker { margin-bottom: 16px; font-size: .59rem; }
  .archive-title { font-size: clamp(1.8rem, 7.5vw, 2.5rem); line-height: 1.65; }
  .archive-meta { margin-top: 22px; font-size: .62rem; }
  .article-body, .walk-text { font-size: .94rem; line-height: 2.15; margin-top: 38px; }
  .article-lead { font-size: 1rem; }
  .article-body h2 { margin-top: 44px; }
  .article-photo { width: calc(100% - 24px); margin-block: 52px; }
  .article-photo figcaption { padding-inline: 10px; font-size: .6rem; }
  .article-cover { margin-top: 30px; }
  .walk-entry { margin-top: 64px; }
  .walk-caption { flex-direction: column; gap: 3px; }
  .walk-text { margin-top: 28px; }
  .color-notes { margin-block: 44px; }
  .color-note { padding-left: 56px; }
  .journal-page .ad-area { margin-block: 60px; }
  .journal-page .ad-placeholder { min-height: 140px; }
  .article-equipment { margin-top: 52px; padding: 26px 22px; }
  .article-footer { margin-top: 60px; }
  .journal-footer nav { gap: 18px; }
  .article-content { margin-top: 30px; }
  .article-content > :is(p, h2, h3, ul, ol, blockquote, hr, .article-toc, .product-card) { width: calc(100% - 44px); }
  .article-content > :is(p, ul, ol, blockquote) { font-size: .94rem; line-height: 2.15; }
  .article-content > h2 { margin-top: 52px; scroll-margin-top: 96px; }
  .article-content > .article-disclosure { font-size: .68rem; }
  .article-content > hr { margin-block: 44px; }
  .article-toc { margin-block: 32px; }
  .product-card > a { padding: 16px; }
  .product-card > a > strong { font-size: .92rem; }
}

@media (max-width: 520px) {
  .article-content > .article-table-scroll { width: calc(100% - 32px); }
  .article-content table { font-size: .91rem; }
}

/* 小型スマホでは、画像付きのときだけリンク案内を下段いっぱいに。 */
@media (max-width: 440px) {
  .product-card > a > img { grid-row: 1; }
  .product-card > a > img ~ strong { align-self: center; }
  .product-card > a > img ~ span {
    grid-column: 1 / -1; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line);
  }
}
