/* =========================================================
   My COMPASS デザイントークン v2(リブランディング)
   作成日: 2026-08-04
   位置づけ: 新規ファイル。既存 css/style.css は無変更。
   確認後、style.css側で読み込む形で統合する(差分修正の原則)。
   ========================================================= */

:root {
  /* ---- ベースカラー(生成り基調) ---- */
  --cp-bg:            #FBF8F3; /* 画面背景 */
  --cp-surface:       #FFFFFF; /* カード背景 */
  --cp-surface-2:     #F4EDE2; /* サブカード・セクション区切り */

  /* ---- プライマリ(コーラル。彩度を抑え中立性を保つ) ---- */
  --cp-primary:       #E28A70;
  --cp-primary-soft:  #F6DED3;
  --cp-primary-line:  rgba(226, 138, 112, 0.35);

  /* ---- セカンダリ(落ち着いたゴールド。特別な日・FAMILY装飾用) ---- */
  --cp-gold:          #C2A15C;
  --cp-gold-soft:     rgba(194, 161, 92, 0.16);

  /* ---- テキスト ---- */
  --cp-text:          #3D3733;
  --cp-text-muted:    #8C8378;
  --cp-text-faint:    #B3A99C;

  /* ---- 機能色 ---- */
  --cp-sage:          #7FA08F; /* 良い流れ・成長の表現 */

  /* ---- 人生サイクル4色(四季メタファー・淡トーン) ---- */
  --cp-season-spring: #A8C6A1;
  --cp-season-summer: #E9B96A;
  --cp-season-autumn: #D98E73;
  --cp-season-winter: #9BAFC4;

  /* ---- 構造 ---- */
  --cp-radius-card:   16px;
  --cp-radius-chip:   999px;
  --cp-shadow-card:   0 2px 12px rgba(61, 55, 51, 0.06);
  --cp-max-width:     560px;

  /* ---- タイポグラフィ ---- */
  --cp-font-display: "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "Noto Serif JP", serif; /* 特別な瞬間のみ使用 */
  --cp-font-body: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; /* 標準UI */

  --cp-fs-body:       16px;
  --cp-fs-body-lg:    18px; /* シニア配慮・文字サイズ「大きめ」設定用 */
  --cp-lh-body:       1.8;
  --cp-fs-heading:    22px;
  --cp-fs-caption:    13px;

  /* ---- モーション(感情設計: 静かで短い) ---- */
  --cp-ease:          cubic-bezier(0.22, 0.61, 0.36, 1);
  --cp-duration-fade: 0.3s;
}

/* Partner Studio 用トーン(濃紺×ゴールド。一般アプリと世界観を分離) */
/* 【2026-08-07 v6・追加指示12】Partner Studioを「濃紺×ゴールド」から
   My COMPASSの暖色系ダーク(焦げ茶ベース＋テラコッタ)へ再スキン。
   一般APPと同じ--cp-primary(テラコッタ)・--cp-gold(ゴールド)を土台にすることで、
   レイアウト構造(検索性優先)は保ちつつ、ブランドの同一性を出す。 */
:root[data-theme="studio"] {
  --cp-bg:            #2A2119;
  --cp-surface:       #33281E;
  --cp-surface-2:     #3D3025;
  --cp-primary:       #E28A70;
  --cp-primary-soft:  rgba(226, 138, 112, 0.18);
  --cp-gold:          #C2A15C;
  --cp-gold-soft:     rgba(194, 161, 92, 0.18);
  --cp-text:          #F3ECE2;
  --cp-text-muted:    #C9BBAC;
}

/* =========================================================
   カード文法(全画面共通の3層: ひとこと→補足→開くと詳細)
   ========================================================= */
.cp-card {
  background: var(--cp-surface);
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}

.cp-card__icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.cp-card__headline {
  font-weight: 700;
  font-size: var(--cp-fs-heading);
  color: var(--cp-text);
  margin: 0 0 6px;
}

.cp-card__body {
  font-size: var(--cp-fs-body);
  line-height: var(--cp-lh-body);
  color: var(--cp-text);
  margin: 0;
}

.cp-card__caption {
  font-size: var(--cp-fs-caption);
  color: var(--cp-text-muted);
}

