/* のんちゃんHAPPYマッチング 共通デザイントークン（Kai承認、2026-10-17）
   管理画面・診断／お返事／お支払い（SPA）・LIFFマイページ・アンケート・プライバシー・特商法の全画面が読む。
   色・文字サイズ・角丸・影・フォントは、ここだけを直す。各画面のCSSに複製しない。
   ダークモード：顧客向け画面は対応。管理画面は<html data-theme="light">で固定（ダークにならない）。 */

:root {
  color-scheme: light;

  /* 色：面と文字 */
  --bg: #f9f6f4;
  --surface: #ffffff;
  --surface-sunken: #f3edf0;
  --ink: #2b2229;
  --ink-soft: #6b5f66;
  --ink-faint: #786872;

  /* 色：アクセント（ブランドの色） */
  --accent: #8b3a62;
  --accent-strong: #6e2c4d;
  --accent-soft: #f0dde6;
  --accent-soft-line: #e3c3d3;
  --on-accent: #ffffff;
  --line: #e7dfe2;

  /* 色：意味（成功・注意・危険）。-soft は淡い背景、-ink は淡い背景の上に置く文字（コントラスト4.5:1以上）。
     --good / --warn は線・点・塗りに使い、文字には使わない */
  --good: #4f7a63;
  --good-soft: #e2ede6;
  --good-ink: #3d6a50;
  --warn: #b8863e;
  --warn-soft: #f3e9d8;
  --warn-ink: #6b4a14;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;

  /* 影・フォーカス */
  --shadow: 0 1px 2px rgba(43, 34, 41, 0.06), 0 8px 24px rgba(43, 34, 41, 0.06);
  --focus-ring: 0 0 0 3px rgba(139, 58, 98, 0.35);

  /* フォント */
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", sans-serif;

  /* 文字サイズの7段（本文は --fs-base 16px） */
  --fs-2xs: 12px;
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: 28px;

  /* 角丸の7段：チップ6／小8／標準10（ボタン・入力・行）／パネル12／カード14／モーダル16／丸薬 */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #201a1e;
    --surface: #2a2228;
    --surface-sunken: #251e23;
    --ink: #f3edf0;
    --ink-soft: #b8a8b0;
    --ink-faint: #a898a1;
    --accent: #e0a0c1;
    --accent-strong: #ecb9d3;
    --accent-soft: #3d2a34;
    --accent-soft-line: #4f3641;
    --on-accent: #2b2229;
    --line: #3d3138;
    --good: #8ec2a4;
    --good-soft: #2a3730;
    --good-ink: #8ec2a4;
    --warn: #e0b878;
    --warn-soft: #3a2f1c;
    --warn-ink: #e0b878;
    --danger: #e08a7a;
    --danger-soft: #3a2622;
    --focus-ring: 0 0 0 3px rgba(224, 160, 193, 0.45);
  }
}

/* ── 基本 ─────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* キーボード操作のフォーカス表示（Tab移動で今どこにいるかを見えるようにする。マウス・タップでは出ない） */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 動きを減らす設定の人には、アニメーション・スムーズスクロールを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── ロゴのヘッダー（顧客向け画面の先頭） ─────────────── */
.brand-header { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--accent-strong); }
.brand-header img { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.brand-header span { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.02em; }

/* ── ボタン：色・形・押した状態は共通。大きさ（padding・文字サイズ・幅）は各画面が決める ── */
.btn { font-family: var(--font); border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: var(--surface-sunken); color: var(--ink); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn.ghost.danger { color: var(--danger); }
.btn.ghost.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn:active:not(:disabled) { filter: brightness(0.94); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── カード ─────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── イベント情報 ─────────────────────────────────── */
.event-info { background: var(--surface-sunken); border-radius: var(--radius-lg); padding: 4px 14px; }
.event-info-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-base); line-height: 1.5; }
.event-info-row:last-child { border-bottom: none; }
.event-info-label { flex: 0 0 3.6em; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }
.event-info-value { flex: 1; min-width: 0; }
.event-info-value small { display: block; font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 2px; }
.event-info-value strong { font-size: var(--fs-md); }

/* ── 診断結果カード（診断の完了画面とLIFFマイページで同じ見た目） ── */
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.result-section { padding: 20px; }
.result-section + .result-section { border-top: 1px solid var(--line); }
.section-eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.type-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.type-emoji { font-size: 32px; line-height: 1; }
.type-name { font-size: var(--fs-lg); font-weight: 700; }
.type-axes { font-size: var(--fs-xs); color: var(--ink-faint); margin-bottom: 16px; }
.fact-row { display: flex; gap: 12px; margin-bottom: 14px; }
.fact-row:last-child { margin-bottom: 0; }
.fact-icon { font-size: var(--fs-md); flex-shrink: 0; width: 22px; text-align: center; }
.fact-label { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.fact-text { font-size: var(--fs-base); line-height: 1.7; color: var(--ink); }
.more-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; padding: 11px 14px; border-radius: var(--radius-lg); background: var(--surface-sunken); border: none; width: 100%; font-family: var(--font); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); cursor: pointer; text-align: left; }
.more-toggle .chev { transition: transform 0.2s ease; color: var(--ink-faint); flex-shrink: 0; }
.more-toggle.open .chev { transform: rotate(180deg); }
.more-panel { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.more-panel.open { max-height: 400px; }
.more-panel-inner { padding-top: 14px; }
.romance-row { display: flex; align-items: flex-start; gap: 12px; }
.romance-emoji { font-size: 26px; line-height: 1.3; flex-shrink: 0; }
.romance-label { font-size: var(--fs-base); font-weight: 700; margin-bottom: 4px; }
.romance-desc, .conflict-desc { font-size: var(--fs-base); line-height: 1.75; color: var(--ink-soft); }
.conflict-tag { display: inline-block; font-size: var(--fs-2xs); font-weight: 700; padding: 3px 11px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 10px; }
.conflict-strength { display: flex; gap: 10px; align-items: flex-start; background: var(--good-soft); border-radius: var(--radius-lg); padding: 12px 14px; margin-top: 6px; }
.conflict-strength .fi { font-size: var(--fs-base); }
.conflict-strength-text { font-size: var(--fs-base); line-height: 1.7; color: var(--ink); }
