/* style.css */

*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #096;
  --orange: #f63;
  --border: #ccc;
  --text: #222;
  --sub: #555;
  --radius: 6px;
}

a:link,
a:visited,
  {
  text-decoration: none;
  color: #fff;
}

a:hover,
a:active {
  text-decoration: none;
}



/* ══ タブ ══ */
.tabs {
  display: flex;
  gap: 8px;
  max-width: 1024px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.tab-btn,
.tab-btn:link,
.tab-btn:visited {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 12px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
}

.tab-btn:hover,
.tab-btn:active {
  opacity: 0.8;
  color: #fff;
  text-decoration: none;
}

.tab-btn .chevron {
  font-size: 13px;
}

.tab-btn .arrow-icon {
  display: block;
  width: 14px;
  height: auto;
}

/* ══ セクション見出し ══ */
.section-heading {
  max-width: 1024px;
  margin: 0 auto 12px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: bold;
}

.section-heading::before {
  content: "■";
  margin-right: 4px;
}

/* ══ カード共通 ══ */
.card,
.addon-card {
  max-width: 1024px;
  margin: 0 auto 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: #fff;
}

/* ══ 片カラムのみのカード（例：書籍版なしのデジタル問題集単体） ══ */
.card.single-col {
  max-width: 512px;
  /* 1024pxの半分 */
  margin-left: 0;
  margin-right: auto;
}

.card.single-col .col-left {
  padding-right: 0;
}

.card.single-col .col-divider {
  display: none;
}

/* SPでは通常どおり100%幅に戻す */
@media screen and (max-width: 950px) {
  .card.single-col {
    max-width: 1024px;
    /* SPは他カードと同じ最大幅に戻す */
  }
}

/* ══ 書籍タイトル・出版社 ══ */
.book-title,
.addon-title {
  font-size: 19px;
  font-weight: bold;
  margin-bottom: 4px;
  line-height: 1.5;
}

.publisher,
.addon-publisher {
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 16px;
  line-height: 1.8;
}

/* ══ 左右カラム（1:1） ══ */
.columns {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.col-left,
.col-right {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.col-left {
  padding-right: 24px;
}

.col-right {
  padding-left: 24px;
}

.col-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

/* ══ 緑ラベル帯 ══ */
.col-label {
  display: block;
  text-align: center;
  padding: 9px;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 14px;
  background: var(--green);
  color: #fff;
  border-bottom: solid 5px #d8f2d3;
}

/* ══ 書籍版：画像＋右テキストの横並び ══ */
.book-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.book-cover {
  width: 110px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: block;
  background: #dce8f0;
  min-height: 140px;
}

.book-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delivery {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
}

.meta {
  font-size: 18px;
  line-height: 1.7;
  color: var(--sub);
}

/* ══ デジタル：画像＋右テキストの横並び ══ */
.digital-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.digital-thumb {
  width: 130px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: block;
  background: #dce8f0;
}

.digital-label {
  font-size: 13px;
  color: var(--green);
  font-weight: bold;
  margin-top: 6px;
  line-height: 1.6;
}

.digital-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ══ 体験版ボタン ══ */

.trial-btn,
.trial-btn:link,
.trial-btn:visited {
  text-decoration: none;
}


.trial-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  width: fit-content;
}

.trial-btn span {
  color: var(--green);
}

.trial-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.trial-btn svg {
  width: 22px;
  height: 18px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.digital-desc {
  font-size: 18px;
  color: var(--sub);
  line-height: 1.7;
}

/* ══ 価格ボックス ══ */
.price-box {
  border: 2px solid var(--border);
  padding: 10px 14px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  align-self: flex-start;
  /* flex子要素として幅が伸びないよう */
}

.price-label {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
}

.price {
  font-size: 26px;
  font-weight: bold;
  color: var(--text);
}

.tax {
  font-size: 13px;
  font-weight: normal;
  color: var(--sub);
}

/* ══ 資格受付ONLINE 吹き出し ══ */

.online-balloon {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
  margin-bottom: 18px;
  /* しっぽ分の余白 */
  align-self: flex-start;
}

/* 下向き三角（吹き出しのしっぽ：下から出る） */
.online-balloon::before {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 20px;
  border: 6px solid transparent;
  border-top-color: var(--green);
}

.online-balloon::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 22px;
  border: 4px solid transparent;
  border-top-color: #fff;
}


.online-balloon p {
  text-decoration: none;
  color: #096;
}

/* ══ オレンジ購入ボタン ══ */
.buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  padding: 13px 16px;
  border-radius: var(--radius);
  text-decoration: none !important;
  margin-bottom: 6px;
  box-shadow: 0px 5px 0px #7a7a7a;
  text-decoration: none;
  color: #fff;
}


.buy-btn span {
  text-decoration: none;
  color: #fff;
}

.buy-btn:hover {
  opacity: 0.6;
}

.buy-btn .ext-icon {
  font-size: 16px;
}

.cart-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cart-icon {
  display: block;
  width: 18px;
  height: 18px;
}



/* ══ 購入の流れリンク ══ */

.flow-link,
.flow-link:link,
.flow-link:visited {
  text-decoration: none;
}


.flow-link {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 8px;
  gap: 8px;
}


.flow-link:hover {
  color: #074;
}


.circle-icon {
  width: 20px;
  height: 20px;
  border: 1px solid var(--sub);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--sub);
  text-decoration: none;
}