/* キーワードチップ(#タグ表現) */
.cp-chip {
  display: inline-block;
  background: var(--cp-primary-soft);
  color: var(--cp-primary);
  border-radius: var(--cp-radius-chip);
  padding: 4px 12px;
  font-size: var(--cp-fs-caption);
  margin: 0 6px 6px 0;
}

/* 折りたたみ(じっくり層・マヤ暦のことば 用) */
.cp-disclosure summary {
  cursor: pointer;
  color: var(--cp-text-muted);
  font-size: var(--cp-fs-caption);
  list-style: none;
}
.cp-disclosure summary::before {
  content: "▸ ";
}
.cp-disclosure[open] summary::before {
  content: "▾ ";
}

/* フェードイン(マイクロインタラクション。0.3s・1回のみ) */
.cp-fade-in {
  animation: cp-fade var(--cp-duration-fade) var(--cp-ease) both;
}
@keyframes cp-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 文字サイズ「大きめ」設定(シニア配慮・設定画面トグル用) */
[data-fontsize="large"] {
  --cp-fs-body: 18px;
  --cp-fs-heading: 24px;
  --cp-lh-body: 1.9;
}

/* =========================================================
   R1 新UI(#rebrand-app)レイアウト
   ========================================================= */
#rebrand-app {
  font-family: var(--cp-font-body);
  color: var(--cp-text);
  background: var(--cp-bg);
  min-height: 100vh;
  max-width: var(--cp-max-width);
  margin: 0 auto;
  padding-bottom: 76px;
  box-sizing: border-box;
}
#rebrand-app[hidden] { display: none; }
.cp-content { padding: 16px 16px 8px; }
.cp-icon, .cp-nav-icon { display: inline-block; width: 22px; height: 22px; color: var(--cp-text-muted); }
.cp-nav-icon { width: 24px; height: 24px; }
.cp-type-icon { display: inline-block; width: 32px; height: 32px; color: var(--cp-primary); flex-shrink: 0; }
.cp-type-icon-lg { width: 64px; height: 64px; }
.cp-type-icon-sm { width: 26px; height: 26px; }
.cp-type-cover { text-align: center; margin-bottom: 4px; }
.cp-type-cover .cp-type-icon { width: 56px; height: 56px; }

.cp-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: var(--cp-max-width); margin: 0 auto;
  display: flex; background: var(--cp-surface);
  border-top: 1px solid var(--cp-primary-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}
.cp-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; padding: 6px 2px; color: var(--cp-text-muted);
  font-family: var(--cp-font-body); font-size: 11px; cursor: pointer;
}
.cp-nav-btn.is-active { color: var(--cp-primary); }
.cp-nav-btn.is-active .cp-nav-icon { color: var(--cp-primary); }
.cp-nav-label { line-height: 1; }

.cp-page-title { font-family: var(--cp-font-display); font-size: 22px; margin: 4px 0 0; }
.cp-page-sub { color: var(--cp-text-muted); font-size: 13px; margin: 0 0 12px; }
.cp-greeting { font-size: 14px; color: var(--cp-text-muted); margin: 4px 0 10px; }
.cp-serif { font-family: var(--cp-font-display); }
.cp-center { text-align: center; }
.cp-mt { margin-top: 12px; }
.cp-card-hero { background: linear-gradient(180deg, var(--cp-surface) 0%, var(--cp-surface-2) 100%); }
.cp-today-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cp-strip-title { margin-top: 18px; }

.cp-rhythm { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.cp-rhythm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cp-surface-2); border: 1px solid var(--cp-primary-line); }
.cp-rhythm-dot.is-current { background: var(--cp-primary); border-color: var(--cp-primary); box-shadow: 0 0 0 3px var(--cp-primary-soft); }

.cp-cycle-wrap { display: inline-block; }

.cp-family-strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; }
.cp-family-avatar {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--cp-surface); border: 1px solid var(--cp-primary-line); border-radius: var(--cp-radius-card);
  padding: 10px; min-width: 68px; cursor: pointer; font-family: var(--cp-font-body);
}
.cp-family-avatar-name { font-size: 11px; color: var(--cp-text-muted); }
.cp-family-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cp-family-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--cp-surface); border: none; border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-card); padding: 14px; cursor: pointer;
}
.cp-family-row-name { font-weight: 700; }
.cp-family-row-type { font-size: 12px; color: var(--cp-text-muted); }

