/* ==========================================================================
   国政情報センター トップページ
   ========================================================================== */

:root {
  /* Colors */
  --c-primary: #12305E;
  --c-primary-dark: #0C223F;
  --c-accent: #1B6FA8;
  --c-accent-dark: #14536B;
  --c-accent-text: #14547F;
  --c-accent-light: #6FA8CF;
  --c-accent-light-2: #9EC3DC;
  --c-text-strong: #1B2733;
  --c-text: #14191e;
  --c-text-soft: #20252a;
  --c-text-muted: #5A646F;
  --c-text-faint: #636c77;
  --c-placeholder-text: #7C93AC;
  --c-placeholder-text-2: #9AA3AD;
  --c-on-dark: #BCCADA;
  --c-on-dark-2: #ebf0f7;
  --c-on-dark-faint: #eceef0;
  --c-bg-tint: #F4F8FC;
  --c-chip-bg: #EAF2FA;
  --c-chip-bg-muted: #F0F2F5;
  --c-border: #E4E8ED;
  --c-border-tint: #DDE3EA;
  --c-border-faint: #D4DAE2;
  --c-border-dark: #22375A;
  --c-warn: #B03030;
  --c-warn-border: #E3B9B9;
  --c-white: #fff;

  /* Layout */
  --container-max: 1280px;
  --side-padding: 48px;
  /* 追従ヘッダーの高さ。sticky な要素はこの値を基準に下げる。
     フォント読み込みなどで実寸が変わるため、JS が実測値で上書きする */
  --header-h: 81px;
  --catalog-nav-h: 51px;

  /* Radius */
  --radius-sm: 3px;
  --radius-cover: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-primary: 0 6px 10px rgba(18, 48, 94, .05);
  --shadow-secondary: 0 2px 5px rgba(18, 48, 94, .05);
  --shadow-primary-sp: 0 4px 7px rgba(18, 48, 94, .05);
  --shadow-secondary-sp: 0 2px 4px rgba(18, 48, 94, .05);

  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

@media (max-width: 767px) {
  :root {
    --side-padding: 20px;
    --header-h: 59px;
    --catalog-nav-h: 45px;
  }

  .form-field { margin-bottom: 18px; }
  .form-field__label { font-size: 14.5px; }
  .form-actions .btn { width: 100%; }
  .pager { gap: 14px; }
  .article__body p { font-size: 15px; }
}

@font-face {
  font-family: "HeroTitle";
  src: url("../fonts/subset-futogo.787053f97e55.woff2") format("woff2");
  font-style: bold;
}

@font-face {
  font-family: "HeroLead";
  src: url("../fonts/subset-futogo-medium.adc46ade4f91.woff2") format("woff2");
  font-style: Bold;
}

@font-face {
  font-family: "AppBanner";
  src: url("../fonts/subset-marugo.5649a08b3fc1.woff2") format("woff2");
  font-style: Bold;
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text-strong);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; cursor: pointer; padding: 0; color: inherit; }
input { font-family: inherit; }
img { max-width: 100%; display: block; }

.icon { display: block; flex-shrink: 0; }
.icon--chevron { width: 9px; height: 15px; }
.icon--chevron-sm { width: 8px; height: 13px; }
.icon--chevron-down { width: 9px; height: 6px; }
.icon--plus { width: 12px; height: 12px; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.section-inner {
  max-width: calc(var(--container-max) + var(--side-padding) * 2);
  margin: 0 auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

/* ---- Buttons & links ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 500;
  padding: 17px 30px;
  border-radius: var(--radius-sm);
  transition: background-color .2s ease, color .2s ease;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--c-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; text-decoration: none; }
.btn--outline {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.btn--outline:hover { background: var(--c-bg-tint); color: var(--c-primary); text-decoration: none; }
.btn--small {
  padding: 9px 18px;
  font-size: 14px;
  gap: 8px;
}

.btn .icon--chevron { transition: transform .2s ease; }
.btn:hover .icon--chevron { transform: translateX(3px); }

.card-link, .text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-accent);
  transition: color .2s ease;
}
.card-link:hover, .text-link:hover { color: var(--c-accent-dark); }
.card-link .icon--chevron-sm,
.text-link .icon--chevron-sm { transition: transform .2s ease; }
.card-link:hover .icon--chevron-sm,
.text-link:hover .icon--chevron-sm { transform: translateX(3px); }

/* カード自体がリンク（カード全体をクリック可能に） */
.service-card {
  position: relative;
  color: inherit;
  text-decoration: none;
}
.service-card:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  border-radius: var(--radius-sm);
}
.icon-btn:hover { background: var(--c-bg-tint); }

/* ---- Chips / badges ---- */
.chip {
  display: inline-block;
  font-size: 14px;
  color: var(--c-accent-text);
  background: var(--c-chip-bg);
  padding: 5px 10px;
}
.chip--category {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 9px;
  font-size: 11px;
}

.badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 7px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--onsale { color: var(--c-warn); border-color: var(--c-warn-border); }
.badge--upcoming { color: var(--c-text-muted); font-weight: 500; border-color: var(--c-border-faint); }
.badge--new { color: var(--c-warn); border-color: var(--c-warn-border); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(18, 48, 94, .08);
  border-top: 3px solid var(--c-primary);
}

.main-nav__inner {
  max-width: calc(var(--container-max) + var(--side-padding) * 2);
  margin: 0 auto;
  padding: 14px var(--side-padding) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo__img {
  height: 40px;
  width: auto;
  display: block;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-item {
  position: relative;
}
.nav-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-strong);
  font-family: inherit;
  cursor: pointer;
  padding: 12px 0;
}
.nav-item__link:hover { color: var(--c-accent); }
.nav-item__caret {
  color: var(--c-placeholder-text-2);
  transition: transform .2s ease, color .2s ease;
}
.icon--external {
  width: 12px;
  height: 12px;
  color: var(--c-placeholder-text-2);
}
.nav-item__link:hover .icon--external { color: var(--c-accent); }

.nav-item--dropdown .nav-item__link:hover .nav-item__caret,
.nav-item--dropdown:hover .nav-item__caret,
.nav-item--dropdown:focus-within .nav-item__caret {
  color: var(--c-accent);
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 32px rgba(18, 48, 94, .14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  z-index: 40;
}
.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-strong);
  white-space: nowrap;
}
.nav-dropdown a:hover {
  background: var(--c-bg-tint);
  color: var(--c-accent);
}

/* Invisible bridge so the pointer can travel from the trigger to the panel without closing it */
.nav-item--dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
}

.main-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle { display: none; }
.menu-toggle__bars {
  width: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle__bars span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--c-primary);
}

/* ---- Mobile drawer ---- */
.drawer {
  position: fixed;
  inset: 0;
  /* サイトヘッダー（z-index:100）より前面に出す。
     背面だと、ヘッダーがドロワーの閉じるボタンを覆って閉じられなくなる */
  z-index: 120;
  background: #fff;
  padding: 0 20px 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.drawer:not([hidden]) { transform: translateX(0); }
.drawer[hidden] { display: block; }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.drawer__nav > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--c-text-strong);
  border-bottom: 1px solid var(--c-border);
}
.drawer__nav > a .icon--external { width: 13px; height: 13px; }

.drawer__group { border-bottom: 1px solid var(--c-border); }
.drawer__group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--c-text-strong);
  font-family: inherit;
}
.drawer__group-heading .icon--plus {
  color: var(--c-text-faint);
  transition: transform .2s ease;
}
.drawer__group-heading[aria-expanded="true"] .icon--plus { transform: rotate(45deg); }
.drawer__sublinks {
  display: none;
  flex-direction: column;
  padding: 0 4px 12px 14px;
}
.drawer__group[data-open="true"] .drawer__sublinks { display: flex; }
.drawer__sublinks a {
  padding: 10px 0;
  font-size: 15px;
  color: var(--c-text-soft);
}

.drawer__divider { height: 12px; }
.drawer__utility {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer__utility a {
  padding: 12px 4px;
  font-size: 14px;
  color: var(--c-text-soft);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 34, 63, .4);
  z-index: 110;
}
.drawer-backdrop[hidden] { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #EAF2FB;
  border-top: 1px solid var(--c-border);
  border-bottom: 3px solid var(--c-primary);
}
/* 背景画像は2枚をクロスフェードで切り替え（切り替えは js/main.js） */
.hero__bgs {
  position: absolute;
  inset: 0;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 切り替え対象（.hero__bgs 配下）だけをフェード制御する */
.hero__bgs .hero__bg {
  opacity: 0;
  transition: opacity 1s ease;
}
.hero__bgs .hero__bg.is-active { opacity: 1; }
/* 画像ごとに見せたい部分が違うため object-position は個別指定 */
.hero__bg--top1 { object-position: center right; }
.hero__bg--top2 { object-position: bottom right; }

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 40%, rgba(250,252,255,.95) 50%, rgba(250,252,255,.70) 60%, rgba(250,252,255,.15) 70%, rgba(250,252,255,0) 85%);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: calc(var(--container-max) + var(--side-padding) * 2);
  margin: 0 auto;
  padding: 64px var(--side-padding) 72px;
}
.hero__text { max-width: none; }
.hero h1 {
  font-size: 56px;
  color: var(--c-primary);
  line-height: 1.35;
  font-weight: 500;
  margin-bottom: 22px;
  font-family: "HeroTitle", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.hero__lead {
  font-size: 19px;
  line-height: 1.95;
  font-weight:400;
  color: var(--c-text);
  max-width: 650px;
  margin-bottom: 26px;
  font-family: "HeroLead", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-feature-settings:"kern", "liga";
}
/* 臨時のお知らせ。ヒーロー直下に、飾りを付けずに1行で次の版のご案内を置く。
   「お知らせ」「文言」「ご予約・ご購入ページへ」だけ。予約中の版が無い間は出ない */
.notice {
  padding-top: 30px;
  /* 次の「商品・サービス」は自分の上余白（50px）も持つので、合わせて十分に離す */
  padding-bottom: 10px;
  color: var(--c-primary);
}
.notice__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
/* 「お知らせ」だけは紺の枠のバッジにして、臨時の案内だと一目で分かるようにする */
.notice__label {
  flex-shrink: 0;
  padding: 3px 11px;
  border: 1px solid var(--c-primary);
  border-radius: var(--radius-sm);
  background: var(--c-white);
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.5;
}
.notice__text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
/* 行き先は PC では文字リンク（改行せず同じ行に）。SP だけボタンにする */
.notice__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-accent);
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.notice__link:hover { color: var(--c-accent-dark); }
.notice__link .icon--chevron-sm { transition: transform .2s ease; }
.notice__link:hover .icon--chevron-sm { transform: translateX(3px); }

