/* ===========================================
   ヒューマンデザイン チャートページ用 CSS
   =========================================== */

/* --- フォント --- */
.font-display {
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
}

input[type="date"],
input[type="time"],
input[type="text"] {
  font-family: 'Noto Sans JP', sans-serif;
}

/* ===========================================
   表示トグル（キロン / バリアブル）
   =========================================== */
.display-toggles {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: rgba(26, 43, 76, 0.75);
}

.display-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.display-toggles input[type="checkbox"] {
  cursor: pointer;
  accent-color: #C4A265;
  width: 1rem;
  height: 1rem;
}

@media (max-width: 640px) {
  .display-toggles {
    gap: 1rem;
    font-size: 0.75rem;
  }
}

/* 非表示ルール（アドバンス表示 OFF 時に発動） */
/* .is-extra = nocolor フラグの惑星 (Chiron, Ceres, 将来追加するもの) */
body.hide-extras .act-list li.is-extra { display: none; }
body.hide-variables .var { display: none; }
body.hide-retrograde .act-list .retro { display: none; }

/* ===========================================
   円形チャート（ホロスコープ）
   =========================================== */
#chart-wheel {
  width: 100%;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

#chart-wheel svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(26, 43, 76, 0.08));
}

#chart-wheel-section .exp-body {
  padding: 0 1rem 1.5rem;
}

/* ハウスシステム切替トグル (Placidus / Whole Sign) */
.house-system-toggle {
  display: inline-flex;
  border: 1px solid rgba(196, 162, 101, 0.5);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 1rem;
  background: #fff;
}

.house-system-toggle button {
  padding: 0.45rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #1A2B4C;
  font-family: inherit;
  transition: all 0.2s ease;
  font-weight: 500;
}

.house-system-toggle button:hover {
  background: rgba(196, 162, 101, 0.15);
}

.house-system-toggle button.active {
  background: #C4A265;
  color: #fff;
}

/* ソーラーリターン 年切替トグル */
.solar-return-toggle {
  display: flex;
  justify-content: center;
  border: 1px solid rgba(196, 162, 101, 0.5);
  border-radius: 6px;
  overflow: hidden;
  margin: 0.5rem auto 0.25rem;
  background: #fff;
  max-width: 18rem;
}

.solar-return-toggle button {
  flex: 1;
  padding: 0.45rem 0.85rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  color: #1A2B4C;
  font-family: inherit;
  transition: all 0.2s ease;
  font-weight: 500;
  border-right: 1px solid rgba(196, 162, 101, 0.25);
}

.solar-return-toggle button:last-child { border-right: none; }

.solar-return-toggle button:hover {
  background: rgba(196, 162, 101, 0.15);
}

.solar-return-toggle button.active {
  background: #1A2B4C;
  color: #fff;
}

/* 任意年入力欄 */
.solar-return-custom-year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem auto 0;
  max-width: 22rem;
  font-size: 0.78rem;
  color: #1A2B4C;
}

.solar-return-custom-year label {
  white-space: nowrap;
}

.solar-return-custom-year input[type="number"] {
  width: 5.5rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(196, 162, 101, 0.5);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  text-align: center;
  background: #fff;
  color: #1A2B4C;
  -moz-appearance: textfield;
}

.solar-return-custom-year input[type="number"]::-webkit-outer-spin-button,
.solar-return-custom-year input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.solar-return-custom-year input[type="number"]:focus {
  outline: none;
  border-color: #C4A265;
  box-shadow: 0 0 0 2px rgba(196, 162, 101, 0.2);
}

.solar-return-custom-year button {
  padding: 0.35rem 0.9rem;
  background: #1A2B4C;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.2s ease;
}

.solar-return-custom-year button:hover {
  background: #243a66;
}

.sr-custom-year-hint {
  text-align: center;
  font-size: 0.72rem;
  color: #1A2B4C99;
  min-height: 1em;
  margin: 0.2rem 0 0;
}

.sr-custom-year-hint.is-error {
  color: #B73D3D;
}

/* ===========================================
   主要なリターン 種別ボタン
   =========================================== */
.major-returns-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  max-width: 36rem;
  margin: 0.5rem auto 0.25rem;
}

@media (min-width: 640px) {
  .major-returns-toggle {
    grid-template-columns: repeat(4, 1fr);
  }
}

.major-returns-toggle button {
  padding: 0.55rem 0.5rem;
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.5);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.76rem;
  color: #1A2B4C;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.major-returns-toggle button:hover {
  background: rgba(196, 162, 101, 0.15);
}

.major-returns-toggle button.active {
  background: #1A2B4C;
  color: #fff;
  border-color: #1A2B4C;
}

/* ===========================================
   ソーラーリターン コンポジットボディグラフ
   =========================================== */
.sr-chart-layout {
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  gap: 0.5rem;
  align-items: start;
  max-width: 640px;
  margin: 0.5rem auto 0;
}

@media (min-width: 640px) {
  .sr-chart-layout { gap: 0.75rem; }
}

.sr-col-natal,
.sr-col-sr {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.sr-col-bodygraph {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.sr-col-bodygraph #sr-bodygraph,
.sr-col-bodygraph #mr-bodygraph {
  width: 100%;
  max-width: 360px;
}

.sr-col-bodygraph #sr-bodygraph svg,
.sr-col-bodygraph #mr-bodygraph svg {
  width: 100%;
  height: auto;
  display: block;
}

.sr-col-label {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(26, 43, 76, 0.7);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-family: 'Noto Serif JP', serif;
}

.sr-act-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.78rem;
  line-height: 1.6;
  width: 100%;
}

/* 1惑星=1行: [Design 値（赤・右寄せ）][惑星マーク（中央）][Personality 値（黒・左寄せ）] */
.sr-act-list .sr-planet-row {
  display: grid;
  grid-template-columns: 1fr 1.6em 1fr;
  align-items: center;
  gap: 0.3em;
  padding: 0.12rem 0;
}

.sr-act-list .sr-d {
  color: #B73D3D;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sr-act-list .sr-p {
  color: #000000;
  text-align: left;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sr-act-list .sr-sym {
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  color: #1A2B4C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: rgba(196, 162, 101, 0.15);
}

/* 列上部の色ドット（出生=黄、SR=青） */
.sr-col-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
}
.sr-col-dot-natal { background: #E8B400; }
.sr-col-dot-sr    { background: #1E5FAF; }

/* SR時刻 出生地TZ・現在地TZ 併記の行間調整 */
#solar-return-meta { line-height: 1.65; }
#solar-return-meta .sr-tz-line {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* SR ボディグラフ：センター定義時のゴールド塗り（sr- ネームスペース） */
#sr-bodygraph #sr-Head.center-defined > path,
#sr-bodygraph #sr-Ajna.center-defined > path,
#sr-bodygraph #sr-Throat.center-defined > path,
#sr-bodygraph #sr-G.center-defined > path,
#sr-bodygraph #sr-Ego.center-defined > path,
#sr-bodygraph #sr-Spleen.center-defined > path,
#sr-bodygraph #sr-SolarPlexus.center-defined > path,
#sr-bodygraph #sr-Sacral.center-defined > path,
#sr-bodygraph #sr-Root.center-defined > path {
  fill: #C4A265 !important;
}

/* 主要なリターン ボディグラフ：センター定義時のゴールド塗り（mr- ネームスペース） */
#mr-bodygraph #mr-Head.center-defined > path,
#mr-bodygraph #mr-Ajna.center-defined > path,
#mr-bodygraph #mr-Throat.center-defined > path,
#mr-bodygraph #mr-G.center-defined > path,
#mr-bodygraph #mr-Ego.center-defined > path,
#mr-bodygraph #mr-Spleen.center-defined > path,
#mr-bodygraph #mr-SolarPlexus.center-defined > path,
#mr-bodygraph #mr-Sacral.center-defined > path,
#mr-bodygraph #mr-Root.center-defined > path {
  fill: #C4A265 !important;
}

@media (max-width: 480px) {
  .sr-chart-layout {
    grid-template-columns: 0.85fr 2fr 0.85fr;
    gap: 0.25rem;
  }
  .sr-act-list { font-size: 0.7rem; }
  .sr-act-list .symbol { font-size: 0.8rem; }
}