.circle-icon::after {
  content: "↓";
}

.flow-link span {
  color: var(--green);
  text-decoration: none;

}

/* ══ 注意書き ══ */
.notice {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}

/* ══ アドオンカード ══ */
.addon-grid {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.addon-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  padding: 0 8px;
}

.addon-col-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
  margin: 0 8px;
}

.addon-label-bar {
  display: block;
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 9px;
  font-size: 14px;
  font-weight: bold;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

/* アドオン：画像＋テキスト横並び */
.addon-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.addon-thumb {
  width: 110px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: block;
  background: #dce8f0;
  min-height: 90px;
}

.addon-thumb-label {
  font-size: 13px;
  color: var(--green);
  font-weight: bold;
  margin-top: 6px;
  line-height: 1.6;
}

.addon-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grade-badge {
  display: inline-block;
  border: 2px solid var(--green);
  border-radius: 4px;
  padding: 2px 14px;
  font-size: 15px;
  font-weight: bold;
  align-self: flex-start;
  background-color: #d8f2d3;
  color: var(--green);
}

.addon-desc {
  font-size: 18px;
  color: var(--sub);
  line-height: 1.7;
}

/* アドオン注記 */
.addon-note {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 20px;
}

.addon-note p+p {
  margin-top: 6px;
}


/* ══ 片カラムのみのカード（例：書籍版なしのデジタル問題集単体） ══ */
.columns.single-col .col-left {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 0;
}

.columns.single-col .col-divider {
  display: none;
  /* 相手側カラムが無いので区切り線も非表示に */
}

/* SPでは通常どおり100%幅に戻す */
@media screen and (max-width: 950px) {
  .columns.single-col .col-left {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}


/* ══ SP：書籍版・デジタル問題集を1カラム縦並び ══ */
@media screen and (max-width: 950px) {

  .card,
  .addon-card {
    padding: 16px;
    overflow-x: hidden;
    margin: 10px;
  }

  .card.single-col {
    max-width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
  }

  .columns,
  .addon-grid {
    display: block;
  }

  .col-left,
  .col-right,
  .addon-col {
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .col-left,
  .addon-col:first-child {
    padding-bottom: 24px;
  }

  /* 縦区切り → 横区切り線に変更 */
  .col-divider,
  .addon-col-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 0 0 24px;
  }

  .addon-col-divider {
    margin: 0 0 24px;
  }

  .col-right {
    padding-top: 0;
  }

  .online-balloon {
    white-space: normal;
    max-width: 100%;
  }

  .buy-btn {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
  }
}