/* セクション末尾の「〜はこちら」。紺のボタンを左右中央に置く */
.section-more {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}
.section-more__btn {
  min-width: 280px;
  padding: 15px 34px;
  font-weight: 700;
  letter-spacing: .02em;
}
.section-more__btn .icon--chevron-sm { transition: transform .2s ease; }
.section-more__btn:hover .icon--chevron-sm { transform: translateX(3px); }

.hero__banners {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__banner {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 84px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 999px;
  padding: 10px 22px 10px 40px;
  box-shadow: 0 10px 26px rgba(18, 48, 94, .14);
  transition: box-shadow .2s ease, transform .2s ease;
}
.hero__banner:hover {
  box-shadow: 0 12px 30px rgba(15, 67, 145, 0.316);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero__banner-logo-img {
  flex-shrink: 0;
  height: 40px;
  width: auto;
}

.hero__banner-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero__banner-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: .03em;
  margin-bottom:5px;
}
.hero__banner-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-primary);
  font-family: "AppBanner", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  letter-spacing: .02em;
  line-height: 1.3;
}
.hero__banner-arrow {
  flex-shrink: 0;
  margin-left: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: background-color .2s ease, transform .2s ease;
}
.hero__banner-arrow .icon--chevron-sm {
  width: 7px;
  height: 11px;
  transition: transform .2s ease;
}
.hero__banner-arrow .icon--chevron-sm path {
  transition: stroke-width .2s ease;
}
.hero__banner:hover .hero__banner-arrow {
  transform: translateX(3px);
}
.hero__banner:hover .hero__banner-arrow .icon--chevron-sm path {
  stroke-width: 1.8;
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.section-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  /* 見出しの下に罫線は引かない。区切りは余白だけで作るので、線があった頃より詰める */
  margin-bottom: 28px;
}
.section-header h2 { margin: 0; }

.services h2, .books h2, .news h2 {
  font-size: 34px;
  font-weight: 500;
  color: var(--c-primary);
  letter-spacing: .02em;
}
.section-title {
  display: inline-flex;
  align-items: baseline;
}
/* 見出しの横に添える英字。飾りは付けず、小さく色を落として置くだけ */
.section-title__en {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-accent-text);
  margin-left: 16px;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  padding: 50px 0 80px;
  background: linear-gradient(180deg, #FFFFFF 78%, #E3EEF8 100%);
}

.service-cards--primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.service-card--primary {
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #C9D8E8 0%, var(--c-border-faint) 45%, #E8EDF3 100%) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.service-card--primary .service-card__media {
  aspect-ratio: 3 / 2;
  min-height: auto;
}
.service-card__media {
  position: relative;
  overflow: hidden;
}
.service-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card--primary .service-card__body {
  padding: 20px 34px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.service-card--primary h3 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--c-primary);
  margin-bottom: 8px;
  /* テキスト見出しとロゴ画像見出しで高さを揃える（26px × 1.45 = 37.7px） */
  min-height: 38px;
  display: flex;
  align-items: center;
  transition: color .2s ease;
}
/* 見出しをロゴ画像で置き換えるカード用 */
.service-card__logo {
  height: 38px;
  width: auto;
}
.service-card--primary p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-text);
}
.service-card__info {
  border-top: 1px solid var(--c-border);
  padding-top: 14px;
  margin-top: 16px;
  display: flex;
  flex-direction: row;
  /* 幅が足りないときは、行の途中で折り返さず［発売中］［発売予定］の塊ごと下へ送る */
  flex-wrap: wrap;
  gap: 6px 16px;
}
.service-card__info--chips {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
/* ［発売中］［版名］はひとかたまりで扱い、折り返すならその塊ごと。
   幅が足りないときに折り返してよいのは「（10月予定）」の前だけ */
.status-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  /* 塊のまま下へ送りたいので縮めない。ただし枠からは出さない
     （出るほど狭いときは「（10月予定）」だけが下の行へ回る） */
  flex-shrink: 0;
  max-width: 100%;
  gap: 2px 6px;
}
.status-row__main {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.status-row__text,
.status-row__note {
  font-size: 14px;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.service-cards--secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card--secondary {
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #C9D8E8 0%, var(--c-border-faint) 45%, #E8EDF3 100%) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-secondary);
  overflow: hidden;
  display: block;
  transition: box-shadow .2s ease, transform .2s ease;
}
.service-card--secondary .service-card__media {
  aspect-ratio: 16/9;
}
.service-card--secondary .service-card__body {
  padding: 26px 28px 28px;
}
.service-card--secondary h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 10px;
  transition: color .2s ease;
}
.service-card--secondary p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-text-soft);
}

/* ==========================================================================
   Books
   ========================================================================== */

.books {
  background: linear-gradient(180deg, #FFFFFF 78%, #E3EEF8 100%);
  padding: 50px 0 80px; 
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 32px;
}
.book-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-card__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 300px;
  background: transparent;
  padding: 16px;
  box-sizing: border-box;
}
.book-card__noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.book-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: var(--c-primary);
  padding: 7px 16px;
  box-shadow: 0 2px 8px rgba(18, 48, 94, .18);
}
/* 予約受付中＝ネイビー、発売中＝レッドで状態を目立たせる */
.book-card__badge--preorder { background: var(--c-primary); }
.book-card__badge--onsale { background: var(--c-warn); }
/* 書影の枠。幅は書影そのものなので、注釈を書影の端に合わせられる */
.book-card__cover-figure {
  position: relative;
  height: 84%;
}
.book-card__photo {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(9, 24, 46, 0.272), 0 2px 6px rgba(18, 48, 94, .10);
}
.book-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
  background: #fff;
}
.book-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--c-primary);
  margin-bottom: 6px;
  min-height: 3.1em; /* 2行分を確保して価格行の高さを揃える */
}
/* 発行日と価格は同じ見た目の2行組。価格は目立たせない */
.book-card__date,
.book-card__price {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  color: #3f4750;
}
.book-card__date {
  margin-bottom: 2px;
}
/* 新しい版の書影がまだ無いときに、書影のすぐ下・左端に添える注釈。
   書影の大きさや位置は変えたくないので、流し込まずに重ねて置く */
.book-card__cover-note {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--c-text-faint);
}
.book-card__price {
  margin-bottom: 16px;
}
.book-card__price strong {
  font-weight: 500;
  color: inherit;
  margin-right: 2px;
}
.book-card__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
/* 説明文がないカードではボタンを下端に寄せる */
.book-card__actions:last-child {
  margin-top: auto;
  margin-bottom: 0;
}
.book-card__buy,
.book-card__preview {
  flex: 1;
  width: auto;
  /* 3列・4列に並ぶ幅では「内容を見る」が2行になってしまうため、
     左右の余白を詰めたうえで折り返しを止める */
  padding: 11px 4px;
  font-size: 13.5px;
  white-space: nowrap;
  gap: 0;
}
.book-card__preview {
  background: #fff;
}
.book-card__desc {
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text-muted);
  margin-top: auto;
}

/* カラーミーショップのカート（購入数＋カートに入れる） */
.book-card__cart { margin-top: auto; }
.cartjs_box { margin: 0 !important; padding: 0 !important; }
.cartjs_product_form.is-styled {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-row__label {
  font-size: 13px;
  color: var(--c-text-soft);
}
.cart-row__input {
  width: 72px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  text-align: center;
  color: var(--c-text-strong);
  background: #fff;
  border: 1px solid var(--c-border-faint);
  border-radius: var(--radius-sm);
}
.cart-row__input:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}
.cart-submit { width: 100%; }

/* ==========================================================================
   News
   ========================================================================== */

.news {
  padding: 50px 0 84px;
  background: #fff;
}

.news-list { border-top: 1px solid var(--c-border-tint); }
.news-item {
  display: grid;
  grid-template-columns: 56px 104px 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--c-border-tint);
  transition: background-color .15s ease;
}
.news-item:hover { background: var(--c-bg-tint); }
.news-item__date {
  font-size: 13px;
  color: var(--c-text-faint);
  font-variant-numeric: tabular-nums;
}
.news-item__title { font-size: 15px; color: var(--c-text-strong); line-height: 1.6; }

/* ==========================================================================
   About

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--c-primary-dark);
  color: #fff;
  padding: 52px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--c-border-dark);
}
.footer-company-name {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.footer-address {
  font-size: 14px;
  line-height: 1.9;
}
/* 4カラム目はサポートと会社情報を縦に積む */
.footer-col-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-col__heading {
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  display: block;
  width: 100%;
  text-align: left;
  cursor: default;
}
.footer-col__heading .icon--plus { display: none; }
.footer-col__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
.footer-col__links a:hover { color: #fff; }
.footer-copyright {
  font-size: 14px;
  color: #fff;
  margin-top: 20px;
}

/* ==========================================================================
   下層ページ（パンくず＋タイトル、本文は準備中プレースホルダー）
   ========================================================================== */

.page-title {
  padding: 20px var(--side-padding) 22px;
  border-bottom: 1px solid var(--c-border);
}
.page-title__inner {
  max-width: calc(var(--container-max) + var(--side-padding) * 2);
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--c-text-faint);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--c-accent); }
.breadcrumb a:hover { color: var(--c-accent-dark); }
.breadcrumb__sep { color: var(--c-border-faint); }
.page-title h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: .02em;
}