.cp-relation-label { color: var(--cp-primary); font-weight: 700; margin: 0 0 6px; }
.cp-hint { color: var(--cp-text-muted); }

.cp-onboard-hero { text-align: center; padding: 12px 4px 20px; }
.cp-onboard-title { font-family: var(--cp-font-display); font-size: 21px; margin: 0; }
.cp-onboard-sub { font-family: var(--cp-font-display); font-size: 21px; margin: 0 0 10px; color: var(--cp-primary); }
.cp-onboard-lead { color: var(--cp-text-muted); font-size: 14px; }
.cp-onboard-form { display: flex; flex-direction: column; gap: 10px; }
#rebrand-app .cp-input {
  font-family: var(--cp-font-body); font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--cp-primary-line); border-radius: 10px; background: var(--cp-surface); color: var(--cp-text);
}
.cp-input-row { display: flex; gap: 8px; }
.cp-input-narrow { flex: 1; min-width: 0; }
.cp-form-error { color: #b3453a; font-size: 13px; }
.cp-btn-primary {
  font-family: var(--cp-font-body); font-size: 16px; font-weight: 700; padding: 12px;
  border: none; border-radius: 12px; background: var(--cp-primary); color: #fff; cursor: pointer;
}
.cp-btn-secondary {
  font-family: var(--cp-font-body); font-size: 14px; padding: 8px 14px; margin-right: 8px;
  border: 1px solid var(--cp-primary-line); border-radius: 10px; background: var(--cp-surface); color: var(--cp-text); cursor: pointer;
}
.cp-back { background: none; border: none; color: var(--cp-text-muted); font-size: 14px; padding: 4px 0 10px; cursor: pointer; }
.cp-loading { text-align: center; padding: 40px 16px; color: var(--cp-text-muted); }

/* =========================================================
   「きょう」画面 強化パーツ(2026-08-04・R1.5)
   ========================================================= */
.cp-tips-card { padding-top: 18px; }
.cp-tip-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--cp-surface-2);
}
.cp-tip-row:first-of-type { border-top: none; padding-top: 10px; }
.cp-tip-icon {
  width: 30px; height: 30px; flex-shrink: 0; color: var(--cp-primary);
  background: var(--cp-primary-soft); border-radius: 50%; padding: 6px; box-sizing: border-box;
}
.cp-tip-text { flex: 1; min-width: 0; }
.cp-tip-label { font-weight: 700; font-size: 13px; color: var(--cp-text-muted); margin-bottom: 3px; }
.cp-tip-body { font-size: 15px; line-height: 1.75; color: var(--cp-text); }

.cp-quote-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--cp-surface-2); box-shadow: none; border: 1px dashed var(--cp-primary-line);
}
.cp-quote-icon { width: 26px; height: 26px; color: var(--cp-gold); flex-shrink: 0; }
.cp-quote-text { font-family: var(--cp-font-display); font-size: 16px; line-height: 1.7; color: var(--cp-text); margin: 0; }

/* =========================================================
   「わたし」7項目カード・「かぞく個人」伝え方カード(2026-08-04・R2)
   ========================================================= */
.cp-dim-card {
  background: var(--cp-surface); border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-card); padding: 16px 18px; margin-bottom: 12px;
}
.cp-dim-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cp-dim-icon { width: 26px; height: 26px; color: var(--cp-sage); flex-shrink: 0; }
.cp-dim-label { font-size: 15px; font-weight: 700; margin: 0; color: var(--cp-text); }
.cp-dim-teaser { font-size: 14.5px; line-height: 1.75; color: var(--cp-text); margin: 0; }

.cp-howto-wrap { margin-top: 8px; }
.cp-howto-list { margin: 4px 0 0; padding-left: 20px; }
.cp-howto-list li { font-size: 14px; line-height: 1.7; color: var(--cp-text); margin-bottom: 4px; }

/* =========================================================
   設定画面: プラン表示(2026-08-04・R2監査対応)
   ========================================================= */