/* ホロスコープのマイナー天体表示トグル */
.wheel-extras-toggle {
  text-align: center;
  margin: 0 auto 1rem;
  font-size: 0.78rem;
  color: rgba(26, 43, 76, 0.75);
}
.wheel-extras-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}
.wheel-extras-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #C4A265;
}

#chart-wheel-section .exp-body {
  text-align: center;
}
#chart-wheel-section .exp-body p {
  text-align: left;
}

@media (max-width: 640px) {
  #chart-wheel-section .exp-body { padding: 0 0.5rem 1rem; }
}

/* ===========================================
   ヘッダー（お名前表示）
   =========================================== */
.hd-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.125rem;
  color: #1A2B4C;
  opacity: 0.7;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .hd-name { font-size: 1rem; }
}

/* ===========================================
   3カラムレイアウト
   =========================================== */

.chart-layout {
  display: grid !important;
  grid-template-columns: minmax(3.4rem, 1fr) auto minmax(3.4rem, 1fr) !important;
  gap: 1.5rem;
  align-items: stretch;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .chart-layout { gap: 2.5rem; }
}

.chart-col-design,
.chart-col-personality {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chart-col-design {
  text-align: right;
}

.chart-col-graph {
  display: flex;
  justify-content: center;
  position: relative;
  /* グリッド項目の最小幅を 0 に。これが無いと auto トラックが SVG の
     既定サイズに引きずられ、狭いコンテナ（育児チャートの詳細欄など）で
     ボディグラフが左右の数値カラムにはみ出す。 */
  min-width: 0;
}

/* ===========================================
   PHS バリアブル（4つの矢印 + 形状）
   =========================================== */
.var {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 5;
  font-size: 0.72rem;
}

.var[data-side="design"] { color: #B73D3D; }
.var[data-side="personality"] { color: #1A2B4C; }

/* 上段: ヘッド付近 */
.var-tl, .var-tr { top: 1%; }
/* 下段: アジュナ付近（縦配置になった分、下げる） */
.var-bl, .var-br { top: 17%; }

/* 左側 (Design) */
.var-tl, .var-bl { left: 0; }
/* 右側 (Personality) */
.var-tr, .var-br { right: 0; }

.var-arrow {
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.var-direction { font-size: 1rem; }

.var-shapes {
  display: flex;
  gap: 3px;
}

.var-shape {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.7rem;
  position: relative;
  flex-shrink: 0;
}

.var-shape > span {
  position: relative;
  z-index: 2;
  line-height: 1;
}

.var-color { background: #E08130; border-radius: 50%; }
.var-tone {
  background: #4CAF50;
  clip-path: polygon(50% 8%, 100% 100%, 0% 100%);
  padding-top: 4px;
}
.var-base {
  background: #1E5BA8;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* モバイルでは縦コンパクトに */
@media (max-width: 640px) {
  .var { font-size: 0.6rem; gap: 3px; }
  .var-arrow { font-size: 0.7rem; gap: 2px; }
  .var-direction { font-size: 0.85rem; }
  .var-shape { width: 18px; height: 18px; font-size: 0.6rem; }
  .var-shapes { gap: 2px; }
}

.act-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  list-style: none;
  padding: 0;
  margin: 0;
}

.act-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  justify-content: center;
}

.act-list .symbol {
  font-size: 1rem;
  opacity: 0.7;
  width: 1.25rem;
  text-align: center;
}

.act-list .gate {
  font-weight: 500;
}

.act-list .retro {
  font-size: 0.8em;
  margin-left: 2px;
  opacity: 0.65;
  font-weight: 400;
}

.col-label {
  font-size: 1.5rem;
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-weight: 500;
  text-align: center;
}

.col-label-design { color: #B73D3D; }
.col-label-personality { color: #1A2B4C; }

/* Personality 側の値を「数字 → シンボル」のミラー順に */
.chart-col-personality .act-list li {
  flex-direction: row-reverse;
}

/* ===========================================
   ボディグラフ SVG（hdkit製）
   =========================================== */

#bodygraph {
  width: 100%;
  max-width: 420px;
  min-width: 0;   /* フレックス項目のはみ出し防止（.chart-col-graph と同趣旨） */
  margin: 0 auto;
}

#bodygraph svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(26, 43, 76, 0.10));
}

/* --- センター（定義済みはゴールド塗り） --- */
#bodygraph #Head.center-defined > path,
#bodygraph #Ajna.center-defined > path,
#bodygraph #Throat.center-defined > path,
#bodygraph #G.center-defined > path,
#bodygraph #Ego.center-defined > path,
#bodygraph #Spleen.center-defined > path,
#bodygraph #SolarPlexus.center-defined > path,
#bodygraph #Sacral.center-defined > path,
#bodygraph #Root.center-defined > path {
  fill: #C4A265 !important;
}

/* --- ゲート（チャンネル半分）の活性化色 --- */
#bodygraph .gate-personality {
  fill: #1A2B4C !important;
  stroke: #1A2B4C !important;
}

#bodygraph .gate-design {
  fill: #B73D3D !important;
  stroke: #B73D3D !important;
}

#bodygraph .gate-both {
  fill: url(#bothPattern) !important;
  stroke: #1A2B4C !important;
}

/* --- ゲート背景円: デフォルト（未活性）--- */
/* !important をつけない → JS の setAttribute と inline style より弱い */
#bodygraph [id^="GateTextBg"] circle,
#bodygraph [id^="GateTextBg"] ellipse,
#bodygraph [id^="GateTextBg"] path {
  fill: #ffffff;
  stroke: #1A2B4C;
  stroke-width: 1.5;
}

/* --- 活性化背景円のオーバーライド --- */
#bodygraph .gatebg-personality circle,
#bodygraph .gatebg-personality ellipse,
#bodygraph .gatebg-personality path {
  fill: #1A2B4C !important;
  stroke: #1A2B4C !important;
  stroke-width: 1.5 !important;
}

#bodygraph .gatebg-design circle,
#bodygraph .gatebg-design ellipse,
#bodygraph .gatebg-design path {
  fill: #B73D3D !important;
  stroke: #B73D3D !important;
  stroke-width: 1.5 !important;
}

#bodygraph .gatebg-both circle,
#bodygraph .gatebg-both ellipse,
#bodygraph .gatebg-both path {
  fill: url(#bothPattern) !important;
  stroke: #1A2B4C !important;
  stroke-width: 1.5 !important;
}

/* ===========================================
   レスポンシブ対応
   =========================================== */