.page-placeholder {
  padding: 48px var(--side-padding);
  text-align: center;
}
.page-placeholder p {
  font-size: 14px;
  color: var(--c-text-faint);
}

/* ==========================================================================
   下層ページ 共通パーツ
   ========================================================================== */

.page-section { padding: 36px 0; }
.page-section--tint { background: var(--c-bg-tint); }
.page-section h2 {
  font-size: 28px;
  font-weight: 500;
  color: var(--c-primary);
  letter-spacing: .02em;
}
.page-section__lead {
  font-size: 16px;
  line-height: 1.95;
  color: var(--c-text-soft);
  max-width: 1200px;
  margin-bottom: 28px;
}
.page-section__lead:last-child { margin-bottom: 0; }
.page-note {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--c-text-faint);
  margin-top: 18px;
}
/* セクション内の小見出し（.page-section h2 より詳細度を上げる） */
h2.subsection-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-primary);
  padding-left: 12px;
  border-left: 3px solid var(--c-accent);
  margin-bottom: 20px;
}
* + .subsection-title { margin-top: 28px; }
/* 固定ヘッダー分のアンカー位置調整。ヘッダーの高さは JS が実測して入れる */
.page-section[id],
.toc-accordion details[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
/* ※ ではじまる注記。折り返した2行目以降を※の分だけ下げて、頭を揃える */
.note-list {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}
.note-list li {
  padding-left: 1em;
  text-indent: -1em;
}
.note-list li + li { margin-top: 4px; }
/* 先に読ませたい注記。地の文より濃く太くして、下の注記とは線で分ける */
.page-note.note-list--lead {
  color: var(--c-text-soft);
  font-weight: 500;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border-tint);
}
.page-note a { color: var(--c-accent); }
.page-note a:hover { color: var(--c-accent-dark); }
/* 注記の地の文が薄いので、文中のリンクは色を濃くして下線も付ける */
.page-note .note-link {
  color: var(--c-accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.page-note .note-link:hover { color: var(--c-accent-dark); }

/* チェックリスト */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--c-text);
}
.check-list li {
  position: relative;
  padding-left: 24px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .5em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: translateY(-2px) rotate(-45deg);
}

/* ==========================================================================
   国会議員要覧・国会要覧について
   ========================================================================== */

.youran-hero {
  /* 書影を右に float させ、テキストを回り込ませる。flow-root で float を内包 */
  display: flow-root;
}
.youran-hero__visual {
  float: right;
  /* 固定幅にせず、幅が狭まるほど比率で縮めてテキスト側の改行を増やさない */
  width: clamp(260px, 38%, 420px);
  margin: 0 0 16px 40px;
}
/* 回り込ませるため、この段落だけ flex をやめて通常フローにする */
.youran-hero .point-list { display: block; }
.youran-hero .point-list li + li { margin-top: 16px; }
.youran-hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  /* 1001〜1199px は正方形版（youran7_square）。切らずに画像の実比率で表示 */
  aspect-ratio: 1448 / 1255;
  border-radius: var(--radius-lg);
}
/* 1200px以上は横長の書影（youran_books）に切り替える。picture の media と揃える */
@media (min-width: 1200px) {
  .youran-hero__visual { width: clamp(420px, 42%, 520px); }
  .youran-hero__visual img { aspect-ratio: 1448 / 881; }
}
/* 1000px以下は横長の書影をテキストの上に置く。高くなりすぎないよう幅に上限（切り取りはしない） */
@media (max-width: 1000px) {
  .youran-hero__visual {
    float: none;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 28px;
  }
  .youran-hero__visual img { aspect-ratio: 1448 / 881; }
}
.youran-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 32px;
}

/* 特色（チェック付きの要点リスト） */
.point-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 全幅で使うページがあるため、1行が長くなりすぎない幅で止める */
  max-width: 1020px;
}
.point-list li {
  position: relative;
  padding-left: 30px;
}
.point-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 6px;
  border-left: 2.5px solid var(--c-accent);
  border-bottom: 2.5px solid var(--c-accent);
  transform: rotate(-45deg);
}
.point-list strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--c-primary);
  margin-bottom: 3px;
}
.point-list span {
  display: block;
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-text-soft);
}
.point-list a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.point-list a:hover { color: var(--c-accent-dark); }

/* 2冊の違い（水色の枠内で完結。ほぼ文章で、書名だけ立てる） */
.diff-box {
  background: var(--c-bg-tint);
  border-radius: var(--radius-md);
  padding: 26px 24px 28px;
  margin-top: 28px;
}
h2.diff-box__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 16px;
}
.diff-lead {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text-soft);
  margin-bottom: 8px;
  margin-left: 12px;
}
.diff-list {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}
.diff-list p {
  position: relative;
  margin-left: 3px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--c-text-soft);
}
/* 行頭の小さいチェック */
.diff-list p::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 9px;
  width: 9px;
  height: 4.5px;
  border-left: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(-45deg);
}
/* 書名だけ立てる（文章中の太字） */
.diff-list__label {
  font-weight: 700;
  color: var(--c-primary);
}

/* 収録内容アコーディオン */
/* 日本語はどこでも折り返せてしまうため、途中で切りたくないものは
   inline-block でひと塊にして、入らないときだけ塊ごと次の行へ送る。
     .title-note  書名の「（衆議院選挙版）」「　令和8年版」などの補足（wrap_note）
     .price-note  金額のあとの「（税込・送料別）」
     .date-part   発刊日の「12月12日」「10月発売予定」（wrap_date）
     .edition-part 版名の「平成13年2月」「改訂版」（wrap_edition） */
.title-note,
.price-note,
.date-part,
.edition-part { display: inline-block; }
/* 表の列は中身の最小幅まで縮められるので、版名の塊は内部でも折れないようにしておく */
.edition-part { white-space: nowrap; }

.toc-accordion {
  border-top: 1px solid var(--c-border-tint);
}
.toc-accordion details {
  border-bottom: 1px solid var(--c-border-tint);
  background: #fff;
}
.toc-accordion summary {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 18px 48px 18px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-primary);
  cursor: pointer;
  list-style: none;
}
.toc-accordion summary::-webkit-details-marker { display: none; }
.toc-accordion summary::after,
.toc-accordion summary::before {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  background: var(--c-primary);
  transition: opacity .2s ease;
}
.toc-accordion summary::before {
  width: 13px;
  height: 1.5px;
  margin-top: -.75px;
}
.toc-accordion summary::after {
  width: 1.5px;
  height: 13px;
  margin-top: -6.5px;
  margin-right: 5.75px;
}
.toc-accordion details[open] summary::after { opacity: 0; }
.toc-accordion summary:hover { background: var(--c-bg-tint); }
/* 分類ありの掲載内容 */
.toc-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 32px;
  /* 見出し（summary）より内容を一段下げる */
  padding: 6px 22px 28px 40px;
  align-items: start;
}
.toc-group h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
  padding-bottom: 7px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--c-border-tint);
}
.toc-group ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
}
.toc-group li {
  position: relative;
  padding-left: 13px;
}
.toc-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-accent-light-2);
}
/* その書籍にのみ掲載している項目は行頭を赤に */
.toc-group li.is-only::before { background: var(--c-warn); }

/* 誌面サンプルを開く項目 */
.toc-sample {
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--c-accent-text);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--c-accent-light-2);
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.toc-sample:hover {
  color: var(--c-accent-dark);
  text-decoration-color: var(--c-accent);
}
/* 凡例（summary の右端）。赤丸印の説明なので、開いているときだけ出す */
.toc-note {
  display: none;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text-soft);
}
.toc-accordion details[open] > summary .toc-note { display: flex; }
.toc-note__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-warn);
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px 28px;
  padding: 4px 22px 26px 40px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
}
.toc-list li {
  position: relative;
  padding-left: 14px;
}
.toc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent-light-2);
}

/* ---- モーダル（誌面サンプル） ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--side-padding);
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 34, 63, .55);
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(12, 34, 63, .28);
  padding: 30px 34px 32px;
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  transition: background-color .2s ease, color .2s ease;
}
.modal__close:hover { background: var(--c-bg-tint); color: var(--c-primary); }
.modal__close .icon { width: 20px; height: 20px; }
.modal__label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #fff;
  background: var(--c-primary);
  padding: 3px 10px;
  margin-bottom: 12px;
}
.modal__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-primary);
  margin-bottom: 8px;
  padding-right: 32px;
}
.modal__desc {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--c-text-soft);
  margin-bottom: 20px;
}
.modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal__body figure { margin: 0; }
.modal__body img {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.modal__body figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--c-text-faint);
  text-align: center;
}
.modal__note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  line-height: 1.8;
  color: var(--c-text-faint);
}

/* ---- 過去の出版物（アーカイブ） ---- */
/* 書籍一覧の末尾に置く、過去の出版物への導線 */
.catalog-archive__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 22px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-bg-tint);
}
/* .page-section h2 より詳細度を上げる */
.catalog-page .catalog-archive__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 6px;
}
.catalog-archive__lead {
  line-height: 1.9;
  color: var(--c-text-soft);
}
.catalog-archive__box .btn { flex-shrink: 0; }

/* 過去の出版物は一覧が主役のページなので、本文まわりの文字を
   14・15・16pxの3段階に揃える（セクション見出し・ページ見出しは除く） */
.archive-page .page-section__lead { font-size: 15px; }
.archive-page .page-note { font-size: 14px; }

.archive-group + .archive-group,
.archive-year + .archive-year { margin-top: 24px; }
.archive-group__label,
.archive-year__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}
.archive-list {
  display: grid;
  /* 幅が足りるところまで列を増やす（広い画面で3列、狭くなると2列・1列） */
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 8px 32px;
  list-style: none;
}
.archive-list__item {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
  padding-left: 14px;
  position: relative;
}
.archive-list__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 6px;
  height: 1px;
  background: var(--c-border-faint);
}
.archive-list__item a { color: var(--c-accent); }
.archive-list__item a:hover { color: var(--c-accent-dark); }
/* 販売の終わったものは、リンクと見分けが付くよう色を落とす */
.archive-list--plain .archive-list__item,
.archive-list__item--gone { color: var(--c-text-muted); }
.archive-list__year {
  margin-left: 8px;
  font-size: 14px;
  color: var(--c-text-faint);
}
.archive-back { display: flex; justify-content: center; }

