/* ===================================================
   法律文書共通スタイル (推しカノFukuoka 水色ベース)
   対象: terms.html / tokutei.html / cancel.html / privacy.html
   ===================================================
   デザイン方針:
   - 推しカノブランドカラー (水色 #145087) を維持
   - Noto Sans JP をベースフォント
   - 余白・改行を詰めて「固い」印象に
   - 装飾(黄色ハイライト等)は削除、罫線ベースの構成
   - 動く背景図形は残す (ブランド継承)
   =================================================== */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Noto Sans JP", "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
  color: #34536f;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 500;
}

/* メインコンテナ (法律ページ用) */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 14px 48px;
}

.legal-section {
  margin-top: 24px;
}

/* ===================================================
   ページタイトル (水色罫線の"扁額"風・詰め気味)
   =================================================== */
.legal-title {
  font-size: 18px;
  color: #145087;
  margin: 16px 0 20px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 12px 0;
  border-top: 1px solid #145087;
  border-bottom: 1px solid #145087;
  text-indent: 0.22em;
}

/* ===================================================
   文書カード
   =================================================== */
.legal-doc {
  position: relative;
  z-index: 20;
  background: #ffffff;
  border: 1px solid #b8d1f0;
  padding: 18px 14px 24px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(13, 71, 125, 0.08);
}

/* 前文 */
.legal-preamble {
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin: 0 0 20px;
  padding: 10px 12px;
  border-left: 3px solid #145087;
  background: #f4f9ff;
}

/* ===================================================
   条 (第X条)
   =================================================== */
.legal-article {
  margin: 0 0 20px;
}

.legal-article:last-child {
  margin-bottom: 0;
}

.legal-article__title {
  font-size: 13px;
  color: #145087;
  font-weight: 700;
  margin: 0 0 8px;
  padding: 4px 0 4px 10px;
  border-left: 3px solid #145087;
  border-bottom: 1px solid #dfeeff;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

/* ===================================================
   本文
   =================================================== */
.legal-text {
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin: 0 0 6px;
}

.legal-text:last-child {
  margin-bottom: 0;
}

.legal-text small {
  font-size: 11px;
  color: #6b7d92;
  line-height: 1.7;
}

/* ===================================================
   項 (1., 2., 3.)
   =================================================== */
.legal-clauses {
  counter-reset: legal-clause;
  margin: 0 0 6px;
  padding-left: 0;
  list-style: none;
}

.legal-clauses > li {
  position: relative;
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin-bottom: 4px;
  padding-left: 1.8em;
}

.legal-clauses > li::before {
  counter-increment: legal-clause;
  content: counter(legal-clause) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: #144a7a;
  min-width: 1.4em;
}

/* ===================================================
   号 (一、二、三)
   =================================================== */
.legal-items {
  counter-reset: legal-item;
  margin: 4px 0 6px;
  padding-left: 0.6em;
  list-style: none;
}

.legal-items > li {
  position: relative;
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin-bottom: 3px;
  padding-left: 2.4em;
}

.legal-items > li::before {
  counter-increment: legal-item;
  content: counter(legal-item, cjk-ideographic) "、";
  position: absolute;
  left: 0;
  top: 0;
  color: #34536f;
  font-weight: 400;
  min-width: 2.4em;
}

/* シンプルな箇条書き (無番号) */
.legal-plain-list {
  margin: 4px 0 6px;
  padding-left: 1em;
  list-style: none;
}

.legal-plain-list > li {
  position: relative;
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin-bottom: 2px;
  padding-left: 0.8em;
}

.legal-plain-list > li::before {
  content: "・";
  position: absolute;
  left: -0.4em;
  top: 0;
  color: #34536f;
}

/* ===================================================
   強調 (色のみ・下線なし)
   =================================================== */
.legal-doc strong,
.legal-doc b {
  font-weight: 700;
  color: #144a7a;
}

/* ===================================================
   テーブル ラッパー (モバイル対応)
   =================================================== */
.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 6px -4px 10px;
  padding: 0 4px;
}

