/* WEB雑誌屋ドットコム 2026-10-26 作り直し
   色: 深緑 #174C43・生成り #F7F4ED・墨 #252A28 */
:root {
  --green: #174C43;
  --green-dark: #0F3830;
  --green-soft: #E3EDE9;
  --paper: #F7F4ED;
  --paper-2: #EFE9DC;
  --ink: #252A28;
  --ink-2: #4A514E;
  --line: #DDD5C5;
  --card: #FFFFFF;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "BIZ UDPMincho", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid #C98B2B; outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 760px; }

/* ヘッダー */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; }
.logo { text-decoration: none; color: var(--green); display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; line-height: 1.2; }
.logo-main { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: .06em; }
.logo-small { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.logo-tag { flex-basis: 100%; font-size: 13px; color: var(--ink-2); letter-spacing: .08em; margin-top: 2px; }
.gnav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
.gnav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.gnav a:hover { border-bottom-color: var(--green); color: var(--green); }

/* PR 表記 */
.pr-bar { background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink); padding: 8px 0; }
.pr-badge { display: inline-block; border: 1px solid var(--ink); border-radius: 3px; font-size: 12px; font-weight: 700; line-height: 1; padding: 3px 5px; margin-right: 8px; vertical-align: 1px; background: #fff; }

/* パンくず */
.crumbs ol { list-style: none; margin: 0; padding: 12px 18px 0; display: flex; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: #8A8F8C; }
.crumbs a { color: var(--ink-2); }

/* 見出し・本文 */
h1, h2, h3 { line-height: 1.4; }
.page-title { font-family: var(--serif); font-size: 28px; margin: 18px 0 10px; letter-spacing: .02em; }
.section { padding-top: 28px; padding-bottom: 8px; }
.sec-title { font-family: var(--serif); font-size: 23px; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--green); }
.sec-lead { margin: -6px 0 16px; color: var(--ink-2); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 18px; }
.muted { color: var(--ink-2); font-size: 14px; }
.small { font-size: 14px; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 22px; border-radius: 8px; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--green); line-height: 1.4; text-align: center; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-sub { background: #fff; color: var(--green); }
.btn-sub:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-wide { width: 100%; }
.btn .ext { font-size: 13px; font-weight: 400; opacity: .9; }
.buy-note { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }

/* トップ */
.hero { padding: 34px 0 26px; background: linear-gradient(180deg, #fff 0, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero h1 { font-family: var(--serif); font-size: 32px; margin: 0 0 8px; letter-spacing: .04em; }
.hero p { margin: 0 0 18px; color: var(--ink-2); }
.search-box { position: relative; max-width: 640px; }
.search-box label { display: block; font-weight: 700; margin-bottom: 6px; }
.search-box input { width: 100%; font-size: 17px; padding: 13px 14px; border: 2px solid var(--green); border-radius: 8px; background: #fff; color: var(--ink); }
.search-results { list-style: none; margin: 10px 0 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; max-height: 440px; overflow: auto; }
.search-results:empty { display: none; }
.search-results li a { display: flex; gap: 12px; align-items: center; padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #EEE9DE; }
.search-results li a:hover { background: var(--green-soft); }
.search-results img { width: 40px; height: 56px; object-fit: contain; background: var(--paper); flex: none; }
.search-results .sr-genre { display: block; font-size: 13px; color: var(--ink-2); }
.search-empty { padding: 10px 12px; color: var(--ink-2); }

.genre-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.genre-grid a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.4; }
.genre-grid a:hover { border-color: var(--green); color: var(--green); }
.genre-grid .count { font-weight: 400; font-size: 13px; color: var(--ink-2); white-space: nowrap; }

.sub-title { font-size: 17px; margin: 26px 0 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 14px 56px; position: relative; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; text-align: center; line-height: 28px; }
.steps strong { display: block; }

/* 表紙の棚 */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
.card a { display: block; text-decoration: none; color: var(--ink); }
.cover { display: block; aspect-ratio: 3 / 4; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; box-shadow: 0 1px 2px rgba(37, 42, 40, .06); transition: transform .15s ease, box-shadow .15s ease; }
.cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.no-cover { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--paper); color: var(--ink-2); font-size: 13px; text-align: center; border-radius: 4px; }
.mag-cover .no-cover { width: 160px; height: 214px; margin: 0 auto; border: 1px solid var(--line); }
.card a:hover .cover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(37, 42, 40, .12); }
.card-name { display: block; margin-top: 8px; font-weight: 700; font-size: 15px; line-height: 1.5; }
.card a:hover .card-name { color: var(--green); text-decoration: underline; }
.card-sub { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.more-link { margin: 16px 0 0; text-align: right; }
.more-link a { font-weight: 700; }

/* ジャンルのページ */
.guide-lead { font-size: 17px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.points li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.points strong { display: block; color: var(--green); }
.tip { background: var(--green-soft); border-radius: 8px; padding: 12px 14px; margin: 14px 0 0; }

/* 表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid #EEE9DE; text-align: left; vertical-align: top; }
table.data thead th { background: var(--paper-2); font-size: 14px; white-space: nowrap; }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: none; }
table.data td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data .mag-cell { display: flex; gap: 10px; align-items: center; min-width: 190px; }
table.data .mag-cell img { width: 44px; height: 60px; object-fit: contain; flex: none; background: var(--paper); }
.mag-desc { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 6px; line-height: 1.6; }
.rate { display: inline-block; background: var(--green); color: #fff; border-radius: 4px; padding: 0 6px; font-size: 13px; font-weight: 700; }

/* 雑誌のページ */
.mag-head { display: grid; gap: 18px; padding-top: 6px; }
.kicker { margin: 18px 0 -10px; font-weight: 700; }
.mag-cover img.ref-cover { width: 120px; opacity: .9; }
.reading { display: block; font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-2); letter-spacing: .04em; margin-top: 4px; }
.mag-intro { font-size: 17px; margin: 0 0 4px; }
.mag-intro .muted { margin-left: 4px; }
.cta-sum { margin: 0 0 12px; font-size: 15px; }
.bn .no-cover { width: 84px; height: 112px; font-size: 12px; }
.mag-head { margin-top: 18px; }
.mag-cover { text-align: center; margin: 0; }
.mag-cover img { width: 160px; border: 1px solid var(--line); background: #fff; box-shadow: 0 4px 14px rgba(37, 42, 40, .12); }
.mag-cover figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.mag-summary { font-size: 16px; margin: 0 0 14px; }
.facts { margin: 0 0 16px; display: grid; grid-template-columns: 7.5em 1fr; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); font-size: 14px; }
.facts dd { font-weight: 700; }
.facts dd .muted { font-weight: 400; }
.cta { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.cta-price { margin: 0 0 10px; }
.cta-price .yen { font-size: 24px; font-weight: 700; }
.page-nav { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 22px 0 0; padding: 0; }
.page-nav a { display: inline-block; padding: 6px 14px; border: 1px solid var(--green); border-radius: 999px; text-decoration: none; font-size: 14px; background: #fff; }
.page-nav a:hover { background: var(--green-soft); }
.source { font-size: 13px; color: var(--ink-2); margin: 8px 0 0; }
.desc-text { white-space: pre-line; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.toc p { margin: 0 0 12px; }
.toc .toc-head { color: var(--green); }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--green); padding: 8px 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "＋ "; }
details.more[open] summary::before { content: "－ "; }

.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.review-title { font-weight: 700; margin: 0 0 4px; }
.review-meta { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.review-body { margin: 0; white-space: pre-line; }
.stars { color: #B7791F; letter-spacing: 1px; margin-right: 8px; font-size: 14px; }
.stars-off { color: #D9D2C3; }
.review-reply { margin: 10px 0 0; padding: 10px 12px; background: var(--paper); border-radius: 6px; font-size: 15px; white-space: pre-line; }
.review-reply strong { display: block; font-size: 13px; color: var(--ink-2); }

.bn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bn { display: grid; grid-template-columns: 84px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.bn img { width: 84px; height: 112px; object-fit: contain; background: var(--paper); }
.bn-name { font-weight: 700; margin: 0; }
.bn-name a { color: var(--ink); }
.bn-meta { font-size: 14px; color: var(--ink-2); margin: 2px 0 6px; }
.bn-ex { font-size: 14px; margin: 0; }
.tag { display: inline-block; font-size: 12px; border: 1px solid var(--green); color: var(--green); border-radius: 4px; padding: 0 6px; margin-left: 6px; font-weight: 700; vertical-align: 1px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; list-style: none; padding: 0; margin: 20px 0 0; }
.pager a, .pager span { display: inline-block; min-width: 44px; min-height: 44px; line-height: 42px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; padding: 0 10px; }
.pager span[aria-current] { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.issue-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 0; flex-wrap: wrap; }

.prose h2 { font-family: var(--serif); font-size: 22px; margin: 30px 0 10px; }
.prose h3 { font-size: 18px; margin: 22px 0 6px; }
.prose dl dt { font-weight: 700; margin-top: 14px; }
.prose dl dd { margin: 4px 0 0; }

/* フッター */
.site-footer { margin-top: 48px; background: var(--green); color: #fff; padding: 30px 0 20px; font-size: 15px; }
.site-footer a { color: #fff; }
.foot-cols { display: grid; gap: 22px; }
.foot-h { font-size: 16px; margin: 0 0 10px; font-family: var(--serif); }
.foot-genres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; font-size: 14px; }
.foot-links { list-style: none; margin: 0 0 12px; padding: 0; }
.foot-links li { margin-bottom: 6px; }
.foot-note { font-size: 13px; line-height: 1.7; opacity: .92; }
.copy { margin: 20px 0 0; font-size: 13px; opacity: .85; }

/* 全誌の一覧（cat.php・search.php・pub.php） */
.rows { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px; border-bottom: 1px solid #EEE9DE; }
.row:last-child { border-bottom: none; }
.row-cover img, .row-cover .no-cover { width: 64px; height: 88px; object-fit: contain; background: var(--paper); display: flex; font-size: 11px; }
.row-body p { margin: 0; }
.row-name { font-weight: 700; font-size: 16px; line-height: 1.5; }
.row-name a { color: var(--ink); }
.row-name a:hover { color: var(--green); }
.row-meta { font-size: 13px; color: var(--ink-2); margin-top: 2px !important; }
.row-ds { font-size: 14px; margin-top: 4px !important; line-height: 1.6; }
.row-price { font-size: 14px; margin-top: 6px !important; }
.row-price strong { font-size: 16px; }
.tag-sub { border-color: var(--ink-2); color: var(--ink-2); font-weight: 400; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); font-size: 14px; }
.chips a:hover { border-color: var(--green); color: var(--green); }
.chips .count { color: var(--ink-2); font-size: 12px; }
.list-tools { display: grid; gap: 8px; margin-bottom: 10px; }
.tabs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a, .tabs span { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.tabs span[aria-current] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.search-row .btn { flex: none; }

/* 日本語の見出し・誌名を語の途中で折り返さない（対応ブラウザだけ） */
h1, h2, h3, .card-name, .genre-grid a, .bn-name, .review-title, .mag-cell span { word-break: auto-phrase; }

/* スマホでは比較表を1誌ずつのカードにする */
@media (max-width: 639px) {
  .gnav { gap: 4px 16px; font-size: 14px; }
  .gnav .long { display: none; }
  .shelf-limit li:nth-child(n+7) { display: none; }
  .genre-grid a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 12px 8px; border-bottom: 1px solid #EEE9DE; }
  table.stack tr:last-child { border-bottom: none; }
  table.stack th, table.stack td { border: none; padding: 0; }
  table.stack th { margin-bottom: 6px; }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--ink-2); font-size: 13px; text-align: left; white-space: nowrap; }
}

@media (min-width: 640px) {
  .shelf { grid-template-columns: repeat(3, 1fr); }
  .genre-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .points { grid-template-columns: repeat(3, 1fr); }
  .mag-head { grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
  .mag-cover img { width: 240px; }
  .bn-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .shelf { grid-template-columns: repeat(5, 1fr); }
  .genre-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 38px; }
  .page-title { font-size: 32px; }
  .foot-cols { grid-template-columns: 2fr 1fr; }
  .foot-genres { grid-template-columns: repeat(3, 1fr); }
  .mag-head { grid-template-columns: 280px 1fr; }
  .mag-cover img { width: 280px; }
}