/* ---- 書籍一覧の検索（ページ見出しの横） ---- */
/* 読み上げには渡すが、画面には出さないラベル */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.page-title__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
/* 検索窓と、その結果表示をひとまとまりにして見出しの右に置く */
.book-search-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.book-search {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.book-search input {
  width: 260px;
  border: 1px solid var(--c-border-faint);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text-strong);
  background: #fff;
}
.book-search input::placeholder { color: var(--c-placeholder-text-2); }
.book-search input:focus { outline: 2px solid var(--c-accent); outline-offset: 0; }
.book-search .btn {
  flex-shrink: 0;
  padding: 8px 18px;
}
.book-search__status {
  color: var(--c-text-soft);
  text-align: right;
}
.book-search__status strong { color: var(--c-primary); }
.book-search__clear {
  margin-left: 12px;
  color: var(--c-accent);
}
.book-search__clear:hover { color: var(--c-accent-dark); }
.book-search__empty {
  font-size: 14px;
  line-height: 2;
  color: var(--c-text-muted);
}

/* ---- 書籍一覧（カテゴリナビ＋カタログ） ---- */
.catalog-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(6px);
}
.catalog-nav__inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.catalog-nav__inner::-webkit-scrollbar { display: none; }
.catalog-nav__item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  font-weight: 500;
  color: var(--c-text-soft);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.catalog-nav__item span {
  font-weight: 700;
  color: var(--c-text-faint);
}
.catalog-nav__item:hover,
.catalog-nav__item.is-active {
  color: var(--c-primary);
  border-bottom-color: var(--c-accent);
}
.catalog-nav__item.is-active { font-weight: 700; }
.catalog-nav__item.is-active span { color: var(--c-accent-text); }

/* 書籍一覧はカテゴリタブもヘッダーの下に貼り付くので、そのぶんも下げる */
.catalog-page .page-section[id] { scroll-margin-top: calc(var(--header-h) + var(--catalog-nav-h) + 8px); }

/* 書籍一覧の本文まわりは14・15・16pxの3段階に揃える
   （ページ見出しとセクション見出しは対象外） */
.catalog-page .book-subhead { font-size: 16px; }
.catalog-page .book-card h3 { font-size: 16px; }
.catalog-page .book-card__date,
.catalog-page .book-card__price { font-size: 14px; }
.catalog-nav__item { font-size: 15px; }
.catalog-nav__item span { font-size: 14px; }
.catalog-archive__lead { font-size: 15px; }
.book-search__status,
.book-search__clear { font-size: 14px; }

/* カタログ：4列のカード */
.catalog-page .page-section { padding: 40px 0; }
.catalog-page .section-header { margin-bottom: 20px; }
.catalog-page .services h2,
.catalog-page .section-title { font-size: 22px; }

.book-grid--catalog {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 26px;
}
/* カタログ：カテゴリの中の小見出し（選挙要覧・選挙実務Q&Aなど） */
.book-subhead {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-primary);
  padding-left: 10px;
  border-left: 3px solid var(--c-accent);
  margin: 0 0 18px;
}
.book-grid--catalog + .book-subhead { margin-top: 32px; }

/* ---- 書籍詳細ページ ---- */
.product-page .page-section { padding: 40px 0; }
/* 左＝書影・仕様・本文、右＝購入まわり。右カラムは読みながら追従させる */
.product {
  --cover-w: 260px;
  --spec-w: 420px;
  --cover-gap: 36px;
  display: grid;
  /* 左は「書影＋仕様表」に必要な幅で止め、余った分は購入カードが受け取る */
  grid-template-columns:
    minmax(0, calc(var(--cover-w) + var(--cover-gap) + var(--spec-w)))
    minmax(340px, 1fr);
  gap: 0 48px;
  align-items: start;
}
/* 幅に余裕がある間は、書影・仕様表・購入カードが一行に収まる */
.product__main {
  min-width: 0;
  display: grid;
  grid-template-columns: var(--cover-w) minmax(0, 1fr);
  column-gap: var(--cover-gap);
  align-items: start;
}
/* 書影が無い版（旧版）は仕様表だけなので、1カラムに戻す */
.product__main--nocover { grid-template-columns: minmax(0, 1fr); }
/* 内容・目次は行数が多いので、書影・購入カードの下で全幅を使う */
.product-section { grid-column: 1 / -1; }

/* 試し読みは書影の直下に対で置く */
.product__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
/* 枠は持たせず、影だけで紙の厚みを出す */
.product__visual img {
  display: block;
  width: 100%;
  max-width: var(--cover-w);
  /* 新書判のように縦長の判型は高さで頭打ちにする。contain なので比率は崩れない */
  max-height: 450px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  /* box-shadow だと高さで止めたときの余白ごと縁取ってしまうので、絵の形に沿う drop-shadow で出す */
  filter: drop-shadow(0 6px 16px rgba(9, 24, 46, .12)) drop-shadow(0 1px 3px rgba(18, 48, 94, .08));
}
/* 別の版の書影を使っているときの注釈。書影の直下に小さく置く */
.product__cover-note {
  margin: -8px 0 0;
  font-size: 12px;
  color: var(--c-text-faint);
}
.product__preview { min-width: 0; width: 100%; }

/* 書影の横では1列。書影の下に回ったときだけ2列に畳む */
.product__spec {
  /* 値が短い行でも下線だけが伸びていくので、読める幅で止める */
  max-width: var(--spec-w);
  border-top: 1px solid var(--c-border-tint);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 32px;
}
.product__main--nocover .product__spec {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.product .info-table__row {
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 0 16px;
  padding: 13px 2px;
  font-size: 16px;
}
/* 見出しと本文で行の高さが違うと、1行目のベースラインがずれる */
.product .info-table dt,
.product .info-table dd { font-size: inherit; line-height: 1.9; }

/* 右カラム：購入ボックスと補助の箱 */
.product__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.buy-box {
  background: var(--c-bg-tint);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 22px 24px 24px;
}
.buy-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 4px;
}
.buy-box__price { font-size: 14px; color: var(--c-text-soft); }
.buy-box__price strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-primary);
  margin-right: 2px;
}
.buy-box .product__cart { margin-top: 18px; max-width: none; }
/* 送料や取り扱いの注記は読ませたいので、他ページと同じ14pxまで上げる */
.product-page .page-note { font-size: 14px; }
.buy-box .page-note { margin-top: 16px; }
/* 注記が2つ続くので、間は線のぶんだけ詰める */
.buy-box .note-list--lead + .page-note { margin-top: 14px; }
/* 幅があるので購入数とボタンは横並びに */
.buy-box .cartjs_product_form.is-styled {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
/* 購入数の枠とボタンは同じ高さに揃える */
.buy-box .cart-submit { flex: 1; min-height: 48px; }
.buy-box .cart-row__input { height: 48px; font-size: 16px; }

.side-box {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px 22px 20px;
}
/* .page-section h2（28px）より詳細度を上げる */
h2.side-box__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--c-accent);
}
.side-box__link { margin: 0; font-size: 13.5px; line-height: 1.8; }
.side-box__link + .side-box__link { margin-top: 6px; }
.side-box__link a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.side-box__link a:hover { color: var(--c-accent-dark); }

/* 要覧の旧版から、いま買える版へ送る案内 */
.buy-box__latest {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.buy-box__latest p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}
.buy-box__latest strong { color: var(--c-primary); }
.buy-box__latest .btn { width: 100%; }

/* 要覧の「関連ページ」。この2誌のページは各ページへの案内が主になる */
.link-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  background: var(--c-bg-tint);
  border: 1px solid var(--c-border-tint);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--c-primary);
  transition: border-color .2s ease, background .2s ease;
}
.link-card:hover { background: #fff; border-color: var(--c-accent-light-2); }
.link-card .icon--chevron-sm {
  color: var(--c-accent);
  transition: transform .2s ease;
}
.link-card:hover .icon--chevron-sm { transform: translateX(3px); }

/* 内容・目次・その他の見出しを、上から順に並べる */
.product-section { margin-top: 36px; }
/* 見出しに印を持たせていないので、節の切れ目は見出しの上の余白で見せる。
   見出しの下（16px）より広く取って、見出しが下の本文に付くようにする */
.product-section + .product-section { margin-top: 44px; }
.product-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 16px;
}
/* 本文の中身は管理画面で書いたHTMLをそのまま出す。書く側がクラスを覚えずに
   済むよう、体裁はここの独自タグ（b-*）で付ける。素の <p> も段落として扱う */

/* 段落 */
b-text,
.product-section p {
  display: block;
  font-size: 16px;
  line-height: 1.95;
  color: var(--c-text);
}
b-text + b-text,
.product-section p + p { margin-top: 8px; }

/* 一覧（目次）。列数は cols="1"〜"3" で指定する */
b-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px 28px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
}
b-list[cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
b-list[cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 項目。見出しと説明が同じ大きさなので、太さと色で違いを付ける。
   説明が付くかどうかで太さが変わらないよう、項目は常に太字にする */
b-item {
  display: block;
  position: relative;
  padding-left: 14px;
  font-weight: 600;
}
b-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent-light-2);
}
/* 説明。項目の中では見出しの下、節の直下では補足として置く */
b-note {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  color: var(--c-text-muted);
}
.product-section > b-note { margin-top: 10px; }
/* 説明や入れ子の一覧が付いた項目は縦に伸びるので、行が詰まって見えないよう間を空ける */
b-item:has(b-note),
b-item:has(b-list) { margin-bottom: 6px; }