@media (max-width: 640px) {
  /* 3カラム維持。両サイドが残り空間を均等分配し、中央のグラフを完全中央配置 */
  .chart-layout {
    grid-template-columns: minmax(3.4rem, 1fr) auto minmax(3.4rem, 1fr) !important;
    gap: 0.5rem;
  }
  /* 文字を小さくして詰める */
  .act-list {
    font-size: 0.7rem;
    gap: 0.25rem;
    justify-content: space-between;
  }
  .act-list li {
    gap: 0.25rem;
  }
  .act-list .symbol {
    font-size: 0.8rem;
    width: 1rem;
  }
  .col-label {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  /* グラフはコンテナいっぱいに */
  #bodygraph { max-width: 100%; }
}

@media (max-width: 420px) {
  /* さらに狭い画面: もっと詰める */
  .chart-layout {
    grid-template-columns: minmax(3.4rem, 1fr) auto minmax(3.4rem, 1fr) !important;
    gap: 0.35rem;
  }
  .act-list {
    font-size: 0.625rem;
  }
  .act-list .symbol {
    font-size: 0.7rem;
    width: 0.85rem;
  }
}

/* ===========================================
   説明セクション（アコーディオン）
   =========================================== */

.explanation-section {
  width: 100%;
}

.explanation-card {
  border: 1px solid rgba(196, 162, 101, 0.25);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.explanation-card[open] {
  border-color: rgba(196, 162, 101, 0.5);
  box-shadow: 0 4px 12px rgba(26, 43, 76, 0.06);
}

.explanation-card summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.explanation-card summary::-webkit-details-marker {
  display: none;
}

.exp-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #C4A265;
  min-width: 9em;
  font-weight: 500;
}

.exp-value {
  flex: 1;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.125rem;
  color: #1A2B4C;
  font-weight: 500;
}

.exp-toggle {
  color: #C4A265;
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.explanation-card[open] .exp-toggle {
  transform: rotate(45deg);
}

.exp-body {
  padding: 0 1.25rem 1.25rem;
  color: #1A2B4C;
  opacity: 0.85;
  line-height: 1.8;
  font-size: 0.95rem;
  margin: 0;
}

/* ===========================================
   3カテゴリCTAカード
   =========================================== */

.cta-section {
  width: 100%;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cta-card {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.25);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: #1A2B4C;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.cta-card:hover {
  border-color: #C4A265;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(26, 43, 76, 0.08);
}

.cta-card-featured {
  background: linear-gradient(180deg, #1A2B4C 0%, #243a66 100%);
  color: #fff;
  border-color: #1A2B4C;
}

.cta-card-featured:hover {
  border-color: #C4A265;
  box-shadow: 0 12px 24px rgba(26, 43, 76, 0.18);
}

.cta-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cta-card h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.25rem;
  margin: 0;
}

.cta-card p {
  font-size: 0.875rem;
  opacity: 0.75;
  line-height: 1.7;
  margin: 0;
}

.cta-card-featured p {
  opacity: 0.85;
}

.cta-arrow {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.875rem;
  color: #C4A265;
  font-weight: 500;
}

.cta-card-featured .cta-arrow {
  color: #C4A265;
}

@media (max-width: 768px) {
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .exp-label {
    min-width: auto;
  }
  .explanation-card summary {
    flex-wrap: wrap;
  }
}
/* ===========================================
   ブリッジ文（説明セクション → NEXT STEPS）
   =========================================== */

.bridge-message {
  text-align: center;
  margin: 2.5rem auto 1.5rem;
  max-width: 640px;
  padding: 0 1.5rem;
}

.bridge-message p {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  line-height: 2;
  color: #1A2B4C;
  opacity: 0.85;
  margin: 0;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .bridge-message {
    margin: 2rem auto 1rem;
    padding: 0 1rem;
  }
  .bridge-message p {
    font-size: 0.9rem;
    line-height: 1.9;
  }
}

/* ============================
   言語切替ボタン
   ============================ */
.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.lang-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: none;
  color: #1A2B4C;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lang-btn:hover { background: rgba(196, 162, 101, 0.15); }
.lang-btn.active { background: #C4A265; color: #fff; }

/* ===========================================
   用途選択カード（一般 / 育児 / ビジネス）
   =========================================== */
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.purpose-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border: 1.5px solid rgba(196, 162, 101, 0.4);
  border-radius: 0.5rem;
  background: rgba(245, 242, 237, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.purpose-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.purpose-card:hover { background: rgba(196, 162, 101, 0.1); }

.purpose-card:has(input:checked) {
  border-color: #1A2B4C;
  background: #1A2B4C;
  color: #fff;
}

.purpose-card .purpose-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.purpose-card .purpose-sub {
  font-size: 0.7rem;
  opacity: 0.7;
}

.purpose-disabled {
  cursor: not-allowed;
  opacity: 0.4;
  background: rgba(245, 242, 237, 0.3);
}

.purpose-disabled:hover { background: rgba(245, 242, 237, 0.3); }

/* ===========================================
   性別カード（育児モード）
   =========================================== */
.gender-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border: 1.5px solid rgba(196, 162, 101, 0.4);
  border-radius: 0.5rem;
  background: rgba(245, 242, 237, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  user-select: none;
}

.gender-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-card:hover { background: rgba(196, 162, 101, 0.1); }

.gender-card:has(input:checked) {
  border-color: #1A2B4C;
  background: #1A2B4C;
  color: #fff;
}

/* ===========================================
   親の出生情報セクション
   =========================================== */
.parent-section {
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  background: rgba(196, 162, 101, 0.04);
}

.parent-legend {
  padding: 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1A2B4C;
  font-family: 'Noto Serif JP', serif;
}

/* ===========================================
   CDA 結果ページ：親御さまの概要カード
   =========================================== */
.cda-section { max-width: 56rem; margin-left: auto; margin-right: auto; }

.parent-summary-card {
  max-width: 28rem;
  margin: 0 auto;
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(26, 43, 76, 0.06);
}

.parent-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(196, 162, 101, 0.18);
  font-size: 0.9rem;
}

.parent-summary-row:last-child { border-bottom: none; }

.parent-summary-label {
  color: #1A2B4C;
  font-weight: 500;
  font-size: 0.82rem;
}

.parent-summary-value {
  color: #1A2B4C;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
}

/* ============================================================
   CDA 親子チャート — 親への手紙レイアウト v2
   ============================================================ */

/* 全体のページ感をやわらかく */
body.cda-page,
#cda-content {
  background: #FAF7F2 !important;
}
#cda-content {
  color: #2C3E50 !important;
  line-height: 1.85 !important;
  font-family: 'Noto Sans JP', sans-serif !important;
}

/* ─── ヒーロー：親への手紙 ─── */
.cda2-hero {
  position: relative !important;
  background: #fff !important;
  border-radius: 20px !important;
  padding: 3rem 2rem !important;
  margin: 0 0 4rem !important;
  box-shadow: 0 8px 32px rgba(196, 162, 101, 0.18) !important;
  border-top: 5px solid #C4A265 !important;
  text-align: center !important;
  overflow: hidden !important;
}
.cda2-hero::before {
  content: '✉';
  position: absolute;
  top: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #C4A265;
  color: #fff;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 14px rgba(196, 162, 101, 0.4);
}
.cda2-hero-from {
  font-size: 1rem !important;
  color: #C4A265 !important;
  font-family: 'Noto Serif JP', serif !important;
  font-weight: 600 !important;
  margin: 1rem 0 1.5rem !important;
  letter-spacing: 0.05em !important;
}
.cda2-hero-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  line-height: 1.55 !important;
  margin: 0 0 1.75rem !important;
}
.cda2-hero-body {
  font-size: 0.98rem !important;
  line-height: 2.1 !important;
  color: #1A2B4C !important;
  max-width: 32em !important;
  margin: 0 auto !important;
}
.cda2-hero-body strong {
  color: #C4A265 !important;
  font-weight: 700 !important;
  background: linear-gradient(180deg, transparent 60%, #FFF1D1 60%) !important;
  padding: 0 0.2em !important;
}

/* ─── 各セクション共通 ─── */
.cda2-section {
  margin: 4.5rem 0 !important;
  position: relative !important;
}
/* セクション間のセパレータ（装飾） */
.cda2-section + .cda2-section::before {
  content: '◆ ◆ ◆';
  display: block;
  text-align: center;
  color: #C4A26577;
  letter-spacing: 1rem;
  font-size: 0.7rem;
  margin: -2rem 0 3rem;
  padding-right: 1rem; /* spacing for last ◆ */
}

/* セクション番号 (golden circle) + 見出しを横並びに */
.cda2-num {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 3rem !important;
  height: 3rem !important;
  background: linear-gradient(135deg, #C4A265 0%, #B59055 100%) !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif !important;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  margin-bottom: 0.85rem !important;
  box-shadow: 0 4px 12px rgba(196, 162, 101, 0.35) !important;
}
.cda2-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  margin: 0 0 0.75rem !important;
  line-height: 1.5 !important;
}
.cda2-sub {
  font-size: 0.93rem !important;
  color: #2C3E50a8 !important;
  line-height: 1.95 !important;
  margin-bottom: 1.75rem !important;
}
.cda2-h3 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  color: #C4A265 !important;
  margin: 1.75rem 0 0.7rem !important;
  padding-bottom: 0.45rem !important;
  border-bottom: 2px solid #C4A26533 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}
.cda2-h3::before {
  content: '◆';
  color: #C4A26588;
  font-size: 0.8em;
}

/* ─── 大カード（PART 1, PART 3 など） ─── */
.cda2-card {
  background: #fff !important;
  border-radius: 14px !important;
  padding: 1.75rem 1.6rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid #C4A26522 !important;
}
.cda2-card-parent {
  background: linear-gradient(180deg, #FFFAF0 0%, #fff 100%) !important;
  border-left: 5px solid #C4A265 !important;
}

.cda2-lead {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  line-height: 1.65 !important;
  margin: 0 0 0.4rem !important;
}
.cda2-ratio {
  display: inline-block !important;
  font-size: 0.78rem !important;
  color: #C4A265 !important;
  background: #FFF1D1 !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 999px !important;
  margin: 0 0 1.25rem !important;
}

.cda2-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cda2-list li {
  position: relative !important;
  padding: 0.55rem 0 0.55rem 1.7rem !important;
  font-size: 0.95rem !important;
  line-height: 1.85 !important;
  color: #2C3E50 !important;
  border-bottom: 1px dashed #C4A26533 !important;
}
.cda2-list li:last-child {
  border-bottom: none !important;
}
.cda2-list li::before {
  content: '●' !important;
  position: absolute !important;
  left: 0.4rem !important;
  top: 0.7rem !important;
  color: #C4A265 !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
}
.cda2-list-good li::before {
  content: '✓' !important;
  color: #3FA868 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  top: 0.5rem !important;
}

/* ─── 響く／響かない（2カラム） ─── */
.cda2-split {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.2rem !important;
  margin-top: 1.75rem !important;
}
@media (min-width: 640px) {
  .cda2-split {
    grid-template-columns: 1fr 1fr !important;
  }
}
.cda2-split-col {
  border-radius: 12px !important;
  padding: 1.2rem 1.25rem !important;
}
.cda2-good {
  background: #F0FAF3 !important;
  border-left: 4px solid #3FA868 !important;
}
.cda2-bad {
  background: #FDF3F0 !important;
  border-left: 4px solid #C56C5C !important;
}
.cda2-split-col h4 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.7rem !important;
  font-family: 'Noto Serif JP', serif !important;
  padding-bottom: 0.4rem !important;
  border-bottom: 1px solid currentColor !important;
}
.cda2-good h4 {
  color: #3FA868 !important;
}
.cda2-bad h4 {
  color: #C56C5C !important;
}
.cda2-split-col ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cda2-split-col li {
  font-size: 0.9rem !important;
  line-height: 1.75 !important;
  padding: 0.4rem 0 !important;
  color: #2C3E50 !important;
  border-bottom: 1px dashed currentColor !important;
}
.cda2-split-col li:last-child {
  border-bottom: none !important;
}
.cda2-good li {
  border-color: #3FA86844 !important;
}
.cda2-bad li {
  border-color: #C56C5C44 !important;
}

/* ─── シナリオカード（夜・癇癪・聞かない） ─── */
.cda2-scene-card {
  background: #fff !important;
  border-radius: 14px !important;
  padding: 1.6rem 1.5rem !important;
  margin-bottom: 1.25rem !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid #C4A26533 !important;
  border-top: 4px solid #C4A265 !important;
}
.cda2-scene-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  margin: 0 0 0.65rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}
.cda2-scene-h::first-letter {
  font-size: 1.4em !important;
}
.cda2-scene-intro {
  font-size: 0.88rem !important;
  color: #C4A265 !important;
  font-weight: 600 !important;
  margin: 0 0 0.85rem !important;
  padding-left: 0.6rem !important;
  border-left: 3px solid #C4A26566 !important;
}
.cda2-numlist {
  list-style: none !important;
  counter-reset: scene-step !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cda2-numlist li {
  counter-increment: scene-step !important;
  position: relative !important;
  padding: 0.75rem 0 0.75rem 2.6rem !important;
  font-size: 0.95rem !important;
  line-height: 1.85 !important;
  color: #2C3E50 !important;
  border-bottom: 1px dashed #C4A26533 !important;
}
.cda2-numlist li:last-child {
  border-bottom: none !important;
}
.cda2-numlist li::before {
  content: counter(scene-step) !important;
  position: absolute !important;
  left: 0 !important;
  top: 0.85rem !important;
  width: 1.9rem !important;
  height: 1.9rem !important;
  background: linear-gradient(135deg, #C4A265 0%, #B59055 100%) !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-family: 'Noto Serif JP', serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: 0 2px 6px rgba(196, 162, 101, 0.3) !important;
}

/* ─── 親子のすれ違いカード ─── */
.cda2-pair-card {
  background: linear-gradient(180deg, #FFF8EC 0%, #fff 100%) !important;
  border-radius: 14px !important;
  padding: 1.75rem 1.6rem !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid #C4A26544 !important;
}
.cda2-pair-title {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  text-align: center !important;
  padding-bottom: 1rem !important;
  margin-bottom: 1.25rem !important;
  border-bottom: 2px solid #C4A26544 !important;
}
.cda2-pair-block {
  margin-top: 1.4rem !important;
  padding: 1.1rem 1.2rem !important;
  border-radius: 10px !important;
}
.cda2-pair-block:nth-child(2) {
  background: #FDF3F0 !important;
}
.cda2-pair-block:nth-child(3) {
  background: #F0FAF3 !important;
}
.cda2-pair-block p {
  font-size: 0.96rem !important;
  line-height: 1.9 !important;
  color: #2C3E50 !important;
  margin: 0 !important;
}
.cda2-pair-label {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.5rem !important;
}
.cda2-pair-gap {
  color: #C56C5C !important;
}
.cda2-pair-fix {
  color: #3FA868 !important;
}

/* 柔らかい注釈 */
.cda2-soft-note {
  background: linear-gradient(135deg, #F5F2ED 0%, #FFF8EC 100%) !important;
  border-left: 4px solid #C4A265 !important;
  padding: 1.1rem 1.3rem !important;
  margin-top: 1.75rem !important;
  font-size: 0.9rem !important;
  line-height: 1.95 !important;
  color: #2C3E50 !important;
  border-radius: 6px !important;
  font-style: normal !important;
}

.cda-soft-box {
  background: #F5F2ED !important;
  border-radius: 10px !important;
  padding: 1.3rem 1.4rem !important;
  font-size: 0.92rem !important;
  line-height: 1.9 !important;
  color: #2C3E50 !important;
}

/* ─── 5. 自然に伝わるもの ─── */
.cda2-transmit-card {
  background: #fff !important;
  border-radius: 12px !important;
  padding: 1.4rem 1.4rem !important;
  margin-bottom: 1rem !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important;
  border-left: 4px solid #C4A265 !important;
}
.cda2-transmit-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  margin: 0 0 0.85rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #C4A26533 !important;
}
.cda2-transmit-pos,
.cda2-transmit-neg {
  font-size: 0.92rem !important;
  line-height: 1.8 !important;
  margin: 0.7rem 0 !important;
  color: #2C3E50 !important;
}
.cda-tag-pos,
.cda-tag-neg {
  display: inline-block !important;
  font-size: 0.7rem !important;
  padding: 0.18rem 0.6rem !important;
  border-radius: 999px !important;
  margin-right: 0.5rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  vertical-align: middle !important;
}
.cda-tag-pos {
  background: #3FA868 !important;
  color: #fff !important;
}
.cda-tag-neg {
  background: #C56C5C !important;
  color: #fff !important;
}
.cda2-transmit-tip {
  margin: 0.85rem 0 0 !important;
  padding: 0.75rem 1rem !important;
  background: #FFF8EC !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  line-height: 1.8 !important;
  color: #1A2B4C !important;
  border-left: 3px solid #C4A26588 !important;
}

/* ─── 6. お悩み別アコーディオン ─── */
.cda-worry-card {
  background: #fff !important;
  border-radius: 12px !important;
  margin-bottom: 0.65rem !important;
  overflow: hidden !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #C4A26522 !important;
  transition: all 0.2s !important;
}
.cda-worry-card[open] {
  box-shadow: 0 6px 18px rgba(196, 162, 101, 0.15) !important;
  border-color: #C4A26588 !important;
}
.cda-worry-card summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 1.1rem 1.3rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.8rem !important;
  font-size: 1rem !important;
  color: #1A2B4C !important;
  user-select: none !important;
}
.cda-worry-card summary::-webkit-details-marker {
  display: none !important;
}
.cda-worry-emoji {
  font-size: 1.4rem !important;
}
.cda-worry-label {
  flex: 1 !important;
  font-weight: 600 !important;
}
.cda-worry-toggle {
  color: #C4A265 !important;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  transition: transform 0.25s !important;
}
.cda-worry-card[open] .cda-worry-toggle {
  transform: rotate(45deg) !important;
}
.cda-worry-body {
  padding: 0.5rem 1.3rem 1.3rem !important;
  font-size: 0.93rem !important;
  line-height: 1.9 !important;
  color: #2C3E50 !important;
  border-top: 1px solid #C4A26522 !important;
}
.cda-worry-body p {
  margin: 0.6rem 0 0 !important;
}

/* ─── 締めくくり ─── */
.cda2-closing {
  background: linear-gradient(135deg, #C4A265 0%, #B59055 100%) !important;
  border-radius: 20px !important;
  padding: 3rem 2rem !important;
  margin: 4rem 0 !important;
  text-align: center !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(196, 162, 101, 0.35) !important;
}
.cda2-closing-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  line-height: 1.5 !important;
  margin: 0 0 1.5rem !important;
}
.cda2-closing-body {
  font-size: 1rem !important;
  line-height: 2.1 !important;
  color: #ffffffe5 !important;
}
.cda2-closing-body strong {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2) !important;
  padding: 0.05em 0.4em !important;
  border-radius: 4px !important;
}

/* ─── 詳しいチャート（折りたたみ） ─── */
.cda2-tech {
  background: #fff !important;
  border-radius: 12px !important;
  margin: 2rem 0 3rem !important;
  border: 1px solid #C4A26533 !important;
  overflow: hidden !important;
}
.cda2-tech summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 1.1rem 1.3rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  font-size: 0.95rem !important;
  color: #1A2B4C !important;
  background: #FAF7F2 !important;
}
.cda2-tech summary::-webkit-details-marker {
  display: none !important;
}
.cda2-tech-label {
  font-weight: 700 !important;
}
.cda2-tech-sub {
  flex: 1 !important;
  font-size: 0.78rem !important;
  color: #2C3E5099 !important;
}
.cda2-tech-toggle {
  color: #C4A265 !important;
  font-size: 1.4rem !important;
  transition: transform 0.25s !important;
}
.cda2-tech[open] .cda2-tech-toggle {
  transform: rotate(45deg) !important;
}
.cda2-tech-body {
  padding: 0 1.3rem 1.5rem !important;
  border-top: 1px solid #C4A26533 !important;
}
.cda2-tech-intro {
  font-size: 0.88rem !important;
  color: #2C3E50a8 !important;
  line-height: 1.8 !important;
  margin: 1rem 0 !important;
  padding: 0.85rem 1rem !important;
  background: #F5F2ED !important;
  border-radius: 6px !important;
}
.cda2-tech-h4 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #C4A265 !important;
  margin: 1.2rem 0 0.5rem !important;
}
.cda2-tech-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.88rem !important;
}
.cda2-tech-table th {
  text-align: left !important;
  padding: 0.5rem 0.7rem !important;
  background: #FFF8EC !important;
  color: #C4A265 !important;
  width: 9em !important;
  font-weight: 600 !important;
  border-bottom: 1px solid #C4A26533 !important;
}
.cda2-tech-table td {
  padding: 0.5rem 0.7rem !important;
  color: #2C3E50 !important;
  border-bottom: 1px solid #C4A26533 !important;
}
/* 専門用語セル：日常語（大）＋ 元の用語（小・参照用） */
.cda2-tech-friendly {
  display: block !important;
  line-height: 1.65 !important;
}
.cda2-tech-term {
  display: block !important;
  margin-top: 0.25rem !important;
  font-size: 0.72rem !important;
  color: #A99B82 !important;
  letter-spacing: 0.02em !important;
}

