/* ===== TOKENS ===== */
:root {
  --ink: #0d1415;
  --sub: #5f6a6a;
  --bg: #f5fbfb; /* セクション淡色 */
  --line: #e3eeee;
  --accent: #1aa3a0; /* 下線/強調色（デザインの青緑） */
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* ===== Article Base Styles ===== */
article {
  width: 90%;
  margin: 0 auto;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 1024px) {
  .wrap {
    padding: 28px 20px 80px;
  }
}

.pub * {
  box-sizing: border-box;
}
.pub {
  color: var(--ink);
  font-feature-settings: "palt";
}

/* ===== Tabs (breadcrumb-like) ===== */
.pub-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 18px;
}
.pub-tabs a {
  display: block;
  text-align: center;
  padding: 12px 10px;
  border: 1px solid var(--line);
  background: #0e1718;
  color: #e9f3f3;
  border-radius: 12px;
  text-decoration: none;
  position: relative;
}
.pub-tabs a.is-active {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
@media (max-width: 767px) {
  .pub-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ===== Page head ===== */
/* ページタイトル（一覧ページ用） */
.pub-title.page-title {
  width: 100%;
  position: relative;
  margin: 0 auto 20px !important;
  padding: 0 0 10px;
  font-size: 22px;
  font-weight: var(--font-sub-weight);
  border-bottom: solid 3px var(--color-main);
}
@media (max-width: 767px) {
  .pub-title.page-title {
    font-size: 20px;
  }
}

/* ===== Underline accent ===== */
.pub-underline {
  width: 220px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 8px 0 16px;
}

/* ===== Badge ===== */
.pub-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: var(--font-strong-weight);
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* ===== List (Archive) ===== */
.pub-list {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.pub-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.pub-card__thumb {
  position: relative;
}
.pub-card__thumb img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: #fff;
}
.pub-card__ttl {
  font-size: 22px;
  line-height: 1.35;
  margin: 6px 0 10px;
}
.pub-card__ttl a {
  color: var(--ink);
  text-decoration: none;
}
.pub-card__lead {
  color: #1e2a2a;
  line-height: 1.8;
  margin-bottom: 10px;
}
.pub-card__meta {
  list-style: none;
  margin: 10px 0 18px;
  padding: 0;
  color: var(--sub);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.pub-card__meta strong {
  font-size: 18px;
}
.btn-pill {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
@media (max-width: 767px) {
  .pub-list {
    gap: 28px;
  }
  .pub-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pub-card__ttl {
    font-size: 18px;
  }
}

/* ===== Single: Hero ===== */
.pub-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 36px;
  align-items: start;
  margin: 6px 0 24px;
}
.pub-hero__thumb {
  position: relative;
}
.pub-hero__thumb img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: #fff;
}
/* SP: 100%幅 */
.pub-cover a {
  width: 100%;
  height: auto;
  display: block;
}
.pub-cover a img {
  width: 100%;
  height: auto;
  background: var(--color-bg-gray);
  padding: 1.5em;
  border-radius: 10px;
}
.pub-hero__ttl {
  font-size: 30px;
  line-height: 1.25;
  margin: 4px 0 12px;
}
.pub-hero__lead {
  color: #1e2a2a;
  line-height: 1.9;
  margin: 10px 0 12px;
}
.pub-hero__meta {
  list-style: none;
  margin: 10px 0 16px;
  padding: 0;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pub-meta .release_date {
  margin-bottom: 20px;
}
.pub-meta .list_price {
  margin-bottom: 20px;
}
.pub-cta .btn-outline {
  width: 100%;
  display: inline-block;
  padding: 0 !important;
  border: 1.5px solid #dcdcdc;
  background: #fff;
  color: #0a1515;
  text-decoration: none;
  text-align: center;
  height: 60px;
  line-height: 60px;
}
@media (max-width: 1023px) {
  .pub-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .pub-hero__ttl {
    font-size: 22px;
  }
}

/* ===== 購入ボタン群 ===== */
.buy {
  background: var(--bg);
  border-radius: 20px;
  padding: 26px 20px;
  margin: 8px 0 28px;
}
.buy__head {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  margin: 0 0 18px;
}
.buy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.buy-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.buy-main {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 82px;
  text-decoration: none;
}
.buy-main img {
  max-width: 90%;
  height: auto;
  display: block;
}
.buy-logo-fallback {
  font-weight: var(--font-strong-weight);
  color: #111;
}
.buy-mini {
  font-size: 14px;
  text-decoration: none;
  color: #0c3d3c;
  border-bottom: 1px solid currentColor;
  line-height: 1;
  display: inline-block;
}
@media (max-width: 767px) {
  .buy {
    padding: 22px 14px;
  }
  .buy-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== 見どころ ===== */
.sec-head {
  font-size: 20px;
  margin: 22px 0 8px;
  position: relative;
  padding-top: 10px;
}
.sec-head::after {
  content: "";
  display: block;
  width: 220px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin-top: 8px;
}
.feat-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.feat-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.feat-label {
  display: inline-block;
  font-size: 12px;
  color: var(--color-main);
  border-radius: 10px;
  line-height: 1;
}
.feat-text {
  color: #0f1919;
}
.center {
  text-align: center;
  margin: 20px 0;
}
.btn-ghost {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #0f1818;
  text-decoration: none;
  box-shadow: var(--shadow);
}

/* ===== キャンペーン ===== */
.camp {
  margin: 26px 0;
}
.camp-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.camp-link {
  display: grid;
  grid-template-columns: 92px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: #fff;
}
.camp-thumb img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-8);
  box-shadow: var(--shadow);
}
.camp-title {
  color: #0f1818;
  font-weight: var(--font-strong-weight);
  display: block;
  margin-bottom: 4px;
}
.camp-note {
  color: #3a4b4b;
  font-size: 14px;
}
.camp-arrow {
  color: #6b7c7b;
  font-size: 28px;
}
.pub-contact {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  color: #3a4b4b;
  background: #fff;
}
.pub-contact .small {
  font-size: 12px;
  color: #5e6b6b;
}
@media (max-width: 767px) {
  .camp-link {
    grid-template-columns: 78px 1fr 18px;
  }
}

/* ===== Pager ===== */
.pub-pager {
  text-align: center;
  margin: 26px 0;
}
/* (テーマ側の.paginationに依存。必要なら追加調整) */

/* ===== Generic ===== */
img {
  max-width: 100%;
}

/* ===== base tokens（publication.cssと同系） ===== */
:root {
  --ink: #0d1415;
  --sub: #5f6a6a;
  --line: #e3eeee;
  --line02: #DCDCDC;  
  --bg: #f5fbfb;
  --accent: #1aa3a0;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  --cta: #f0b24a; /* 電子版/定期購読の大ボタン色 */
}
.page-ttl {
  font-size: 28px;
  font-weight: var(--font-strong-weight);
  margin: 8px 0 16px;
}
@media (max-width: 767px) {
  .page-ttl {
    font-size: 22px;
  }
}

/* ===== 定期購読 ===== */
.sub-hero {
  background: var(--bg);
  border-radius: 22px;
  padding: 18px;
  margin: 8px 0 18px;
  box-shadow: var(--shadow);
}
.sub-hero img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  background: #fff;
  box-shadow: var(--shadow);
}
.sub-head {
  margin: 6px 0 8px;
}
.sub-ttl {
  font-size: 26px;
  line-height: 1.35;
  margin: 8px 0 6px;
}
.sub-date {
  color: var(--sub);
  font-size: 14px;
}
.sub-lead {
  line-height: 1.9;
  color: #1b2727;
  margin: 10px 0 12px;
}
.sub .sec-head {
  font-size: 20px;
  margin: 22px 0 10px;
}
.sub-cta {
  margin: 22px 0;
}
.sub-cta__lead {
  text-align: center;
  margin: 0 0 12px;
}
.btn-prime {
  display: inline-block;
  min-width: 260px;
  text-align: center;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--cta);
  color: #382b07;
  text-decoration: none;
  box-shadow: var(--shadow);
  font-weight: var(--font-strong-weight);
}
.note-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  margin-top: 14px;
}
.note-box.dark {
  background: #0d1415;
  color: #e9f3f3;
  border-color: #132122;
}
.note-list {
  margin: 0;
  padding-left: 1.2em;
}
.note-list li {
  margin: 0.5em 0;
}