/* 入れ子にした一覧。章の下に節を1件ずつ並べるときに使う。
   下の階層へ行くほど弱くして、章・節・明細の順に読めるようにする */
b-item > b-list { margin-top: 2px; }
b-item b-item { font-weight: 400; }
b-item b-item b-item { color: var(--c-text-muted); }

/* 注釈。説明（b-note）よりさらに弱く小さくする。
   段落や項目の中に置いたときだけ、その行に続けて出す */
b-small {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.8;
  font-weight: 400;
  color: var(--c-text-muted);
}
b-text b-small,
b-item b-small,
b-note b-small { display: inline; margin-top: 0; }

/* 本文に直接書いたリンク。クラスを持つリンク（リンクカードなど）には触らない */
.product-section a:not([class]) {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.product-section a:not([class]):hover { color: var(--c-accent-dark); }

/* ---- 選挙事務従事者用教材 ---- */
.material-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.material {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 30px 34px 32px;
}
/* 詳細ページは1件だけを大きく出すので、カードの枠は付けない。
   狭い画面用の padding より後に効かせるため、クラスを2つ重ねている */
.material.material--plain {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

/* 一覧のカードは仕様・価格までしか載せないので、書影の高さに本文を合わせる */
.material--brief { align-items: center; }
.material--brief .material__actions { margin-top: 20px; }
.material__visual {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.material__visual img {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
/* eラーニングの画像は白背景に端末が並んだ図なので、枠を付けない */
.material__visual--plain img {
  border: 0;
  border-radius: 0;
}
/* DVDの2枚は上下に並べる。1枚が大きくなりすぎるので左右に余白を取る */
.material__visual--pair {
  flex-direction: column;
  padding: 0 30px;
}
.material__body h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-primary);
  margin: 10px 0 12px;
}
.material__desc {
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text-soft);
}
.material__desc + .check-list,
.check-list + .material__desc { margin-top: 16px; }
.material__spec {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: 16px;
}
.material__spec > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.material__spec dt {
  flex-shrink: 0;
  width: 4.5em;
  color: var(--c-text-faint);
}
.material__spec dd { margin: 0; line-height: 1.75; color: var(--c-text); }
/* 仕様表の行に置くボタン（内容見本など）。文のあとで改行して置く */
.material__spec-btn { margin-top: 8px; }
/* 仕様表の途中に区切りを入れる行（DVDの収録内容と金額の間など） */
.material__spec .is-divided {
  /* 罫線の上には dl の gap（8px）が入るので、差分を margin で足して上下を揃える */
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}

/* 見出しを1行使い、その下に内容をインデントして置く行（DVDのPart.1／Part.2） */
.material__spec .material__spec-block { display: block; }
.material__spec-block dt {
  width: auto;
  font-weight: 700;
  color: var(--c-primary);
}
.material__spec-block dd { padding-left: 1.5em; }
.material__spec strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-primary);
}
/* ボタンの前に置く一文（購入・見本誌の受付は問い合わせ経由という案内） */
.material__note {
  position: relative;
  margin-top: 20px;
  padding-top: 18px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text);
}
/* 罫線は本文の幅ではなく、上にある仕様表の幅に合わせる */
.material__note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-top: 1px solid var(--c-border);
}
/* 文のうしろに続ける注釈（カートの仕様など）。本文より一段小さく置く */
.material__note-sub { font-size: 14px; }
.material__note + .material__actions { margin-top: 10px; }

.material__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
}
.material__parts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.material__part {
  background: var(--c-bg-tint);
  border-radius: var(--radius-md);
  padding: 20px 22px 22px;
}
.material__part h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 8px;
}
.material__part p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text-soft);
}
.material__price {
  margin: 12px 0 0;
}
.material__price strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-primary);
}

/* カード内の小見出し（割引の箱） */
.material__subhead {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-primary);
  padding-left: 10px;
  border-left: 3px solid var(--c-accent);
  margin: 0 0 8px;
}

/* 箱の中ではなく、本文の途中に単独で置くときは上に余白を取る */
* + .material__subhead { margin-top: 20px; }

/* 仕様・価格と割引を横に並べる（カードを縦に伸ばさないため）。
   罫線は左の列で止めず、上の枠に持たせてカードの幅いっぱいに引く */
.material__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px 28px;
  align-items: start;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}
.material__cols .material__spec {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.material__cols .material__box { margin-top: 0; }

/* eラーニングの申し込み手順 */
.material__flow {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border);
}
.material__steps {
  /* 番号は ::before の丸バッジで出すので、標準のマーカーは消す */
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  counter-reset: step;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
}
.material__steps li {
  position: relative;
  padding-left: 32px;
  counter-increment: step;
}
.material__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .2em;
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--c-accent);
  border-radius: 50%;
}

/* 割引率を囲む箱（DVDの内訳と同じ地色）。横に伸ばさず元の幅で置く */
.material__box {
  background: var(--c-bg-tint);
  border-radius: var(--radius-md);
  padding: 15px 20px 16px;
  margin-top: 22px;
  max-width: 280px;
}

.material__rates {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 16px;
}
.material__rates > div {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px solid var(--c-border);
}
.material__rates > div:last-child { border-bottom: 0; }
.material__rates dt {
  flex-shrink: 0;
  /* 「100口〜499口」が折り返さない幅 */
  width: 7.5em;
  color: var(--c-text-faint);
}
.material__rates dd {
  margin: 0;
  font-weight: 700;
  color: var(--c-primary);
}
.material__box-note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-faint);
}

/* 電話・メールの1行表記。ネットショップではなく問い合わせで受けるので目に付く位置に置く */
.contact-line {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text);
}
.contact-line--panel { margin-top: 10px; }
/* ボタンと同じ行に置いて1行ぶん詰める */
.contact-line--inline { margin-top: 0; }
.contact-line a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-line a:hover { color: var(--c-accent-dark); }
/* 「（平日 9:00〜18:00）」は途中で切りたくない */
.contact-line__note { display: inline-block; color: var(--c-text-faint); }

/* 教材ページは自治体のご担当者が画面で読む場面が多いので、
   このページだけ本文まわりを 16px に揃え、小さすぎる文字（注記・タグ）も 14px まで上げる */
.material-page .check-list { font-size: 16px; }
.material-page .panel__text { font-size: 16px; }
.material-page .page-note { font-size: 14px; color: var(--c-text); }
.material-page .chip--category { font-size: 14px; }
.material-page .btn--small { font-size: 16px; }

/* ---- 発刊履歴テーブル ---- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.history-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.history-table th,
.history-table td {
  padding: 11px 18px;
  text-align: left;
  /* 同じ発刊時期の2冊はごく薄い罫線で、グループ間は通常の罫線で区切る */
  border-bottom: 1px solid var(--c-bg-tint);
}
.history-table thead th {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-primary);
  background: var(--c-bg-tint);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.history-table tbody tr.is-group-end > th,
.history-table tbody tr.is-group-end > td { border-bottom: 1px solid var(--c-border); }
.history-table tbody tr:last-child > th,
.history-table tbody tr:last-child > td { border-bottom: 0; }
.history-table td {
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.history-table tbody th {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-primary);
  white-space: nowrap;
}
.history-table__period {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--c-text-soft) !important;
  background: #FBFCFE;
}
.history-table__date { white-space: nowrap; }
.history-table__stock { width: 1%; white-space: nowrap; }

/* 発刊時期ごとに1行。書籍（国会議員要覧・国会要覧）ごとに版・発刊日・在庫の3列を並べる */
.history-table--split { min-width: 820px; }
.history-table--split tbody th,
.history-table--split tbody td { border-bottom: 1px solid var(--c-border); }
.history-table--split tbody tr:last-child > th,
.history-table--split tbody tr:last-child > td { border-bottom: 0; }
.history-table--split thead th { font-weight: 500; }
/* 2段目の小見出し（版・発刊日・在庫）は控えめに */
.history-table--split thead tr + tr th {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 14px;
  color: var(--c-text-muted);
}
.history-table--split th,
.history-table--split td { vertical-align: top; }
.history-table__note {
  margin-left: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text-muted);
}
/* 表は幅いっぱいに広げる。発刊時期・版・在庫は内容ぶんの幅に留め、
   余った幅は自動幅の発刊日に寄せる（注記が長いときも1行で入りやすくなる） */
.history-table--split .history-table__period,
.history-table--split .edition-name,
.history-table--split .edition-stock { width: 1%; }
.history-table--split .edition-name,
.history-table--split .edition-date,
.history-table--split .edition-stock { white-space: nowrap; }
/* 版名は wrap_edition で塊にしてあるので、長い版名だけ塊の間で折り返せるようにする */
.history-table--split .edition-name { white-space: normal; }
/* 発刊時期と備考は行内では折らず、両者の間だけで折り返す */
.history-table--split .history-table__period { white-space: normal; }
/* 発刊日の列は「内閣改造後、編纂・発行予定です。」のような長い注記で広がりすぎないよう上限を設ける
   （td の max-width は効かないので、中身のブロックに指定して列幅を抑える）。
   折り返し可にすると列が縮みすぎるので、日付「2025年12月12日」が1行に収まる下限も併せて持たせる */
.history-table--split .edition-date .edition-line,
.history-table--rows .history-table__date .edition-line {
  max-width: 15rem;
  white-space: normal;
}
.history-table--split .edition-date .edition-line { min-width: 8.5em; }
@media (min-width: 801px) {
  .history-table--rows .history-table__date .edition-line { min-width: 8.5em; }
}
.history-table__month,
.history-table__note { white-space: nowrap; }
.history-table--split .edition-name { line-height: 1.6; }
/* 狭い幅用の表でも、書籍名は折り返さず、版名は塊（wrap_edition）の間でだけ折り返す。
   版名が短くても列が細くなりすぎないよう下限を持たせる（569px以下で書籍を版の中に畳んだときも同じ） */