.cp-plan-section { margin-top: 4px; }
.cp-plan-card {
  background: var(--cp-surface); border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-card); padding: 16px 18px; margin-bottom: 12px;
  border: 1px solid transparent;
}
.cp-plan-card-main {
  border-color: var(--cp-gold);
  background: linear-gradient(180deg, var(--cp-surface) 0%, var(--cp-gold-soft) 140%);
}
.cp-plan-badge {
  display: inline-block; background: var(--cp-gold); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: var(--cp-radius-chip); padding: 3px 10px; margin-bottom: 8px;
}
.cp-plan-head { display: flex; justify-content: space-between; align-items: baseline; }
.cp-plan-name { font-weight: 700; font-size: 16px; }
.cp-plan-price { font-size: 14px; color: var(--cp-text-muted); }
.cp-plan-pitch { font-size: 14px; line-height: 1.7; margin: 6px 0 4px; }
.cp-plan-people { font-size: 12px; color: var(--cp-text-muted); margin: 0; }
.cp-footer-link { text-align: center; margin-top: 24px; }
.cp-footer-link a { color: var(--cp-text-faint); font-size: 12px; text-decoration: underline; }

.cp-family-pitch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

.cp-onboard-family-teaser { font-size: 12.5px; color: var(--cp-text-muted); text-align: center; margin-top: 10px; line-height: 1.7; }

.cp-studio-link { display: inline-block; text-decoration: none; text-align: center; }

/* =========================================================
   【2026-08-06 UAT表示不具合修正】
   新UI表示中、コンテナ(#rebrand-app)の外側でbody背景(旧テーマの暗色)が
   黒い帯として露出していた(実ブラウザUATのスクリーンショットで確認)。
   新UIがアクティブな間だけ、bodyの背景を新デザインの画面背景で上塗りする。
   旧UI(#legacy-app)表示中はこのクラスが外れるため、従来の見た目に影響しない。
   ========================================================= */
body.cp-active { background: var(--cp-bg); }

/* =========================================================
   認証画面リブランディング(2026-08-06・再実装)
   ---------------------------------------------------------
   対象: #tab-account / #tab-verify-email / #tab-reset-password
   body.cp-auth-active が付いている間だけ有効(rebrand-auth.js が
   付け外しを行う)。旧デザイン(#tab-home等の他画面・admin.html・
   partner.htmlの独自配色)には一切影響しない。
   既存クラス(.card/.field/.btn-primary等)を対象にした上書きのみ。
   view-account.js等のJSロジック・HTML構造には一切触れていない。
   ========================================================= */