.legal-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 11.5px;
  background: #ffffff;
}

.legal-table th,
.legal-table td {
  border: 1px solid #b8d1f0;
  padding: 6px 7px;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  color: #34536f;
  word-break: break-word;
  overflow-wrap: break-word;
}

.legal-table th {
  background: #e6f0fb;
  color: #145087;
  font-weight: 600;
  white-space: normal;
}

.legal-table td strong,
.legal-table th strong {
  color: #144a7a;
}

/* ===================================================
   定義表 (販売業者、所在地 等の縦並び定義リスト)
   =================================================== */
/* -------------------------------
   モバイル: 縦積み (label 上、value 下)
   ------------------------------- */
.legal-defs {
  margin: 8px 0 12px;
  padding: 0;
  border-top: 1px solid #d0dcea;
}

.legal-defs__row {
  display: block;
  padding: 10px 4px 12px;
  border-bottom: 1px solid #d0dcea;
}

.legal-defs__label {
  display: block;
  padding: 0 0 0 10px;
  background: none;
  border-right: none;
  border-left: 3px solid #145087;
  font-weight: 700;
  font-size: 12px;
  color: #145087;
  line-height: 1.4;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.legal-defs__value {
  display: block;
  padding: 0 4px 0 13px; /* border-left 3px + padding-left 10px と揃える */
  font-size: 13px;
  color: #34536f;
  line-height: 1.7;
  word-break: break-word;
}

.legal-defs__value small {
  display: block;
  font-size: 11px;
  color: #6b7d92;
  margin-top: 4px;
  line-height: 1.55;
}

/* -------------------------------
   デスクトップ (768px以上): 2カラムに戻す
   ------------------------------- */
@media (min-width: 768px) {
  .legal-defs__row {
    display: grid;
    grid-template-columns: 8em 1fr;
    padding: 0;
    border-bottom: 1px solid #d0dcea;
  }

  .legal-defs__label {
    padding: 12px 12px;
    background: #e6f0fb;
    border-left: none;
    border-right: 1px solid #d0dcea;
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.5;
    align-self: stretch;
    display: flex;
    align-items: center;
  }

  .legal-defs__value {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.75;
  }
}

/* ===================================================
   リンク
   =================================================== */
.legal-link {
  color: #145087;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.legal-link:hover {
  opacity: 0.8;
}

/* ===================================================
   メタ情報 (制定日・改定日・施行日)
   =================================================== */
.legal-meta {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #dfeeff;
  font-size: 11.5px;
  color: #6b7d92;
  line-height: 1.7;
}

.legal-meta__row {
  display: flex;
  gap: 10px;
  margin-bottom: 2px;
}

.legal-meta__label {
  font-weight: 600;
  min-width: 5em;
  color: #145087;
}

/* ===================================================
   注記 (※, 補足)
   =================================================== */
.legal-note {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-left: 3px solid #145087;
  background: #f4f9ff;
  font-size: 11.5px;
  line-height: 1.75;
  color: #34536f;
}

/* ===================================================
   PC向け微調整
   =================================================== */
@media (min-width: 768px) {
  .main {
    padding: 20px 20px 64px;
  }

  .legal-title {
    font-size: 22px;
    margin-top: 24px;
    padding: 16px 0;
  }

  .legal-doc {
    padding: 28px 32px 36px;
  }

  .legal-article__title {
    font-size: 14px;
  }

  .legal-text,
  .legal-clauses > li,
  .legal-items > li,
  .legal-plain-list > li {
    font-size: 13px;
  }

  .legal-table {
    font-size: 12.5px;
  }

  .legal-defs__label {
    font-size: 13px;
    padding: 10px 12px;
  }

  .legal-defs__value {
    font-size: 13.5px;
    padding: 10px 14px;
  }
}

/* ===================================================
   印刷対応
   =================================================== */
@media print {
  body {
    background: #fff;
  }
  .site-header,
  .site-footer,
  .bg-shapes {
    display: none;
  }
  .legal-doc {
    border: none;
    padding: 0;
    box-shadow: none;
  }
}