.history-table--rows .edition-kind,
.history-table--rows .edition-name__kind { white-space: nowrap; }
/* 余った幅は書籍・版には配らず、内容ぶんの幅（版は下限7em）に留める */
.history-table--rows .edition-kind,
.history-table--rows .edition-name { width: 1%; }
.history-table--rows .edition-name { min-width: 7em; }
/* 版名は表の主役なので、発刊日・在庫より一段大きくする */
.history-table tbody .edition-name { font-size: 15px; }
/* 2冊の区切りは罫線で示す */
.history-table--split .is-group-split { border-left: 1px solid var(--c-border); }
.history-table--split thead .is-group-split { border-left-color: var(--c-border); }
/* 800px以下は発刊時期の列を畳み、代わりに期ごとの見出し行を出す（備考の重複を防ぐ） */
@media (max-width: 800px) {
  .history-table--rows .history-table__period { display: none; }
  .history-table--rows .history-table__group-row { display: table-row; }
}

/* 狭い幅では、2冊を上下の行に分けた表（.history-table--rows）に差し替える */
.history-table--rows { display: none; }
@media (max-width: 980px) {
  .history-table--split { display: none; }
  .history-table--rows { display: table; }
}
/* 発刊時期は元の表でも行の見出しとして使うので、狭い幅でも残す */
.history-table--rows .history-table__period { vertical-align: top; }
.history-table--rows .history-table__month { display: block; }
.history-table--rows .history-table__note {
  display: block;
  margin-left: 0;
  margin-top: 2px;
}
/* 見出しはこちらの表でもスクロール中に残す */
.history-table--rows {
  overflow: visible;
  border-collapse: separate;
  border-spacing: 0;
}
.history-table--rows thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
}
.history-table--rows thead th:first-child { border-top-left-radius: var(--radius-md); }
.history-table--rows thead th:last-child { border-top-right-radius: var(--radius-md); }
.history-table--rows tbody tr:last-child > * { border-bottom: 0; }
.history-table--rows tbody tr:last-child > :first-child { border-bottom-left-radius: var(--radius-md); }
.history-table--rows tbody tr:last-child > :last-child { border-bottom-right-radius: var(--radius-md); }
.edition-name__kind,
.edition-name__kind-label { display: none; }
/* 発刊時期の列を畳む幅で出す、期ごとの見出し行 */
.history-table__group-row { display: none; }
.history-table--rows .history-table__group-row > td {
  padding-top: 8px;
  padding-bottom: 8px;
  background: #FBFCFE;
  font-size: 16px;
  color: var(--c-text-soft);
}
/* 見出し行では、発刊時期と備考を1行に並べる */
.history-table--rows .history-table__group-row .history-table__month { display: inline; }
.history-table--rows .history-table__group-row .history-table__note {
  display: inline;
  margin-top: 0;
  margin-left: 8px;
}

/* 書籍ページのある版は、版名と在庫バッジからその本のページへ行けるようにする */
.edition-name a { color: var(--c-accent); }
.edition-name a:hover { color: var(--c-accent-dark); }
a.stock:hover { opacity: .82; }

/* 見出しはスクロール中も画面上部に残す。
   position:sticky は overflow を持つ祖先があると効かないため、
   横スクロール枠（.table-scroll）と表自身の overflow:hidden を外している。
   top はサイトヘッダー（--header-h）と1段目の見出し（44px）のぶん下げる。 */
.table-scroll--sticky { overflow: visible; }
.history-table--split {
  overflow: visible;
  /* collapse のままだと罫線が表側に属し、固定した見出しから取り残されて
     スクロール中に線がずれる。セルごとに罫線を持たせる */
  border-collapse: separate;
  border-spacing: 0;
}
.history-table--split thead th {
  position: sticky;
  z-index: 2;
}
.history-table--split thead tr:first-child th {
  top: var(--header-h);
  height: 44px;
}
.history-table--split thead tr + tr th { top: calc(var(--header-h) + 44px); }
/* overflow で角を落とせなくなるぶん、四隅のセルで角丸を作る */
.history-table--split thead tr:first-child th:first-child { border-top-left-radius: var(--radius-md); }
.history-table--split thead tr:first-child th:last-child { border-top-right-radius: var(--radius-md); }
.history-table--split tbody tr:last-child > :first-child { border-bottom-left-radius: var(--radius-md); }
.history-table--split tbody tr:last-child > :last-child { border-bottom-right-radius: var(--radius-md); }
/* 幅が足りなくなる順に、(1)備考を発刊時期の下へ折り返し (2)セルの余白を詰め
   (3)2冊を2行に分ける、と段階的に畳む。しきい値は実測値（1163/1079/967px）から。 */
@media (max-width: 1170px) {
  .history-table__note {
    display: block;
    margin-left: 0;
  }
}
@media (max-width: 1080px) {
  .history-table--split th,
  .history-table--split td {
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* 同じ月に同じ書籍の版が複数あるとき、3列の行同士が揃うようにする */
.edition-line { display: block; }
.edition-line + .edition-line { margin-top: 8px; }
.edition-line--none { color: var(--c-text-faint); }

/* 在庫ステータス */
.stock {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  padding: 2px 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.stock--in {
  color: var(--c-accent-text);
  background: var(--c-chip-bg);
  border-color: var(--c-accent-light-2);
}
.stock--pre {
  color: #fff;
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.stock--ask {
  color: var(--c-text-muted);
  border-color: var(--c-border-faint);
}
.stock--out {
  color: var(--c-text-faint);
  background: var(--c-chip-bg-muted);
}

/* 補足パネル（バックナンバーの案内など） */
.panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 26px 30px 28px;
}
.page-note + .panel { margin-top: 28px; }
.panel__text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--c-text);
}
.panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 20px;
}

/* 情報表（お支払い・お届けなど） */
.info-table {
  margin: 0;
  border-top: 1px solid var(--c-border);
}
.info-table__row {
  display: grid;
  /* 「インターネット販売運営責任者」が折り返さない幅 */
  grid-template-columns: 240px 1fr;
  gap: 0 32px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--c-border);
}
.info-table dt {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-primary);
}
.info-table dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text);
}
.info-table dd strong { font-weight: 700; color: var(--c-text-strong); }
/* 1つの項目に段落が2つ以上あるとき（特定商取引法の個人情報保護など） */
.info-table dd p + p { margin-top: 1em; }
/* 本文中のリンク（会社概要・特定商取引法・プライバシーポリシー） */
.info-table dd a,
.page-section__lead a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.info-table dd a:hover,
.page-section__lead a:hover { color: var(--c-accent-dark); }

.doc-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--c-border);
}
.doc-item { border-bottom: 1px solid var(--c-border); }
.doc-item a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 2px;
  transition: color .2s ease;
}
.doc-item a::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: var(--c-accent);
  transition: background-color .2s ease;
  /* ダウンロード矢印 */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M1.5 12v2.5h13V12' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M1.5 12v2.5h13V12' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.doc-item__type {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--c-primary);
  padding: 3px 12px;
}
.doc-item__type--sub { background: var(--c-accent); }
.doc-item__title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--c-text-strong);
  transition: color .2s ease;
}
.doc-item__meta {
  flex-shrink: 0;
  /* 矢印を書名の直後に置きたいので後ろに回したうえで、年月は右端へ寄せる */
  order: 1;
  margin-left: auto;
  font-size: 14px;
  color: var(--c-text-faint);
  font-variant-numeric: tabular-nums;
}
/* 本文まわりは14・15・16pxの3段階に揃える */
.corrections-page .page-note,
.schedule-page .page-note { font-size: 14px; }

/* ==========================================================================
   フォーム（お問い合わせ）
   ========================================================================== */

.form {
  /* 入力欄が横に伸びすぎると視線移動が大きくなるため幅を止める */
  max-width: 720px;
}
.form-field { margin-bottom: 22px; }
.form-field__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 7px;
}
.form-field__required,
.form-field__optional {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}
.form-field__required { color: var(--c-warn); border: 1px solid var(--c-warn-border); }
.form-field__optional { color: var(--c-text-faint); border: 1px solid var(--c-border-faint); }

.form-field__input,
.form-field__select,
.form-field__textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;   /* iOSで拡大されないよう16px以上にする */
  line-height: 1.6;
  color: var(--c-text-strong);
  background: #fff;
  border: 1px solid var(--c-border-faint);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field__textarea { resize: vertical; min-height: 160px; }
/* 既定の矢印を消して、サイト共通のシェブロンに揃える */
.form-field__select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2312305E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 6px;
}

.form-field__input:focus,
.form-field__select:focus,
.form-field__textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(27, 111, 168, .14);
}
.form-field__input::placeholder,
.form-field__textarea::placeholder { color: var(--c-placeholder-text-2); }

.form-field__help {
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-text-faint);
  margin-top: 6px;
}
.form-field__error {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--c-warn);
  margin-top: 6px;
}
.form-field--error .form-field__input,
.form-field--error .form-field__select,
.form-field--error .form-field__textarea { border-color: var(--c-warn); }

.form-alert {
  max-width: 720px;
  border: 1px solid var(--c-warn-border);
  border-left: 3px solid var(--c-warn);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--c-warn);
}
.form-actions { margin-top: 28px; }
/* 自動投稿対策の隠しフィールド。読み上げにも出さない */
.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   ページ送り
   ========================================================================== */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.pager__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-accent);
  padding: 8px 16px;
  border: 1px solid var(--c-border-faint);
  border-radius: var(--radius-md);
}
.pager__link:hover { border-color: var(--c-accent-light); text-decoration: none; }
.pager__status {
  font-size: 13.5px;
  color: var(--c-text-faint);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   記事本文（お知らせ詳細）
   ========================================================================== */

.article { max-width: 800px; }
.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--c-text-faint);
}
.article__meta .chip--category { margin-bottom: 0; }
.article__body p {
  font-size: 16px;
  line-height: 1.95;
  color: var(--c-text);
}
.article__body p + p { margin-top: 18px; }
.article__body a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Hover interactions (desktop pointer only)
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
  /* カード全体がリンクなので、浮き上がり・枠線・見出し色で明確に反応させる */
  .service-cards--primary .service-card--primary:hover,
  .service-cards--secondary .service-card--secondary:hover {
    box-shadow: 0 14px 20px rgba(18, 48, 94, .10);
    transform: translateY(-3px);
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, var(--c-accent-light) 0%, var(--c-accent-light-2) 100%) border-box;
  }
  .service-card--primary:hover h3,
  .service-card--secondary:hover h4 { color: var(--c-accent); }
  .book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 16px rgba(18, 48, 94, .10);
  }
  .doc-item a:hover { color: var(--c-accent); }
  .doc-item a:hover::after { background: var(--c-accent-light); }
  .doc-item a:hover .doc-item__title { color: var(--c-accent); }
}