/* ─── CTA ─── */
.cda2-cta {
  background: #fff !important;
  border-radius: 16px !important;
  padding: 2.5rem 1.75rem !important;
  box-shadow: 0 6px 24px rgba(196, 162, 101, 0.12) !important;
}
.cda2-cta-h {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #1A2B4C !important;
  text-align: center !important;
  margin: 0 0 0.6rem !important;
}
.cda2-cta-sub {
  font-size: 0.92rem !important;
  color: #2C3E50a8 !important;
  line-height: 1.95 !important;
  text-align: center !important;
  margin: 0 0 1.75rem !important;
}
.cda2-cta-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.1rem !important;
}
@media (min-width: 640px) {
  .cda2-cta-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
.cda2-cta-card {
  display: block !important;
  text-decoration: none !important;
  background: #FFF8EC !important;
  border-radius: 14px !important;
  padding: 1.5rem 1.4rem !important;
  color: #1A2B4C !important;
  transition: all 0.25s !important;
  border: 1px solid #C4A26544 !important;
}
.cda2-cta-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 22px rgba(196, 162, 101, 0.25) !important;
}
.cda2-cta-card-main {
  background: linear-gradient(135deg, #C4A265 0%, #B59055 100%) !important;
  color: #fff !important;
  border-color: #C4A265 !important;
}
.cda2-cta-card-main h3,
.cda2-cta-card-main p,
.cda2-cta-card-main .cda2-cta-arrow {
  color: #fff !important;
}
.cda2-cta-icon {
  font-size: 2.2rem !important;
  margin-bottom: 0.6rem !important;
}
.cda2-cta-card h3 {
  font-family: 'Noto Serif JP', serif !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.55rem !important;
}
.cda2-cta-card p {
  font-size: 0.88rem !important;
  line-height: 1.75 !important;
  color: #2C3E50 !important;
  margin: 0 0 1rem !important;
}
.cda2-cta-arrow {
  display: inline-block !important;
  font-size: 0.88rem !important;
  color: #C4A265 !important;
  font-weight: 700 !important;
}
.cda2-back {
  font-size: 0.9rem !important;
  color: #2C3E5099 !important;
  text-decoration: none !important;
}
.cda2-back:hover {
  color: #C4A265 !important;
}

/* ローディング */
#cda-loading {
  background: #fff;
  border-radius: 16px;
  padding: 3rem 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* ─── レスポンシブ ─── */
@media (max-width: 640px) {
  .cda2-hero {
    padding: 2.25rem 1.25rem !important;
  }
  .cda2-hero-h {
    font-size: 1.4rem !important;
  }
  .cda2-closing-h {
    font-size: 1.4rem !important;
  }
  .cda2-h {
    font-size: 1.3rem !important;
  }
  .cda2-num {
    width: 2.6rem !important;
    height: 2.6rem !important;
    font-size: 1.2rem !important;
  }
  .cda2-card,
  .cda2-scene-card,
  .cda2-pair-card {
    padding: 1.3rem 1.1rem !important;
  }
  .cda2-cta {
    padding: 1.8rem 1.25rem !important;
  }
}

/* ============================================================
   不具合・要望フォーム（feedback.php）— ハニーポット
   ============================================================ */
.fb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   認証ヘッダー（auth-toggle・全ページ共通）
   ============================================================ */
.auth-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
}
.auth-toggle-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  color: #1A2B4C;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.auth-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}
.auth-avatar-placeholder {
  background: #C4A265;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.auth-name {
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.auth-link {
  color: #1A2B4C;
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover { color: #C4A265; }
.auth-link-sub  { color: #1A2B4C77; font-size: 0.7rem; }

@media (max-width: 640px) {
  .auth-toggle { top: 0.5rem; left: 0.5rem; }
  .auth-toggle-inner { padding: 0.25rem 0.6rem; font-size: 0.7rem; gap: 0.4rem; }
  .auth-name { max-width: 5em; }
}

/* ============================================================
   保存ボタン（result.php）
   ============================================================ */
.save-chart-btn {
  display: inline-block;
  border: 1px solid #3FA868;
  color: #3FA868;
  background: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.save-chart-btn:hover:not(:disabled) {
  background: #3FA868;
  color: #fff;
}
.save-chart-btn:disabled { opacity: 0.7; cursor: default; }

/* ============================================================
   マイチャートページ（mypage.php）
   ============================================================ */
.mypage-card {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.mypage-card-head {
  border-bottom: 1px solid rgba(196,162,101,0.25);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}
.mypage-card-label {
  font-size: 0.7rem;
  color: #C4A265;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mypage-card-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1A2B4C;
  margin-top: 0.25rem;
}
.mypage-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  margin: 0;
}
.mypage-card-meta > div {
  display: grid;
  grid-template-columns: 6em 1fr;
  align-items: baseline;
}
.mypage-card-meta dt {
  color: #1A2B4C99;
  font-size: 0.78rem;
}
.mypage-card-meta dd {
  margin: 0;
  color: #1A2B4C;
}
.mypage-card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.mypage-btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mypage-btn-primary {
  background: #1A2B4C;
  color: #fff;
  border-color: #1A2B4C;
}
.mypage-btn-primary:hover { background: #243a66; }
.mypage-btn-danger {
  background: #fff;
  color: #B73D3D;
  border-color: #B73D3D;
}
.mypage-btn-danger:hover:not(:disabled) {
  background: #B73D3D;
  color: #fff;
}
.mypage-btn:disabled { opacity: 0.6; cursor: default; }

.mypage-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border: 1px dashed rgba(196, 162, 101, 0.4);
  border-radius: 10px;
}
.mypage-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.mypage-empty-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  color: #1A2B4C;
  margin-bottom: 0.6rem;
}
.mypage-empty-body {
  font-size: 0.85rem;
  color: #1A2B4Cb0;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .mypage-card-meta { grid-template-columns: 1fr; }
}

/* ============================================================
   管理ダッシュボード（admin.php）
   ============================================================ */
.admin-key-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F5F2ED;
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}
.admin-key-box code { flex: 1; color: #1A2B4C; }
.admin-key-copy-btn {
  background: #1A2B4C;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.admin-key-copy-btn:hover { background: #243a66; }

.admin-code-snippet {
  background: #1A2B4C;
  color: #fff;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
}
.admin-stat-card {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.admin-stat-label {
  font-size: 0.7rem;
  color: #1A2B4C99;
  letter-spacing: 0.03em;
}
.admin-stat-value {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: #C4A265;
  line-height: 1.1;
  margin: 0.2rem 0;
}
.admin-stat-sub {
  font-size: 0.7rem;
  color: #1A2B4C77;
}

.admin-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.admin-sort-label { color: #1A2B4C99; }
.admin-sort-btn {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 999px;
  color: #1A2B4C;
  text-decoration: none;
  background: #fff;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.admin-sort-btn:hover { background: rgba(196,162,101,0.1); }
.admin-sort-btn.is-active {
  background: #1A2B4C;
  color: #fff;
  border-color: #1A2B4C;
}

.admin-table-wrap {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: #C4A265;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.3);
  background: rgba(196, 162, 101, 0.05);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.15);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(196,162,101,0.04); }

.admin-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-avatar-placeholder {
  background: #C4A265;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.admin-name {
  font-weight: 500;
  color: #1A2B4C;
}
.admin-key {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.7rem;
  color: #1A2B4C66;
}
.admin-saved {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  line-height: 1.45;
}
.admin-saved-count {
  display: inline-block;
  background: #C4A265;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.admin-saved-name { font-weight: 500; }

/* マイチャート一覧（複数枚対応） */
.mypage-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-saved-date { color: #1A2B4C99; font-family: ui-monospace, monospace; font-size: 0.72rem; }
.admin-saved-place { color: #1A2B4C99; font-size: 0.72rem; }
.admin-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #1A2B4C66;
  font-style: italic;
}
.admin-empty-inline {
  color: #1A2B4C44;
}

/* ============================================================
   権限ベース表示制御（admin-only / tier badge）
   ============================================================ */
/* 既定では非表示。body に is-admin が付くと表示 */
.admin-only-btn { display: none !important; }
body.is-admin .admin-only-btn { display: inline-block !important; }

.admin-export-btn {
  border: 1px solid #C4A265;
  color: #C4A265;
  background: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-export-btn:hover { background: #C4A265; color: #fff; }

/* ティアバッジ */
.tier-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
}
.tier-badge.tier-free { background: #ECECEC; color: #1A2B4C99; }
.tier-badge.tier-mid  { background: #DCF1F4; color: #1E9FAF; }
.tier-badge.tier-high { background: #FFE8C8; color: #C4A265; }

.admin-flag-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #1A2B4C;
  color: #fff;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.admin-expires {
  font-size: 0.68rem;
  color: #1A2B4C99;
  margin-top: 0.2rem;
}
.admin-tier-note {
  font-size: 0.7rem;
  color: #C4A26599;
  margin-top: 0.2rem;
  max-width: 14em;
  word-break: break-word;
}
.admin-edit-link {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(196, 162, 101, 0.5);
  border-radius: 4px;
  color: #1A2B4C;
  text-decoration: none;
  font-size: 0.78rem;
  background: #fff;
  white-space: nowrap;
}
.admin-edit-link:hover { background: #C4A265; color: #fff; border-color: #C4A265; }

/* ============================================================
   ユーザー編集画面（admin.php?edit=...）
   ============================================================ */
.admin-edit-card {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 10px;
  padding: 1.5rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.admin-edit-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.2);
}
.admin-edit-head .admin-avatar {
  width: 48px; height: 48px;
}
.admin-edit-head .admin-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  font-weight: 600;
}
.admin-edit-head .admin-key {
  font-size: 0.7rem;
  word-break: break-all;
}

.admin-edit-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
}
.admin-edit-info > div {
  display: grid;
  grid-template-columns: 7em 1fr;
  align-items: center;
}
.admin-edit-info dt { color: #1A2B4C99; font-size: 0.78rem; }
.admin-edit-info dd { margin: 0; }

.admin-edit-form { display: flex; flex-direction: column; gap: 0.9rem; }
.admin-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.admin-form-row > label { font-size: 0.8rem; color: #1A2B4C; font-weight: 500; }
.admin-form-row select,
.admin-form-row input[type="text"] {
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 5px;
  padding: 0.5rem 0.7rem;
  background: #F5F2ED;
  font-size: 0.9rem;
  color: #1A2B4C;
}
.admin-form-row select:focus,
.admin-form-row input[type="text"]:focus {
  outline: none;
  border-color: #C4A265;
}
.admin-edit-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  align-items: center;
}

.admin-quick-grants {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(196, 162, 101, 0.4);
}
.admin-quick-grants > summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #C4A265;
  font-weight: 500;
  margin-bottom: 0.7rem;
}
.admin-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-quick-btn {
  background: #FFF8EC;
  border: 1px solid #C4A26566;
  color: #1A2B4C;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
}
.admin-quick-btn:hover {
  background: #C4A265;
  color: #fff;
  border-color: #C4A265;
}


/* ============================================================
   法務ページ（/legal/*.php）共通スタイル
   ============================================================ */

/* 特商法表記の項目リスト（dl形式） */
.legal-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.85rem 1.5rem;
  align-items: start;
}
.legal-dl dt {
  font-weight: 600;
  color: #1A2B4C;
  padding-top: 0.1rem;
  white-space: nowrap;
}
.legal-dl dd {
  margin: 0;
  color: #1A2B4C;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .legal-dl {
    grid-template-columns: 1fr;
    gap: 0.3rem 0;
  }
  .legal-dl dt {
    margin-top: 1rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(196, 162, 101, 0.3);
  }
  .legal-dl dt:first-child {
    margin-top: 0;
  }
  .legal-dl dd {
    margin-bottom: 0.3rem;
  }
}

/* 利用規約・プライバシー・返金ポリシー本文 */
.legal-doc {
  color: #1A2B4C;
}
.legal-doc h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.4);
  color: #1A2B4C;
}
.legal-doc h2:first-child {
  margin-top: 0;
}
.legal-doc p {
  margin: 0.6rem 0;
  line-height: 1.85;
}
.legal-doc ul,
.legal-doc ol {
  margin: 0.6rem 0 0.6rem 1.4rem;
  line-height: 1.85;
}
.legal-doc ul { list-style: disc; }
.legal-doc ol { list-style: decimal; }
.legal-doc ul li,
.legal-doc ol li {
  margin: 0.25rem 0;
}
.legal-doc strong {
  font-weight: 600;
  color: #1A2B4C;
}

/* フッター（全ページ共通） */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid rgba(196, 162, 101, 0.25);
  text-align: center;
  font-size: 0.75rem;
  color: rgba(26, 43, 76, 0.55);
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-bottom: 0.6rem;
}
.site-footer-links a {
  color: rgba(26, 43, 76, 0.7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-footer-links a:hover {
  color: #C4A265;
  border-bottom-color: #C4A265;
}
.site-footer-copy {
  color: rgba(26, 43, 76, 0.45);
}

/* ============================================================
   法務ページ：準拠法ディスクレーマー（多言語）
   ============================================================ */
.legal-disclaimer {
  background: #FFF8EC;
  border-left: 3px solid #C4A265;
  padding: 1rem 1.2rem;
  margin: 0 0 2rem;
  font-size: 0.82rem;
  line-height: 1.75;
  color: #1A2B4C;
}
.legal-disclaimer p {
  margin: 0;
}
.legal-disclaimer .lang-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #C4A265;
  margin-bottom: 0.3rem;
}
.legal-disclaimer .legal-note-tw {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(196, 162, 101, 0.4);
  font-size: 0.78rem;
  color: rgba(26, 43, 76, 0.7);
}

/* ============================================================
   シェアボタン（result.php）
   ============================================================ */
.share-section {
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(196, 162, 101, 0.15);
  border-bottom: 1px solid rgba(196, 162, 101, 0.15);
  background: rgba(255, 248, 236, 0.4);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(196, 162, 101, 0.4);
  background: #fff;
  color: #1A2B4C;
  font-size: 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.share-btn:hover {
  background: #C4A265;
  color: #fff;
  border-color: #C4A265;
}
.share-btn .share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
}
.share-btn-x .share-icon       { background: #000; color: #fff; }
.share-btn-threads .share-icon { background: #000; color: #fff; font-family: serif; }
.share-btn-line .share-icon    { background: #06C755; color: #fff; }
.share-btn-copy .share-icon    { background: #C4A265; color: #fff; }
.share-btn-copied {
  background: #C4A265 !important;
  color: #fff !important;
  border-color: #C4A265 !important;
}

/* ============================================================
   マイチャート：育児チャート（CDA）カード
   ============================================================ */
.mypage-cda-card {
  border-left: 3px solid #C4A265;
}
.mypage-cda-card .mypage-card-label {
  color: #C4A265;
}
.mypage-cda-amp {
  color: #C4A265;
  margin: 0 0.4rem;
  font-weight: 400;
}

/* ============================================================
   下部ナビゲーションバー（bottom tab bar）
   index.php / result.php / result-cda.php の3画面共通
   ============================================================ */

:root {
  --hdsl-nav-h: 56px;   /* タブバー本体の高さ（safe-area を除く） */
  --hdsl-save-h: 54px;  /* 保存CTA帯の高さ。.hdsl-save-bar の実レンダリング高以上に保つこと */
}

/* 固定バーに隠れないよう本文末尾に余白を確保（バーのあるページのみ） */
body.has-bottom-nav {
  padding-bottom: calc(var(--hdsl-nav-h) + env(safe-area-inset-bottom));
}
body.has-bottom-nav.has-save-bar {
  padding-bottom: calc(var(--hdsl-nav-h) + var(--hdsl-save-h) + env(safe-area-inset-bottom));
}

.hdsl-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  box-sizing: border-box;
  height: calc(var(--hdsl-nav-h) + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(196, 162, 101, 0.28);
  box-shadow: 0 -2px 14px rgba(26, 43, 76, 0.07);
  padding-bottom: env(safe-area-inset-bottom);
}

.hdsl-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 2px 8px;
  text-decoration: none;
  color: rgba(26, 43, 76, 0.5);
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.hdsl-nav-item:hover { color: rgba(26, 43, 76, 0.85); }

.hdsl-nav-icon {
  position: relative;
  width: 24px;
  height: 24px;
}
.hdsl-nav-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hdsl-nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* 現在地（チャート作成）＝ネイビーで点灯 */
.hdsl-nav-item.is-active { color: #1A2B4C; }

/* アクセント（サービス）＝ゴールド */
.hdsl-nav-item.hdsl-nav-accent { color: #C4A265; }
.hdsl-nav-item.hdsl-nav-accent:hover { color: #B7944D; }

/* ログイン中はアカウントアイコンに在席ドット（auth.js が body.logged-in を付与） */
body.logged-in .hdsl-nav-account .hdsl-nav-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3FA868;
  border: 1.5px solid #fff;
}

/* 結果画面のみ：保存CTA帯（タブバー直上）。
   既定は非表示。チャート生成成功で #chartContainer / #cda-content から
   .hidden が外れた時だけ、後続兄弟セレクタで表示する（JS不要）。 */
.hdsl-save-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--hdsl-nav-h) + env(safe-area-inset-bottom));
  z-index: 99;
  box-sizing: border-box;
  min-height: var(--hdsl-save-h);
  justify-content: center;
  align-items: center;
  padding: 9px 16px;
  background: rgba(245, 242, 237, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(196, 162, 101, 0.22);
}
#chartContainer:not(.hidden) ~ .hdsl-save-bar,
#cda-content:not(.hidden) ~ .hdsl-save-bar {
  display: flex;
}
.hdsl-save-bar .save-chart-btn {
  width: 100%;
  max-width: 420px;
  background: #3FA868;
  color: #fff;
  font-weight: 500;
}
.hdsl-save-bar .save-chart-btn:hover:not(:disabled) {
  background: #34925A;
  color: #fff;
}

@media (max-width: 360px) {
  .hdsl-nav-label { font-size: 0.6rem; }
}

/* ============================================================
   管理画面：ユーザーの保存チャート表示（admin.php 編集ページ）
   ============================================================ */
.admin-saved-block {
  padding: 0.9rem 0;
  border-top: 1px solid rgba(196, 162, 101, 0.2);
}
.admin-saved-block:first-of-type {
  border-top: none;
  padding-top: 0;
}
.admin-saved-block-name {
  font-weight: 600;
  color: #1A2B4C;
  margin-bottom: 0.5rem;
}

/* 編集ページ：保存チャートの 26ゲート一覧 */
.admin-gate-caption {
  font-size: 0.72rem;
  color: rgba(26, 43, 76, 0.6);
  margin: 0.9rem 0 0.2rem;
}
.admin-gate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1.25rem;
}
.admin-gate-col-head {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.3rem;
  padding-bottom: 0.18rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.3);
}
.admin-gate-col-d { color: #B73D3D; }
.admin-gate-col-p { color: #1A2B4C; }
.admin-gate-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-gate-list li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.06rem 0;
}
.admin-gate-list .sym {
  width: 1.3em;
  text-align: center;
  color: rgba(26, 43, 76, 0.5);
}
.admin-gate-list .g {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 600;
}

/* 編集ページ：ボディグラフ起動ボタン */
.admin-bodygraph-actions { margin-top: 0.9rem; }
.admin-bodygraph-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1A2B4C;
  color: #fff;
  font-size: 0.83rem;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-bodygraph-btn:hover { background: #243a66; }

/* ダッシュボード一覧：保存列の育児チャート表記 */
.admin-saved-cda {
  display: inline-block;
  margin-top: 0.15rem;
  color: #C4A265;
  font-size: 0.72rem;
  font-weight: 500;
}

/* 管理ダッシュボード：チャート生成アクティビティ */
.admin-usage-section {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
}
.admin-usage-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1.5fr) minmax(220px, 1.4fr);
  gap: 1rem 1.5rem;
  align-items: stretch;
}
.admin-usage-big {
  border-right: 1px solid rgba(196, 162, 101, 0.2);
  padding-right: 1.25rem;
}
.admin-usage-big-label {
  font-size: 0.78rem;
  color: rgba(26, 43, 76, 0.6);
  letter-spacing: 0.04em;
}
.admin-usage-big-number {
  font-family: 'Noto Serif JP', serif;
  font-size: 3rem;
  font-weight: 600;
  color: #1A2B4C;
  line-height: 1;
  margin: 0.4rem 0 0.3rem;
}
.admin-usage-big-sub {
  font-size: 0.76rem;
  color: rgba(26, 43, 76, 0.55);
}
.admin-usage-breakdown {
  border-right: 1px solid rgba(196, 162, 101, 0.2);
  padding-right: 1.25rem;
}
.admin-usage-bd-label {
  font-size: 0.72rem;
  color: rgba(26, 43, 76, 0.6);
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}
.admin-usage-bd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0;
  font-size: 0.84rem;
}
.admin-usage-bd-row strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 700;
  color: #1A2B4C;
}
.admin-usage-trends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-content: start;
}
.admin-usage-trend-label {
  font-size: 0.72rem;
  color: rgba(26, 43, 76, 0.6);
  letter-spacing: 0.04em;
}
.admin-usage-trend-number {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #1A2B4C;
  margin: 0.2rem 0 0.1rem;
}
.admin-usage-trend-sub {
  font-size: 0.72rem;
  color: rgba(26, 43, 76, 0.55);
}
@media (max-width: 900px) {
  .admin-usage-grid {
    grid-template-columns: 1fr;
  }
  .admin-usage-big,
  .admin-usage-breakdown {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(196, 162, 101, 0.2);
    padding-bottom: 1rem;
  }
}

/* 管理ダッシュボード：ユーザー継続・保存指標 */
.admin-engagement-section {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
}
.admin-eng-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.admin-eng-card {
  background: #F5F2ED;
  border: 1px solid rgba(196, 162, 101, 0.25);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.admin-eng-label {
  font-size: 0.74rem;
  color: rgba(26, 43, 76, 0.6);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.admin-eng-value {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #1A2B4C;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.admin-eng-value.admin-eng-empty {
  color: rgba(26, 43, 76, 0.3);
}
.admin-eng-sub {
  font-size: 0.7rem;
  color: rgba(26, 43, 76, 0.55);
  line-height: 1.4;
}
.admin-eng-details {
  border-top: 1px solid rgba(196, 162, 101, 0.2);
  padding-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem 1.5rem;
}
.admin-eng-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(196, 162, 101, 0.15);
  font-size: 0.84rem;
}
.admin-eng-detail-row > span {
  color: rgba(26, 43, 76, 0.7);
}
.admin-eng-detail-row strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 700;
  color: #1A2B4C;
}
.admin-eng-detail-note {
  flex-basis: 100%;
  font-size: 0.68rem;
  color: rgba(26, 43, 76, 0.5);
  margin-top: 0.2rem;
}
@media (max-width: 900px) {
  .admin-eng-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-eng-details { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .admin-eng-cards { grid-template-columns: 1fr; }
}

/* 管理ダッシュボード：アコーディオン化された折りたたみセクション */
.admin-collapsible > .admin-section-summary {
  position: relative;
  cursor: pointer;
  list-style: none;       /* Firefox 等 */
  padding: 0.15rem 2.25rem 0.3rem 0;  /* 右端に開閉インジケータ用の余白 */
  outline: none;
  user-select: none;
}
.admin-collapsible > .admin-section-summary::-webkit-details-marker { display: none; }
.admin-collapsible > .admin-section-summary::marker { content: ''; }
.admin-collapsible > .admin-section-summary::after {
  content: '▾';
  position: absolute;
  right: 0.25rem;
  top: 0.7rem;
  font-size: 1rem;
  color: rgba(196, 162, 101, 0.85);
  transition: transform 0.18s ease;
  pointer-events: none;
}
.admin-collapsible:not([open]) > .admin-section-summary::after {
  transform: rotate(-90deg);
}
.admin-collapsible > .admin-section-summary:hover {
  background: rgba(196, 162, 101, 0.04);
}
.admin-collapsible > .admin-section-summary:focus-visible {
  outline: 2px solid rgba(196, 162, 101, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}
.admin-collapsible:not([open]) {
  padding-bottom: 1rem;   /* 閉じてる時にパディングを縮めて見た目をすっきり */
}
.admin-collapsible:not([open]) > .admin-section-summary {
  padding-bottom: 0;
}
/* 開いた時、summary 直下の最初のブロックに上マージンを少し付ける */
.admin-eng-cards-mt { margin-top: 1rem; }

/* 管理ダッシュボード：有料問合せ手動カウンタ（ゲージセクション内） */
.inquiry-recorder {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(196, 162, 101, 0.06);
  border: 1px solid rgba(196, 162, 101, 0.25);
  border-radius: 8px;
}
.inquiry-recorder .gauge-group-h {
  margin-top: 0;
}
.inquiry-recorder-note {
  font-size: 0.74rem;
  color: rgba(26, 43, 76, 0.6);
  margin-bottom: 0.7rem;
  line-height: 1.5;
}
.inquiry-channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.inquiry-ch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  gap: 0.3rem;
}
.inquiry-ch-label {
  font-size: 0.78rem;
  color: #1A2B4C;
  font-weight: 500;
}
.inquiry-ch-count {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 700;
  color: #1A2B4C;
  font-size: 0.95rem;
  min-width: 1.5em;
  text-align: center;
}
.inquiry-btn {
  background: #F5F2ED;
  color: #1A2B4C;
  border: 1px solid rgba(196, 162, 101, 0.4);
  border-radius: 4px;
  width: 1.8rem;
  height: 1.6rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}
.inquiry-btn:hover:not(:disabled) {
  background: #C4A265;
  color: #fff;
  border-color: #C4A265;
}
.inquiry-btn:disabled { opacity: 0.4; cursor: wait; }
.inquiry-btn-plus { font-weight: 700; }
.inquiry-total {
  font-size: 0.88rem;
  color: #1A2B4C;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(196, 162, 101, 0.25);
}
.inquiry-total strong {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  margin: 0 0.2rem;
  color: #C4A265;
}
.inquiry-msg {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
}
@media (max-width: 700px) {
  .inquiry-channels { grid-template-columns: repeat(2, 1fr); }
}

/* 管理ダッシュボード：判断基準ゲージ */
.admin-gauge-section {
  background: #fff;
  border: 1px solid rgba(196, 162, 101, 0.3);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
}
.gauge-group { margin-top: 1rem; }
.gauge-group:first-of-type { margin-top: 0.5rem; }
.gauge-group-h {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1A2B4C;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(196, 162, 101, 0.25);
}
.gauge-list { display: flex; flex-direction: column; gap: 0.45rem; }
.gauge-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 2fr) minmax(70px, 0.7fr) minmax(110px, 0.9fr) minmax(140px, 1fr);
  gap: 0.6rem 0.85rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: #F5F2ED;
  border: 1px solid rgba(196, 162, 101, 0.18);
  border-radius: 6px;
  font-size: 0.84rem;
}
.gauge-label { color: #1A2B4C; font-weight: 500; }
.gauge-meter { width: 100%; }
.gauge-bar {
  background: rgba(26, 43, 76, 0.08);
  border-radius: 999px;
  height: 0.5rem;
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  background: #C4A265;
  border-radius: 999px;
  transition: width 0.3s;
}
.gauge-current {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 700;
  color: #1A2B4C;
  text-align: right;
}
.gauge-target {
  font-size: 0.76rem;
  color: rgba(26, 43, 76, 0.65);
}
.gauge-status-badge {
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
/* ステータスごとの色分け */
.gauge-status-pass    .gauge-status-badge { background: #DFF2E1; color: #3FA868; }
.gauge-status-pass    .gauge-fill         { background: #3FA868; }
.gauge-status-close   .gauge-status-badge { background: #FFF1C8; color: #B58A1F; }
.gauge-status-close   .gauge-fill         { background: #C4A265; }
.gauge-status-far     .gauge-status-badge { background: #ECECEC; color: rgba(26, 43, 76, 0.6); }
.gauge-status-far     .gauge-fill         { background: rgba(196, 162, 101, 0.55); }
.gauge-status-na      .gauge-status-badge { background: #F0EDE6; color: rgba(26, 43, 76, 0.5); }
.gauge-status-na      .gauge-fill         { background: rgba(26, 43, 76, 0.08); }
.gauge-status-safe    .gauge-status-badge { background: #DFF2E1; color: #3FA868; }
.gauge-status-safe    .gauge-fill         { background: #3FA868; }
.gauge-status-caution .gauge-status-badge { background: #FFF1C8; color: #B58A1F; }
.gauge-status-caution .gauge-fill         { background: #C4A265; }
.gauge-status-warn    .gauge-status-badge { background: #FFE0CC; color: #C46F1A; }
.gauge-status-warn    .gauge-fill         { background: #C46F1A; }
.gauge-status-over    .gauge-status-badge { background: #FBD7D3; color: #B73D3D; }
.gauge-status-over    .gauge-fill         { background: #B73D3D; }
.gauge-na-note {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  color: rgba(26, 43, 76, 0.5);
  padding-top: 0.15rem;
}
@media (max-width: 900px) {
  .gauge-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.7rem;
  }
  .gauge-label       { grid-column: 1 / -1; }
  .gauge-meter       { grid-column: 1 / -1; }
  .gauge-current     { text-align: left; }
  .gauge-na-note     { grid-column: 1 / -1; }
}