/* ===== 電子版 ===== */
.dig-hero {
  margin: 10px 0 18px;
}
.dig-hero img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.dig-ctas .sec-lead {
  font-size: 18px;
  margin: 4px 0;
}
.dig-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0 6px;
}
.cta-big {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--cta);
  color: #382b07;
  font-weight: var(--font-strong-weight);
  padding: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
@media (max-width: 767px) {
  .dig-cta-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.dig-stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 4px 0 22px;
}
@media (max-width: 767px) {
  .dig-stores {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.store-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.store-list li {
  border-bottom: 1px solid var(--line);
}
.store-list a {
  display: block;
  padding: 14px 6px;
  color: #0f1919;
  text-decoration: none;
}
.store-list a:hover {
  background: #f7fcfc;
}

/* ===== 購入方法 ===== */
.how-sec {
  margin: 18px 0 26px;
}
.how-h2 {
  font-size: 20px;
  margin: 6px 0 6px;
}
.how-body {
  line-height: 1.9;
  color: #1b2727;
}
.how-body p {
  margin: 0.8em 0;
}
.how-body ul {
  padding-left: 1.2em;
  margin: 0.6em 0;
}
.center {
  text-align: center;
}

/* ===== book-tabs（定期購読と共通） ===== */
.book-tabs.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 18px;
}
.book-tabs .card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
}
.book-tabs .card-link.is-active {
  background: var(--card);
  border-color: var(--line);
}
.book-tabs .card-link .arrow::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
}
/* SP 2列 */
@media (max-width: 767px) {
  .book-tabs.cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}