body.cp-auth-active {
  /* 【黒帯解消】html,body{background:var(--bg)}の暗色(#12141c)が、
     認証画面のように内容が短い場合にpadding-bottom(下部ナビ用余白)
     の部分で露出する不具合の対策。詳細度の高いクラス指定で上書きする。 */
  background: var(--cp-bg);
}
body.cp-auth-active #tab-account,
body.cp-auth-active #tab-verify-email,
body.cp-auth-active #tab-reset-password {
  background: var(--cp-bg);
  font-family: var(--cp-font-body);
  padding-top: 8px;
}
.cp-auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  margin: 24px 0 20px;
}
.cp-auth-logo {
  font-family: var(--cp-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--cp-primary);
  letter-spacing: 0.04em;
  margin: 0;
}
.cp-auth-tagline {
  font-size: 14px;
  color: var(--cp-text-muted);
  margin: 0;
  line-height: 1.6;
}
.cp-auth-login-intro {
  font-size: 14px;
  color: var(--cp-text);
  text-align: center;
  margin: 4px 0 18px;
  line-height: 1.7;
}
/* カード(ようこそメッセージ・フォーム全体を包む既存.card) */
body.cp-auth-active .card {
  background: var(--cp-surface);
  border: none;
  border-radius: var(--cp-radius-card);
  box-shadow: var(--cp-shadow-card);
  padding: 20px 18px;
}
/* フォーム入力欄 */
body.cp-auth-active input[type="text"],
body.cp-auth-active input[type="email"],
body.cp-auth-active input[type="password"] {
  background: #fff;
  border: 1px solid var(--cp-primary-line, #e5ddd0);
  color: var(--cp-text);
  border-radius: var(--cp-radius-input, 10px);
  transition: border-color var(--cp-duration-fade, 0.2s);
}
body.cp-auth-active input[type="text"]:hover,
body.cp-auth-active input[type="email"]:hover,
body.cp-auth-active input[type="password"]:hover {
  border-color: var(--cp-primary);
}
body.cp-auth-active input[type="text"]:focus,
body.cp-auth-active input[type="email"]:focus,
body.cp-auth-active input[type="password"]:focus {
  border-color: var(--cp-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--cp-primary-soft, rgba(230,138,90,0.18));
}
body.cp-auth-active input:disabled {
  opacity: 0.6;
}
body.cp-auth-active .field label {
  color: var(--cp-text-muted);
}
/* ボタン */
body.cp-auth-active .btn-primary {
  background: var(--cp-primary);
  color: #fff;
  border-radius: var(--cp-radius-button, 10px);
  transition: background var(--cp-duration-fade, 0.2s), opacity var(--cp-duration-fade, 0.2s);
}
body.cp-auth-active .btn-primary:hover { background: var(--cp-primary-dark, var(--cp-primary)); }
body.cp-auth-active .btn-primary:active { opacity: 0.85; }
body.cp-auth-active .btn-primary:disabled { opacity: 0.5; }
body.cp-auth-active .btn-secondary {
  background: transparent;
  color: var(--cp-primary);
  border: 1px solid var(--cp-primary-line, #e5ddd0);
  border-radius: var(--cp-radius-button, 10px);
}
body.cp-auth-active .btn-text {
  color: var(--cp-text-muted);
}
body.cp-auth-active .form-error {
  color: var(--cp-error, #c0392b);
}
body.cp-auth-active .account-mode-toggle .btn-secondary {
  font-weight: 600;
}
/* 【完成条件対応】認証画面表示中は、共通ヘッダー・下部ナビも新デザインへ統一する。
   report記載のtab-account等の内側だけでなく、legacy-app全体の外枠(header/bottom-nav)
   も含めて「認証画面から一般画面までデザインが統一されている」完成条件を満たすため。
   ヘッダー・下部ナビのHTML構造・リンク・タブ切替ロジックには一切触れない(色のみ)。 */
body.cp-auth-active .app-header {
  background: rgba(251, 248, 243, 0.96);
  border-bottom: 1px solid var(--cp-primary-line, #e5ddd0);
}
body.cp-auth-active .app-title {
  color: var(--cp-primary);
}
body.cp-auth-active .app-header a,
body.cp-auth-active .app-header .dict-link {
  color: var(--cp-text-muted);
}
body.cp-auth-active .bottom-nav {
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--cp-primary-line, #e5ddd0);
}
body.cp-auth-active .nav-btn {
  color: var(--cp-text-faint);
}
body.cp-auth-active .nav-btn.active {
  color: var(--cp-primary);
}
/* 【アカウント見出しの整理】cp-auth-headerが既にMy COMPASS名+タグラインを
   表示するため、旧来の「アカウント」という素っ気ない見出し(section-title)は
   認証画面表示中だけ非表示にする(HTML構造・他画面への影響なし。CSSのみ)。 */
body.cp-auth-active #account-content > .section-title:first-of-type,
body.cp-auth-active #verify-email-content > .section-title:first-of-type,
body.cp-auth-active #reset-password-content > .section-title:first-of-type {
  display: none;
}
/* カード内の案内文(lead-note等)の視認性をやや高める */
body.cp-auth-active .card p {
  color: var(--cp-text);
}

/* ============================================================
 * 【2026-08-06 販売前修正 U-2】認証画面(body.cp-auth-active)では、
 * 旧UIの固定下部ナビと旧ヘッダーを完全に非表示にする。
 * 未ログインの利用者にアプリ内ナビが見えて操作を誤る問題
 * (ログインボタンのタップが下部ナビに奪われる)の恒久対策。
 * ============================================================ */
body.cp-auth-active .bottom-nav { display: none !important; }
body.cp-auth-active .app-header { display: none !important; }
/* ナビが消えたぶんの下部余白は不要になるため詰める(認証画面のみ) */
body.cp-auth-active main { padding-bottom: 24px; }

/* 認証ヘッダーの共通ロゴマーク(favicon.svgを共通ブランドマークとして使用) */
.cp-auth-logomark { display: block; margin: 0 auto 8px; width: 44px; height: 44px; }

/* ============================================================
 * 【2026-08-06 販売前修正 U-8】トースト(保存・追加・削除の完了通知)
 * ============================================================ */
.cp-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(8px);
  background: var(--cp-text, #3c3630); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 60; max-width: 86vw;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.cp-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
 * 【2026-08-06 販売前修正 U-6】確認モーダル(削除・退会の誤操作防止)
 * ============================================================ */
.cp-modal-overlay {
  position: fixed; inset: 0; background: rgba(60,54,48,.45); z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.cp-modal {
  background: var(--cp-surface, #fff); border-radius: 16px; padding: 20px;
  max-width: 360px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.cp-modal-text { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--cp-text, #3c3630); }
.cp-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cp-modal-actions .cp-btn-secondary, .cp-modal-actions .cp-btn-danger { width: auto; padding: 10px 16px; }

/* ============================================================
 * 【2026-08-06 販売前修正 U-5/U-10】設定: 現在のプラン・危険操作・規約リンク
 * ============================================================ */
.cp-current-plan { font-size: 20px; font-weight: 700; color: var(--cp-primary, #c96f4a); margin: 4px 0 10px; }
.cp-plan-card-current { outline: 2px solid var(--cp-primary, #c96f4a); outline-offset: -2px; }
.cp-plan-current-chip {
  display: inline-block; background: var(--cp-primary, #c96f4a); color: #fff;
  font-size: 11px; padding: 2px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.cp-btn-danger {
  display: block; width: 100%; padding: 12px; margin-top: 10px;
  background: #b5493a; color: #fff; border: none; border-radius: 12px;
  font-size: 15px; cursor: pointer;
}
.cp-btn-danger:disabled { opacity: .6; cursor: default; }
.cp-btn-danger-link {
  background: none; border: none; color: #b5493a; text-decoration: underline;
  font-size: 14px; cursor: pointer; padding: 8px;
}
.cp-legal-links { display: flex; flex-direction: column; }
.cp-legal-link {
  display: block; padding: 12px 4px; color: var(--cp-text, #3c3630);
  text-decoration: none; border-bottom: 1px solid var(--cp-primary-line, #ece4d6); font-size: 15px;
}
.cp-legal-link:last-child { border-bottom: none; }
.cp-legal-link::after { content: "›"; float: right; color: var(--cp-text-faint, #a89e90); }

/* ============================================================
 * 【2026-08-06 販売前修正 U-9】ふたりをくらべる(2カラム比較)
 * ============================================================ */
.cp-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.cp-compare-col {
  background: var(--cp-bg, #FBF8F3); border-radius: 14px; padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.cp-compare-col .cp-type-icon { margin: 0 auto; }
.cp-compare-name { margin: 0; font-weight: 700; font-size: 15px; color: var(--cp-text, #3c3630); }
.cp-compare-type { margin: 0; font-size: 12px; color: var(--cp-text-soft, #7d7466); }
.cp-compare-col .cp-chips { justify-content: center; }
/* 【2026-08-07 v6】プラン購入導線 */
.cp-plan-buy-btn { margin-top: 10px; }
.cp-plan-soon { margin-top: 8px; font-size: 12px; color: var(--cp-text-faint); }

/* ============================================================
 * 【2026-08-07 v6】相性タイプ早見カード・チーム全体のようす・検索・リズムラベル
 * ============================================================ */
.cp-relquick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.cp-relquick-card {
  background: var(--cp-bg); border-radius: 12px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.cp-relquick-card .cp-type-icon-sm { margin: 0 auto; }
.cp-relquick-label { font-size: 11px; color: var(--cp-text-muted); }
.cp-relquick-type { font-size: 12px; font-weight: 700; color: var(--cp-text); }

.cp-people-search { margin-bottom: 12px; }

.cp-team-bar {
  display: flex; width: 100%; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--cp-surface-2); margin: 10px 0 8px;
}
.cp-team-bar-seg { height: 100%; }
.cp-team-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.cp-team-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--cp-text-muted); }
.cp-team-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.cp-rhythm-wrap { display: flex; flex-direction: column; gap: 6px; }
.cp-rhythm-caption { margin: 0; font-size: 12px; color: var(--cp-text-muted); }

/* 【2026-08-07 v6.1】先生の方への入口・招待コード入力 */
.cp-partner-recruit { border: 1px dashed var(--cp-gold); }
.cp-footer-link-btn {
  background: none; border: none; color: var(--cp-text-muted); text-decoration: underline;
  font-size: 13px; padding: 10px 0 4px; cursor: pointer; display: block;
}
.cp-invite-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