/* モーション低減設定の環境では動きを止める（色・影の変化は残す） */
@media (prefers-reduced-motion: reduce) {
  .hero__bgs .hero__bg { transition: none; }
  .service-cards--primary .service-card--primary:hover,
  .service-cards--secondary .service-card--secondary:hover,
  .book-card:hover { transform: none; }
}

/* ==========================================================================
   Tablet (intermediate) — 768–1023px
   ========================================================================== */

/* ==========================================================================
   Desktop — under 1180px
   書影の横に仕様表を置くと、著者名や発行日が1行に収まらなくなる幅。
   仕様表は書影の下に回して、全幅で2列に畳む。
   ========================================================================== */

@media (max-width: 1180px) {
  /* 購入カードは幅が変わると値段やカートの見え方まで動くので、
     この幅から下は 340px で固定し、縮む分は左（書影・仕様表）が引き受ける */
  .product { grid-template-columns: minmax(0, 1fr) 340px; }
  .product__main { grid-template-columns: minmax(0, 1fr); }
  .product__visual { align-items: center; }
  .product__spec {
    max-width: none;
    margin-top: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product__preview { min-width: 200px; width: auto; }
}

@media (max-width: 1023px) {
  .hero h1 { font-size: 46px; }
  .hero__lead br { display: none; }
  .hero__lead { max-width: 560px; }

  /* ナビ項目が多く折り返すため、タブレット幅以下はハンバーガーに切替 */
  .global-nav { display: none; }
  .menu-toggle { display: flex; }

  /* 2カラムだと本文が詰まるため縦積みに */
  .service-cards--primary { grid-template-columns: 1fr; }

  .service-cards--secondary { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(3, 1fr); }
  .book-grid--catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* 下層ページ */
  .toc-list { grid-template-columns: repeat(2, 1fr); }
  .toc-groups { grid-template-columns: repeat(2, 1fr); }
  .info-table__row { grid-template-columns: 240px 1fr; gap: 0 24px; }

  /* 購入カードの 340px は保ったまま、間を詰めて左の幅を稼ぐ */
  .product { gap: 0 32px; }
  b-list[cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* フッター5カラムは長いリンクが折り返すため2カラムに */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
  .footer-col--company { grid-column: 1 / -1; }
  .footer-col-stack { display: contents; }
}

/* ==========================================================================
   Narrow tablet — under 980px
   3カラム・2カラムのままだと1つあたりが細くなりすぎて、
   金額や書誌情報が1文字ずつ縦に折り返してしまう幅。カラムを1段減らす。
   ========================================================================== */

@media (max-width: 980px) {
  /* 書影＋諸情報を上段、購入カードをその下に置く */
  /* 1カラムに畳むので、価格とカートは書影のすぐ下に来るよう並べ替える。
     グリッド用の align-items: start は縦並びだと幅が縮むので戻す */
  .product { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .product__main { display: contents; }
  .product__visual { order: 1; }
  .product__side { order: 2; }
  .product__spec { order: 3; margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  /* 節は書影・仕様表のあとに続ける。間は .product の gap で空ける */
  .product-section { grid-column: auto; order: 4; margin-top: 0; }
  /* 節どうしだけは、見出しが立つように gap へ少し足す */
  .product-section + .product-section { margin-top: 16px; }

  /* 教材の内訳（DVDのPart.1／Part.2など）は横並びだと1行2〜3文字になる */
  .material { grid-template-columns: 200px minmax(0, 1fr); gap: 26px; }
  .material--booklet { grid-template-columns: 240px minmax(0, 1fr); }
  .material__parts { grid-template-columns: minmax(0, 1fr); }
  .material__cols { grid-template-columns: minmax(0, 1fr); }
  .material__cols ~ .material__note::before { width: 100%; }
}

/* ==========================================================================
   Mobile — under 768px
   ========================================================================== */

@media (max-width: 767px) {

  .main-nav__inner {
    padding: 0 var(--side-padding);
    height: 56px;
  }
  .logo__img { height: 28px; }

  .global-nav { display: none; }

  .menu-toggle { display: flex; }

  /* 下層ページ */
  .page-title { padding: 16px var(--side-padding) 18px; }
  .page-title h1 { font-size: 19px; }
  .breadcrumb { margin-bottom: 8px; }
  .page-placeholder { padding: 40px var(--side-padding); }

  .page-section { padding: 36px 0; }
  .page-section h2 { font-size: 22px; }
  .page-section__lead { font-size: 13.5px; line-height: 1.9; margin-bottom: 20px; }
  .schedule-page .page-section__lead { font-size: 14px; }

  .youran-actions { margin-top: 24px; gap: 14px 20px; }
  .youran-actions .btn { width: 100%; }
  h2.subsection-title { font-size: 17px; margin-bottom: 14px; }
  * + .subsection-title { margin-top: 28px; }
  .point-list { gap: 14px; }
  .point-list strong { font-size: 14.5px; }
  .point-list span { font-size: 13px; }
  .diff-box { padding: 16px 18px 18px; margin-top: 22px; }
  h2.diff-box__title { font-size: 15px; }
  .diff-lead { font-size: 13px; margin-bottom: 10px; }
  .diff-list { gap: 12px; }
  .diff-list p { font-size: 13px; line-height: 1.9; margin-left: 0; padding-left: 18px; }
  .diff-list p::before { top: 8px; }
  .toc-accordion summary { padding: 16px 44px 16px 16px; font-size: 15px; }
  .toc-accordion summary::after,
  .toc-accordion summary::before { right: 16px; }
  .toc-list { grid-template-columns: 1fr; gap: 10px; padding: 2px 16px 20px 30px; font-size: 14.5px; }
  .toc-note { font-size: 14px; gap: 6px; }

  .modal { padding: 16px; align-items: flex-end; }
  .modal__dialog { max-height: 88vh; padding: 22px 20px 24px; }
  .modal__title { font-size: 17px; }
  .modal__desc { font-size: 13px; margin-bottom: 16px; }
  .modal__body { gap: 16px; }
  .toc-groups { grid-template-columns: 1fr; gap: 18px; padding: 4px 16px 20px 30px; }
  .toc-group h3 { font-size: 14px; padding-bottom: 6px; margin-bottom: 8px; }
  .toc-group ul { font-size: 14.5px; gap: 7px; }

  /* SPは「発刊時期」列を省いて横スクロールなしに収める（グループは罫線で表現） */
  .history-table { font-size: 14px; min-width: 0; }
  .history-table th,
  .history-table td { padding: 9px 8px; }
  .history-table__period { display: none; }
  /* 狭いので、発刊日は折り返して書籍・版の幅を確保する */
  .history-table--rows .history-table__date { white-space: normal; }
  /* 発刊時期ごとに1行の表では、左端が行の見出しになるので残す */
  .history-table tbody th { font-size: 14px; }
  .history-table thead th:first-of-type,
  .history-table tbody th { padding-left: 12px; }
  .history-table__stock { padding-right: 12px; }
  .stock { font-size: 14px; padding: 2px 8px; }

  .panel { padding: 20px 20px 22px; }
  .page-note + .panel { margin-top: 20px; }
  .panel__text { font-size: 13.5px; line-height: 1.85; }
  .panel__actions { gap: 12px; margin-top: 16px; }
  .panel__actions .btn { width: 100%; }

  .info-table__row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 2px;
  }
  .info-table dt { font-size: 16px; }
  .info-table dd { font-size: 16px; line-height: 1.85; }

  .doc-item a {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 14px 2px;
  }
  /* 幅が無いので書名は下の行に回す。1行目は［種別］［年月］［矢印］ */
  .doc-item__title { width: 100%; order: 3; font-size: 15px; }
  .doc-item a::after { order: 2; }

  /* Hero。SPは中身の高さ（約350px）だと窮屈なので、1.3倍ほどの最小高さを確保する。
     .hero は align-items:center なので中身は上下中央に収まる */
  .hero { min-height: 450px; }
  /* SPは2枚とも同じ寄せで扱う（PC用の個別指定を上書き） */
  .hero__bg { object-position: 65% center; }
  .hero__scrim {
    background: linear-gradient(180deg, rgba(250,252,255,.94) 0%, rgba(250,252,255,.88) 40%, rgba(250,252,255,.6) 68%, rgba(250,252,255,.3) 100%);
  }
  .hero__inner {
    padding: 32px var(--side-padding) 28px;
  }
  .hero__text { max-width: none; }
  .hero h1 { font-size: 29px; line-height: 1.45; margin-bottom: 14px; }
  .hero__lead { font-size: 14px; line-height: 1.9; margin-bottom: 16px; max-width: none; }
  /* ピルは中身の幅ぶんだけにする。全幅に伸ばすと矢印だけが遠くへ離れ、
     真ん中が大きく空いて間延びして見える。
     横に並べて、入りきらない幅では折り返して積む */
  .hero__banners {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    gap: clamp(8px, 2.4vw, 10px);
  }
  /* お知らせ。ラベルと文言を並べ、行き先はその下に紺のボタンで出す */
  .notice { padding-top: 20px; padding-bottom: 4px; }
  .notice__row { gap: 6px 10px; }
  .notice__text { font-size: 15px; }
  .notice__link {
    justify-content: center;
    width: 100%;
    max-width: 360px;
    margin: 10px auto 0;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    background: var(--c-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .notice__link:hover { background: var(--c-primary-dark); color: #fff; text-decoration: none; }
  /* セクション末尾のボタンは、幅いっぱいまでは広げず、指で押しやすい高さにする */
  .section-more { margin-top: 28px; }
  .section-more__btn { min-width: 0; width: 100%; max-width: 360px; padding: 14px 24px; font-size: 15px; }

  /* バナーも同じ考え方で詰めて、350px までは2つを横に並べる */
  .hero__banner {
    flex: 0 0 auto;
    width: auto;
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
    min-height: 0;
    /* 左は文字の始まりなので、右（矢印側）より少しだけ余白を足す */
    padding: clamp(7px, 2.6vw, 10px) clamp(10px, 3vw, 16px) clamp(7px, 2.6vw, 10px) clamp(13px, 3.8vw, 19px);
  }
  /* 中身は上下左右とも中央。伸ばさないので、ラベルとロゴ（書名）が
     矢印のとなりにそのまま収まる */
  .hero__banner-body {
    flex: 0 1 auto;
    min-width: 0;
    align-items: center;
    text-align: center;
  }
  .hero__banner-logo-img { height: clamp(21px, 6vw, 28px); }
  .hero__banner-label { font-size: clamp(8.5px, 2.4vw, 10.5px); }
  .hero__banner-title { font-size: clamp(13px, 3.9vw, 17px); }
  .hero__banner-arrow {
    flex-shrink: 0;
    width: clamp(24px, 6.6vw, 30px);
    height: clamp(24px, 6.6vw, 30px);
    margin-left: 0;
  }

  /* Section headings */
  .services h2, .books h2, .news h2 { font-size: 24px; }
  .section-title__en { font-size: 11px; margin-left: 10px; }
  .section-header { margin-bottom: 16px; align-items: center; flex-wrap: wrap; row-gap: 8px; }

  /* Services */
  .services { padding: 36px 0 40px; }
  .service-cards--primary { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .service-card--primary {
    grid-template-columns: 1fr;
    box-shadow: var(--shadow-primary-sp);
  }
  .service-card--primary .service-card__media { aspect-ratio: 16/10; }
  .service-card--primary .service-card__body { padding: 20px; }
  /* 19px × 1.45 = 27.6px */
  .service-card--primary h3 { font-size: 19px; margin-bottom: 8px; min-height: 28px; }
  .service-card__logo { height: 24px; }
  .service-card--primary p { font-size: 13.5px; line-height: 1.85; }
  .service-card__info { gap: 8px; margin-top: 12px; }
  .badge { font-size: 10px; }
  .status-row__text,
  .status-row__note { font-size: 12.5px; }
  .chip { font-size: 11.5px; padding: 5px 9px; }

  .service-cards--secondary { grid-template-columns: 1fr; gap: 12px; }
  .service-card--secondary {
    display: grid;
    grid-template-columns: 104px 1fr;
    min-height: 104px;
    box-shadow: var(--shadow-secondary-sp);
  }
  .service-card--secondary .service-card__media { aspect-ratio: auto; }
  .service-card--secondary .service-card__body { padding: 14px 16px; }
  .service-card--secondary h4 { font-size: 15px; margin-bottom: 6px; }
  .service-card--secondary p { font-size: 12.5px; line-height: 1.8; }

  /* Books */
  .books { padding: 36px 0 40px; }
  .book-grid { grid-template-columns: 1fr 1fr; column-gap: 14px; row-gap: 20px; }
  .book-grid--catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 18px; }

  /* SPは幅が狭いので、金額と注記を2行にする */

  .catalog-nav__item { padding: 12px 10px; }

  /* 見出しの横に並べる幅が無いので、下の行へ回して全幅で使う */
  .page-title__row { display: block; }
  .book-search-area { align-items: stretch; margin-top: 12px; }
  .book-search__status { text-align: left; }

  .catalog-archive__box { padding: 18px 16px; }
  .catalog-archive__box .btn { width: 100%; }
  .archive-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* iOS で拡大されないよう 16px 以上にする */
  .book-search input { flex: 1; width: auto; min-width: 0; font-size: 16px; }

  .product { gap: 22px; }
  .product__visual img { max-width: 220px; }
  .product__spec { grid-template-columns: minmax(0, 1fr); margin-top: 22px; }
  .buy-box { padding: 18px 20px 20px; }
  .buy-box .cartjs_product_form.is-styled { flex-direction: column; align-items: stretch; gap: 12px; }
  .buy-box__price strong { font-size: 24px; }
  .product-section h2 { font-size: 17px; }
  b-text,
  .product-section p { line-height: 1.9; }
  /* 幅が無いので、列の指定にかかわらず1列に畳む */
  b-list,
  b-list[cols="2"],
  b-list[cols="3"] { grid-template-columns: minmax(0, 1fr); }
  .link-cards { grid-template-columns: minmax(0, 1fr); }
  .link-card { padding: 13px 14px; font-size: 14.5px; }

  .material { grid-template-columns: 1fr; gap: 20px; padding: 20px 20px 24px; }
  .material__visual { max-width: 240px; margin: 0 auto; }
  .material__body h2 { font-size: 18px; }
  .material__desc { font-size: 16px; line-height: 1.85; }
  .material__parts { grid-template-columns: 1fr; gap: 12px; }
  .material__part { padding: 16px 18px 18px; }
  .material__actions .btn { width: 100%; }
  .material__box { padding: 14px 16px 15px; }
  /* SPのリード文は共通で 13.5px だが、教材ページは 16px を保つ */
  .material-page .page-section__lead { font-size: 16px; }

  .book-card__cover { height: 150px; padding: 12px; }
  .book-card__badge { font-size: 10px; padding: 3px 8px; }
  /* 書影の幅より注釈のほうが長いので、SPではカードの幅いっぱいを使う
     （書影の端に合わせたままだと、狭い画面で右端が切れる） */
  .book-card__cover-figure { position: static; }
  .book-card__cover-note {
    top: auto;
    bottom: 4px;
    left: 12px;
    right: 12px;
    margin-top: 0;
    white-space: normal;
  }
  .book-card__body { padding: 12px 12px 14px; }
  .book-card h3 { font-size: 13.5px; margin-bottom: 4px; min-height: 0; }
  .book-card__date { font-size: 12px; margin-bottom: 2px; }
  .book-card__cover-note { font-size: 11px; margin-top: 4px; }
  .book-card__price { font-size: 12px; margin-bottom: 12px; }
  /* 横に2つ並べると「内容を見る」が入りきらないので縦に積む。
     説明文を隠しているぶん、ボタンはカードの下端で揃える */
  .book-card__actions {
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 0;
  }
  .book-card__buy,
  .book-card__preview { flex: none; width: 100%; padding: 10px 8px; font-size: 12.5px; }
  /* 幅の狭いカードでは「カートに入れる」が2行になる */
  .cart-submit { padding-left: 6px; padding-right: 6px; font-size: 13px; }
  .book-card__desc { display: none; }

  /* News */
  .news { padding: 36px 0 40px; }
  .news-item {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding: 14px 2px;
  }
  .news-item__badge {
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .news-item__badge:empty { display: none; }
  .news-item__date {
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
  }
  .news-item__badge, .news-item__date { grid-column: auto; }
  .news-item {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 10px;
  }
  .news-item__title {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 1.7;
  }

  /* Footer */
  .site-footer { padding: 8px 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; border-bottom: none; }
  .footer-col--company { order: 2; padding-top: 24px; }
  .footer-accordion {
    border-bottom: 1px solid var(--c-border-dark);
  }
  .footer-col__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    margin-bottom: 0;
    font-size: 14px;
  }
  .footer-col__heading .icon--plus {
    display: block;
    color: var(--c-on-dark-faint);
    transition: transform .2s ease;
  }
  .footer-col__heading[aria-expanded="true"] .icon--plus { transform: rotate(45deg); }
  .footer-col__links {
    display: none;
    padding-bottom: 16px;
  }
  .footer-accordion[data-open="true"] .footer-col__links {
    display: flex;
  }
  .footer-copyright { font-size: 11.5px; margin-top: 20px; }
}

/* ==========================================================================
   Small mobile — under 570px
   ========================================================================== */

@media (max-width: 569px) {
  /* 4列だと版名が潰れるので、書籍の列を版の中に畳んで3列にする */
  .history-table--rows .edition-kind { display: none; }
  .history-table--rows .edition-name__kind-label { display: inline; }
  .history-table--rows .edition-name__kind {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-primary);
  }
  .history-table--rows .edition-name { padding-left: 12px; }
  /* 版名の行間を詰めて、1件ぶんの高さを抑える */
  .history-table--rows .edition-name a,
  .history-table--rows .edition-name { line-height: 1.5; }
}

/* 400px以下は3列でも窮屈なので、表の文字を一段小さくする */
@media (max-width: 400px) {
  .history-table { font-size: 13px; }
  .history-table th,
  .history-table td { padding: 8px 6px; }
  .history-table thead th { font-size: 14px; }
  .history-table tbody .edition-name { font-size: 14px; }
  .history-table--rows .edition-name__kind { font-size: 13px; }
  .history-table--rows .history-table__group-row > td { font-size: 15px; }
  .history-table__note { font-size: 13px; }
  .stock { font-size: 12px; padding: 2px 6px; }
}

/* ---------- 選挙の仕事 DVD版 内容見本動画 ---------- */
/* パスワード入力は1項目だけなので、フォームの幅を絞って間延びさせない */
.sample-gate { max-width: 420px; }

.sample-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}
.sample-video h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 10px;
}
/* 16:9 の枠に iframe を敷き詰める */
.sample-video__frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sample-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sample-video__pending {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-tint);
  border-radius: var(--radius-md);
  color: var(--c-text-faint);
  font-size: 15px;
}
@media (max-width: 768px) {
  .sample-videos { grid-template-columns: 1fr; gap: 22px; }
}