/* ===== 2columns: main + aside（一覧/詳細 共通で使える） ===== */
.pub-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 1024px) {
  /* PC: articleを100%幅に */
  article {
    width: 100%;
  }
  /* PC: 220px幅 */
  .pub-cover a {
    width: 220px;
  }
  /* PC: .pub-cover, .book-coverを220pxに */
  .pub-cover,
  .book-cover {
    width: 220px;
  }
  .pub-cover img,
  .book-cover img {
    width: 220px;
  }
  /* PC: .pub-info, .book-metaを384pxに */
  .pub-info,
  .book-meta {
    width: 384px;
  }
  .pub-layout {
    grid-template-columns: 1fr 300px;
  }
}
.pub-main {
  min-width: 0;
}
.pub-aside {
  align-self: start;
  position: sticky;
  top: 20px;
}
.pub-aside .widget {
  margin-bottom: 18px;
}

/* =========================================================
   /books/ : 2カラム化＋カード整形＋フッター欠け対策
   ======================================================= */

/* 2columns layout（.main-inner をそのままグリッドに） */
.main-inner {
  display: flex;
  justify-content: space-between;
  flex-flow: row nowrap;
  width: 100%;
  margin: 0 auto;
  gap: 28px;
}
@media (min-width: 1024px) {
  .main-inner {
    max-width: 1024px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .main-inner {
    width: 94%;
  }
}

/* 本文・サイド共通の小調整 */
.main-content {
  width: 65%;
  min-width: 0;
}
#secondary {
  width: 35%;
  align-self: start;
  float: none; /* テーマ側の float を無効化 */
  position: sticky; /* 追従（不要なら削除OK） */
  top: 20px;
}

/* フッターが見えない/切れる対策 */
.site-main.main-container{
  overflow: visible;
} /* 親の overflow:hidden を打ち消し */
.main-inner::after {
  content: "";
  clear: both;
} /* 旧floatのケア */

/* タブ（現在地の強調：aria-currentに対応） */
.book-tabs .card-link[aria-current="page"],
.book-tabs .card-link.is-active {
  background: var(--card);
  border-color: var(--line);
}

/* 見出し */
.book-header {
  margin: 8px 0 18px;
}
.book-title {
  font-size: 28px;
  font-weight: var(--font-strong-weight);
  margin: 6px 0 18px;
}
.article-title {
  font-size: 26px !important;
  line-height: 1.5em !important;
  font-weight: var(--font-sub-weight) !important;
  margin: 24px 0 12px;
}
@media (max-width: 767px) {
  .book-title {
    font-size: 22px;
  }
}

/* 一覧カード */
.pub-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
/* SP: 100%幅 */
.pub-cover,
.book-cover {
  width: 100%;
}
.pub-cover img,
.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background: #F8F8FA;
  box-shadow: none;
}
/* SP: 100%幅 */
.pub-info,
.book-meta {
  width: 100%;
}
.pub-title {
  font-size: 20px;
  line-height: 1.35;
  color: var(--color-text);
  padding-bottom: 0.4em;
  margin-bottom: 0;
  border-bottom: solid 3px var(--color-main);
}
.pub-title a {
  color: var(--ink);
  text-decoration: none;
}

/* book-excerpt と pub-excerpt を統一 */
.book-excerpt,
.pub-excerpt {
  color: #182424;
  line-height: 1.8;
  margin: 20px 0 20px;
}
.book-excerpt h3,
.pub-excerpt h3,
.book-lead {
  margin: 0 0 8px;
  font-weight: var(--font-strong-weight);
  font-size: 14px;
  line-height: 1.8em;
}
.book-excerpt p,
.pub-excerpt p {
  margin: 0;
  font-weight: var(--font-strong-weight);
  font-size: 16px;
  line-height: 1.8em;
  color: #182424;
}

/* meta-list と pub-meta を統一 */
.meta-list,
.pub-meta {
  margin: 8px 0 30px;
  padding: 0;
  color: var(--color-text) !important;
}
.meta-list .row,
.pub-meta .row {
  display: flex;
  gap: 5px;
  padding: 10px 0;
  align-items: flex-end;
}
.meta-list .row span,
.pub-meta .row span {
  font-size: 24px;
  font-weight: bold;
}

.btn-outline {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--ink) ;
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-text) !important;
  background: transparent;
}
.btn-outline:hover {
  background:var(--color-main) !important;
  color: #FFF !important;
  border: solid #FFF 1px !important;
}

/* SP最適化 */
@media (max-width: 767px) {
  .pub-list {
    gap: 50px;
  }
  .pub-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* SP小画面最適化 */
@media screen and (max-width: 480px) {
  .main-content.single-book .book-header {
    width: 94%;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    flex-flow: column;
    justify-content: flex-start;
    align-items: baseline;
  }
}

