/* ==============================================
   design-system.css — .Think Design System 共通CSS
   style.css から抽出・統合した共通スタイル
   v20260416
   ============================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;900&display=swap');
@import url('../../theme.css');

/* =============================================
   CSS変数（:root）
   ============================================= */

:root {
  /* ブランドカラー */
  --color-bg:           var(--repo-color-bg, #F6F8FA);
  --color-bg-dark:      var(--repo-color-bg-dark, #111827);
  --color-bg-beige:     var(--repo-color-bg-beige, #EEF2F6);
  --color-primary:      var(--repo-color-primary, #102A43);
  --color-primary-dark: var(--repo-color-primary-dark, #0B1F33);
  --color-primary-tint: var(--repo-color-primary-tint, rgba(16,42,67,0.06));
  --color-accent:       var(--repo-color-accent, #365C70);
  --color-gold:         var(--repo-color-gold, #8A6F3D);
  --color-text:         var(--repo-color-text, #1F2933);
  --color-text-light:   var(--repo-color-text-light, #5B677A);
  --color-white:        var(--repo-color-white, #FFFFFF);
  --color-border:       var(--repo-color-border, rgba(16,42,67,0.12));
  --color-success:      var(--repo-color-success, #15803D);
  --color-error:        var(--repo-color-error, #B42318);
  --color-warning:      var(--repo-color-warning, #B54708);
  --color-info:         var(--repo-color-info, #2563EB);

  /* 管理画面専用 */
  --admin-bg:            #F0EEE7;
  --admin-sidebar-bg:    var(--repo-admin-sidebar-bg, var(--color-primary));
  --admin-sidebar-width: 240px;
  --admin-header-height: 60px;

  /* ステータスカラー（共通） */
  --status-active-bg:   rgba(91,122,112,0.12);
  --status-active-text: #3a6b5f;
  --status-pause-bg:    rgba(184,154,90,0.12);
  --status-pause-text:  #7a6030;
  --status-quit-bg:     rgba(180,60,60,0.1);
  --status-quit-text:   #8a2020;
  --status-draft-bg:    rgba(120,120,120,0.1);
  --status-draft-text:  #555555;
  --status-todo-bg:     rgba(220,80,60,0.1);
  --status-todo-text:   #a03020;
  --status-inprog-bg:   rgba(184,154,90,0.12);
  --status-inprog-text: #7a6030;
  --status-done-bg:     rgba(91,122,112,0.12);
  --status-done-text:   #3a6b5f;

  /* 案件ステータスカラー */
  --status-prospect-bg:      rgba(147,197,253,0.25);
  --status-prospect-text:    #1d4ed8;
  --status-proposal-bg:      rgba(59,130,246,0.15);
  --status-proposal-text:    #1e40af;
  --status-negotiation-bg:   rgba(251,146,60,0.15);
  --status-negotiation-text: #c2410c;
  --status-won-bg:           rgba(34,197,94,0.15);
  --status-won-text:         #15803d;
  --status-lost-bg:          rgba(120,120,120,0.12);
  --status-lost-text:        #555555;

  /* スマホ専用 */
  --mobile-accent:   var(--repo-mobile-accent, var(--color-primary));
  --mobile-accent2:  var(--repo-mobile-accent2, #2563EB);
  --mobile-border:   #ddd;
  --mobile-bg-card:  #ffffff;
  --mobile-text:     var(--color-text);
  --mobile-text-sub: var(--color-text-light);
  --mobile-radius:   8px;
  --mobile-shadow:   0 2px 8px rgba(0,0,0,0.08);

  /* タイポグラフィ */
  --font-sans:  'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --font-serif: 'Noto Serif JP', 'Yu Mincho', serif;
  --font-mono:  'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;

  /* 共通 */
  --radius:     4px;
  --radius-md:  6px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-pill: 9999px;
  --transition: 0.2s ease;
  --shadow:     0 2px 12px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.15);

  /* スペーシングスケール（4px ベース） */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-30: 120px;
  --space-40: 160px;

  /* カード最小幅トークン */
  --card-min-width-tablet:  480px;  /* タブレット（769px〜900px）でのカード最小幅 */
  --card-min-width-desktop: 720px;  /* PC（901px以上）でのカード最小幅 */
}

/* =============================================
   ダークモード変数
   ============================================= */

[data-theme="dark"] {
  /* ブランドカラー（ダーク） */
  --color-bg:           var(--repo-dark-color-bg, #0f1117);
  --color-bg-dark:      var(--repo-dark-color-bg-dark, #0a0c10);
  --color-bg-beige:     var(--repo-dark-color-bg-beige, #161820);
  --color-primary:      var(--repo-dark-color-primary, #7CB7E8);
  --color-primary-dark: var(--repo-dark-color-primary-dark, #A6D4F5);
  --color-primary-tint: var(--repo-dark-color-primary-tint, rgba(124,183,232,0.12));
  --color-accent:       var(--repo-dark-color-accent, #7A9CAF);
  --color-gold:         var(--repo-dark-color-gold, #D6B56D);
  --color-text:         var(--repo-dark-color-text, #E5E7EB);
  --color-text-light:   var(--repo-dark-color-text-light, #AAB4C0);
  --color-white:        var(--repo-dark-color-white, #1a1e28);
  --color-border:       var(--repo-dark-color-border, rgba(255,255,255,0.1));
  --color-success:      #22c55e;
  --color-error:        #ef4444;
  --color-warning:      #f59e0b;

  /* 管理画面専用 */
  --admin-bg:            #0f1117;
  --admin-sidebar-bg:    var(--repo-dark-admin-sidebar-bg, #0a0e18);

  /* ステータスカラー（ダーク） */
  --status-active-bg:   rgba(111,168,152,0.15);
  --status-active-text: #6fa898;
  --status-pause-bg:    rgba(212,176,106,0.15);
  --status-pause-text:  #d4b06a;
  --status-quit-bg:     rgba(239,68,68,0.15);
  --status-quit-text:   #f87171;
  --status-draft-bg:    rgba(139,150,170,0.15);
  --status-draft-text:  #8b96aa;
  --status-todo-bg:     rgba(239,68,68,0.12);
  --status-todo-text:   #f87171;
  --status-inprog-bg:   rgba(212,176,106,0.15);
  --status-inprog-text: #d4b06a;
  --status-done-bg:     rgba(34,197,94,0.15);
  --status-done-text:   #22c55e;

  /* 案件ステータスカラー */
  --status-prospect-bg:      rgba(96,165,250,0.2);
  --status-prospect-text:    #60a5fa;
  --status-proposal-bg:      rgba(59,130,246,0.2);
  --status-proposal-text:    #93bbfd;
  --status-negotiation-bg:   rgba(251,146,60,0.2);
  --status-negotiation-text: #fb923c;
  --status-won-bg:           rgba(34,197,94,0.2);
  --status-won-text:         #4ade80;
  --status-lost-bg:          rgba(139,150,170,0.15);
  --status-lost-text:        #8b96aa;

  /* スマホ専用 */
  --mobile-accent:   var(--repo-dark-mobile-accent, #7CB7E8);
  --mobile-accent2:  var(--repo-dark-mobile-accent2, #A6D4F5);
  --mobile-border:   rgba(255,255,255,0.1);
  --mobile-bg-card:  #1a1e28;
  --mobile-text:     #e0e4ec;
  --mobile-text-sub: #8b96aa;
  --mobile-shadow:   0 2px 8px rgba(0,0,0,0.3);

  /* 共通 */
  --shadow:     0 2px 12px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
}

/* =============================================
   リセット + ベーススタイル
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* =============================================
   ショーケース共通レイアウト
   ============================================= */

.ds-body {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.ds-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.ds-page-subtitle {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.ds-page-desc {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 40px;
  line-height: 1.8;
}

.ds-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 24px;
  transition: color var(--transition);
}

.ds-back-link:hover { color: var(--color-primary); }

.ds-section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.ds-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.ds-section-desc {
  font-size: 12px;
  color: var(--color-text-light);
  margin-bottom: 20px;
  line-height: 1.7;
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ds-row:last-child { margin-bottom: 0; }

.ds-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  margin-bottom: -4px;
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.ds-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* =============================================
   レイアウト（管理画面）
   ============================================= */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── サイドバー ── */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: var(--admin-sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 300;
  overflow-y: auto;
  transition: transform var(--transition);
}

.admin-sidebar__logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.admin-sidebar__logo-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.admin-sidebar__logo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.admin-sidebar__nav {
  padding: 16px 0;
  flex: 1;
}

.admin-sidebar__section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 20px 6px;
}

.admin-sidebar__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: all var(--transition);
  letter-spacing: 0.02em;
  position: relative;
  text-decoration: none;
}

.admin-sidebar__nav-link:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.07);
}

.admin-sidebar__nav-link.is-active {
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
}

.admin-sidebar__nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-gold);
  border-radius: 0 2px 2px 0;
}

.admin-sidebar__nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.admin-sidebar__badge {
  margin-left: auto;
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.admin-sidebar__footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

/* ── メインエリア ── */
.admin-main {
  flex: 1;
  min-width: 0;                 /* flex子の overflow を防ぐ */
  margin-left: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── 管理ヘッダー ── */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--admin-header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
}

.admin-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
}

.admin-header__hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all var(--transition);
}

.admin-header__breadcrumb {
  flex: 1;
  font-size: 13px;
  color: var(--color-text-light);
}

.admin-header__breadcrumb strong {
  color: var(--color-text);
  font-weight: 600;
}

.admin-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text);
}

.admin-header__user-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-header__logout {
  font-size: 12px;
  color: var(--color-text-light);
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
}

.admin-header__logout:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(16,42,67,0.04);
}

/* ── コンテンツエリア ── */
.admin-content {
  flex: 1;
  padding: 28px;
  width: 100%;
  min-width: 960px;          /* PC時のメインコンテンツ最低幅 */
  max-width: 1600px;         /* 超ワイド画面での間延び防止 */
  margin-inline: auto;       /* コンテンツを中央寄せ */
  box-sizing: border-box;
}

/* サイドバーオーバーレイ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 299;
}
.sidebar-overlay.is-open { display: block; }

/* =============================================
   ページヘッダー
   ============================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.page-header__subtitle {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* =============================================
   ボタン
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  min-height: 36px;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn--primary:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 4px 16px rgba(16,42,67,0.25);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}
.btn--accent:hover {
  background-color: #4a6960;
  box-shadow: 0 4px 16px rgba(91,122,112,0.25);
}

.btn--gold {
  background-color: var(--color-gold);
  color: var(--color-white);
}
.btn--gold:hover { background-color: #a08040; }

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(16,42,67,0.04);
}

.btn--danger {
  background: transparent;
  border: 1px solid rgba(180,60,60,0.3);
  color: #8a2020;
}
.btn--danger:hover {
  background: rgba(180,60,60,0.08);
  border-color: #8a2020;
}

.btn--success {
  background-color: #10B981;
  color: var(--color-white);
}
.btn--success:hover {
  background-color: #059669;
}

.btn--xs  { padding: 3px 8px; font-size: 11px; min-height: unset; }
.btn--sm  { padding: 5px 12px; font-size: 12px; min-height: 32px; }
.btn--lg  { padding: 12px 28px; font-size: 14px; min-height: 46px; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn--all-filled {
  background-color: #16a34a !important;
  box-shadow: 0 4px 16px rgba(22,163,74,0.3) !important;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* EFO専用ボタン */
.btn-form-next,
.btn-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 46px;
}

.btn-form-next:hover,
.btn-form-submit:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16,42,67,0.25);
}

.btn-form-next:disabled,
.btn-form-submit:disabled {
  background: #999;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-form-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: none;
  color: var(--color-text-light);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 46px;
}

.btn-form-back:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =============================================
   カード
   ============================================= */

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;                                  /* 親コンテナ幅を満たす */
  /* min-width はモバイルで解除（横スクロール防止）。タブレット/PC 向けはメディアクエリで設定 */
}

/* タブレット以上（769px〜900px）: カードが収縮しないよう最小幅を設定 */
@media (min-width: 769px) {
  .card {
    min-width: min(var(--card-min-width-tablet), 100%);
  }
}

/* PC（901px以上）: より広い最小幅 */
@media (min-width: 901px) {
  .card {
    min-width: min(var(--card-min-width-desktop), 100%);
  }
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

.card__body {
  padding: 20px;
}

/* =============================================
   KPIカード
   ============================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.kpi-card--primary::before   { background: var(--color-primary); }
.kpi-card--accent::before    { background: var(--color-accent); }
.kpi-card--gold::before      { background: var(--color-gold); }
.kpi-card--alert::before     { background: #c0392b; }

.kpi-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.kpi-card__value {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.kpi-card__value--unit {
  font-size: 18px;
  font-weight: 600;
  margin-left: 2px;
}

.kpi-card--alert .kpi-card__value { color: #c0392b; }

.kpi-card__note {
  font-size: 11px;
  color: var(--color-text-light);
}

/* KPIプログレスバー */
.kpi-card__progress {
  margin-top: 12px;
}

.kpi-card__progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.kpi-card__progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-accent);
  transition: width 0.6s ease;
  max-width: 100%;
}

.kpi-card--gold .kpi-card__progress-fill    { background: var(--color-gold); }
.kpi-card--primary .kpi-card__progress-fill  { background: var(--color-primary); }
.kpi-card--accent .kpi-card__progress-fill   { background: var(--color-accent); }
.kpi-card--alert .kpi-card__progress-fill    { background: #c0392b; }

.kpi-card__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* KPIコンパクト */
.kpi-card--sm {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  min-width: 90px;
  box-shadow: var(--shadow);
}

.kpi-card--sm .kpi-card__label {
  font-size: 11px;
  color: var(--color-text-light);
  margin-bottom: 2px;
  white-space: nowrap;
}

.kpi-card--sm .kpi-card__value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
}

/* =============================================
   テーブル
   ============================================= */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}

.table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }

.table tbody tr:nth-child(odd)  { background: var(--color-white); }
.table tbody tr:nth-child(even) { background: #f9f7f3; }

.table tbody tr:hover {
  background: rgba(91,122,112,0.06);
}

.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: middle;
  color: var(--color-text);
}

.table tbody tr:last-child td { border-bottom: none; }

.table__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table__amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

tr[data-href] { cursor: pointer; }
tr[data-href]:hover { background: rgba(91,122,112,0.08) !important; }

.alert-row td { background: rgba(192,57,43,0.06) !important; }
.alert-row:hover td { background: rgba(192,57,43,0.1) !important; }
.alert-row .alert-cell { color: #c0392b; font-weight: 700; }
tr.overdue-row { background: rgba(220,38,38,0.04); }

/* テーブル内セレクト */
.table-select {
  padding: 4px 28px 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-text);
  background: var(--color-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  min-height: 28px;
  transition: border-color var(--transition);
}

.table-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* =============================================
   バッジ（ステータス）
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 共通ステータス */
.badge--active   { background: var(--status-active-bg);   color: var(--status-active-text); }
.badge--pause    { background: var(--status-pause-bg);    color: var(--status-pause-text); }
.badge--quit     { background: var(--status-quit-bg);     color: var(--status-quit-text); }
.badge--draft    { background: var(--status-draft-bg);    color: var(--status-draft-text); }
.badge--todo     { background: var(--status-todo-bg);     color: var(--status-todo-text); }
.badge--inprog   { background: var(--status-inprog-bg);   color: var(--status-inprog-text); }
.badge--done     { background: var(--status-done-bg);     color: var(--status-done-text); }

/* 案件ステータス */
.badge--prospect    { background: var(--status-prospect-bg);    color: var(--status-prospect-text); }
.badge--proposal    { background: var(--status-proposal-bg);    color: var(--status-proposal-text); }
.badge--negotiation { background: var(--status-negotiation-bg); color: var(--status-negotiation-text); }
.badge--won         { background: var(--status-won-bg);         color: var(--status-won-text); }
.badge--lost        { background: var(--status-lost-bg);        color: var(--status-lost-text); }

/* 作業・請求ステータス */
.badge--working  { background: rgba(59,130,246,0.15);  color: #1d4ed8; }
.badge--unbilled { background: rgba(249,115,22,0.15);  color: #c2410c; }
.badge--billed   { background: rgba(139,92,246,0.15);  color: #6d28d9; }
.badge--paid     { background: rgba(16,185,129,0.15);  color: #065f46; }
.badge--info     { background: rgba(59,130,246,0.12);  color: #1d4ed8; }
.badge--activity { background: rgba(91,122,112,0.12);  color: var(--status-active-text); font-size: 11px; padding: 2px 6px; border-radius: var(--radius); font-weight: 500; }

/* 確度バッジ */
.badge--prob-a { background: rgba(16,185,129,0.15);  color: #065f46; }
.badge--prob-b { background: rgba(59,130,246,0.15);  color: #1d4ed8; }
.badge--prob-c { background: rgba(245,158,11,0.15);  color: #92400e; }
.badge--prob-d { background: rgba(239,68,68,0.15);   color: #991b1b; }

/* スマホ用バッジ */
.badge--hearing     { background: var(--status-prospect-bg);    color: var(--status-prospect-text); }
.badge--proposing   { background: var(--status-proposal-bg);    color: var(--status-proposal-text); }
.badge--negotiating { background: var(--status-negotiation-bg); color: var(--status-negotiation-text); }
.badge--ordered     { background: var(--status-won-bg);         color: var(--status-won-text); }

/* =============================================
   フォーム要素
   ============================================= */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: #c0392b;
  margin-left: 4px;
  font-size: 11px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 42px;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91,122,112,0.12);
}

.form-input.is-valid  { border-color: #2F9E44; }
.form-input.is-error  { border-color: #c0392b; }
.form-select.is-valid { border-color: #2F9E44; }
.form-select.is-error { border-color: #c0392b; }
.form-textarea.is-valid { border-color: #2F9E44; }
.form-textarea.is-error { border-color: #c0392b; }

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.7;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-error-msg {
  display: none;
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
}
.form-error-msg.is-visible { display: block; }

.form-hint {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
  line-height: 1.6;
}

.form-row { display: grid; gap: 16px; }
.form-row--2col { grid-template-columns: 1fr 1fr; }
.form-row--3col { grid-template-columns: 1fr 1fr 1fr; }

/* 入力フィールドラッパー */
.form-input-wrap { position: relative; }

.form-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.form-input-icon--ok  { color: #2F9E44; }
.form-input-icon--err { color: #c0392b; }
.form-input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--color-text-light);
  pointer-events: none;
}

/* 必須/任意バッジ */
.form-required {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 2px 8px;
  border-radius: 2px;
}

.form-optional {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-light);
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 2px;
}

/* フォームアクション */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.form-actions--right { justify-content: flex-end; }

/* selectサーチラッパー */
.select-search-wrap { position: relative; }

.select-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 13px;
  font-family: var(--font-sans);
  background: #fafaf8;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.select-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #fff;
}

.select-search-wrap .form-select,
.select-search-wrap select {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* 万ボタン・今日ボタン */
.man-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 36px;
  background: rgba(91,122,112,0.1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  margin-left: 6px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.man-btn:hover { background: rgba(91,122,112,0.2); border-color: var(--color-accent); }

.today-btn {
  font-size: 11px;
  color: var(--color-accent);
  cursor: pointer;
  margin-left: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
  user-select: none;
  display: inline-block;
  vertical-align: middle;
}
.today-btn:hover { color: var(--color-primary); }

/* フラッシュメッセージ */
.flash {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 40px 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
  border: 1px solid transparent;
  transition: opacity 0.5s ease;
}

.flash__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1;
}

.flash__body {
  flex: 1;
  min-width: 0;
}

.flash--success {
  background: rgba(22,163,74,0.08);
  color: #15803d;
  border-color: rgba(22,163,74,0.24);
}

.flash--error {
  background: rgba(192,57,43,0.08);
  color: #8a2020;
  border-color: rgba(192,57,43,0.24);
}

.flash--warning {
  background: rgba(217,119,6,0.08);
  color: #8a5500;
  border-color: rgba(217,119,6,0.24);
}

.flash--info {
  background: rgba(59,130,246,0.08);
  color: #1e40af;
  border-color: rgba(59,130,246,0.24);
}

[data-theme="dark"] .flash--success {
  background: rgba(22,163,74,0.12);
  color: #4ade80;
  border-color: rgba(22,163,74,0.3);
}

[data-theme="dark"] .flash--error {
  background: rgba(192,57,43,0.14);
  color: #f87171;
  border-color: rgba(192,57,43,0.32);
}

[data-theme="dark"] .flash--warning {
  background: rgba(217,119,6,0.12);
  color: #fbbf24;
  border-color: rgba(217,119,6,0.3);
}

[data-theme="dark"] .flash--info {
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
  border-color: rgba(59,130,246,0.3);
}

.flash-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: currentColor;
  opacity: 0.5;
  cursor: pointer;
  padding: 4px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-close:hover { opacity: 1; }

/* =============================================
   検索・フィルタバー
   ============================================= */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* フィルタ内の入力は横並び前提。form-select等の width:100% を打ち消す */
.filter-bar .form-select,
.filter-bar .form-input,
.filter-bar select,
.filter-bar input[type="text"],
.filter-bar input[type="date"] {
  width: auto;
  min-width: 180px;
  flex: 0 1 220px;
}

.filter-bar .btn {
  flex: 0 0 auto;
}

/* ラベルは折り返さない */
.filter-bar .form-label {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.filter-bar__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.filter-bar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  font-size: 14px;
  pointer-events: none;
}

.filter-bar__search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition);
  min-height: 38px;
}

.filter-bar__search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91,122,112,0.1);
}

.filter-bar__tabs {
  display: flex;
  gap: 4px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3px;
  flex-wrap: wrap;
}

.filter-bar__tab {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  font-family: var(--font-sans);
  white-space: nowrap;
  min-height: 32px;
}

.filter-bar__tab:hover {
  color: var(--color-primary);
  background: rgba(16,42,67,0.05);
}

.filter-bar__tab.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* =============================================
   モーダル
   ============================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.is-open { display: flex; }

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.2);
  margin: 16px;
}

.modal__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.modal__text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =============================================
   ページネーション
   ============================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  font-size: 12px;
  color: var(--color-text-light);
}

.pagination__pages {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination__btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
  min-height: 30px;
}

.pagination__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination__btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =============================================
   EFO: ステッププログレスバー
   ============================================= */

.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  position: relative;
}

.step-progress__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 160px;
}

.step-progress__item::before {
  content: '';
  position: absolute;
  top: 20px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step-progress__item:last-child::before { display: none; }

.step-progress__item.is-done::before { background: var(--color-accent); }

.step-progress__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.step-progress__item.is-active .step-progress__circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(16,42,67,0.15);
}

.step-progress__item.is-done .step-progress__circle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.step-progress__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-top: 8px;
  letter-spacing: 0.03em;
  text-align: center;
}

.step-progress__item.is-active .step-progress__label {
  color: var(--color-primary);
  font-weight: 700;
}

/* EFO: フォームステップ */
.form-step {
  display: none;
  animation: stepFadeIn 0.35s ease;
}

.form-step.is-active { display: block; }

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.form-step__heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

/* 粗利率表示 */
.profit-rate-display {
  background: linear-gradient(135deg, rgba(16,42,67,0.04) 0%, rgba(91,122,112,0.06) 100%);
  border: 1.5px solid rgba(91,122,112,0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.profit-rate-display__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.profit-rate-display__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.profit-rate-display__value--good    { color: #15803d; }
.profit-rate-display__value--warning { color: #c2410c; }

.profit-rate-display__note {
  font-size: 11px;
  color: var(--color-text-light);
  margin-left: auto;
}

/* =============================================
   スピナー
   ============================================= */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   トースト通知
   ============================================= */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: auto;
  max-width: 320px;
  line-height: 1.5;
}

.toast--success { background: #16a34a; }
.toast--error   { background: #c0392b; }
.toast--info    { background: var(--color-accent); }

.toast--fadeout { animation: toastOut 0.4s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* =============================================
   ゲーミフィケーション
   ============================================= */

.gamif-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

/* stat-card パターン準拠のゲーミフィケーションカード */
.gamif-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow);
}

.gamif-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.gamif-card__icon--streak { background: rgba(245,158,11,0.12); }
.gamif-card__icon--level  { background: rgba(184,154,90,0.12); }
.gamif-card__icon--zero   { background: rgba(0,0,0,0.05); }

.gamif-card__body { flex: 1; }

.gamif-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.gamif-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gamif-card__value--streak { color: var(--color-warning); }
.gamif-card__value--zero   { color: var(--color-text-light); }

.gamif-card__unit {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.gamif-card__sub    { font-size: 11px; color: var(--color-text-light); margin-top: 4px; }
.gamif-card__record { font-size: 11px; color: var(--color-text-light); margin-top: 4px; opacity: 0.75; }

/* ストリーク炎アイコンアニメーション */
.streak-fire {
  display: inline-block;
  animation: flicker 1.5s ease-in-out infinite alternate;
}

.streak-fire--zero {
  animation: none;
  opacity: 0.4;
  filter: grayscale(100%);
}

@keyframes flicker {
  0%   { filter: drop-shadow(0 0 4px rgba(245,158,11,0.6)); opacity: 1; }
  100% { filter: drop-shadow(0 0 8px rgba(239,68,68,0.5)); opacity: 0.85; }
}

/* レベルバッジ（XPプログレスバー付き表示用） */
.level-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.level-badge__icon  { font-size: 20px; }
.level-badge__level { font-size: 28px; font-weight: 700; color: var(--color-primary); letter-spacing: -0.02em; }
.level-badge__xp    { font-size: 12px; font-weight: 600; color: var(--color-text-light); margin-bottom: 8px; }

.level-badge-small {
  display: inline-block;
  background: var(--mobile-accent2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.5;
}

/* XPプログレスバー */
.xp-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}

.xp-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mobile-accent2) 0%, var(--lp-brand-blue) 100%);
  border-radius: 99px;
  transition: width 0.6s ease;
}

.xp-bar__label { font-size: 10px; color: var(--color-text-light); text-align: right; }

/* ゲーミフィケーションToast */
.gamification-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--mobile-accent2) 0%, var(--color-primary) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
  z-index: 9999;
  animation: gamif-toast-in 0.4s ease, gamif-toast-out 0.4s ease 4.6s forwards;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}

@keyframes gamif-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes gamif-toast-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

@media (max-width: 600px) {
  .gamification-toast {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    max-width: 100%;
    border-radius: 0;
    padding: 16px 20px;
    font-size: 15px;
  }

  @keyframes gamif-toast-in {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes gamif-toast-out {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(100%); }
  }
}

/* ランキング */
.ranking-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.ranking-item--gold   { border-left-color: var(--color-gold); background: #fffbeb; }
.ranking-item--silver { border-left-color: #94a3b8; background: #f8fafc; }
.ranking-item--bronze { border-left-color: #d97706; background: #fffcf5; }
.ranking-item--mine   { outline: 2px solid var(--mobile-accent2); outline-offset: -2px; }

.ranking-item__rank         { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; font-weight: 900; }
.ranking-item__rank--gold   { color: var(--color-gold); }
.ranking-item__rank--silver { color: #718096; }
.ranking-item__rank--bronze { color: #c0905a; }
.ranking-item__name  { flex: 1; font-size: 14px; font-weight: 600; color: var(--color-text); }
.ranking-item__you   { font-size: 11px; font-weight: 400; color: var(--mobile-accent2); }
.ranking-item__count { font-size: 18px; font-weight: 700; color: var(--color-text); letter-spacing: -0.02em; }
.ranking-item__unit  { font-size: 11px; font-weight: 400; color: var(--color-text-light); margin-left: 1px; }

/* ハイライトグリッド */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.highlight-item {
  background: var(--color-white);
  border-radius: 10px;
  padding: 10px 6px 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.highlight-item__icon  { font-size: 20px; line-height: 1; }
.highlight-item__value { font-size: 20px; font-weight: 700; color: var(--color-text); letter-spacing: -0.02em; line-height: 1.1; }
.highlight-item__label { font-size: 10px; color: var(--color-text-light); font-weight: 500; }

/* コンディション星 */
.condition-stars {
  display: inline-flex;
  gap: 1px;
  font-size: 14px;
  line-height: 1;
}
.condition-stars__filled { color: var(--color-gold); }
.condition-stars__empty  { color: #d1cdc6; }

/* =============================================
   モバイル専用
   ============================================= */

.mobile-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--admin-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--mobile-accent);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.mobile-header__title   { font-size: 15px; font-weight: 700; letter-spacing: 0.03em; }
.mobile-header__user    { font-size: 12px; color: rgba(255,255,255,0.75); }
.mobile-header__logout  { font-size: 12px; color: rgba(255,255,255,0.7); text-decoration: underline; }

.mobile-form__input,
.mobile-form__select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 16px; /* iOSズーム防止 */
  font-family: var(--font-sans);
  color: var(--mobile-text);
  background: var(--mobile-bg-card);
  border: 1px solid var(--mobile-border);
  border-radius: var(--mobile-radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.mobile-form__input:focus,
.mobile-form__select:focus {
  border-color: var(--mobile-accent2);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-sans);
  text-align: center;
  border-radius: var(--mobile-radius);
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 8px;
}

.mobile-btn--primary { background: var(--mobile-accent); color: #fff; }
.mobile-btn--primary:hover   { background: var(--color-primary-dark); }
.mobile-btn--primary:active  { transform: scale(0.98); }
.mobile-btn--primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* =============================================
   ダッシュボードタブ
   ============================================= */

.dashboard-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dashboard-tab {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  text-align: center;
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-height: 40px;
}

.dashboard-tab:hover {
  color: var(--color-primary);
  background: rgba(16,42,67,0.05);
}

.dashboard-tab.is-active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(16,42,67,0.2);
}

.dashboard-panel { display: none; animation: panelFadeIn 0.25s ease; }
.dashboard-panel.is-active { display: block; }

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ダッシュボードグリッド */
.dashboard-grid     { display: grid; grid-template-columns: 1fr 1fr;          gap: 20px; }
.dashboard-grid--3  { display: grid; grid-template-columns: repeat(3, 1fr);   gap: 20px; }
.dashboard-grid--full { display: grid; grid-template-columns: 1fr;            gap: 20px; }
.dashboard-grid--2-1 { display: grid; grid-template-columns: 2fr 1fr;         gap: 20px; }

/* =============================================
   空状態
   ============================================= */

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state__icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.empty-state__text { font-size: 14px; color: var(--color-text-light); line-height: 1.7; margin-bottom: 16px; }

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

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid--3  { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid--2-1 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .edit-layout { grid-template-columns: 1fr; }
  .edit-sidebar { order: -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ds-body { padding: 16px; }

  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-header { padding: 0 12px; gap: 8px; }
  .admin-header__hamburger { display: flex; }
  .admin-header__breadcrumb { display: none; }
  .admin-header__user span  { display: none; }
  .admin-content { padding: 16px; min-width: 0; }

  /* モバイルはフィルタを縦積みに戻す */
  .filter-bar .form-select,
  .filter-bar .form-input,
  .filter-bar select,
  .filter-bar input[type="text"],
  .filter-bar input[type="date"] { width: 100%; flex: 1 1 100%; min-width: 0; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-card__value { font-size: 28px; }

  .page-header { flex-direction: column; align-items: flex-start; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar__search { max-width: 100%; }

  .form-row--2col,
  .form-row--3col { grid-template-columns: 1fr; }

  /* テーブルカード化 */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tbody tr {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    padding: 10px 12px;
    background: var(--color-white) !important;
  }
  .table tbody td {
    border-bottom: none;
    padding: 4px 0;
    font-size: 13px;
  }
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 2px;
  }
  .table__actions {
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
  }

  .pagination { flex-direction: column; gap: 10px; text-align: center; }

  .step-progress__item { max-width: 80px; }
  .step-progress__label { font-size: 9px; letter-spacing: 0; }
  .step-progress__circle { width: 32px; height: 32px; font-size: 12px; }

  .form-actions { flex-direction: column-reverse; gap: 10px; }
  .btn-form-next,
  .btn-form-submit,
  .btn-form-back { width: 100%; justify-content: center; }

  .profit-rate-display { flex-direction: column; align-items: flex-start; gap: 8px; }
  .profit-rate-display__note { margin-left: 0; }

  /* フォーム入力 iOSズーム防止 */
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .btn { min-height: 44px; padding: 10px 18px; }
  .btn--sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
  .btn--xs { min-height: unset; }

  .dashboard-tabs { gap: 3px; padding: 3px; }
  .dashboard-tab  { flex: none; width: 100%; padding: 10px 12px; font-size: 13px; }
  .dashboard-grid--3   { grid-template-columns: 1fr; }
  .dashboard-grid--2-1 { grid-template-columns: 1fr; }

  /* モバイル向けトースト */
  .toast-container { top: auto; bottom: 80px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  .ds-grid { grid-template-columns: 1fr; }
  .ds-grid--2 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 375px) {
  .gamif-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .gamif-card__value,
  .level-badge__level { font-size: 22px; }
}

@media (min-width: 480px) {
  .mobile-wrap {
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    margin-top: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    min-height: calc(100vh - 32px);
  }
  .mobile-header { border-radius: 12px 12px 0 0; }
}

/* =============================================
   ショーケース専用スタイル
   ============================================= */

.ds-portal-body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  padding: 48px 32px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.ds-portal-header {
  text-align: center;
  margin-bottom: 48px;
}

.ds-portal-logo {
  font-size: 32px;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.ds-portal-desc {
  font-size: 14px;
  color: var(--color-text-light);
}

.ds-portal-category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 12px;
  margin-top: 32px;
}

.ds-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.ds-portal-card {
  display: block;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.ds-portal-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ds-portal-card__icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.ds-portal-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.ds-portal-card__desc {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .ds-portal-body { padding: 24px 16px; }
  .ds-portal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .ds-portal-grid { grid-template-columns: 1fr; }
}

/* =============================================
   カンバンボード
   ============================================= */

.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}

.kanban__col {
  min-width: 200px;
  flex: 1;
  flex-shrink: 0;
}

.kanban__col-header {
  padding: 10px 14px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.kanban__col-count {
  background: rgba(0,0,0,0.1);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.kanban__col-body {
  background: rgba(0,0,0,0.04);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.kanban__card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  border-left: 3px solid transparent;
}

.kanban__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kanban__card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.kanban__card-sub {
  font-size: 12px;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.kanban__card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban__card-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.kanban__card-person {
  font-size: 11px;
  color: var(--color-text-light);
}

/* カンバン カラー定義 — ステータスに合わせて上書き可 */
.kanban__col-header--prospect    { background: var(--status-prospect-bg);    color: var(--status-prospect-text); }
.kanban__col-header--proposal    { background: var(--status-proposal-bg);    color: var(--status-proposal-text); }
.kanban__col-header--negotiation { background: var(--status-negotiation-bg); color: var(--status-negotiation-text); }
.kanban__col-header--won         { background: var(--status-won-bg);         color: var(--status-won-text); }
.kanban__col-header--lost        { background: var(--status-lost-bg);        color: var(--status-lost-text); }
.kanban__col-header--estimate    { background: rgba(168,85,247,0.15);        color: #6d28d9; }

.kanban__card--prospect    { border-left-color: var(--status-prospect-text); }
.kanban__card--proposal    { border-left-color: var(--status-proposal-text); }
.kanban__card--negotiation { border-left-color: var(--status-negotiation-text); }
.kanban__card--won         { border-left-color: var(--status-won-text); }
.kanban__card--lost        { border-left-color: var(--status-lost-text); opacity: 0.7; }
.kanban__card--estimate    { border-left-color: #6d28d9; }

/* =============================================
   ドロップゾーン（ファイルアップロード）
   ============================================= */

.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  background: rgba(16,42,67,0.02);
  cursor: pointer;
  transition: all var(--transition);
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--color-accent);
  background: rgba(91,122,112,0.06);
}

.drop-zone__icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.6;
}

.drop-zone__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.drop-zone__sub {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.drop-zone__btn {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.drop-zone__btn:hover { background: var(--color-primary-dark); }

/* =============================================
   プログレスバー
   ============================================= */

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--color-accent);
  transition: width 0.4s ease;
  max-width: 100%;
}

.progress-bar--primary .progress-bar__fill { background: var(--color-primary); }
.progress-bar--gold    .progress-bar__fill { background: var(--color-gold); }
.progress-bar--success .progress-bar__fill { background: var(--color-success); }
.progress-bar--error   .progress-bar__fill { background: var(--color-error); }

/* ラベル付きプログレス */
.progress-with-label {
  margin-bottom: 12px;
}

.progress-with-label__header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

.progress-with-label__title { font-weight: 600; }
.progress-with-label__count { font-variant-numeric: tabular-nums; }

/* =============================================
   信頼度バッジ（OCR用）
   ============================================= */

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.confidence-badge--high    { background: rgba(16,185,129,0.15); color: #065f46; }
.confidence-badge--medium  { background: rgba(245,158,11,0.15);  color: #92400e; }
.confidence-badge--low     { background: rgba(239,68,68,0.15);   color: #991b1b; }

.confidence-badge--high::before   { content: '●'; font-size: 8px; color: #10b981; }
.confidence-badge--medium::before { content: '●'; font-size: 8px; color: #f59e0b; }
.confidence-badge--low::before    { content: '●'; font-size: 8px; color: #ef4444; }

/* =============================================
   宛名ラベルグリッド
   ============================================= */

/* A4 12面 */
.label-grid--12 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  background: #fff;
}

/* A4 24面 */
.label-grid--24 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 6px;
  background: #fff;
}

.label-cell {
  border: 1px dashed #ccc;
  padding: 12px 10px;
  font-size: 11px;
  line-height: 1.7;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.label-cell__company   { font-size: 11px; font-weight: 600; color: var(--color-text); }
.label-cell__dept      { font-size: 10px; color: var(--color-text-light); }
.label-cell__name      { font-size: 12px; font-weight: 700; color: var(--color-text); margin-top: 4px; }
.label-cell__zip       { font-size: 10px; color: var(--color-text-light); margin-top: 4px; }
.label-cell__address   { font-size: 10px; color: var(--color-text); }
.label-cell--empty     { background: rgba(0,0,0,0.02); }

/* =============================================
   タイムライン（活動履歴）
   ============================================= */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
  border-radius: 1px;
}

.timeline__item {
  position: relative;
  margin-bottom: 20px;
}

.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  z-index: 1;
}

.timeline__item--call   .timeline__dot { border-color: var(--color-accent); background: rgba(91,122,112,0.1); }
.timeline__item--visit  .timeline__dot { border-color: var(--color-primary); background: rgba(16,42,67,0.1); }
.timeline__item--mail   .timeline__dot { border-color: var(--color-gold); background: rgba(184,154,90,0.1); }
.timeline__item--note   .timeline__dot { border-color: var(--color-text-light); }

.timeline__date {
  font-size: 11px;
  color: var(--color-text-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline__content {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.timeline__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.timeline__text {
  font-size: 12px;
  color: var(--color-text);
  line-height: 1.6;
}

/* =============================================
   差し込みタグ挿入 UI
   ============================================= */

.tag-insert-panel {
  background: var(--color-bg-beige);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.tag-insert-panel__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.tag-insert-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-insert-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.tag-insert-btn:hover {
  border-color: var(--color-accent);
  background: rgba(91,122,112,0.07);
  color: var(--color-accent);
}

/* =============================================
   パイプライン表示（水平ステップ）
   ============================================= */

.pipeline {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
  gap: 0;
}

.pipeline__step {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 100px;
  position: relative;
}

.pipeline__step-inner {
  flex: 1;
  padding: 10px 16px 10px 24px;
  background: rgba(0,0,0,0.04);
  text-align: center;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  transition: background var(--transition);
}

.pipeline__step:first-child .pipeline__step-inner {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.pipeline__step-inner:hover { background: rgba(16,42,67,0.08); cursor: pointer; }

.pipeline__step--active .pipeline__step-inner  { background: var(--color-primary); }
.pipeline__step--done   .pipeline__step-inner  { background: var(--color-accent); }

.pipeline__step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  white-space: nowrap;
}

.pipeline__step--active .pipeline__step-label,
.pipeline__step--done   .pipeline__step-label { color: var(--color-white); }

.pipeline__step-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.pipeline__step--active .pipeline__step-count,
.pipeline__step--done   .pipeline__step-count { color: var(--color-white); }

/* =============================================
   統計カード（stat-card）
   ============================================= */

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card__icon--primary { background: rgba(16,42,67,0.08); }
.stat-card__icon--accent  { background: rgba(91,122,112,0.12); }
.stat-card__icon--gold    { background: rgba(184,154,90,0.12); }
.stat-card__icon--alert   { background: rgba(192,57,43,0.08); }

.stat-card__body { flex: 1; }

.stat-card__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card__unit {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.stat-card__note {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.stat-card__change {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius);
}

.stat-card__change--up   { color: var(--color-success); background: rgba(22,163,74,0.1); }
.stat-card__change--down { color: var(--color-error);   background: rgba(192,57,43,0.08); }

/* =============================================
   フィルタバー拡張（セレクト型）
   ============================================= */

.filter-bar__select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  min-height: 38px;
  transition: border-color var(--transition);
}

.filter-bar__select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91,122,112,0.1);
}


/* ==============================================
   新規コンポーネント群 — v20260329 追加
   アコーディオン / タブ / ツールチップ / ドロップダウン /
   ブレッドクラム / アバター / スケルトン / ステッパー /
   空状態 / ドロワー / ツリービュー / データリスト
   ============================================== */

/* =============================================
   アコーディオン（.accordion）
   ============================================= */

.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.accordion__item:last-child {
  border-bottom: none;
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  font-family: var(--font-sans);
}

.accordion__trigger:hover {
  background: rgba(16,42,67,0.03);
}

.accordion__trigger[aria-expanded="true"] {
  background: rgba(16,42,67,0.04);
}

.accordion__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-light);
  transition: transform 0.25s ease;
}

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  transform: rotate(180deg);
}

.accordion__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
  background: var(--color-white);
}

.accordion__body.is-open {
  grid-template-rows: 1fr;
}

.accordion__inner {
  overflow: hidden;
}

.accordion__content {
  padding: 4px 20px 20px;
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* =============================================
   タブ（.tabs）
   ============================================= */

/* 水平タブ */
.tabs {
  display: flex;
  flex-direction: column;
}

.tabs__nav {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__nav::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  white-space: nowrap;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.tabs__tab:hover {
  color: var(--color-primary);
}

.tabs__tab.is-active {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-primary);
}

.tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(16,42,67,0.1);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
}

.tabs__tab.is-active .tabs__badge {
  background: var(--color-primary);
  color: var(--color-white);
}

.tabs__panel {
  display: none;
  padding: 20px 0;
  animation: tabFadeIn 0.2s ease;
}

.tabs__panel.is-active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ピルタブ */
.tabs--pill .tabs__nav {
  border-bottom: none;
  gap: 4px;
  background: rgba(16,42,67,0.05);
  padding: 4px;
  border-radius: var(--radius-lg);
  display: inline-flex;
}

.tabs--pill .tabs__tab {
  border-bottom: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  bottom: 0;
}

.tabs--pill .tabs__tab.is-active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tabs--pill .tabs__panel {
  padding: 16px 0;
}

/* =============================================
   ツールチップ（.tooltip）
   CSS only / data-tooltip属性
   ============================================= */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9000;
}

/* 吹き出し本体 */
[data-tooltip]::before {
  content: attr(data-tooltip);
  transform: translateX(-50%) translateY(-4px);
  bottom: calc(100% + 6px);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: 1.4;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: var(--radius);
}

/* 矢印 */
[data-tooltip]::after {
  content: '';
  transform: translateX(-50%);
  bottom: calc(100% + 1px);
  border: 5px solid transparent;
  border-top-color: var(--color-primary);
  border-bottom: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus::before,
[data-tooltip]:focus::after {
  opacity: 1;
}

[data-tooltip]:hover::before {
  transform: translateX(-50%) translateY(0);
}

/* 下配置 */
[data-tooltip-pos="bottom"]::before {
  bottom: auto;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
}

[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 1px);
  border-top-color: transparent;
  border-bottom: 5px solid var(--color-primary);
  border-top: none;
}

[data-tooltip-pos="bottom"]:hover::before {
  transform: translateX(-50%) translateY(0);
}

/* 右配置 */
[data-tooltip-pos="right"]::before {
  left: calc(100% + 6px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="right"]::after {
  left: calc(100% + 1px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  border-top-color: transparent;
  border-right: 5px solid var(--color-primary);
  border-bottom: none;
  border-left: none;
}

[data-tooltip-pos="right"]:hover::before {
  transform: translateY(-50%) translateX(0);
}

/* 左配置 */
[data-tooltip-pos="left"]::before {
  left: auto;
  right: calc(100% + 6px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="left"]::after {
  left: auto;
  right: calc(100% + 1px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  border-top-color: transparent;
  border-left: 5px solid var(--color-primary);
  border-bottom: none;
  border-right: none;
}

[data-tooltip-pos="left"]:hover::before {
  transform: translateY(-50%) translateX(0);
}

/* =============================================
   ドロップダウンメニュー（.dropdown）
   ============================================= */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color var(--transition), background var(--transition);
  min-height: 38px;
}

.dropdown__trigger:hover {
  border-color: var(--color-accent);
  background: rgba(91,122,112,0.03);
}

.dropdown__trigger.is-open {
  border-color: var(--color-primary);
  background: rgba(16,42,67,0.03);
}

.dropdown__caret {
  width: 12px;
  height: 12px;
  color: var(--color-text-light);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dropdown__trigger.is-open .dropdown__caret {
  transform: rotate(180deg);
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 500;
  padding: 4px 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dropdown__menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown__menu--right {
  left: auto;
  right: 0;
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font-sans);
  text-align: left;
  text-decoration: none;
}

.dropdown__item:hover {
  background: rgba(16,42,67,0.04);
  color: var(--color-primary);
}

.dropdown__item--danger {
  color: var(--color-error);
}

.dropdown__item--danger:hover {
  background: rgba(192,57,43,0.06);
  color: var(--color-error);
}

.dropdown__item-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.7;
}

.dropdown__divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.dropdown__header {
  padding: 6px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================
   ブレッドクラム（.breadcrumb）
   ============================================= */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--color-text-light);
}

.breadcrumb__item:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-top: 1.5px solid var(--color-text-light);
  border-right: 1.5px solid var(--color-text-light);
  transform: rotate(45deg);
  margin: 0 10px;
  opacity: 0.5;
}

.breadcrumb__link {
  color: var(--color-text-light);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb__item:last-child .breadcrumb__link,
.breadcrumb__current {
  color: var(--color-primary);
  font-weight: 600;
  cursor: default;
  pointer-events: none;
}

/* コンパクト */
.breadcrumb--sm .breadcrumb__item { font-size: 12px; }
.breadcrumb--sm .breadcrumb__link { font-size: 12px; }

/* =============================================
   アバター（.avatar）
   ============================================= */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 700;
  font-family: var(--font-sans);
  position: relative;
  background: rgba(16,42,67,0.1);
  color: var(--color-primary);
}

/* サイズ */
.avatar--xs { width: 24px; height: 24px; font-size: 9px; }
.avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.avatar--md { width: 40px; height: 40px; font-size: 14px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--xl { width: 72px; height: 72px; font-size: 24px; }

/* カラーバリエーション（イニシャル用） */
.avatar--primary  { background: rgba(16,42,67,0.12);   color: var(--color-primary); }
.avatar--accent   { background: rgba(91,122,112,0.15); color: var(--color-accent); }
.avatar--gold     { background: rgba(184,154,90,0.15); color: #7a6030; }
.avatar--teal     { background: rgba(37,99,235,0.15); color: #1a7aa8; }
.avatar--rose     { background: rgba(192,57,43,0.12);  color: #a03020; }

/* 画像アバター */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* グループ表示 */
.avatar-group {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.avatar-group .avatar {
  border: 2px solid var(--color-white);
  margin-left: -8px;
}

.avatar-group .avatar:last-child {
  margin-left: 0;
}

/* ステータスインジケーター */
.avatar-wrap {
  position: relative;
  display: inline-flex;
}

.avatar-status {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
}

.avatar-status--online  { background: var(--color-success); }
.avatar-status--offline { background: #aaaaaa; }
.avatar-status--busy    { background: var(--color-error); }
.avatar-status--away    { background: var(--color-warning); }

/* --lg サイズのインジケーターは少し大きく */
.avatar--lg ~ .avatar-status,
.avatar-wrap:has(.avatar--lg) .avatar-status {
  width: 13px;
  height: 13px;
}

/* =============================================
   スケルトンローディング（.skeleton）
   ============================================= */

@keyframes skeletonShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #e8e5de 25%,
    #f0ede6 50%,
    #e8e5de 75%
  );
  background-size: 1200px 100%;
  animation: skeletonShimmer 1.5s infinite linear;
  border-radius: var(--radius);
}

/* テキスト行 */
.skeleton--text {
  height: 14px;
  border-radius: 7px;
}

.skeleton--text-sm {
  height: 11px;
  border-radius: 6px;
}

.skeleton--text-lg {
  height: 20px;
  border-radius: 10px;
}

/* ブロック */
.skeleton--rect {
  border-radius: var(--radius);
}

/* サークル */
.skeleton--circle {
  border-radius: 50%;
}

/* カードスケルトン */
.skeleton-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.skeleton-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skeleton-card__lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* テーブル行スケルトン */
.skeleton-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

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

/* =============================================
   ステッパー（.stepper）
   水平ステップインジケーター（管理画面内フロー用）
   ============================================= */

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
}

.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

/* コネクター線（最後以外） */
.stepper__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
  transition: background 0.3s ease;
}

.stepper__step--done:not(:last-child)::after {
  background: var(--color-accent);
}

.stepper__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-light);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.stepper__step--active .stepper__circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 0 4px rgba(16,42,67,0.12);
}

.stepper__step--done .stepper__circle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.stepper__check {
  width: 14px;
  height: 14px;
}

.stepper__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  margin-top: 8px;
  text-align: center;
  letter-spacing: 0.02em;
}

.stepper__step--active .stepper__label {
  color: var(--color-primary);
  font-weight: 700;
}

.stepper__step--done .stepper__label {
  color: var(--color-accent);
}

/* コンパクト（サブラベルなし） */
.stepper--sm .stepper__circle {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.stepper--sm .stepper__step:not(:last-child)::after {
  top: 12px;
}

.stepper--sm .stepper__label {
  font-size: 10px;
  margin-top: 6px;
}

/* =============================================
   空状態（.empty-state）
   ============================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  background: rgba(16,42,67,0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-text-light);
}

.empty-state__icon svg {
  width: 32px;
  height: 32px;
}

.empty-state__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.empty-state__desc {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.8;
  max-width: 360px;
  margin-bottom: 24px;
}

.empty-state__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* コンパクト */
.empty-state--sm {
  padding: 32px 20px;
}

.empty-state--sm .empty-state__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
}

.empty-state--sm .empty-state__icon svg {
  width: 24px;
  height: 24px;
}

.empty-state--sm .empty-state__title {
  font-size: 14px;
}

.empty-state--sm .empty-state__desc {
  font-size: 12px;
  margin-bottom: 16px;
}

/* =============================================
   サイドドロワー（.drawer）
   右からスライドイン + オーバーレイ
   ============================================= */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 90vw;
  background: var(--color-white);
  box-shadow: -4px 0 30px rgba(0,0,0,0.12);
  z-index: 801;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.is-open {
  transform: translateX(0);
}

/* 左配置 */
.drawer--left {
  right: auto;
  left: 0;
  box-shadow: 4px 0 30px rgba(0,0,0,0.12);
  transform: translateX(-100%);
}

.drawer--left.is-open {
  transform: translateX(0);
}

/* 幅バリエーション */
.drawer--sm  { width: 320px; }
.drawer--md  { width: 420px; }
.drawer--lg  { width: 600px; }
.drawer--xl  { width: 800px; }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.drawer__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.drawer__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  font-size: 18px;
  font-family: var(--font-sans);
  line-height: 1;
}

.drawer__close:hover {
  background: rgba(16,42,67,0.06);
  color: var(--color-primary);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* =============================================
   ツリービュー（.tree）
   ============================================= */

.tree {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1;
}

.tree__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tree__list--nested {
  padding-left: 20px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}

.tree__list--nested.is-open {
  grid-template-rows: 1fr;
}

.tree__list--inner {
  overflow: hidden;
}

.tree__item {
  position: relative;
}

.tree__node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
  color: var(--color-text);
  text-decoration: none;
}

.tree__node:hover {
  background: rgba(16,42,67,0.04);
  color: var(--color-primary);
}

.tree__node.is-active {
  background: rgba(16,42,67,0.08);
  color: var(--color-primary);
  font-weight: 600;
}

.tree__toggle {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree__toggle-icon {
  width: 12px;
  height: 12px;
  color: var(--color-text-light);
  transition: transform 0.2s ease;
}

.tree__item.is-open > .tree__node .tree__toggle-icon {
  transform: rotate(90deg);
}

.tree__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--color-text-light);
}

.tree__node.is-active .tree__icon {
  color: var(--color-primary);
}

.tree__label {
  flex: 1;
  font-size: 13px;
}

.tree__count {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-light);
  background: rgba(16,42,67,0.07);
  padding: 1px 6px;
  border-radius: 8px;
}

/* インデント線 */
.tree__list--nested {
  border-left: 1px solid var(--color-border);
  margin-left: 12px;
}

/* =============================================
   データリスト（.data-list）
   キー: バリュー形式
   ============================================= */

.data-list {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13px;
}

.data-list__row {
  display: contents;
}

.data-list__row:not(:last-child) > * {
  border-bottom: 1px solid var(--color-border);
}

.data-list__key {
  background: rgba(16,42,67,0.03);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--color-text-light);
  font-size: 12px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--color-border);
}

.data-list__val {
  background: var(--color-white);
  padding: 12px 16px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* フラット（枠なしバージョン） */
.data-list--flat {
  border: none;
  border-radius: 0;
}

.data-list--flat .data-list__key {
  background: none;
  padding-left: 0;
}

.data-list--flat .data-list__val {
  padding-right: 0;
}

.data-list--flat .data-list__row:not(:last-child) > * {
  border-bottom: 1px solid var(--color-border);
}

/* コンパクト */
.data-list--sm .data-list__key,
.data-list--sm .data-list__val {
  padding: 8px 14px;
  font-size: 12px;
}

/* =============================================
   ドロワー / アコーディオン / ツリー JS連携用
   ポータルカード（インデックスページ）
   ============================================= */

/* 既存ポータルスタイルとの衝突防止用 — 追加コンポーネント専用デモラッパー */
.ds-demo-wrap {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.ds-demo-spacer {
  height: 16px;
}


/* ダークモード要素補正 */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1a1e28;
  color: #e0e4ec;
  border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .admin-header__user-icon {
  background: var(--mobile-accent2);
  color: #fff;
}

[data-theme="dark"] .ds-portal-card {
  background: #1a1e28;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .ds-portal-card:hover {
  border-color: var(--repo-dark-lp-brand-blue-mid, rgba(124,183,232,0.20));
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .ds-portal-body {
  background: #0f1117;
}

[data-theme="dark"] .ds-portal-header {
  background: #0a0e18;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .ds-portal-category {
  color: #8b96aa;
}

/* ============================================
   ゲーミフィケーション ダークモード補正
   ============================================ */

/* gamif-card */
[data-theme="dark"] .gamif-card {
  background: var(--color-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .gamif-card__icon--zero {
  background: rgba(255,255,255,0.06);
}

/* XPプログレスバー */
[data-theme="dark"] .xp-bar {
  background: rgba(255,255,255,0.1);
}

[data-theme="dark"] .xp-bar__label {
  color: var(--color-text-light);
}

/* ランキング */
[data-theme="dark"] .ranking-item {
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

[data-theme="dark"] .ranking-item--gold   { background: rgba(245,158,11,0.12);  border-left-color: #f59e0b; }
[data-theme="dark"] .ranking-item--silver { background: rgba(148,163,184,0.10); border-left-color: #94a3b8; }
[data-theme="dark"] .ranking-item--bronze { background: rgba(217,119,6,0.12);   border-left-color: #d97706; }
[data-theme="dark"] .ranking-item--mine   { outline-color: var(--color-primary); }

[data-theme="dark"] .ranking-item__name  { color: var(--color-text); }
[data-theme="dark"] .ranking-item__count { color: var(--color-text); }
[data-theme="dark"] .ranking-item__unit  { color: var(--color-text-light); }
[data-theme="dark"] .ranking-item__rank--gold   { color: var(--color-gold) !important; }
[data-theme="dark"] .ranking-item__rank--silver { color: var(--color-text-light) !important; }
[data-theme="dark"] .ranking-item__rank--bronze { color: #c89060 !important; }

/* ハイライトグリッド */
[data-theme="dark"] .highlight-item {
  background: var(--color-white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="dark"] .highlight-item__value { color: var(--color-text); }
[data-theme="dark"] .highlight-item__label { color: var(--color-text-light); }

/* condition-stars（空星） */
[data-theme="dark"] .condition-stars__empty { color: rgba(255,255,255,0.12); }

/* ダークモード切替ボタン */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  box-shadow: var(--shadow);
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.theme-toggle:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--mobile-accent2);
  color: var(--mobile-accent2);
}

/* ============================================
   受注おめでとう演出（パチンコ風フィーバー）
   .celebration-overlay
   ============================================ */

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.celebration-overlay.is-active {
  pointer-events: auto;
  opacity: 1;
}

/* 背景フラッシュ */
.celebration-overlay__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.25) 0%, rgba(0,0,0,0.85) 70%);
  animation: celebBgPulse 0.6s ease-in-out infinite alternate;
}

@keyframes celebBgPulse {
  0%   { background: radial-gradient(ellipse at center, rgba(37,99,235,0.2) 0%, rgba(0,0,0,0.85) 70%); }
  100% { background: radial-gradient(ellipse at center, rgba(245,166,35,0.25) 0%, rgba(0,0,0,0.85) 70%); }
}

/* コンフェティ（紙吹雪）キャンバス */
.celebration-overlay__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* メインカード */
.celebration-card {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f1520 0%, #1a2540 100%);
  border: 2px solid rgba(245,166,35,0.4);
  box-shadow: 0 0 60px rgba(245,166,35,0.3), 0 0 120px rgba(37,99,235,0.15), 0 20px 60px rgba(0,0,0,0.5);
  max-width: 520px;
  width: 90vw;
  animation: celebCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes celebCardIn {
  0%   { opacity: 0; transform: scale(0.3) rotate(-5deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* FEVER ラベル */
.celebration-card__fever {
  display: inline-block;
  padding: 6px 28px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #f5a623, #ff6b35, #f5a623);
  background-size: 200% 100%;
  animation: celebFeverShimmer 1.5s linear infinite;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

@keyframes celebFeverShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 受注金額 */
.celebration-card__amount {
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 900;
  background: linear-gradient(135deg, #f5a623 0%, #ffd700 50%, #f5a623 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: celebGoldShimmer 2s ease-in-out infinite;
  line-height: 1.2;
  margin-bottom: 8px;
}

@keyframes celebGoldShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* メッセージ */
.celebration-card__message {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

/* 案件名 */
.celebration-card__deal {
  font-size: 15px;
  color: #8b96aa;
  margin-bottom: 24px;
}

/* 担当者 */
.celebration-card__person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--mobile-accent2);
  font-size: 14px;
  font-weight: 600;
}

.celebration-card__person-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mobile-accent2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* 閉じるボタン */
.celebration-card__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #8b96aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s;
}

.celebration-card__close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* 光のビーム演出 */
.celebration-beams {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.celebration-beams::before,
.celebration-beams::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vmax;
  height: 200vmax;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.celebration-beams::before {
  background: conic-gradient(
    from 0deg,
    transparent 0deg, rgba(245,166,35,0.06) 10deg,
    transparent 20deg, transparent 40deg,
    rgba(37,99,235,0.06) 50deg, transparent 60deg,
    transparent 80deg, rgba(245,166,35,0.06) 90deg,
    transparent 100deg, transparent 120deg,
    rgba(37,99,235,0.06) 130deg, transparent 140deg,
    transparent 160deg, rgba(245,166,35,0.06) 170deg,
    transparent 180deg, transparent 200deg,
    rgba(37,99,235,0.06) 210deg, transparent 220deg,
    transparent 240deg, rgba(245,166,35,0.06) 250deg,
    transparent 260deg, transparent 280deg,
    rgba(37,99,235,0.06) 290deg, transparent 300deg,
    transparent 320deg, rgba(245,166,35,0.06) 330deg,
    transparent 340deg, transparent 360deg
  );
  animation: celebBeamRotate 8s linear infinite;
}

@keyframes celebBeamRotate {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* スマホ対応 */
@media (max-width: 600px) {
  .celebration-card {
    padding: 36px 24px;
    border-radius: 16px;
  }

  .celebration-card__message {
    font-size: 20px;
  }
}

/* ==============================================
   LP / サービスサイト向けセクションコンポーネント
   v20260416
   ============================================== */

/* =============================================
   LP共通レイアウト変数
   ============================================= */

:root {
  --lp-max-width:        1120px;
  --lp-section-padding:  80px 40px;
  --lp-section-padding-sm: 48px 20px;
  --lp-brand-blue:       var(--repo-lp-brand-blue, #2563EB);
  --lp-brand-blue-light: var(--repo-lp-brand-blue-light, rgba(37,99,235,0.08));
  --lp-brand-blue-mid:   var(--repo-lp-brand-blue-mid, rgba(37,99,235,0.15));
  --lp-section-alt-bg:   #f8f9fb;
}

[data-theme="dark"] {
  --lp-section-alt-bg:   #0d1117;
  --lp-brand-blue-light: var(--repo-dark-lp-brand-blue-light, rgba(124,183,232,0.12));
  --lp-brand-blue-mid:   var(--repo-dark-lp-brand-blue-mid, rgba(124,183,232,0.20));
}

/* LP 共通コンテナ */
.lp-container {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .lp-container {
    padding: 0 20px;
  }
}

/* LP セクション共通 */
.lp-section {
  padding: var(--lp-section-padding);
}

.lp-section--alt {
  background: var(--lp-section-alt-bg);
}

@media (max-width: 768px) {
  .lp-section {
    padding: var(--lp-section-padding-sm);
  }
}

/* LP セクションラベル（上部の小見出し） */
.lp-section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* LP セクション見出し */
.lp-section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.lp-section-subtitle {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--color-text-light);
  line-height: 1.8;
  max-width: 640px;
}

.lp-section-header {
  margin-bottom: 48px;
}

.lp-section-header--center {
  text-align: center;
}

.lp-section-header--center .lp-section-subtitle {
  margin: 0 auto;
}

/* =============================================
   Hero Section
   ============================================= */

.lp-hero {
  padding: 96px 40px 80px;
  background: var(--color-white);
}

/* バリアント: 左テキスト-右ビジュアル */
.lp-hero__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.lp-hero__content {}

.lp-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.lp-hero__headline {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.lp-hero__headline em {
  color: var(--lp-brand-blue);
  font-style: normal;
}

.lp-hero__subheadline {
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 480px;
}

.lp-hero__cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.lp-hero__social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lp-hero__social-proof-item {
  font-size: 12px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-hero__social-proof-item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

.lp-hero__visual {
  background: var(--lp-section-alt-bg);
  border-radius: var(--radius-lg);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.lp-hero__visual-placeholder {
  text-align: center;
  color: var(--color-text-light);
}

.lp-hero__visual-placeholder-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--color-border);
}

/* バリアント: 中央集約型 */
.lp-hero--center .lp-hero__inner {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 760px;
}

.lp-hero--center .lp-hero__subheadline {
  margin-left: auto;
  margin-right: auto;
}

.lp-hero--center .lp-hero__cta-group {
  justify-content: center;
}

.lp-hero--center .lp-hero__social-proof {
  justify-content: center;
}

/* バリアント: テキストのみ */
.lp-hero--text-only .lp-hero__inner {
  grid-template-columns: 1fr;
  max-width: 720px;
}

/* ダークグラデーション背景バリアント */
.lp-hero--dark {
  background: linear-gradient(135deg, var(--color-primary) 0%, #243b6e 100%);
}

.lp-hero--dark .lp-hero__headline {
  color: #ffffff;
}

.lp-hero--dark .lp-hero__subheadline {
  color: rgba(255,255,255,0.75);
}

.lp-hero--dark .lp-hero__eyebrow {
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

.lp-hero--dark .lp-hero__social-proof-item {
  color: rgba(255,255,255,0.65);
}

@media (max-width: 900px) {
  .lp-hero {
    padding: 56px 20px 48px;
  }

  .lp-hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .lp-hero__visual {
    min-height: 240px;
  }
}

/* =============================================
   Problem Section
   ============================================= */

.lp-problem {
  padding: var(--lp-section-padding);
}

.lp-problem__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-problem__target {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--lp-section-alt-bg);
  border: 1px solid var(--color-border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
}

.lp-problem__target-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.lp-problem__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.lp-problem__item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.lp-problem__item-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-error);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  background: rgba(192,57,43,0.08);
  border-radius: 999px;
}

.lp-problem__item-body {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
}

.lp-problem__item-stat {
  margin-top: 12px;
  font-size: 11px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-problem__item-stat::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-light);
  flex-shrink: 0;
}

.lp-problem__summary {
  margin-top: 40px;
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.8;
}

.lp-problem__summary strong {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .lp-problem {
    padding: var(--lp-section-padding-sm);
  }

  .lp-problem__list {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Solution Section
   ============================================= */

.lp-solution {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-solution__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-solution__flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

.lp-solution__flow-node {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-solution__flow-node--problem {
  border-top: 3px solid var(--color-error);
}

.lp-solution__flow-node--solution {
  border-top: 3px solid var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
}

.lp-solution__flow-node--result {
  border-top: 3px solid var(--color-success);
}

.lp-solution__flow-node-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lp-solution__flow-node--problem .lp-solution__flow-node-label { color: var(--color-error); }
.lp-solution__flow-node--solution .lp-solution__flow-node-label { color: var(--lp-brand-blue); }
.lp-solution__flow-node--result .lp-solution__flow-node-label { color: var(--color-success); }

.lp-solution__flow-node-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.lp-solution__flow-node-body {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.lp-solution__flow-arrow {
  font-size: 20px;
  color: var(--color-text-light);
  flex-shrink: 0;
  font-weight: 700;
}

.lp-solution__differentiators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lp-solution__diff-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.lp-solution__diff-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--lp-brand-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--lp-brand-blue);
  font-size: 20px;
}

.lp-solution__diff-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.lp-solution__diff-body {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .lp-solution {
    padding: var(--lp-section-padding-sm);
  }

  .lp-solution__flow {
    grid-template-columns: 1fr;
  }

  .lp-solution__flow-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .lp-solution__differentiators {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Benefit Section
   ============================================= */

.lp-benefit {
  padding: var(--lp-section-padding);
}

.lp-benefit__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

/* バリアント: 横並び比較 */
.lp-benefit__comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 40px;
}

.lp-benefit__before,
.lp-benefit__after {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.lp-benefit__before {
  border-top: 3px solid var(--color-text-light);
  opacity: 0.85;
}

.lp-benefit__after {
  border-top: 3px solid var(--color-success);
}

.lp-benefit__panel-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.lp-benefit__before .lp-benefit__panel-label {
  color: var(--color-text-light);
}

.lp-benefit__after .lp-benefit__panel-label {
  color: var(--color-success);
}

.lp-benefit__panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.lp-benefit__panel-list {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
}

.lp-benefit__panel-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.lp-benefit__panel-list li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.lp-benefit__before .lp-benefit__panel-list li::before {
  background: var(--color-text-light);
}

.lp-benefit__after .lp-benefit__panel-list li::before {
  background: var(--color-success);
}

.lp-benefit__panel-stat {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.lp-benefit__panel-stat-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.lp-benefit__before .lp-benefit__panel-stat-value {
  color: var(--color-text-light);
}

.lp-benefit__after .lp-benefit__panel-stat-value {
  color: var(--color-success);
}

.lp-benefit__panel-stat-label {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.lp-benefit__comparison-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--lp-brand-blue);
  flex-shrink: 0;
  font-weight: 700;
}

/* バリアント: 数値主体 */
.lp-benefit__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.lp-benefit__metric-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-benefit__metric-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--lp-brand-blue);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.lp-benefit__metric-unit {
  font-size: 20px;
  font-weight: 700;
}

.lp-benefit__metric-label {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
}

.lp-benefit__metric-source {
  font-size: 11px;
  color: var(--color-border);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .lp-benefit {
    padding: var(--lp-section-padding-sm);
  }

  .lp-benefit__comparison {
    grid-template-columns: 1fr;
  }

  .lp-benefit__comparison-arrow {
    transform: rotate(90deg);
  }
}

/* =============================================
   Feature Grid Section
   ============================================= */

.lp-feature {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-feature__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-feature__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.lp-feature__item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.lp-feature__item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.lp-feature__item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--lp-brand-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-brand-blue);
  font-size: 22px;
  margin-bottom: 16px;
}

.lp-feature__item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.lp-feature__item-body {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
}

.lp-feature__item-tag {
  margin-top: 16px;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.lp-feature__notice {
  margin-top: 24px;
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .lp-feature {
    padding: var(--lp-section-padding-sm);
  }

  .lp-feature__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .lp-feature__grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Case Study Section
   ============================================= */

.lp-case {
  padding: var(--lp-section-padding);
}

.lp-case__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-case__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.lp-case__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lp-case__card-header {
  background: var(--lp-brand-blue-light);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lp-case__card-meta {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.5;
}

.lp-case__card-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.lp-case__card-result {
  text-align: right;
  flex-shrink: 0;
}

.lp-case__card-result-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-success);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lp-case__card-result-label {
  font-size: 10px;
  color: var(--color-text-light);
  margin-top: 2px;
}

.lp-case__card-body {
  padding: 24px;
}

.lp-case__card-problem {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.7;
}

.lp-case__card-problem-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-error);
  margin-bottom: 6px;
}

.lp-case__card-comment {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.8;
  font-style: italic;
  position: relative;
  padding-left: 16px;
}

.lp-case__card-comment::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--lp-brand-blue);
  border-radius: 2px;
}

.lp-case__card-commenter {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-light);
  font-style: normal;
}

@media (max-width: 768px) {
  .lp-case {
    padding: var(--lp-section-padding-sm);
  }

  .lp-case__grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Comparison Table Section
   ============================================= */

.lp-comparison {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-comparison__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-comparison__table-wrap {
  margin-top: 40px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.lp-comparison__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  font-size: 14px;
}

.lp-comparison__table th {
  padding: 16px 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--color-border);
}

.lp-comparison__table th:first-child {
  text-align: left;
  color: var(--color-text-light);
}

.lp-comparison__table th.is-ours {
  background: var(--lp-brand-blue-light);
  color: var(--lp-brand-blue);
  border-bottom-color: var(--lp-brand-blue);
}

.lp-comparison__table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.lp-comparison__table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}

.lp-comparison__table tbody tr:last-child td {
  border-bottom: none;
}

.lp-comparison__table td.is-ours {
  background: var(--lp-brand-blue-light);
}

.lp-comparison__table tbody tr:hover td {
  background: var(--lp-section-alt-bg);
}

.lp-comparison__table tbody tr:hover td.is-ours {
  background: rgba(37,99,235,0.12);
}

.lp-comparison__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.lp-comparison__check--yes {
  background: rgba(22,163,74,0.12);
  color: var(--color-success);
}

.lp-comparison__check--no {
  background: rgba(192,57,43,0.1);
  color: var(--color-error);
}

.lp-comparison__check--partial {
  background: rgba(217,119,6,0.1);
  color: var(--color-warning);
}

@media (max-width: 768px) {
  .lp-comparison {
    padding: var(--lp-section-padding-sm);
  }
}

/* =============================================
   Process Steps Section
   ============================================= */

.lp-process {
  padding: var(--lp-section-padding);
}

.lp-process__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-process__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin-top: 40px;
  position: relative;
}

/* ステップ間のコネクタライン */
.lp-process__steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(100% / var(--step-count) / 2);
  right: calc(100% / var(--step-count) / 2);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.lp-process__step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px 0;
}

.lp-process__step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-light);
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.lp-process__step.is-active .lp-process__step-number {
  background: var(--lp-brand-blue);
  border-color: var(--lp-brand-blue);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.lp-process__step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.lp-process__step-body {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
}

.lp-process__step-duration {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

/* バリアント: 縦積みプロセス */
.lp-process__steps--vertical {
  grid-template-columns: 1fr;
  gap: 0;
}

.lp-process__steps--vertical::before {
  display: none;
}

.lp-process__step--vertical {
  flex-direction: row;
  text-align: left;
  align-items: flex-start;
  gap: 20px;
  padding: 0 0 32px;
  position: relative;
}

.lp-process__step--vertical::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.lp-process__step--vertical:last-child::after {
  display: none;
}

.lp-process__step--vertical .lp-process__step-number {
  flex-shrink: 0;
  margin-bottom: 0;
}

.lp-process__step-content {}

@media (max-width: 768px) {
  .lp-process {
    padding: var(--lp-section-padding-sm);
  }

  .lp-process__steps {
    grid-template-columns: 1fr;
  }

  .lp-process__steps::before {
    display: none;
  }

  .lp-process__step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 24px;
  }

  .lp-process__step .lp-process__step-number {
    flex-shrink: 0;
    margin-bottom: 0;
  }
}

/* =============================================
   Pricing Plans Section
   ============================================= */

.lp-pricing {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-pricing__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
  align-items: start;
}

.lp-pricing__plan {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.lp-pricing__plan.is-featured {
  border-color: var(--lp-brand-blue);
  box-shadow: var(--shadow-md);
}

.lp-pricing__plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--lp-brand-blue);
  color: #ffffff;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
}

.lp-pricing__plan-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.lp-pricing__plan.is-featured .lp-pricing__plan-name {
  color: var(--lp-brand-blue);
}

.lp-pricing__plan-price {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.lp-pricing__plan-price-unit {
  font-size: 16px;
  font-weight: 600;
}

.lp-pricing__plan-price-period {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-light);
}

.lp-pricing__plan-desc {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.lp-pricing__plan-features {
  margin-bottom: 24px;
}

.lp-pricing__plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.6;
}

.lp-pricing__plan-feature-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 2px;
}

.lp-pricing__plan-feature-icon--yes {
  background: rgba(22,163,74,0.12);
  color: var(--color-success);
}

.lp-pricing__plan-feature-icon--no {
  background: rgba(0,0,0,0.06);
  color: var(--color-text-light);
}

.lp-pricing__plan-feature--disabled {
  color: var(--color-text-light);
  opacity: 0.6;
}

.lp-pricing__notes {
  margin-top: 32px;
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 768px) {
  .lp-pricing {
    padding: var(--lp-section-padding-sm);
  }

  .lp-pricing__grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   CTA Block Section
   ============================================= */

.lp-cta {
  padding: var(--lp-section-padding);
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.lp-cta::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.lp-cta__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.lp-cta__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.lp-cta__headline {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.lp-cta__subheadline {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.lp-cta__btn-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.lp-cta__reassurance {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.lp-cta__reassurance-item {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-cta__reassurance-item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  flex-shrink: 0;
}

/* CTA ボタン（白背景） */
.btn--cta-primary {
  background: #ffffff;
  color: var(--color-primary);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.btn--cta-primary:hover {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.btn--cta-secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1.5px solid rgba(255,255,255,0.35);
  transition: all var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.btn--cta-secondary:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .lp-cta {
    padding: var(--lp-section-padding-sm);
  }

  .lp-cta__btn-group {
    flex-direction: column;
    align-items: center;
  }

  .lp-cta__reassurance {
    gap: 16px;
  }
}

/* =============================================
   LP ポータルスタイル（design-system.css 補完）
   ============================================= */

.ds-portal-body {
  min-height: 100vh;
  background: var(--admin-bg);
}

.ds-portal-header {
  padding: 40px 40px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.ds-portal-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.ds-portal-desc {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 40px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.ds-portal-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.ds-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.ds-portal-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: all var(--transition);
  color: inherit;
}

.ds-portal-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--lp-brand-blue);
}

.ds-portal-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-portal-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.ds-portal-card__desc {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ==============================================
   Animation Tokens (foundations/animation.md)
   v20260416
   ============================================== */

:root {
  --anim-duration-fast:    200ms;
  --anim-duration-base:    300ms;
  --anim-duration-slow:    500ms;
  --anim-ease-standard:    cubic-bezier(0.4, 0.0, 0.2, 1);
  --anim-ease-emphasized:  cubic-bezier(0.2, 0.0, 0, 1);
}

/* fade-in (data-animate属性ベース) */
[data-animate="fade-in"] {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--anim-duration-base) var(--anim-ease-standard),
    transform var(--anim-duration-base) var(--anim-ease-standard);
  transition-delay: var(--delay, 0ms);
}
[data-animate="fade-in"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* prefers-reduced-motion: 全アニメーション無効化 */
@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;
  }
  [data-animate="fade-in"] {
    opacity: 1;
    transform: none;
  }
}

/* ==============================================
   LP Hero - 拡張バリアント (metric / story / product / video / comparison / trust)
   v20260416
   ============================================== */

/* ===== バリアント: 数値訴求型 ===== */
.lp-hero--metric .lp-hero__inner {
  grid-template-columns: 1.1fr 1fr;
}

.lp-hero__metric-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lp-hero__metric-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--lp-brand-blue);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.lp-hero__metric-value {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--lp-brand-blue);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lp-hero__metric-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

/* ===== バリアント: ストーリー型 ===== */
.lp-hero--story {
  background: var(--lp-section-alt-bg);
}

.lp-hero--story .lp-hero__inner {
  grid-template-columns: 1fr;
  max-width: 760px;
  text-align: left;
}

.lp-hero--story .lp-hero__headline {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

.lp-hero--story .lp-hero__subheadline {
  font-size: 17px;
  max-width: 600px;
}

/* ===== バリアント: プロダクト型 ===== */
.lp-hero--product .lp-hero__inner {
  grid-template-columns: 0.85fr 1.15fr;
}

.lp-hero__visual--product {
  min-height: 420px;
  background: linear-gradient(135deg, #f8f9fb 0%, #eef2f7 100%);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .lp-hero__visual--product {
  background: linear-gradient(135deg, #161820 0%, #0d1117 100%);
}

/* ===== バリアント: 動画型 ===== */
.lp-hero--video .lp-hero__inner {
  grid-template-columns: 1fr 1.2fr;
}

.lp-hero__video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}

.lp-hero__video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lp-hero__video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--lp-section-alt-bg);
  text-align: center;
  padding: 24px;
}

/* ===== バリアント: 比較型 ===== */
.lp-hero--comparison .lp-hero__inner {
  grid-template-columns: 1fr;
  max-width: 960px;
  text-align: center;
}

.lp-hero__content--full {
  width: 100%;
}

.lp-hero__compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
  text-align: left;
}

.lp-hero__compare-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.lp-hero__compare-card--before {
  opacity: 0.85;
}

.lp-hero__compare-card--after {
  border-color: var(--lp-brand-blue);
  border-width: 2px;
  background: var(--lp-brand-blue-light);
}

.lp-hero__compare-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.lp-hero__compare-card--after .lp-hero__compare-label {
  color: var(--lp-brand-blue);
}

.lp-hero__compare-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lp-hero__compare-card li {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 0;
  border-bottom: 1px dashed var(--color-border);
}

.lp-hero__compare-card li:last-child {
  border-bottom: none;
}

.lp-hero--comparison .lp-hero__cta-group {
  justify-content: center;
}

/* ===== バリアント: 信頼先出し型 ===== */
.lp-hero--trust .lp-hero__inner {
  grid-template-columns: 1fr;
  max-width: 880px;
  text-align: center;
}

.lp-hero__trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 32px 0 20px;
  padding: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.lp-hero__trust-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-hero__trust-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.lp-hero__trust-meta span {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-hero__trust-meta i {
  color: var(--lp-brand-blue);
  font-size: 18px;
}

.lp-hero--trust .lp-hero__cta-group {
  justify-content: center;
}

/* レスポンシブ（Hero拡張バリアント） */
@media (max-width: 900px) {
  .lp-hero--metric .lp-hero__inner,
  .lp-hero--product .lp-hero__inner,
  .lp-hero--video .lp-hero__inner {
    grid-template-columns: 1fr;
  }
  .lp-hero__compare {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   Trust Section (lp-trust)
   v20260416
   ============================================== */

.lp-trust {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-trust__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

/* === バリアント: ロゴ列 === */
.lp-trust__logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.lp-trust__logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  min-height: 80px;
  filter: grayscale(0.4);
  opacity: 0.85;
  transition: filter var(--anim-duration-fast) var(--anim-ease-standard),
              opacity var(--anim-duration-fast) var(--anim-ease-standard);
}

.lp-trust__logo-item:hover {
  filter: grayscale(0);
  opacity: 1;
}

.lp-trust__logo-placeholder {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

.lp-trust__logos--compact .lp-trust__logo-item {
  min-height: 56px;
  padding: 16px 12px;
}

.lp-trust__note {
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 24px;
  line-height: 1.6;
}

/* === バリアント: 実績数値 === */
.lp-trust__metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

.lp-trust__metric {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-trust__metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.lp-trust__metric-value {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--lp-brand-blue);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.lp-trust__metric-note {
  font-size: 11px;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* === バリアント: 認証 === */
.lp-trust__certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

.lp-trust__cert-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-trust__cert-icon {
  color: var(--lp-brand-blue);
  margin-bottom: 12px;
}

.lp-trust__cert-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.lp-trust__cert-desc {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* === バリアント: 統合型 === */
.lp-trust--combined {
  padding: 40px 40px;
}

.lp-trust__combined-headline {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .lp-trust {
    padding: var(--lp-section-padding-sm);
  }
  .lp-trust__metric-grid,
  .lp-trust__certs {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   FAQ Section (lp-faq)
   v20260416
   ============================================== */

.lp-faq {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-faq__inner {
  max-width: 800px;
  margin: 0 auto;
}

.lp-faq__accordion {
  background: var(--color-white);
}

.lp-faq__more {
  font-size: 13px;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 24px;
}

.lp-faq__more a {
  color: var(--lp-brand-blue);
  border-bottom: 1px solid var(--lp-brand-blue);
  padding-bottom: 1px;
}

/* === バリアント: カテゴリタブ === */
.lp-faq--categorized .lp-faq__inner {
  max-width: 880px;
}

.lp-faq__tabs {
  margin-top: 24px;
}

/* === バリアント: 二列レイアウト === */
.lp-faq--two-column .lp-faq__inner {
  max-width: var(--lp-max-width);
}

.lp-faq__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .lp-faq {
    padding: var(--lp-section-padding-sm);
  }
  .lp-faq__columns {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   Risk Reversal (lp-risk-reversal)
   v20260416
   ============================================== */

.lp-risk-reversal {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-risk-reversal__inner {
  max-width: 880px;
  margin: 0 auto;
}

/* === バリアント: 保証リスト === */
.lp-risk-reversal__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.lp-risk-reversal__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.lp-risk-reversal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(22,163,74,0.1);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-risk-reversal__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.lp-risk-reversal__desc {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
}

.lp-risk-reversal__note {
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
  line-height: 1.7;
}

.lp-risk-reversal__note a {
  color: var(--lp-brand-blue);
  border-bottom: 1px solid var(--lp-brand-blue);
}

/* === バリアント: 横長帯バナー === */
.lp-risk-reversal--banner {
  padding: 24px 40px;
  background: var(--color-primary);
}

.lp-risk-reversal__banner-inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.lp-risk-reversal__banner-items {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lp-risk-reversal__banner-items li {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-risk-reversal__banner-items i {
  color: var(--lp-brand-blue);
  font-size: 16px;
}

.lp-risk-reversal--banner .btn--primary {
  background: var(--lp-brand-blue);
  color: #ffffff;
}

/* === バリアント: 3カードグリッド === */
.lp-risk-reversal__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.lp-risk-reversal__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-risk-reversal__card-icon {
  color: var(--color-success);
  margin-bottom: 16px;
}

.lp-risk-reversal__card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.lp-risk-reversal__card-desc {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .lp-risk-reversal {
    padding: var(--lp-section-padding-sm);
  }
  .lp-risk-reversal__item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lp-risk-reversal__icon {
    margin: 0 auto;
  }
  .lp-risk-reversal__cards {
    grid-template-columns: 1fr;
  }
  .lp-risk-reversal__banner-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ==============================================
   Story Section (lp-story)
   v20260416
   ============================================== */

.lp-story {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-story__inner {
  max-width: 880px;
  margin: 0 auto;
}

/* === バリアント: 三幕構成 === */
.lp-story__acts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.lp-story__act {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  position: relative;
  box-shadow: var(--shadow);
}

.lp-story__act--after {
  background: var(--lp-brand-blue-light);
  border-color: var(--lp-brand-blue);
}

.lp-story__act-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: var(--lp-section-alt-bg);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.lp-story__act--after .lp-story__act-label {
  color: var(--lp-brand-blue);
  background: rgba(255,255,255,0.6);
}

.lp-story__act-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.lp-story__act-body {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.8;
}

.lp-story__closing {
  font-size: 18px;
  font-weight: 700;
  color: var(--lp-brand-blue);
  text-align: center;
  margin-top: 24px;
}

/* === バリアント: タイムライン === */
.lp-story__timeline {
  position: relative;
  padding-left: 32px;
  margin: 32px auto 0;
  max-width: 600px;
}

.lp-story__timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--lp-brand-blue);
}

.lp-story__timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.lp-story__timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--lp-brand-blue);
}

.lp-story__timeline-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--lp-brand-blue);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.lp-story__timeline-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.lp-story__timeline-body p {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
}

/* === バリアント: 語り === */
.lp-story--narrative .lp-story__inner {
  max-width: 720px;
}

.lp-story__narrative-quote {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px 0;
}

.lp-story__narrative-headline {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-serif);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.lp-story__narrative-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.lp-story__narrative-body p {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.9;
}

.lp-story__narrative-quote--end {
  background: var(--lp-brand-blue-light);
  border-left: 4px solid var(--lp-brand-blue);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  text-align: left;
}

.lp-story__narrative-quote--end p {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.lp-story__narrative-author {
  font-size: 12px;
  color: var(--color-text-light);
  font-weight: 500;
}

@media (max-width: 768px) {
  .lp-story {
    padding: var(--lp-section-padding-sm);
  }
  .lp-story__act {
    padding: 24px 20px;
  }
}

/* ==============================================
   Data Evidence (lp-data)
   v20260416
   ============================================== */

.lp-data {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-data__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

/* === バリアント: KPI 3指標並列 === */
.lp-data__kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.lp-data__kpi {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-data__kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.lp-data__kpi-value {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  color: var(--lp-brand-blue);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.lp-data__kpi-detail {
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: 8px;
  font-weight: 500;
}

.lp-data__kpi-meta {
  font-size: 11px;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

.lp-data__source {
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
  line-height: 1.7;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  max-width: 720px;
  margin: 0 auto;
}

/* === バリアント: Before / After 比較 === */
.lp-data--before-after .lp-data__inner {
  max-width: 840px;
}

.lp-data__compare {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.lp-data__compare-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.lp-data__compare-card--before {
  opacity: 0.85;
}

.lp-data__compare-card--after {
  background: var(--lp-brand-blue-light);
  border-color: var(--lp-brand-blue);
  border-width: 2px;
}

.lp-data__compare-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.lp-data__compare-card--after .lp-data__compare-label {
  color: var(--lp-brand-blue);
}

.lp-data__compare-value {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.lp-data__compare-card--after .lp-data__compare-value {
  color: var(--lp-brand-blue);
}

.lp-data__compare-unit {
  font-size: 0.4em;
  font-weight: 600;
  color: var(--color-text-light);
  margin-left: 4px;
}

.lp-data__compare-desc {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 12px;
}

.lp-data__compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-brand-blue);
}

.lp-data__compare-result {
  text-align: center;
  margin-bottom: 24px;
}

.lp-data__compare-result-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--lp-brand-blue);
  letter-spacing: -0.02em;
}

.lp-data__compare-result-label {
  font-size: 12px;
  color: var(--color-text-light);
}

/* === バリアント: グラフ主体 === */
.lp-data--chart-focus .lp-data__inner {
  max-width: 800px;
}

.lp-data__chart {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.lp-data__chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.lp-data__chart-table {
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-text-light);
}

.lp-data__chart-table summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--lp-brand-blue);
  font-weight: 600;
}

.lp-data__chart-table table {
  margin-top: 12px;
  width: 100%;
  border-collapse: collapse;
}

.lp-data__chart-table th,
.lp-data__chart-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  color: var(--color-text);
}

.lp-data__chart-table th {
  font-weight: 600;
  background: var(--lp-section-alt-bg);
}

@media (max-width: 768px) {
  .lp-data {
    padding: var(--lp-section-padding-sm);
  }
  .lp-data__kpi-grid {
    grid-template-columns: 1fr;
  }
  .lp-data__compare {
    grid-template-columns: 1fr;
  }
  .lp-data__compare-arrow {
    transform: rotate(90deg);
  }
}

/* ==============================================
   Use Case (lp-use-case)
   v20260416
   ============================================== */

.lp-use-case {
  padding: var(--lp-section-padding);
  background: var(--lp-section-alt-bg);
}

.lp-use-case__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
}

.lp-use-case__tabs {
  margin-top: 24px;
}

.lp-use-case__meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
  padding: 12px 16px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.lp-use-case__meta > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.lp-use-case__meta dt {
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.lp-use-case__meta dd {
  color: var(--color-text);
  font-weight: 600;
}

/* === バリアント: タブ切替 ===  Before/After フローカード */
.lp-use-case__flows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.lp-use-case__flow {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.lp-use-case__flow--after {
  background: var(--lp-brand-blue-light);
  border-color: var(--lp-brand-blue);
  border-width: 2px;
}

.lp-use-case__flow-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.lp-use-case__flow--after .lp-use-case__flow-label {
  color: var(--lp-brand-blue);
}

.lp-use-case__flow-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  counter-reset: step;
}

.lp-use-case__flow-steps li {
  position: relative;
  padding: 8px 8px 8px 32px;
  font-size: 14px;
  color: var(--color-text);
  border-bottom: 1px dashed var(--color-border);
  counter-increment: step;
}

.lp-use-case__flow-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  color: var(--color-text-light);
}

.lp-use-case__flow--after .lp-use-case__flow-steps li::before {
  background: var(--lp-brand-blue);
  color: #fff;
  border-color: var(--lp-brand-blue);
}

.lp-use-case__flow-result {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: right;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.lp-use-case__flow--after .lp-use-case__flow-result {
  color: var(--lp-brand-blue);
}

.lp-use-case__effect {
  font-size: 16px;
  text-align: center;
  padding: 16px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.lp-use-case__effect strong {
  color: var(--lp-brand-blue);
  font-size: 1.2em;
}

/* === バリアント: マトリクス === */
.lp-use-case__matrix-wrap {
  overflow-x: auto;
}

.lp-use-case__matrix {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lp-use-case__matrix th,
.lp-use-case__matrix td {
  padding: 14px 18px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.lp-use-case__matrix th[scope="col"] {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lp-use-case__matrix th[scope="row"] {
  background: var(--lp-section-alt-bg);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.lp-use-case__matrix td {
  color: var(--color-text);
}

.lp-use-case__matrix tr:last-child th,
.lp-use-case__matrix tr:last-child td {
  border-bottom: none;
}

.lp-use-case__matrix th:last-child,
.lp-use-case__matrix td:last-child {
  border-right: none;
}

/* === バリアント: 単一シナリオ（時系列） === */
.lp-use-case--single .lp-use-case__inner {
  max-width: 760px;
}

.lp-use-case__timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.lp-use-case__timeline-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--lp-brand-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.lp-use-case__timeline-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--lp-brand-blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lp-use-case__timeline-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.lp-use-case__timeline-item p {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .lp-use-case {
    padding: var(--lp-section-padding-sm);
  }
  .lp-use-case__flows {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Onboarding / Introduction Components
   welcome / onboarding-checklist / product-tour / first-action-prompt
   v20260416
   ============================================= */

/* ---------- welcome ---------- */

.welcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-sans);
}

.welcome__greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
}

.welcome__purpose {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
}

.welcome__time {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-light);
  margin: 0;
}

.welcome__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.welcome__secondary {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius);
  transition: color var(--transition);
}

.welcome__secondary:hover,
.welcome__secondary:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

.welcome__close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.welcome__close:hover,
.welcome__close:focus-visible {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
}

/* welcome--modal */
.welcome--modal {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: left;
  animation: welcomeFadeIn var(--anim-duration-base) var(--anim-ease-standard);
}

/* welcome--banner */
.welcome--banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  border-radius: var(--radius);
  flex-direction: row;
}

.welcome__banner-text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
  flex: 1;
  min-width: 0;
}

.welcome__banner-text strong {
  color: var(--color-primary);
  font-weight: 700;
  margin-right: 4px;
}

.welcome__banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* welcome--full */
.welcome--full {
  min-height: 480px;
  padding: 64px 32px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  align-items: center;
  text-align: center;
  gap: 20px;
}

.welcome--full .welcome__greeting {
  font-size: 28px;
}

.welcome--full .welcome__purpose {
  font-size: 16px;
  max-width: 520px;
}

.welcome__logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

/* welcome--card */
.welcome--card {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--lp-brand-blue);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  gap: 16px;
}

.welcome--card .welcome__card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome--card .welcome__greeting {
  font-size: 16px;
}

.welcome--card .welcome__purpose {
  font-size: 13px;
}

@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- onboarding-checklist ---------- */

.onboarding-checklist {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  color: var(--color-text);
}

.onboarding-checklist__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.onboarding-checklist__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  flex: 1;
  min-width: 0;
}

.onboarding-checklist__progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.onboarding-checklist__close {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--color-text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.onboarding-checklist__close:hover,
.onboarding-checklist__close:focus-visible {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
}

.onboarding-checklist__progress {
  width: 100%;
  height: 6px;
  background: var(--lp-brand-blue-light);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.onboarding-checklist__progress-bar {
  height: 100%;
  background: var(--lp-brand-blue);
  border-radius: 9999px;
  transition: width var(--anim-duration-base) var(--anim-ease-standard);
}

.onboarding-checklist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.onboarding-checklist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.onboarding-checklist__item.is-current {
  background: var(--lp-brand-blue-light);
}

.onboarding-checklist__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}

.onboarding-checklist__item.is-done .onboarding-checklist__check {
  background: var(--color-success);
  border-color: var(--color-success);
}

.onboarding-checklist__item.is-done .onboarding-checklist__check::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: translate(-50%, -65%) rotate(45deg);
}

.onboarding-checklist__item.is-current .onboarding-checklist__check {
  border-color: var(--lp-brand-blue);
  box-shadow: 0 0 0 3px var(--lp-brand-blue-light);
}

.onboarding-checklist__item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onboarding-checklist__item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.onboarding-checklist__item.is-done .onboarding-checklist__item-title {
  color: var(--color-text-light);
  text-decoration: line-through;
  text-decoration-color: var(--color-border);
}

.onboarding-checklist__item-meta {
  font-size: 11px;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* onboarding-checklist--horizontal */
.onboarding-checklist--horizontal .onboarding-checklist__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
  counter-reset: ob-step;
}

.onboarding-checklist__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 8px;
}

.onboarding-checklist__step + .onboarding-checklist__step::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 50%;
  left: calc(-50% + 16px);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.onboarding-checklist__step.is-done + .onboarding-checklist__step::before,
.onboarding-checklist__step.is-current + .onboarding-checklist__step.is-done::before {
  background: var(--color-success);
}

.onboarding-checklist__step-circle {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-light);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-checklist__step.is-done .onboarding-checklist__step-circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: transparent;
  position: relative;
}

.onboarding-checklist__step.is-done .onboarding-checklist__step-circle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 12px;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  transform: translate(-50%, -65%) rotate(45deg);
}

.onboarding-checklist__step.is-current .onboarding-checklist__step-circle {
  border-color: var(--lp-brand-blue);
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  box-shadow: 0 0 0 3px var(--lp-brand-blue-mid);
}

.onboarding-checklist__step-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.onboarding-checklist__step.is-current .onboarding-checklist__step-label {
  color: var(--color-primary);
}

.onboarding-checklist__step-meta {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* onboarding-checklist--collapsible */
.onboarding-checklist--collapsible {
  padding: 0;
}

.onboarding-checklist__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--color-text);
  text-align: left;
  border-radius: var(--radius-lg);
  transition: background var(--transition);
}

.onboarding-checklist__toggle:hover,
.onboarding-checklist__toggle:focus-visible {
  background: var(--color-bg-subtle);
}

.onboarding-checklist__toggle-icon {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-light);
  border-bottom: 2px solid var(--color-text-light);
  transform: rotate(-45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.onboarding-checklist__toggle[aria-expanded="true"] .onboarding-checklist__toggle-icon {
  transform: rotate(45deg);
  border-color: var(--color-primary);
}

.onboarding-checklist__toggle .onboarding-checklist__title {
  flex: 1;
  margin: 0;
}

.onboarding-checklist__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  padding: 0 20px;
}

.onboarding-checklist__panel[aria-hidden="false"] {
  max-height: 600px;
  padding: 0 20px 16px;
}

/* onboarding-checklist--minimal */
.onboarding-checklist--minimal {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.onboarding-checklist__minimal-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.onboarding-checklist--minimal .onboarding-checklist__progress {
  flex: 1;
  margin-bottom: 0;
}

.onboarding-checklist__minimal-link {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--lp-brand-blue);
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.onboarding-checklist__minimal-link:hover,
.onboarding-checklist__minimal-link:focus-visible {
  text-decoration: underline;
}

/* completion-state */
.onboarding-checklist__completion {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  gap: 8px;
}

.onboarding-checklist__completion-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-success);
  margin-bottom: 4px;
  position: relative;
}

.onboarding-checklist__completion-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 22px;
  border-right: 3px solid var(--color-white);
  border-bottom: 3px solid var(--color-white);
  transform: translate(-50%, -65%) rotate(45deg);
}

.onboarding-checklist__completion-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.onboarding-checklist__completion-text {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0 0 8px;
}

/* ---------- product-tour ---------- */

.product-tour {
  font-family: var(--font-sans);
  color: var(--color-text);
}

.product-tour__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
  pointer-events: none;
}

.product-tour__highlight {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--lp-brand-blue-mid);
  border-radius: var(--radius);
}

.product-tour__tooltip {
  position: absolute;
  z-index: 3;
  width: 320px;
  max-width: calc(100% - 32px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 20px;
  animation: tourTooltipIn var(--anim-duration-base) var(--anim-ease-standard);
}

.product-tour__step-progress {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lp-brand-blue);
  margin-bottom: 6px;
}

.product-tour__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
  line-height: 1.5;
}

.product-tour__body {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 14px;
}

.product-tour__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-tour__nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-tour__skip {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius);
}

.product-tour__skip:hover,
.product-tour__skip:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

.product-tour__close {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--color-text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-tour__close:hover,
.product-tour__close:focus-visible {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
}

/* product-tour--spotlight (root container layer) */
.product-tour--spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* product-tour--popover */
.product-tour--popover {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.product-tour--popover .product-tour__tooltip {
  pointer-events: auto;
}

/* product-tour--inline-hint */
.product-tour--inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  color: var(--lp-brand-blue);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background var(--transition);
}

.product-tour--inline-hint:hover,
.product-tour--inline-hint:focus-visible {
  background: var(--lp-brand-blue-mid);
}

.product-tour__hint-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lp-brand-blue);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-tour__hint-label {
  letter-spacing: 0.02em;
}

/* product-tour--video */
.product-tour--video {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  max-width: 480px;
}

.product-tour__video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-tour__video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.product-tour__video-placeholder {
  font-size: 12px;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.product-tour__video-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.product-tour__video-time {
  font-size: 12px;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
}

@keyframes tourTooltipIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- first-action-prompt ---------- */

.first-action-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--font-sans);
  color: var(--color-text);
}

.first-action-prompt__illustration {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-text-light);
}

.first-action-prompt__illustration svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-text-light);
}

.first-action-prompt__heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}

.first-action-prompt__guidance {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 0 24px;
}

.first-action-prompt__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.first-action-prompt__sub-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.first-action-prompt__sub {
  background: none;
  border: none;
  color: var(--lp-brand-blue);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius);
}

.first-action-prompt__sub:hover,
.first-action-prompt__sub:focus-visible {
  text-decoration: underline;
}

.first-action-prompt__divider {
  color: var(--color-text-light);
  font-size: 12px;
}

/* first-action-prompt--centered */
.first-action-prompt--centered {
  padding: 64px 32px;
}

/* first-action-prompt--inline */
.first-action-prompt--inline {
  padding: 32px 20px;
}

.first-action-prompt--inline .first-action-prompt__heading {
  font-size: 15px;
}

.first-action-prompt--inline .first-action-prompt__guidance {
  font-size: 13px;
  margin-bottom: 16px;
}

.first-action-prompt--inline .first-action-prompt__illustration {
  display: none;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .welcome--modal {
    max-width: calc(100% - 32px);
    padding: 24px;
  }
  .welcome--full {
    min-height: 360px;
    padding: 48px 20px;
  }
  .welcome--card {
    flex-direction: column;
    align-items: stretch;
  }
  .onboarding-checklist__steps {
    flex-direction: column;
    gap: 12px;
  }
  .onboarding-checklist__step + .onboarding-checklist__step::before {
    display: none;
  }
  .product-tour__tooltip {
    width: calc(100% - 32px);
  }
  .first-action-prompt--centered {
    padding: 48px 20px;
  }
  .first-action-prompt__guidance {
    font-size: 13px;
  }
}

/* ダークモード差分（CSS変数経由で大半は自動切替。固有の塗りのみ調整） */
[data-theme="dark"] .product-tour__overlay {
  background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .first-action-prompt__illustration {
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .onboarding-checklist__item.is-done .onboarding-checklist__item-title {
  color: var(--color-text-light);
}

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  .welcome--modal,
  .product-tour__tooltip {
    animation: none;
  }
  .onboarding-checklist__progress-bar {
    transition: none;
  }
}

/* ============================================================
 * RESPONSIVE VERIFICATION PATCHES (2026-04-16)
 * Source: historical responsive verification notes
 * Goal: WCAG 2.2 AA touch target (44x44px) compliance
 * Applied: 7 patches (C-1 through C-7)
 * ============================================================ */

/* Patch C-1: ナビリンク フォントサイズ補正（参照用HTMLナビ）
 * 対象: 全11ファイルの .dev-nav リンク 13px
 * 補正: REPORT.md ではセレクタ未指定のため .dev-nav a を追加 */
.dev-nav a {
  font-size: 13px; /* 現状と同値。参照用HTMLのみ適用。本番では非表示 */
}

/* Patch C-2: 調査注記・出典テキストの最小フォントサイズ補正
 * 対象: trust.html / data-evidence.html の 11px 調査注記
 * 補正: REPORT.md パッチ案のセレクタでは .lp-data__kpi-meta (11px) が
 *       カバーされないため追加。12px 引き上げで視認性改善。
 *       14px 化はデータコンポーネントの視覚バランス再検討が必要なため次回対応 */
.data-note,
.survey-note,
.stat__note,
.evidence__source,
[class*="--note"],
[class*="__note"],
.lp-data__kpi-meta {
  font-size: 12px; /* 11px → 12px。WCAG AA 相当まで引き上げ */
}

/* Patch C-3: 閉じるボタン `×` のタッチターゲット補正
 * 対象: welcome.html (32×32px), onboarding-checklist.html (28×28px),
 *       product-tour.html (28×28px)
 * 補正: 既存定義で width/height がハードコード (28px/32px) のため、
 *       min-width/min-height だけでは不十分。width: auto + min-* で上書き。
 *       REPORT.md パッチ案に width: auto が欠落していたため補完 */
.btn-close,
button[aria-label="閉じる"],
button[aria-label="close"],
.modal__close,
.welcome__close,
.onboarding-checklist__close,
.product-tour__close,
.toast__close {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Patch C-4: スキップ・戻る・次へ ナビゲーションボタンの高さ補正
 * 対象: product-tour.html — `スキップ` 29px高（最深刻）、`戻る` 32px、`次へ` 32px
 * 補正: .product-tour__skip は padding: 6px 4px（合計高さ≒29px）のため
 *       padding を 10px 12px に変更して確実に 44px 超えを確保 */
.product-tour__nav .btn,
.product-tour__skip,
.product-tour__back,
.product-tour__next,
[class*="tour"] button,
[class*="tour"] .btn {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* .product-tour__skip 専用: padding 不足を補完
 * (上記セレクタ群と合わせて適用) */
.product-tour__skip {
  padding: 10px 12px; /* 6px 4px → 10px 12px。タッチ領域拡張 */
}

/* Patch C-5: タブボタンの高さ補正
 * 対象: faq.html (カテゴリタブ 41px高)、use-case.html (業種タブ 41px高)
 * 現状: .tabs__tab の padding: 10px 20px で高さが 41px（3px不足）
 * 補正: min-height: 44px を追加。既存 padding は変更しない */
.tabs__tab,
.tab-btn,
[role="tab"] {
  min-height: 44px;
  padding-top: 11px;   /* 10px → 11px で 44px 達成。既存レイアウトへの影響最小 */
  padding-bottom: 11px;
}

/* Patch C-6: welcome.html 主 CTA の高さ補正
 * 対象: `最初の日報を入れる` (157×36px)、`あとで見る` (73×35px)、`始める` (61×32px)
 * 根拠: .btn のベース min-height: 36px を welcome コンテキストで上書き。
 *       ベース .btn 全体を 44px にすると管理画面等の小型ボタン
 *       (.btn--xs, .btn--sm) に影響が出るため、コンテキスト限定で適用 */
.welcome .btn,
.welcome__actions .btn,
.welcome__footer .btn {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Patch C-7: セカンダリアクション群のタッチターゲット補正
 * 対象: first-action-prompt.html — `サンプルデータで試す` 等が 31px高
 * 根拠: .first-action-prompt__sub (padding: 6px 4px, height ≒ 31px) が違反の実体。
 *       REPORT.md パッチ案の .btn--secondary/.btn--ghost では
 *       このセレクタをカバーできないため、実際のクラスに対して適用 */
.first-action-prompt .btn--secondary,
.first-action-prompt .btn--ghost,
.first-action-prompt .btn--outline,
.first-action-prompt__sub,
.first-action-prompt__actions .btn,
.first-action-prompt__sub-actions .btn {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ============================================================
 * RESIDUAL ISSUE PATCHES (2026-04-16 Final)
 * Source: historical residual issue verification notes
 * Goal: Resolve 4 remaining critical/medium touch-target and font-size issues
 *       identified after 7-patch round (C-1 through C-7)
 * Applied: R-1 through R-4
 * ============================================================ */

/* Patch R-1: product-tour スキップボタン width 36px → 44px
 * 対象: product-tour.html — .product-tour__skip の width が 36px 不足
 * 原因: padding: 10px 12px でテキスト「スキップ」が短いため横幅が 36px にとどまる
 * 補正: min-width: 44px を追加。height は Patch C-4 で 44px 達成済み */
.product-tour__skip {
  min-width: 44px;
}

/* Patch R-2: welcome.html セカンダリボタン 高さ 35px → 44px
 * 対象: .welcome__secondary クラス（「あとで見る」「ガイドを見る」）
 *       Patch C-6 は .welcome .btn 等をターゲットにしたが
 *       .welcome__secondary は <button> のみで .btn クラス未付与のため未到達
 * 補正: .welcome__secondary に直接 min-height と padding を適用 */
.welcome__secondary {
  min-height: 44px;
  min-width: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Patch R-3a: onboarding-checklist 「入力する」ボタン 32px → 44px
 * 対象: .btn.btn--primary.btn--sm（バリアント A / B / C の「入力する」3件）
 *       .btn--sm は既存定義で min-height / padding が小さく上書きされている
 *       親コンテキスト(.onboarding-checklist)で限定して上書きし
 *       他箇所の .btn--sm には影響しない */
.onboarding-checklist .btn--sm,
.onboarding-checklist .btn--primary.btn--sm,
.onboarding-checklist .btn--outline.btn--sm {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Patch R-3b: onboarding-checklist 「残り1件を見る」17px → 44px
 * 対象: .onboarding-checklist__minimal-link（バリアント D 極小）
 *       <button> 単体でクラスのスタイルが最小限のため 17px 高になっている
 * 補正: min-height 44px + inline-flex で確実なタッチ領域を確保 */
.onboarding-checklist__minimal-link {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: var(--space-3, 12px);
  padding-right: var(--space-3, 12px);
}

/* Patch R-4: trust.html 調査注記 11px → 13px
 * 対象: trust.html の lp-trust__note（クラスは既にHTML側で付与済み）
 *       Patch C-2 の [class*="__note"] は 12px を適用済みだが
 *       検証スクリプトが 14px 未満を全て違反としてカウントするため残存表示あり
 *       設計上の最小許容フォントサイズ 13px へ引き上げ（C-2 から 1px 追加）
 * 補正: .lp-trust__note を明示セレクタで 13px に設定（詳細度で C-2 を上書き） */
.lp-trust__note,
.lp-trust__metric-note {
  font-size: 13px; /* 11px → 13px。設計上の注記フォント最小値に統一 */
}


/* ============================================================
 * MID-PRIORITY PATCHES (2026-04-16 Complete)
 * Source: historical mid-priority verification notes
 * Goal: Resolve 2 remaining medium-priority touch-target issues (M-1, M-2)
 * Applied: M-1 through M-2
 * ============================================================ */

/* Patch M-1: onboarding-checklist completion state "案件一覧を開く" 36px → 44px
 * 対象: onboarding-checklist.html — .onboarding-checklist__completion 内の .btn.btn--primary
 *       Patch R-3a (.onboarding-checklist .btn--sm) は .btn--sm クラス付きのみを対象にしており
 *       completion state の「案件一覧を開く」は .btn--primary のみ（.btn--sm なし）のため未到達
 * 補正: .onboarding-checklist__completion .btn を直接ターゲット */
.onboarding-checklist__completion .btn {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Patch M-2: first-action-prompt インラインヘッダー "＋ 新規追加" 32px → 44px
 * 対象: first-action-prompt.html バリアント B のインラインヘッダー内 .btn.btn--primary.btn--sm
 *       該当 div は style 属性のみで CSS セレクタが届かないため
 *       HTML に first-action-prompt__inline-header クラスを追加して対応
 * 補正: .first-action-prompt__inline-header .btn に min-height / padding を適用
 *       他箇所の .btn--sm には影響しない */
.first-action-prompt__inline-header .btn {
  min-height: 44px;
  min-width: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ============================================================
 * CONTENT MODULES (2026-04-16)
 * Operation-first content pages: case-study / members / blog / whitepaper
 * Each module is index + detail two-tier structure
 * ============================================================ */

/* ============================================================
 * SHARED: .content-page layout foundation
 * Used by all four content modules as the page-level container
 * ============================================================ */

.content-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-page__header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.content-page__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.35;
  margin: 0 0 8px;
}

.content-page__subtitle {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
}

.content-page__filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.content-page__filter-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--color-text-light);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.content-page__filter-chip:hover,
.content-page__filter-chip[aria-current="true"] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.content-page__count {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

/* ============================================================
 * content-case-study — Index
 * Grid of cards: industry / customer / challenge / outcome
 * ============================================================ */

.content-case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.content-case-study__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.content-case-study__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-case-study__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.content-case-study__card-industry {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--status-active-bg);
  border-radius: var(--radius);
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

.content-case-study__card-customer {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin: 0;
}

.content-case-study__card-challenge {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.65;
  margin: 0;
}

.content-case-study__card-outcome {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-beige);
  border-radius: var(--radius);
  padding: 8px 12px;
  line-height: 1.5;
}

.content-case-study__card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: auto;
  min-height: 44px;
}

.content-case-study__card-link:hover {
  text-decoration: underline;
}

/* content-case-study — Detail */

.content-case-study__hero {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 40px 24px;
  margin-bottom: 40px;
}

.content-case-study__hero-logo {
  max-height: 48px;
  width: auto;
  margin-bottom: 16px;
  display: block;
}

.content-case-study__hero-industry {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.content-case-study__kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.content-case-study__kpi-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
}

.content-case-study__kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  line-height: 1.2;
}

.content-case-study__kpi-card .kpi-label {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 4px;
  display: block;
}

.content-case-study__section {
  margin-bottom: 32px;
}

.content-case-study__section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  border-left: 3px solid var(--color-gold);
  padding-left: 12px;
  margin: 0 0 16px;
  line-height: 1.4;
}

.content-case-study__before-after-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.content-case-study__before-after-table th,
.content-case-study__before-after-table td {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  text-align: left;
  line-height: 1.6;
}

.content-case-study__before-after-table th {
  background: var(--color-bg-beige);
  font-weight: 600;
  color: var(--color-primary);
  width: 120px;
}

.content-case-study__before-after-table .before-col {
  color: var(--color-text-light);
}

.content-case-study__before-after-table .after-col {
  color: var(--color-accent);
  font-weight: 600;
}

.content-case-study__testimonial {
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 32px 0;
}

.content-case-study__testimonial-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.content-case-study__testimonial blockquote {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-text);
  margin: 0 0 8px;
  font-style: italic;
}

.content-case-study__testimonial cite {
  font-size: 12px;
  color: var(--color-text-light);
  font-style: normal;
}

.content-case-study__related {
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
  margin-top: 40px;
}

.content-case-study__related-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 20px;
}

/* ============================================================
 * content-members — Index
 * Staff listing with photo / name / role / strengths
 * ============================================================ */

.content-members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.content-members__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.content-members__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-members__card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--color-bg-beige);
}

.content-members__card-body {
  padding: 16px 20px 20px;
}

.content-members__card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.content-members__card-role {
  font-size: 12px;
  color: var(--color-text-light);
  margin: 0 0 12px;
}

.content-members__card-strengths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-members__strength-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg-beige);
  border-radius: var(--radius);
  padding: 3px 8px;
}

/* content-members — Detail */

.content-members__hero {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 40px;
}

.content-members__hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-border);
}

.content-members__hero-info {
  flex: 1;
}

.content-members__hero-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.content-members__hero-role {
  font-size: 14px;
  color: var(--color-text-light);
  margin: 0 0 16px;
}

.content-members__career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 32px;
}

.content-members__career-table th,
.content-members__career-table td {
  border: 1px solid var(--color-border);
  padding: 10px 16px;
  text-align: left;
  line-height: 1.6;
}

.content-members__career-table th {
  background: var(--color-bg-beige);
  font-weight: 600;
  color: var(--color-primary);
  width: 100px;
  white-space: nowrap;
}

.content-members__domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.content-members__achievement-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.content-members__achievement-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
}

.content-members__achievement-body {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.65;
  margin: 0;
}

.content-members__value-block {
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-text);
}

/* ============================================================
 * content-blog — Index
 * Article list with thumbnail / category / date / title / summary
 * ============================================================ */

.content-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.content-blog__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.content-blog__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-blog__card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--color-bg-beige);
}

.content-blog__card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.content-blog__card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-blog__card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--status-active-bg);
  border-radius: var(--radius);
  padding: 2px 8px;
}

.content-blog__card-date {
  font-size: 12px;
  color: var(--color-text-light);
}

.content-blog__card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.45;
  margin: 0;
}

.content-blog__card-summary {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* content-blog — Detail */

.content-blog__article-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.content-blog__article-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--status-active-bg);
  border-radius: var(--radius);
  padding: 3px 10px;
  margin-bottom: 12px;
}

.content-blog__article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin: 0 0 16px;
}

.content-blog__article-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.content-blog__author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.content-blog__author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.content-blog__author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 2px;
}

.content-blog__author-title {
  font-size: 12px;
  color: var(--color-text-light);
  margin: 0;
}

.content-blog__toc {
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.content-blog__toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
}

.content-blog__toc ol,
.content-blog__toc ul {
  margin: 0;
  padding-left: 20px;
}

.content-blog__toc li {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
}

.content-blog__toc a {
  color: var(--color-primary);
  text-decoration: none;
}

.content-blog__toc a:hover {
  text-decoration: underline;
}

.content-blog__body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--color-text);
}

.content-blog__body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin: 40px 0 16px;
}

.content-blog__body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  border-left: 3px solid var(--color-gold);
  padding-left: 10px;
  margin: 32px 0 12px;
}

.content-blog__body p {
  margin: 0 0 20px;
}

.content-blog__body ul,
.content-blog__body ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.content-blog__body li {
  margin-bottom: 6px;
}

.content-blog__cta {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.content-blog__cta-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.content-blog__share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 32px;
}

.content-blog__share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
}

.content-blog__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text);
  text-decoration: none;
  font-size: 16px;
  transition: border-color var(--transition), color var(--transition);
}

.content-blog__share-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.content-blog__related {
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
  margin-top: 40px;
}

.content-blog__related-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 20px;
}

/* ============================================================
 * content-whitepaper — Index
 * Download resource cards with cover / title / summary / meta / CTA
 * ============================================================ */

.content-whitepaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.content-whitepaper__card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.content-whitepaper__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-whitepaper__card-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--color-primary);
}

.content-whitepaper__card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.content-whitepaper__card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.45;
  margin: 0;
}

.content-whitepaper__card-summary {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

.content-whitepaper__card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-light);
}

.content-whitepaper__card-cta {
  display: block;
  text-align: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
  margin-top: auto;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-whitepaper__card-cta:hover {
  background: var(--color-primary-dark);
}

/* content-whitepaper — Detail */

.content-whitepaper__hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 40px;
}

.content-whitepaper__hero-cover {
  width: 240px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: block;
}

.content-whitepaper__hero-info {
  flex: 1;
}

.content-whitepaper__hero-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin: 0 0 16px;
}

.content-whitepaper__target-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.content-whitepaper__target-list li {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
  padding: 4px 0 4px 20px;
  position: relative;
}

.content-whitepaper__target-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.content-whitepaper__toc {
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.content-whitepaper__toc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
}

.content-whitepaper__toc ol {
  margin: 0;
  padding-left: 20px;
}

.content-whitepaper__toc li {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
}

.content-whitepaper__excerpt {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

.content-whitepaper__form {
  background: var(--color-bg-beige);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
}

.content-whitepaper__form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 20px;
}

.content-whitepaper__faq {
  margin-bottom: 40px;
}

.content-whitepaper__faq-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 16px;
}

/* ============================================================
 * CONTENT MODULES — Responsive
 * Tablet ≤ 768px: 2-column grid / Mobile ≤ 480px: 1-column
 * ============================================================ */

@media (max-width: 1024px) {
  .content-case-study-grid,
  .content-members-grid,
  .content-blog-grid,
  .content-whitepaper-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-case-study__kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-members__domain-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-whitepaper__hero {
    gap: 28px;
  }

  .content-whitepaper__hero-cover {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .content-page {
    padding: 0 16px;
  }

  .content-page__title {
    font-size: 22px;
  }

  .content-case-study-grid,
  .content-members-grid,
  .content-blog-grid,
  .content-whitepaper-grid {
    grid-template-columns: 1fr;
  }

  .content-case-study__kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-members__hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .content-members__hero-photo {
    width: 120px;
    height: 120px;
  }

  .content-members__domain-grid {
    grid-template-columns: 1fr;
  }

  .content-whitepaper__hero {
    flex-direction: column;
  }

  .content-whitepaper__hero-cover {
    width: 100%;
    max-width: 280px;
  }

  .content-blog__cta {
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .content-case-study__kpi-grid {
    grid-template-columns: 1fr;
  }

  .content-page__header {
    padding: 24px 0 16px;
    margin-bottom: 20px;
  }

  .content-case-study__testimonial {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .content-case-study__testimonial-photo {
    width: 64px;
    height: 64px;
  }
}

/* ==============================================
   media-text — メディア・テキスト並列セクション
   v20260416
   ============================================== */

/* --radius-pill 未定義のため LP 変数セクションに追記 */
:root {
  --radius-pill: 9999px;
}

/* =============================================
   lp-media-text — ベース
   ============================================= */

.lp-media-text {
  padding: var(--lp-section-padding);
}

.lp-media-text--alt {
  background: var(--lp-section-alt-bg);
}

.lp-media-text__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* 画像が左（デフォルト）: 変更不要 */

/* 画像が右 */
.lp-media-text--image-right .lp-media-text__inner {
  direction: rtl;
}

.lp-media-text--image-right .lp-media-text__media,
.lp-media-text--image-right .lp-media-text__body {
  direction: ltr;
}

/* 比率 60:40 */
.lp-media-text--ratio-6-4 .lp-media-text__inner {
  grid-template-columns: 3fr 2fr;
}

/* Zigzag コンテナ: 偶数番目のブロックを反転 */
.lp-media-text--zigzag .lp-media-text:nth-child(even) .lp-media-text__inner {
  direction: rtl;
}

.lp-media-text--zigzag .lp-media-text:nth-child(even) .lp-media-text__media,
.lp-media-text--zigzag .lp-media-text:nth-child(even) .lp-media-text__body {
  direction: ltr;
}

/* Zigzag 内のブロックはセクションパディングを半分に詰める */
.lp-media-text--zigzag .lp-media-text {
  padding-top: 56px;
  padding-bottom: 56px;
}

.lp-media-text--zigzag .lp-media-text:first-child {
  padding-top: var(--lp-section-padding);
}

.lp-media-text--zigzag .lp-media-text:last-child {
  padding-bottom: var(--lp-section-padding);
}

/* =============================================
   メディアエリア
   ============================================= */

.lp-media-text__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--lp-section-alt-bg);
  box-shadow: var(--shadow-md);
  line-height: 0;
}

.lp-media-text__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--anim-ease-standard);
}

.lp-media-text__media:hover img {
  transform: scale(1.02);
}

/* 動画バリアント */
.lp-media-text--video .lp-media-text__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.lp-media-text--video .lp-media-text__media iframe,
.lp-media-text--video .lp-media-text__media video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: var(--radius-lg);
}

.lp-media-text--video .lp-media-text__media:hover img {
  transform: none;
}

/* メディアプレースホルダー（画像がない場合のダミー） */
.lp-media-text__placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  border-radius: var(--radius-lg);
  color: var(--lp-brand-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* =============================================
   テキストエリア
   ============================================= */

.lp-media-text__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lp-media-text__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
}

.lp-media-text__heading {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}

.lp-media-text__lead {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
}

.lp-media-text__text {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.8;
  margin: 0;
}

/* チェックリスト */
.lp-media-text__checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.lp-media-text__checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.6;
}

.lp-media-text__checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lp-brand-blue-light);
  border: 1.5px solid var(--lp-brand-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8l3.5 3.5L13 5' stroke='%232ea7e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  margin-top: 2px;
}

/* CTA リンク */
.lp-media-text__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--lp-brand-blue);
  text-decoration: none;
  transition: gap 0.2s var(--anim-ease-standard), color 0.2s;
  align-self: flex-start;
}

.lp-media-text__cta:hover {
  gap: 10px;
  color: var(--color-primary);
}

.lp-media-text__cta-icon {
  font-size: 18px;
  line-height: 1;
}

/* =============================================
   レスポンシブ: モバイル（768px 未満）
   ============================================= */

@media (max-width: 768px) {
  .lp-media-text {
    padding: var(--lp-section-padding-sm);
  }

  .lp-media-text__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
  }

  /* 画像が右のバリアントも、モバイルでは画像上・テキスト下に統一 */
  .lp-media-text--image-right .lp-media-text__inner {
    direction: ltr;
  }

  /* 比率 60:40 もモバイルでは1列に戻す */
  .lp-media-text--ratio-6-4 .lp-media-text__inner {
    grid-template-columns: 1fr;
  }

  /* メディアを常に先に表示 */
  .lp-media-text__media {
    order: -1;
  }

  .lp-media-text--zigzag .lp-media-text {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .lp-media-text--zigzag .lp-media-text:first-child {
    padding-top: 48px;
  }

  .lp-media-text--zigzag .lp-media-text:last-child {
    padding-bottom: 48px;
  }

  .lp-media-text--zigzag .lp-media-text:nth-child(even) .lp-media-text__inner {
    direction: ltr;
  }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .lp-media-text__media img {
    transition: none;
  }
  .lp-media-text__media:hover img {
    transform: none;
  }
  .lp-media-text__cta {
    transition: none;
  }
}

/* ==============================================
   card-gallery — カードギャラリーセクション
   v20260416
   ============================================== */

/* =============================================
   lp-card-gallery — ベース
   ============================================= */

.lp-card-gallery {
  padding: var(--lp-section-padding);
}

.lp-card-gallery--alt {
  background: var(--lp-section-alt-bg);
}

.lp-card-gallery__inner {
  max-width: var(--lp-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.lp-card-gallery__header {
  margin-bottom: 48px;
}

.lp-card-gallery__header--center {
  text-align: center;
}

.lp-card-gallery__header--center .lp-card-gallery__subtitle {
  margin: 0 auto;
}

.lp-card-gallery__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.lp-card-gallery__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.lp-card-gallery__subtitle {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--color-text-light);
  line-height: 1.8;
  max-width: 640px;
}

/* =============================================
   グリッド列数
   ============================================= */

.lp-card-gallery__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr); /* デフォルト: 3列 */
  list-style: none;
  margin: 0;
  padding: 0;
  justify-items: stretch;
}

.lp-card-gallery--cols-2 .lp-card-gallery__grid {
  grid-template-columns: repeat(2, 1fr);
}

.lp-card-gallery--cols-3 .lp-card-gallery__grid {
  grid-template-columns: repeat(3, 1fr);
}

.lp-card-gallery--cols-4 .lp-card-gallery__grid {
  grid-template-columns: repeat(4, 1fr);
}

/* =============================================
   カード基本スタイル
   ============================================= */

.lp-card-gallery__item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s var(--anim-ease-standard), transform 0.2s var(--anim-ease-standard);
}

.lp-card-gallery__item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* =============================================
   画像付きカード
   ============================================= */

.lp-card-gallery--with-image .lp-card-gallery__item-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--lp-section-alt-bg);
  flex-shrink: 0;
  line-height: 0;
}

.lp-card-gallery--with-image .lp-card-gallery__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--anim-ease-standard);
}

.lp-card-gallery__item:hover .lp-card-gallery__item-image img {
  transform: scale(1.04);
}

/* メンバーバリアントの画像はカード外（別途スタイル） */
.lp-card-gallery--members .lp-card-gallery__item-image {
  aspect-ratio: auto;
}

/* =============================================
   カード本文エリア
   ============================================= */

.lp-card-gallery__item-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.lp-card-gallery__item-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-brand-blue);
  background: var(--lp-brand-blue-light);
  border: 1px solid var(--lp-brand-blue-mid);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
}

.lp-card-gallery__item-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.45;
  margin: 0;
  flex-shrink: 0;
}

.lp-card-gallery__item-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.75;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lp-card-gallery__item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: auto;
  padding-top: 8px;
}

.lp-card-gallery__item-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-light);
  flex-shrink: 0;
}

.lp-card-gallery__item-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-brand-blue);
  text-decoration: none;
  margin-top: auto;
  align-self: flex-start;
  transition: gap 0.2s var(--anim-ease-standard), color 0.2s;
}

.lp-card-gallery__item-cta:hover {
  gap: 8px;
  color: var(--color-primary);
}

/* =============================================
   クリッカブルカード（--linked）
   ============================================= */

.lp-card-gallery--linked .lp-card-gallery__item {
  position: relative;
}

.lp-card-gallery--linked a.lp-card-gallery__item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.lp-card-gallery--linked a.lp-card-gallery__item:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

/* =============================================
   テキストのみカード（--no-image）
   ============================================= */

.lp-card-gallery--no-image .lp-card-gallery__item-body {
  padding: 24px;
}

/* アイコン付き（no-image バリアントで使用） */
.lp-card-gallery__item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--lp-brand-blue-light);
  color: var(--lp-brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* =============================================
   横長カード（--horizontal）
   ============================================= */

.lp-card-gallery--horizontal .lp-card-gallery__grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.lp-card-gallery--horizontal .lp-card-gallery__item {
  flex-direction: row;
  align-items: stretch;
}

.lp-card-gallery--horizontal .lp-card-gallery__item-image {
  width: 220px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.lp-card-gallery--horizontal .lp-card-gallery__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.lp-card-gallery--horizontal .lp-card-gallery__item-body {
  flex: 1;
}

/* =============================================
   メンバー紹介（--members）
   ============================================= */

.lp-card-gallery--members .lp-card-gallery__grid {
  gap: 32px;
}

.lp-card-gallery--members .lp-card-gallery__item {
  text-align: center;
  padding: 32px 24px 28px;
  flex-direction: column;
  align-items: center;
  border: none;
  box-shadow: none;
  background: transparent;
}

.lp-card-gallery--members .lp-card-gallery__item:hover {
  transform: none;
  box-shadow: none;
}

/* アバター（avatar.md の .avatar--xl に準拠） */
.lp-card-gallery__member-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  background: var(--lp-brand-blue-light);
  flex-shrink: 0;
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-md);
}

.lp-card-gallery__member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* イニシャル表示（avatar.md の avatar__initials に準拠） */
.lp-card-gallery__member-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-white);
  user-select: none;
  line-height: 1;
}

/* アバターカラーバリアント（avatar.md 準拠） */
.lp-card-gallery__member-avatar--navy   { background: var(--color-primary); }
.lp-card-gallery__member-avatar--accent { background: var(--color-accent); }
.lp-card-gallery__member-avatar--gold   { background: var(--color-gold); }

.lp-card-gallery__member-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.lp-card-gallery__member-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--lp-brand-blue);
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.lp-card-gallery__member-bio {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
}

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

@media (max-width: 1024px) {
  /* タブレット: 4列→2列 */
  .lp-card-gallery--cols-4 .lp-card-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* タブレット: 3列→2列 */
  .lp-card-gallery--cols-3 .lp-card-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .lp-card-gallery {
    padding: var(--lp-section-padding-sm);
  }

  .lp-card-gallery__inner {
    padding: 0 20px;
  }

  .lp-card-gallery__header {
    margin-bottom: 32px;
  }

  /* モバイル: すべて1列 */
  .lp-card-gallery--cols-2 .lp-card-gallery__grid,
  .lp-card-gallery--cols-3 .lp-card-gallery__grid,
  .lp-card-gallery--cols-4 .lp-card-gallery__grid {
    grid-template-columns: 1fr;
  }

  /* メンバーは2列を維持 */
  .lp-card-gallery--members .lp-card-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 横長カードはモバイルで縦積みに */
  .lp-card-gallery--horizontal .lp-card-gallery__item {
    flex-direction: column;
  }

  .lp-card-gallery--horizontal .lp-card-gallery__item-image {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .lp-card-gallery--horizontal .lp-card-gallery__item-image img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (max-width: 480px) {
  /* 小型モバイル: メンバーも1列 */
  .lp-card-gallery--members .lp-card-gallery__grid {
    grid-template-columns: 1fr;
  }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .lp-card-gallery__item {
    transition: none;
  }
  .lp-card-gallery__item:hover {
    transform: none;
  }
  .lp-card-gallery__item:hover .lp-card-gallery__item-image img {
    transform: none;
  }
  .lp-card-gallery__item-cta {
    transition: none;
  }
}

/* ==============================================
   ds-prose — 長文コンテンツ向けタイポグラフィ
   ブログ記事・ヘルプ・利用規約・事例詳細本文
   v20260416
   ============================================== */

/* ===== コンテナ ===== */

.ds-prose {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-12) var(--space-6);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: var(--color-text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.ds-prose--narrow {
  max-width: 640px;
}

.ds-prose--wide {
  max-width: 960px;
}

.ds-prose--compact {
  line-height: 1.6;
}

.ds-prose--compact p {
  margin-bottom: var(--space-3);
}

/* ===== 見出し h1〜h6 ===== */

.ds-prose h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--space-6);
}

.ds-prose h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}

.ds-prose h3 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--color-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.ds-prose h4 {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--color-primary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.ds-prose h5 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.ds-prose h6 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

/* ===== 段落 ===== */

.ds-prose p {
  margin-top: 0;
  margin-bottom: var(--space-5);
  line-height: 1.8;
}

.ds-prose p.lead {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.ds-prose p:last-child {
  margin-bottom: 0;
}

/* ===== テキスト装飾 ===== */

.ds-prose strong {
  font-weight: 700;
  color: var(--color-primary);
}

.ds-prose em {
  font-style: italic;
}

.ds-prose small {
  font-size: 0.875em;
  line-height: 1.6;
  color: var(--color-text-light);
  display: inline-block;
  margin-bottom: var(--space-2);
}

.ds-prose cite {
  font-size: 0.875em;
  font-style: italic;
  color: var(--color-text-light);
}

.ds-prose sup {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 1;
}

.ds-prose sub {
  font-size: 0.75em;
  vertical-align: sub;
  line-height: 1;
}

.ds-prose abbr[title] {
  border-bottom: 1px dashed var(--color-text-light);
  cursor: help;
  text-decoration: none;
}

.ds-prose acronym {
  border-bottom: 1px dashed var(--color-text-light);
  cursor: help;
}

.ds-prose time {
  color: inherit;
}

/* ===== リンク ===== */

.ds-prose a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition), border-bottom-color var(--transition);
  border-bottom: 1px solid transparent;
}

.ds-prose a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.ds-prose a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* 外部リンクインジケータ */
.ds-prose a[href^="http"]::after,
.ds-prose a[href^="https"]::after {
  content: '\2197';
  font-size: 0.75em;
  margin-left: 3px;
  opacity: 0.6;
  vertical-align: super;
}

/* ===== 引用 ===== */

.ds-prose blockquote {
  border-left: 4px solid var(--color-accent);
  background: rgba(91, 122, 112, 0.06);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.ds-prose blockquote p {
  margin-bottom: var(--space-2);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
}

.ds-prose blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== コードブロック ===== */

.ds-prose pre {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-8) 0;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.ds-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* インラインコード */
.ds-prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(26, 43, 74, 0.07);
  color: var(--color-accent);
  padding: 2px 6px;
  border-radius: var(--radius);
}

/* ===== 水平線 ===== */

.ds-prose hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-10) 0;
}

/* ===== 画像・メディア ===== */

.ds-prose img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  margin: var(--space-8) auto;
}

.ds-prose figure {
  margin: var(--space-10) 0;
  text-align: center;
}

.ds-prose figure img {
  margin: 0 auto var(--space-3);
}

.ds-prose figcaption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-light);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ===== リスト ===== */

.ds-prose ul,
.ds-prose ol {
  list-style: revert;
  padding-left: 1.5em;
  margin-top: 0;
  margin-bottom: var(--space-5);
}

.ds-prose ul {
  list-style-type: none;
  padding-left: 0;
}

.ds-prose ul > li {
  padding-left: 1.5em;
  position: relative;
}

.ds-prose ul > li::before {
  content: '\25A0';
  color: var(--mobile-accent2, #2563EB);
  font-size: 0.55em;
  position: absolute;
  left: 0.3em;
  top: 0.55em;
}

.ds-prose ol {
  list-style-type: decimal;
}

.ds-prose ol > li::marker {
  color: var(--color-accent);
  font-weight: 700;
}

.ds-prose li {
  line-height: 1.7;
  margin-bottom: var(--space-2);
}

.ds-prose li:last-child {
  margin-bottom: 0;
}

/* ネストリスト */
.ds-prose ul ul,
.ds-prose ol ol,
.ds-prose ul ol,
.ds-prose ol ul {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  padding-left: 1.25em;
}

/* ===== 定義リスト ===== */

.ds-prose dl {
  margin-top: 0;
  margin-bottom: var(--space-6);
}

.ds-prose dt {
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

.ds-prose dd {
  padding-left: 1.25em;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: var(--space-2);
  margin-left: 0;
}

/* ===== テーブル ===== */

.ds-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  font-size: 15px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ds-prose thead {
  background: var(--color-primary);
  color: #fff;
}

.ds-prose th {
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.02em;
  font-size: 13px;
  white-space: nowrap;
}

.ds-prose tbody tr:nth-child(even) {
  background: rgba(26, 43, 74, 0.03);
}

.ds-prose tbody tr:hover {
  background: rgba(26, 43, 74, 0.06);
  transition: background var(--transition);
}

.ds-prose td {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.6;
  vertical-align: top;
}

.ds-prose caption {
  font-size: 13px;
  color: var(--color-text-light);
  text-align: left;
  padding-bottom: var(--space-2);
  caption-side: top;
}

/* ===== フォーム（プローズ内埋め込み用） ===== */

.ds-prose form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.ds-prose label {
  font-weight: 500;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-1);
  font-size: 14px;
}

.ds-prose input[type="text"],
.ds-prose input[type="email"],
.ds-prose input[type="tel"],
.ds-prose input[type="url"],
.ds-prose input[type="number"],
.ds-prose textarea,
.ds-prose select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--transition), box-shadow var(--transition);
  display: block;
}

.ds-prose input:focus,
.ds-prose textarea:focus,
.ds-prose select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91, 122, 112, 0.15);
}

.ds-prose textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.ds-prose fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ds-prose legend {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
  padding: 0 var(--space-2);
}

/* ===== ポータル用 ds-prose-label ===== */
/* prose.html のセクションラベル（.ds-prose の外側で表示する） */

.ds-prose-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: var(--color-bg-beige);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3px 10px;
  margin-bottom: var(--space-2);
  margin-top: var(--space-6);
  pointer-events: none;
}

.ds-prose .ds-prose-label {
  /* prose 内に誤って混入した場合にスタイルを維持 */
  font-family: var(--font-sans);
}

/* ===== ダークモード対応 ===== */

[data-theme="dark"] .ds-prose {
  color: var(--color-text);
}

[data-theme="dark"] .ds-prose blockquote {
  background: rgba(111, 168, 152, 0.08);
  border-left-color: var(--color-accent);
}

[data-theme="dark"] .ds-prose code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

[data-theme="dark"] .ds-prose pre {
  background: #0a0e18;
}

[data-theme="dark"] .ds-prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .ds-prose tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .ds-prose input,
[data-theme="dark"] .ds-prose textarea,
[data-theme="dark"] .ds-prose select {
  background: #1a1e28;
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .ds-prose ul > li::before {
  color: var(--mobile-accent2, #2563EB);
}

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

@media (max-width: 768px) {
  .ds-prose {
    padding: var(--space-8) var(--space-4);
    font-size: 16px;
  }

  .ds-prose h1 {
    font-size: 28px;
    margin-bottom: var(--space-5);
  }

  .ds-prose h2 {
    font-size: 22px;
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
  }

  .ds-prose h3 {
    font-size: 18px;
    margin-top: var(--space-6);
  }

  .ds-prose h4 {
    font-size: 16px;
  }

  .ds-prose p.lead {
    font-size: 18px;
  }

  .ds-prose table {
    font-size: 13px;
  }

  .ds-prose th,
  .ds-prose td {
    padding: var(--space-2) var(--space-3);
  }
}

@media (max-width: 480px) {
  .ds-prose {
    padding: var(--space-6) var(--space-4);
  }

  .ds-prose h1 {
    font-size: 24px;
  }

  .ds-prose h2 {
    font-size: 20px;
  }

  .ds-prose h3 {
    font-size: 17px;
  }

  .ds-prose figure {
    margin: var(--space-6) 0;
  }
}

/* prefers-reduced-motion: ds-prose 内のアニメーション */
@media (prefers-reduced-motion: reduce) {
  .ds-prose a,
  .ds-prose tbody tr {
    transition: none;
  }
}

/* ==============================================
   ゲーミフィケーション拡張 — v20260416
   実績カード / ミッション / スコアボード / 称号 /
   リワード / 演出通知 / プロフィールカード /
   チームランキング / 進捗タイムライン / 設定パネル
   ============================================== */

/* =============================================
   6. 実績カード（.achievement-*）
   ============================================= */

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .achievement-grid { grid-template-columns: repeat(2, 1fr); }
}

.achievement-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.achievement-card:hover { box-shadow: var(--shadow-md); }

/* ロック状態 */
.achievement-card--locked {
  opacity: 0.55;
  filter: grayscale(80%);
}

.achievement-card--locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* レア度ボーダー */
.achievement-card--bronze  { border-top: 3px solid #c0905a; }
.achievement-card--silver  { border-top: 3px solid #94a3b8; }
.achievement-card--gold    { border-top: 3px solid var(--color-gold); }
.achievement-card--platinum {
  border-top: 3px solid transparent;
  background-image: linear-gradient(var(--color-white), var(--color-white)),
    linear-gradient(90deg, #8b9cf7, #a78bfa, #c4b5fd, #a78bfa, #8b9cf7);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

[data-theme="dark"] .achievement-card--platinum {
  background-image: linear-gradient(var(--color-white), var(--color-white)),
    linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa, #8b5cf6, #6366f1);
}

.achievement-card__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.achievement-card__icon-wrap--bronze  { background: rgba(192,144,90,0.12); }
.achievement-card__icon-wrap--silver  { background: rgba(148,163,184,0.12); }
.achievement-card__icon-wrap--gold    { background: rgba(184,154,90,0.12); }
.achievement-card__icon-wrap--platinum { background: rgba(139,92,246,0.10); }
.achievement-card__icon-wrap--locked  { background: rgba(0,0,0,0.06); }

.achievement-card__rarity {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.achievement-card__rarity--bronze  { color: #c0905a; }
.achievement-card__rarity--silver  { color: #718096; }
.achievement-card__rarity--gold    { color: var(--color-gold); }
.achievement-card__rarity--platinum { color: #8b5cf6; }

.achievement-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  margin-top: var(--space-1);
}

.achievement-card__desc {
  font-size: 11px;
  color: var(--color-text-light);
  line-height: 1.5;
}

.achievement-card__progress {
  margin-top: var(--space-1);
}

.achievement-card__progress-label {
  font-size: 10px;
  color: var(--color-text-light);
  margin-bottom: var(--space-1);
  display: flex;
  justify-content: space-between;
}

.achievement-card__bar {
  height: 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 99px;
  overflow: hidden;
}

[data-theme="dark"] .achievement-card__bar { background: rgba(255,255,255,0.1); }

.achievement-card__bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transition: width 0.6s ease;
}

.achievement-card__bar-fill--bronze  { background: #c0905a; }
.achievement-card__bar-fill--silver  { background: #94a3b8; }
.achievement-card__bar-fill--gold    { background: var(--color-gold); }
.achievement-card__bar-fill--platinum { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* 解除済みスタンプ */
.achievement-card__unlocked-stamp {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-3);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-success);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* =============================================
   7. デイリー / ウィークリーミッション（.mission-*）
   ============================================= */

.mission-panel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mission-panel__header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}

.mission-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.mission-panel__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mission-panel__countdown {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-warning);
  font-variant-numeric: tabular-nums;
}

.mission-panel__progress-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
}

.mission-panel__body {
  padding: var(--space-3) var(--space-5);
}

/* ミッションアイテム */
.mission-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.mission-item:last-child { border-bottom: none; }

.mission-item__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.mission-item--done .mission-item__check {
  background: var(--color-success);
  border-color: var(--color-success);
}

.mission-item__check-icon {
  display: none;
  color: #fff;
}

.mission-item--done .mission-item__check-icon { display: block; }

.mission-item__body { flex: 1; }

.mission-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.mission-item--done .mission-item__name {
  color: var(--color-text-light);
  text-decoration: line-through;
}

.mission-item__desc {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

.mission-item__reward {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-gold);
  flex-shrink: 0;
  white-space: nowrap;
}

/* コンプリートボーナスバナー */
.mission-panel__bonus {
  margin: 0 var(--space-5) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: rgba(184,154,90,0.08);
  border: 1px solid rgba(184,154,90,0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

[data-theme="dark"] .mission-panel__bonus {
  background: rgba(212,176,106,0.08);
  border-color: rgba(212,176,106,0.2);
}

.mission-panel__bonus-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
}

.mission-panel__bonus-reward {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
}

/* =============================================
   8. スコアボード / ダッシュボードウィジェット（.scoreboard-*）
   ============================================= */

.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .scoreboard-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}

.scoreboard-stat {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scoreboard-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.scoreboard-stat__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scoreboard-stat__unit {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.scoreboard-stat__change {
  font-size: 12px;
  font-weight: 700;
  margin-top: var(--space-1);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.scoreboard-stat__change--up   { color: var(--color-success); }
.scoreboard-stat__change--down { color: var(--color-error); }
.scoreboard-stat__change--flat { color: var(--color-text-light); }

/* 円形進捗（目標達成率） */
.circular-progress {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circular-progress__svg {
  transform: rotate(-90deg);
}

.circular-progress__track {
  fill: none;
  stroke: rgba(0,0,0,0.08);
  stroke-width: 6;
}

[data-theme="dark"] .circular-progress__track { stroke: rgba(255,255,255,0.1); }

.circular-progress__fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.circular-progress__fill--primary { stroke: var(--color-primary); }
.circular-progress__fill--warning { stroke: var(--color-warning); }
.circular-progress__fill--success { stroke: var(--color-success); }
.circular-progress__fill--gold    { stroke: var(--color-gold); }

.circular-progress__label {
  position: absolute;
  text-align: center;
}

.circular-progress__pct {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.circular-progress__sub {
  font-size: 10px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* チーム vs 自分 ウィジェット */
.vs-widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow);
}

.vs-widget__header {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.vs-widget__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.vs-widget__row:last-child { margin-bottom: 0; }

.vs-widget__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  width: 56px;
  flex-shrink: 0;
}

.vs-widget__bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  overflow: hidden;
}

[data-theme="dark"] .vs-widget__bar-wrap { background: rgba(255,255,255,0.08); }

.vs-widget__bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

.vs-widget__bar-fill--team { background: rgba(16,42,67,0.35); }
.vs-widget__bar-fill--mine { background: var(--color-primary); }

[data-theme="dark"] .vs-widget__bar-fill--mine { background: var(--color-primary); }

.vs-widget__value {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* =============================================
   9. 称号 / ロール（.title-badge / .title-picker-*）
   ============================================= */

/* インライン称号バッジ（名前横） */
.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.title-badge--bronze  { background: rgba(192,144,90,0.12); color: #c0905a; }
.title-badge--silver  { background: rgba(148,163,184,0.12); color: #718096; }
.title-badge--gold    { background: rgba(184,154,90,0.12);  color: var(--color-gold); }
.title-badge--platinum { background: rgba(139,92,246,0.10); color: #7c3aed; }

/* 称号一覧 */
.title-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.title-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.title-item:hover { border-color: var(--color-accent); box-shadow: var(--shadow); }

.title-item--active {
  border-color: var(--color-primary);
  background: rgba(16,42,67,0.03);
}

[data-theme="dark"] .title-item--active {
  border-color: var(--color-primary);
  background: rgba(37,99,235,0.06);
}

.title-item--locked {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.title-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.title-item__body { flex: 1; }

.title-item__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.title-item__cond {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

.title-item__set-btn {
  font-size: 11px;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.title-item__set-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.title-item--active .title-item__set-btn {
  background: var(--color-primary);
  color: #fff;
  pointer-events: none;
}

/* Tooltip（称号獲得条件） */
.title-tooltip {
  position: relative;
  display: inline-flex;
}

.title-tooltip__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
}

.title-tooltip__tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-primary);
}

.title-tooltip:hover .title-tooltip__tip { opacity: 1; }

/* =============================================
   10. リワード（.reward-*）
   ============================================= */

.reward-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 480px) { .reward-grid { grid-template-columns: 1fr; } }

.reward-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.reward-card:hover { box-shadow: var(--shadow-md); }

.reward-card--claimed {
  opacity: 0.6;
  background: var(--color-bg-beige);
}

.reward-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(184,154,90,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reward-card__body { flex: 1; }

.reward-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.reward-card__cost {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.reward-card__cost--locked { color: var(--color-text-light); }

.reward-card__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.reward-card__btn--claim {
  background: var(--color-gold);
  color: #fff;
}

.reward-card__btn--claim:hover { background: var(--color-primary); }

.reward-card__btn--claimed {
  background: rgba(0,0,0,0.06);
  color: var(--color-text-light);
  pointer-events: none;
}

[data-theme="dark"] .reward-card__btn--claimed { background: rgba(255,255,255,0.08); }

.reward-card__btn--locked {
  background: rgba(0,0,0,0.06);
  color: var(--color-text-light);
  pointer-events: none;
}

/* 獲得済み履歴 */
.reward-history {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.reward-history__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 12px;
}

.reward-history__name { flex: 1; font-weight: 600; color: var(--color-text); }
.reward-history__date { color: var(--color-text-light); white-space: nowrap; }

/* =============================================
   11. レベルアップ演出 / 通知モーダル（.gamif-modal-*）
   ============================================= */

.gamif-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.gamif-modal-overlay.is-open {
  display: flex;
  animation: gamifOverlayIn 0.3s ease;
}

@keyframes gamifOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gamif-modal {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8);
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: gamifModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes gamifModalIn {
  from { opacity: 0; transform: scale(0.85) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gamif-modal__icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  animation: gamifIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes gamifIconBounce {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.gamif-modal__icon-wrap--levelup  { background: rgba(184,154,90,0.15); }
.gamif-modal__icon-wrap--badge    { background: rgba(37,99,235,0.12); }
.gamif-modal__icon-wrap--streak   { background: rgba(245,158,11,0.12); }
.gamif-modal__icon-wrap--complete { background: rgba(22,163,74,0.12);  }

.gamif-modal__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.gamif-modal__eyebrow--levelup  { color: var(--color-gold); }
.gamif-modal__eyebrow--badge    { color: var(--color-primary); }
.gamif-modal__eyebrow--streak   { color: var(--color-warning); }
.gamif-modal__eyebrow--complete { color: var(--color-success); }

.gamif-modal__title {
  font-size: 26px;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.gamif-modal__sub {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.gamif-modal__xp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(184,154,90,0.10);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-5);
}

.gamif-modal__close {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-sans);
}

.gamif-modal__close:hover { background: var(--color-primary-dark); }

/* ミッション達成トースト */
.mission-toast {
  position: fixed;
  top: 80px;
  right: var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 300px;
  z-index: 9998;
  animation: missionToastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--color-success);
}

.mission-toast--out {
  animation: missionToastOut 0.3s ease forwards;
}

@keyframes missionToastIn {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes missionToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}

.mission-toast__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(22,163,74,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mission-toast__body { flex: 1; }

.mission-toast__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.mission-toast__sub {
  font-size: 11px;
  color: var(--color-text-light);
}

.mission-toast__reward {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-gold);
  margin-top: 3px;
}

/* =============================================
   12. プロフィールカード（.profile-card-*）
   ============================================= */

.profile-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* トップ行: アバター + 名前 + 称号 */
.profile-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.profile-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.profile-card__info { flex: 1; }

.profile-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  line-height: 1.3;
}

.profile-card__title-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(184,154,90,0.12);
  color: var(--color-gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.profile-card__rank {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 3px;
  font-weight: 500;
}

/* XP行 */
.profile-card__xp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-light);
  margin-bottom: 3px;
}

.profile-card__xp-label { font-weight: 700; color: var(--color-primary); font-size: 12px; }

/* 統計グリッド: ストリーク / ランキング / スコア */
.profile-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.profile-card__stat {
  text-align: center;
  padding: var(--space-2) 0;
  border-radius: var(--radius-md);
  background: var(--color-bg-beige);
}

[data-theme="dark"] .profile-card__stat { background: rgba(255,255,255,0.04); }

.profile-card__stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.profile-card__stat-label {
  font-size: 10px;
  color: var(--color-text-light);
  margin-top: 3px;
  font-weight: 500;
}

/* 最近のバッジ */
.profile-card__badges-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-card__badges-label {
  font-size: 11px;
  color: var(--color-text-light);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.profile-card__badge-icons {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.profile-card__badge-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.profile-card__badge-icon--bronze  { background: rgba(192,144,90,0.12); }
.profile-card__badge-icon--silver  { background: rgba(148,163,184,0.12); }
.profile-card__badge-icon--gold    { background: rgba(184,154,90,0.12);  }

/* =============================================
   13. チームランキング / 部署対抗（.team-ranking-*）
   ============================================= */

.team-ranking {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-ranking__header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}

.team-ranking__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

.team-ranking__period-tabs {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.05);
  border-radius: var(--radius-pill);
  padding: 3px;
}

[data-theme="dark"] .team-ranking__period-tabs { background: rgba(255,255,255,0.08); }

.team-ranking__period-tab {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--color-text-light);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.team-ranking__period-tab--active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .team-ranking__period-tab--active {
  background: var(--color-white);
  color: var(--color-text);
}

/* チームアイテム */
.team-ranking__list {
  display: flex;
  flex-direction: column;
}

.team-ranking__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.team-ranking__item:last-child { border-bottom: none; }
.team-ranking__item:hover { background: var(--color-bg-beige); }

[data-theme="dark"] .team-ranking__item:hover { background: rgba(255,255,255,0.03); }

.team-ranking__rank {
  font-size: 16px;
  font-weight: 900;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.team-ranking__rank--1 { color: var(--color-gold); }
.team-ranking__rank--2 { color: #718096; }
.team-ranking__rank--3 { color: #c0905a; }

/* 順位変動 */
.team-ranking__trend {
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.team-ranking__trend--up   { color: var(--color-success); }
.team-ranking__trend--down { color: var(--color-error); }
.team-ranking__trend--flat { color: var(--color-text-light); }

/* チームアバターグループ */
.team-avatars {
  display: flex;
  flex-direction: row-reverse;
  margin-left: 4px;
}

.team-avatars__item {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  margin-left: -6px;
}

.team-avatars__item:last-child { margin-left: 0; }

.team-avatars__more {
  background: rgba(0,0,0,0.1);
  color: var(--color-text-light);
  font-size: 8px;
}

[data-theme="dark"] .team-avatars__more { background: rgba(255,255,255,0.1); }

.team-ranking__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.team-ranking__score {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.team-ranking__unit {
  font-size: 10px;
  font-weight: 400;
  color: var(--color-text-light);
  margin-left: 1px;
}

/* =============================================
   14. 進捗タイムライン（.gamif-timeline-*）
   ============================================= */

.gamif-timeline {
  position: relative;
  padding-left: 44px;
}

.gamif-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
  border-radius: 1px;
}

.gamif-timeline__group { margin-bottom: var(--space-5); }

.gamif-timeline__group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
  position: relative;
  left: -32px;
  padding-left: 8px;
}

.gamif-timeline__item {
  position: relative;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.gamif-timeline__item:last-child { margin-bottom: 0; }

.gamif-timeline__dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  z-index: 1;
  flex-shrink: 0;
}

.gamif-timeline__dot--badge    { border-color: var(--color-gold);    background: rgba(184,154,90,0.12); }
.gamif-timeline__dot--mission  { border-color: var(--color-success);  background: rgba(22,163,74,0.10); }
.gamif-timeline__dot--levelup  { border-color: var(--color-primary);  background: rgba(16,42,67,0.08); }
.gamif-timeline__dot--streak   { border-color: var(--color-warning);  background: rgba(245,158,11,0.10); }

.gamif-timeline__content {
  flex: 1;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.gamif-timeline__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.gamif-timeline__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.3;
}

.gamif-timeline__xp {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.gamif-timeline__meta {
  font-size: 11px;
  color: var(--color-text-light);
}

/* フィルタチップ */
.gamif-filter-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.gamif-filter-chip {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-light);
  background: var(--color-white);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.gamif-filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.gamif-filter-chip--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* =============================================
   15. ゲーミフィケーション設定パネル（.gamif-settings-*）
   ============================================= */

.gamif-settings {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gamif-settings__section {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.gamif-settings__section:last-child { border-bottom: none; }

.gamif-settings__section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-3);
}

.gamif-settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
}

.gamif-settings__row + .gamif-settings__row {
  border-top: 1px solid var(--color-border);
}

.gamif-settings__label-group { flex: 1; }

.gamif-settings__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.gamif-settings__desc {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* トグルスイッチ */
.gamif-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.gamif-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.gamif-toggle__track {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-pill);
  transition: background var(--transition);
  cursor: pointer;
}

[data-theme="dark"] .gamif-toggle__track { background: rgba(255,255,255,0.15); }

.gamif-toggle input:checked + .gamif-toggle__track {
  background: var(--color-primary);
}

[data-theme="dark"] .gamif-toggle input:checked + .gamif-toggle__track {
  background: var(--color-primary);
}

.gamif-toggle__track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gamif-toggle input:checked + .gamif-toggle__track::after {
  transform: translateX(18px);
}

.gamif-toggle input:focus-visible + .gamif-toggle__track {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* セグメント切替（週次/月次等） */
.gamif-segment {
  display: inline-flex;
  background: rgba(0,0,0,0.05);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

[data-theme="dark"] .gamif-segment { background: rgba(255,255,255,0.08); }

.gamif-segment__btn {
  padding: var(--space-1) var(--space-3);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--color-text-light);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.gamif-segment__btn--active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .gamif-segment__btn--active {
  background: rgba(255,255,255,0.12);
  color: var(--color-text);
}

/* =============================================
   ダークモード: 新コンポーネント追加対応
   ============================================= */

[data-theme="dark"] .achievement-card--locked::after {
  background: rgba(0,0,0,0.12);
}

[data-theme="dark"] .gamif-timeline__content {
  background: var(--color-white);
  border-color: var(--color-border);
}

[data-theme="dark"] .mission-toast {
  background: var(--color-white);
  border-left-color: var(--color-success);
}

/* =============================================
   prefers-reduced-motion: 新コンポーネント
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .achievement-card,
  .reward-card,
  .title-item,
  .mission-item__check {
    transition: none;
  }

  .gamif-modal { animation: none; }
  .gamif-modal__icon-wrap { animation: none; }
  .gamif-modal-overlay.is-open { animation: none; }
  .mission-toast { animation: none; }
  .mission-toast--out { animation: none; }
  .achievement-card__bar-fill,
  .circular-progress__fill,
  .vs-widget__bar-fill {
    transition: none;
  }
}

/* =============================================
   Chat v2 — 意思決定支援UI チャットシステム
   18コンポーネント完全定義
   ============================================= */

/* -- スクリーンリーダー専用ユーティリティ ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   チャット変数（local scope）
   ============================================= */

:root {
  --chat-bubble-self-bg:      rgba(46, 167, 224, 0.08);
  --chat-bubble-self-border:  var(--mobile-accent2);
  --chat-bubble-other-bg:     var(--color-white);
  --chat-bubble-other-border: var(--color-border);
  --chat-bubble-radius:       var(--radius-md);  /* 6px — 丸すぎない */
  --chat-meta-size:           13px;              /* 高齢者対応: 12px → 13px */
  --chat-font-size:           16px;              /* 高齢者対応: 15px → 16px */
  --chat-line-height:         1.8;               /* 高齢者対応: 1.75 → 1.8 */
  --chat-msg-gap:             16px;              /* 高齢者対応: 12px → 16px */
  --chat-section-gap:         var(--space-6);    /* 24px */
  --chat-bubble-max-width:    72%;
  --chat-avatar-size:         32px;
  --chat-typing-dot-size:     6px;
}

[data-theme="dark"] {
  --chat-bubble-self-bg:      rgba(59, 184, 240, 0.12);
  --chat-bubble-self-border:  var(--mobile-accent2);
  --chat-bubble-other-bg:     var(--color-white);  /* ダーク時 = #1a1e28 */
  --chat-bubble-other-border: var(--color-border);
}

/* =============================================
   全体レイアウト: .chat-layout
   ============================================= */

.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh; /* フォールバック */
  background: var(--color-bg);
  position: relative;
}

/* PC表示: 最大幅でセンタリング */
@media (min-width: 640px) {
  .chat-layout--narrow {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }
}

/* =============================================
   1. ChatHeader
   ============================================= */

.chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 56px;
}

.chat-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 36px → 48px */
  height: 48px;          /* 高齢者対応: 36px → 48px */
  min-width: 48px;       /* 高齢者対応: 36px → 48px */
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  font-size: 18px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.chat-header__back:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-header__back:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

.chat-header__avatar {
  flex-shrink: 0;
}

.chat-header__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-header__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header__sub {
  font-size: 13px;       /* 高齢者対応: 12px → 13px */
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

.chat-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chat-header__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 36px → 48px */
  height: 48px;          /* 高齢者対応: 36px → 48px */
  border-radius: var(--radius-md);
  color: var(--color-text-light);
  font-size: 18px;
  transition: background var(--transition), color var(--transition);
}

.chat-header__action-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-header__action-btn:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* =============================================
   チャットアバター（.chat-avatar）
   ============================================= */

.chat-avatar {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-bg-beige);
}

.chat-avatar__initials {
  font-size: 12px;       /* 高齢者対応: 10px → 12px */
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
  user-select: none;
}

.chat-avatar--navy   { background: var(--color-primary); }
.chat-avatar--accent { background: var(--color-accent); }
.chat-avatar--blue   { background: var(--mobile-accent2); }

/* =============================================
   2. ConversationContainer
   ============================================= */

.chat-conversation {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-bg);
  scroll-behavior: smooth;
}

.chat-conversation::-webkit-scrollbar { width: 4px; }
.chat-conversation::-webkit-scrollbar-track { background: transparent; }
.chat-conversation::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-pill);
}

/* =============================================
   3. DateDivider
   ============================================= */

.chat-date-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-3);
  color: var(--color-text-light);
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  font-weight: 500;
  letter-spacing: 0.04em;
}

.chat-date-divider::before,
.chat-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.chat-date-divider span {
  white-space: nowrap;
  flex-shrink: 0;
}

/* =============================================
   4. UnreadDivider
   ============================================= */

.chat-unread-divider {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0 var(--space-3);
  color: var(--mobile-accent2);
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chat-unread-divider::before,
.chat-unread-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mobile-accent2);
  opacity: 0.3;
}

.chat-unread-divider::before { flex: 0 0 16px; }

.chat-unread-divider__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mobile-accent2);
  color: var(--color-white);
  font-size: 12px;       /* 高齢者対応: 10px → 12px */
  font-weight: 700;
  padding: 2px 8px;      /* 高齢者対応: 1px 6px → 2px 8px */
  border-radius: var(--radius-pill);
  min-width: 20px;       /* 高齢者対応: 18px → 20px */
  line-height: 1.5;
}

/* =============================================
   メッセージ行共通: .chat-msg
   ============================================= */

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin-bottom: var(--chat-msg-gap);
  position: relative;
}

/* 連続投稿: 間隔を詰める */
.chat-msg--consecutive {
  margin-bottom: 4px;
}

/* アバターの幅を確保（整列用） */
.chat-msg__avatar {
  width: var(--chat-avatar-size);
  flex-shrink: 0;
  align-self: flex-end;
}

/* 連続投稿時: アバタースペーサー */
.chat-msg__avatar--spacer {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  flex-shrink: 0;
}

.chat-msg__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: var(--chat-bubble-max-width);
  position: relative;
}

.chat-msg__sender {
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
  padding-left: 2px;
}

/* -- MessageBubbleOther -- */
.chat-msg--other {
  flex-direction: row;
}

.chat-msg--other .chat-msg__body {
  align-items: flex-start;
}

/* -- MessageBubbleSelf -- */
.chat-msg--self {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.chat-msg--self .chat-msg__body {
  align-items: flex-end;
}

@media (max-width: 480px) {
  .chat-msg__body { max-width: 85%; }
}

/* =============================================
   バブル本体: .chat-bubble
   ============================================= */

.chat-bubble {
  padding: 14px 18px;    /* 高齢者対応: 10px 14px（space-2 space-3）→ 14px 18px */
  border-radius: var(--chat-bubble-radius);
  font-size: var(--chat-font-size);
  line-height: var(--chat-line-height);
  word-break: break-word;
  overflow-wrap: anywhere;
  position: relative;
}

.chat-bubble__text {
  margin: 0;
  color: var(--color-text);
}

/* 5. MessageBubbleSelf */
.chat-msg--self .chat-bubble {
  background: var(--chat-bubble-self-bg);
  border: 1px solid var(--color-border);
  border-right: 2px solid var(--chat-bubble-self-border);
  border-radius: var(--chat-bubble-radius);
}

/* 送信中 */
.chat-bubble--sending {
  opacity: 0.55;
}

/* 送信失敗 */
.chat-bubble--failed {
  border-color: var(--color-error) !important;
  background: rgba(192, 57, 43, 0.05) !important;
}

/* 引用付きバブル */
.chat-bubble--with-quote {
  padding-top: var(--space-2);
}

/* 6. MessageBubbleOther */
.chat-msg--other .chat-bubble {
  background: var(--chat-bubble-other-bg);
  border: 1px solid var(--chat-bubble-other-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* 引用ブロック（バブル内） */
.chat-bubble__quote {
  border-left: 3px solid var(--mobile-accent2);
  padding: 6px var(--space-2);
  margin-bottom: var(--space-2);
  background: rgba(0,0,0,0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.chat-bubble__quote-sender {
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  font-weight: 600;
  color: var(--mobile-accent2);
  display: block;
  margin-bottom: 2px;
}

.chat-bubble__quote-text {
  font-size: 13px;       /* 高齢者対応: 12px → 13px */
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* =============================================
   7. MessageBubbleSystem
   ============================================= */

.chat-msg--system {
  display: block;
  text-align: center;
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  color: var(--color-text-light);
  padding: 6px var(--space-3);
  margin: var(--space-2) auto;
  max-width: 80%;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* =============================================
   8. MessageMeta
   ============================================= */

.chat-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
}

.chat-meta--self {
  justify-content: flex-end;
}

.chat-timestamp {
  font-size: var(--chat-meta-size);
  color: var(--color-text-light);
  line-height: 1;
}

/* ステータスアイコン */
.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--chat-meta-size);
  line-height: 1;
}

.chat-status--sending { color: var(--color-text-light); }
.chat-status--sent    { color: var(--color-accent); }
.chat-status--read    { color: var(--mobile-accent2); }
.chat-status--failed  { color: var(--color-error); }

.chat-retry-btn {
  font-size: 14px;       /* 高齢者対応: 11px → 14px */
  font-weight: 600;
  color: var(--color-error);
  background: none;
  border: 1px solid var(--color-error);
  border-radius: var(--radius);
  padding: 12px 20px;    /* 高齢者対応: 2px 8px → 12px 20px（min-height 48px確保） */
  min-height: 48px;      /* 高齢者対応: 23px → 48px */
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
}

.chat-retry-btn:hover {
  background: var(--color-error);
  color: var(--color-white);
}

.chat-retry-btn:focus-visible {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}

/* =============================================
   9. MessageActionBar
   ============================================= */

.chat-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;              /* 高齢者対応: 2px → 8px（隣ボタンへの誤タップ防止） */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px 8px;      /* 高齢者対応: 2px 4px → 4px 8px */
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: absolute;
  bottom: calc(100% + 4px);
  white-space: nowrap;
}

.chat-msg--self .chat-action-bar  { left: 0; right: auto; }
.chat-msg--other .chat-action-bar { right: 0; left: auto; }

/* バブルhover時にアクションバーを表示 */
.chat-msg:hover .chat-action-bar,
.chat-msg:focus-within .chat-action-bar {
  opacity: 1;
  pointer-events: auto;
}

.chat-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 28px → 48px */
  height: 48px;          /* 高齢者対応: 28px → 48px */
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-size: 18px;       /* 高齢者対応: 14px → 18px（アイコン可視性向上） */
  transition: background var(--transition), color var(--transition);
}

.chat-action-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-action-btn:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* =============================================
   10. QuotePreview
   ============================================= */

.chat-quote-preview {
  flex-shrink: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.chat-quote-preview__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
}

.chat-quote-preview__line {
  width: 3px;
  min-width: 3px;
  height: 36px;
  background: var(--mobile-accent2);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.chat-quote-preview__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-quote-preview__sender {
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  font-weight: 600;
  color: var(--mobile-accent2);
}

.chat-quote-preview__text {
  font-size: 13px;       /* 高齢者対応: 12px → 13px */
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.chat-quote-preview__cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 28px → 48px */
  height: 48px;          /* 高齢者対応: 28px → 48px */
  border-radius: 50%;
  color: var(--color-text-light);
  font-size: 16px;       /* 高齢者対応: 14px → 16px */
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.chat-quote-preview__cancel:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-quote-preview__cancel:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* =============================================
   11. AttachmentCard
   ============================================= */

.chat-attachment {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--chat-bubble-radius);
  max-width: 260px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chat-attachment__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 167, 224, 0.1);
  border-radius: var(--radius);
  color: var(--mobile-accent2);
  font-size: 18px;
  flex-shrink: 0;
}

.chat-attachment__icon--green {
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
}

.chat-attachment__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-attachment__name {
  font-size: 14px;       /* 高齢者対応: 13px → 14px */
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment__size {
  font-size: 13px;       /* 高齢者対応: 11px → 13px */
  color: var(--color-text-light);
}

.chat-attachment__dl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 28px → 48px */
  height: 48px;          /* 高齢者対応: 28px → 48px */
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-size: 18px;       /* 高齢者対応: 15px → 18px */
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.chat-attachment__dl:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-attachment__dl:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* =============================================
   12. TypingIndicator
   ============================================= */

.chat-typing {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--chat-bubble-other-bg);
  border: 1px solid var(--chat-bubble-other-border);
  border-radius: var(--chat-bubble-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chat-typing__dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-typing__dot {
  width: var(--chat-typing-dot-size);
  height: var(--chat-typing-dot-size);
  border-radius: 50%;
  background: var(--color-text-light);
  animation: chat-typing-wave 1.4s infinite ease-in-out;
  opacity: 0.4;
}

.chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-typing-wave {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* =============================================
   13. Composer（入力欄全体）
   ============================================= */

.chat-composer {
  flex-shrink: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* 14. ComposerToolbar */
.chat-composer__toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-composer__tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 32px → 48px */
  height: 48px;          /* 高齢者対応: 32px → 48px */
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-size: 18px;       /* 高齢者対応: 16px → 18px */
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.chat-composer__tool-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.chat-composer__tool-btn:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* 入力行（textarea + 送信ボタン） */
.chat-composer__input-wrap {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}

/* textarea */
.chat-composer__textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px var(--space-3);  /* 高齢者対応: 10px → 14px（min-height 48px確保） */
  font-family: var(--font-sans);
  font-size: 16px;               /* 高齢者対応: 15px → 16px（iOS自動ズーム防止にも寄与） */
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 48px;              /* 高齢者対応: 40px → 48px */
  max-height: 100px;             /* 最大4行相当 */
  overflow-y: auto;
  transition: border-color var(--transition);
  -webkit-text-size-adjust: 100%;
}

.chat-composer__textarea:focus {
  outline: none;
  border-color: var(--mobile-accent2);
}

.chat-composer__textarea::placeholder {
  color: var(--color-text-light);
  font-size: 16px;               /* 高齢者対応: 14px → 16px（iOS自動ズーム防止に必須） */
}

.chat-composer__textarea--active {
  border-color: var(--mobile-accent2);
}

/* =============================================
   15. SendButton
   ============================================= */

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;           /* 高齢者対応: 40px → 48px */
  height: 48px;          /* 高齢者対応: 40px → 48px */
  min-width: 48px;       /* 高齢者対応: 40px → 48px */
  border-radius: var(--radius-md);
  font-size: 18px;
  flex-shrink: 0;
  transition: background var(--transition), opacity var(--transition);
  border: none;
  cursor: pointer;

  /* デフォルト（無効状態） */
  background: var(--color-border);
  color: var(--color-text-light);
  cursor: not-allowed;
  opacity: 0.6;
}

.chat-send-btn:disabled {
  background: var(--color-border);
  color: var(--color-text-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* 有効状態 */
.chat-send-btn--active {
  background: var(--mobile-accent2);
  color: var(--color-white);
  cursor: pointer;
  opacity: 1;
}

.chat-send-btn--active:hover {
  background: var(--color-primary);
}

.chat-send-btn--active:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* 送信中状態 */
.chat-send-btn--sending {
  background: var(--mobile-accent2);
  color: var(--color-white);
  cursor: not-allowed;
  opacity: 0.8;
}

/* 送信中スピナー */
.chat-send-btn__spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: rgba(255,255,255,1);
  border-radius: 50%;
  animation: chat-spin 0.7s linear infinite;
}

@keyframes chat-spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   新着メッセージアニメーション
   ============================================= */

.chat-msg--animate-in {
  animation: chat-msg-in 0.15s ease-out;
}

@keyframes chat-msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   16. EmptyState
   ============================================= */

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  gap: var(--space-3);
  flex: 1;
}

.chat-empty__icon {
  font-size: 40px;
  color: var(--color-border);
  display: block;
}

.chat-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  margin: 0;
}

.chat-empty__desc {
  font-size: 15px;       /* 高齢者対応: 13px → 15px */
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
  opacity: 0.8;
}

/* =============================================
   17. ErrorState
   ============================================= */

.chat-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  gap: var(--space-3);
  flex: 1;
}

.chat-error__icon {
  font-size: 36px;
  color: var(--color-error);
  opacity: 0.6;
  display: block;
}

.chat-error__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.chat-error__desc {
  font-size: 15px;       /* 高齢者対応: 13px → 15px */
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

.chat-error__retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;    /* 高齢者対応: 8px 20px → 14px 24px（min-height 48px確保） */
  min-height: 48px;      /* 高齢者対応: 37px → 48px */
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;       /* 高齢者対応: 13px → 14px */
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  margin-top: var(--space-2);
}

.chat-error__retry:hover {
  border-color: var(--mobile-accent2);
  color: var(--mobile-accent2);
  background: rgba(37,99,235,0.05);
}

.chat-error__retry:focus-visible {
  outline: 2px solid var(--mobile-accent2);
  outline-offset: 2px;
}

/* =============================================
   18. LoadingState（Skeleton）
   ============================================= */

.chat-loading {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  width: 100%;
}

.chat-loading__row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}

.chat-loading__row--self {
  flex-direction: row-reverse;
}

.chat-loading__avatar {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  min-width: var(--chat-avatar-size);
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  animation: chat-skeleton-pulse 1.5s ease-in-out infinite;
}

.chat-loading__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 60%;
}

.chat-loading__body--right {
  align-items: flex-end;
}

.chat-skeleton {
  border-radius: var(--radius-md);
  background: var(--color-border);
  animation: chat-skeleton-pulse 1.5s ease-in-out infinite;
}

.chat-skeleton--name {
  height: 10px;
  width: 60px;
  border-radius: var(--radius);
}

.chat-skeleton--bubble {
  height: 40px;
  border-radius: var(--chat-bubble-radius);
}

.chat-skeleton--bubble-sm  { width: 120px; }
.chat-skeleton--bubble-md  { width: 200px; }
.chat-skeleton--bubble-lg  { width: 260px; height: 60px; }

@keyframes chat-skeleton-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.3; }
}

/* =============================================
   prefers-reduced-motion: チャット
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .chat-typing__dot,
  .chat-send-btn__spinner,
  .chat-skeleton,
  .chat-loading__avatar,
  .chat-msg--animate-in {
    animation: none;
  }

  .chat-action-bar,
  .chat-send-btn,
  .chat-composer__textarea,
  .chat-header__back,
  .chat-header__action-btn,
  .chat-action-btn,
  .chat-quote-preview__cancel,
  .chat-error__retry,
  .chat-attachment__dl,
  .chat-composer__tool-btn,
  .chat-retry-btn {
    transition: none;
  }
}

/* ==============================================
   カレンダー（.cal-*）
   v1.9.0 / 2026-04-16
   ============================================== */

/* ── ルートコンテナ ── */
.cal-root {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 600px;
  font-family: var(--font-sans);
}

/* ── ヘッダー ── */
.cal-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}

.cal-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cal-header__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 140px;
  text-align: center;
  flex-shrink: 0;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  background: transparent;
}

.cal-nav-btn:hover {
  background: var(--color-bg-beige);
  color: var(--color-primary);
}

.cal-nav-btn:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

.cal-today-btn {
  padding: 6px var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  background: transparent;
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.cal-today-btn:hover {
  background: var(--color-bg-beige);
  color: var(--color-primary);
}

.cal-today-btn:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

.cal-header__modes {
  display: flex;
  gap: 2px;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 3px;
}

.cal-mode-tab {
  padding: 5px var(--space-3);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  background: transparent;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.cal-mode-tab:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.cal-mode-tab[aria-selected="true"] {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow);
}

.cal-mode-tab:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

.cal-add-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background-color var(--transition);
  margin-left: auto;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.cal-add-btn:hover {
  background: var(--color-primary-dark);
}

.cal-add-btn:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

/* ── ボディ共通 ── */
.cal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.cal-view {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.cal-view.is-active {
  display: flex;
}

/* ===========================
   月表示（MonthView）
   =========================== */

.cal-month {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cal-month__dow-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.cal-month__dow-cell {
  padding: var(--space-2) var(--space-3);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  text-align: center;
  letter-spacing: 0.06em;
}

.cal-month__dow-cell--sun { color: var(--color-error); }
.cal-month__dow-cell--sat { color: var(--lp-brand-blue); }

.cal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
  flex: 1;
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

.cal-month__cell {
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  background: var(--color-white);
  transition: background-color var(--transition);
  cursor: pointer;
  min-height: 100px;
  vertical-align: top;
}

.cal-month__cell:hover {
  background: rgba(37,99,235,0.03);
}

.cal-month__cell:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: -2px;
  z-index: 1;
}

.cal-month__cell--outside {
  background: var(--color-bg);
}

.cal-month__cell--outside .cal-month__date {
  color: var(--color-text-light);
  opacity: 0.5;
}

.cal-month__date {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 1;
}

.cal-month__cell--today .cal-month__date {
  background: var(--lp-brand-blue);
  color: var(--color-white);
}

.cal-month__cell--selected .cal-month__date {
  background: var(--color-primary);
  color: var(--color-white);
}

.cal-month__cell--sun .cal-month__date { color: var(--color-error); }
.cal-month__cell--sat .cal-month__date { color: var(--lp-brand-blue); }

.cal-month__cell--today.cal-month__cell--sun .cal-month__date,
.cal-month__cell--today.cal-month__cell--sat .cal-month__date,
.cal-month__cell--selected.cal-month__cell--sun .cal-month__date,
.cal-month__cell--selected.cal-month__cell--sat .cal-month__date {
  color: var(--color-white);
}

/* ── イベントバー（月表示） ── */
.cal-event-bar {
  display: block;
  width: 100%;
  padding: 2px var(--space-2);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity var(--transition), filter var(--transition);
  border: none;
  text-align: left;
}

.cal-event-bar:hover {
  opacity: 0.85;
  filter: brightness(0.96);
}

.cal-event-bar:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.cal-event-bar--sales {
  background: rgba(37,99,235,0.15);
  color: #1a6ea0;
  border-left: 3px solid var(--lp-brand-blue);
}

.cal-event-bar--meeting {
  background: rgba(91,122,112,0.15);
  color: #3a6b5f;
  border-left: 3px solid var(--color-accent);
}

.cal-event-bar--task {
  background: rgba(217,119,6,0.15);
  color: #92400e;
  border-left: 3px solid var(--color-warning);
}

.cal-event-bar--holiday {
  background: rgba(102,102,102,0.12);
  color: var(--color-text-light);
  border-left: 3px solid var(--color-text-light);
}

.cal-event-bar--alert {
  background: rgba(192,57,43,0.12);
  color: #8a2020;
  border-left: 3px solid var(--color-error);
}

/* 複数日またがり */
.cal-event-bar--span-start {
  border-radius: var(--radius) 0 0 var(--radius);
  width: calc(100% + var(--space-2));
}

.cal-event-bar--span-middle {
  border-radius: 0;
  width: calc(100% + var(--space-5));
  margin-left: calc(-1 * var(--space-2));
}

.cal-event-bar--span-end {
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-left: calc(-1 * var(--space-2));
  width: calc(100% + var(--space-2));
}

/* ── オーバーフロー（+N件） ── */
.cal-overflow {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 2px var(--space-2);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color var(--transition);
  border: none;
  background: transparent;
  text-align: left;
  align-self: flex-start;
}

.cal-overflow:hover {
  background: var(--lp-brand-blue-light);
  color: var(--lp-brand-blue);
}

.cal-overflow:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 1px;
}

/* ── オーバーフローパネル ── */
.cal-overflow-panel {
  display: none;
  position: absolute;
  z-index: 200;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  min-width: 200px;
  max-width: 280px;
  top: 100%;
  left: 0;
}

.cal-overflow-panel.is-open {
  display: block;
}

.cal-overflow-panel__header {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.cal-overflow-panel__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* ===========================
   週表示（WeekView）
   =========================== */

.cal-week {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* モバイル日付チップナビ: デスクトップでは非表示 */
.cal-week-mobile-nav {
  display: none;
}

.cal-week__header-row {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 15;
}

.cal-week__header-spacer {
  border-right: 1px solid var(--color-border);
}

.cal-week__col-header {
  padding: var(--space-2) var(--space-1);
  text-align: center;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cal-week__col-header-dow {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.cal-week__col-header-date {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-week__col-header--today .cal-week__col-header-date {
  background: var(--lp-brand-blue);
  color: var(--color-white);
}

.cal-week__col-header--sun .cal-week__col-header-dow { color: var(--color-error); }
.cal-week__col-header--sat .cal-week__col-header-dow { color: var(--lp-brand-blue); }

.cal-week__col-header--today.cal-week__col-header--sun .cal-week__col-header-dow,
.cal-week__col-header--today.cal-week__col-header--sat .cal-week__col-header-dow {
  color: var(--color-text-light);
}

/* 終日イベント行 */
.cal-week__allday {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  border-bottom: 2px solid var(--color-border);
  background: var(--color-bg);
  min-height: 32px;
}

.cal-week__allday-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  border-right: 1px solid var(--color-border);
}

.cal-week__allday-cell {
  padding: var(--space-1) var(--space-2);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* タイムグリッド */
.cal-week__time-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  flex: 1;
  overflow-y: auto;
  position: relative;
  border-left: 1px solid var(--color-border);
}

.cal-time-axis {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  left: 0;
  z-index: 5;
}

.cal-time-slot-label {
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: var(--space-2);
  padding-top: var(--space-1);
  font-size: 10px;
  color: var(--color-text-light);
  flex-shrink: 0;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.cal-week__column {
  border-right: 1px solid var(--color-border);
  position: relative;
  min-height: calc(24 * 60px);
}

.cal-time-slot {
  height: 60px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  position: relative;
  box-sizing: border-box;
}

.cal-time-slot--half {
  border-bottom-style: dashed;
  border-bottom-color: rgba(0,0,0,0.025);
}

/* 現在時刻ライン */
.cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-error);
  z-index: 5;
  pointer-events: none;
}

.cal-now-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: var(--color-error);
  border-radius: 50%;
}

/* ===========================
   イベントブロック（週・日）
   =========================== */

.cal-event-block {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  line-height: 1.4;
  overflow: hidden;
  cursor: pointer;
  transition: opacity var(--transition), box-shadow var(--transition);
  z-index: 2;
  border: none;
  text-align: left;
}

.cal-event-block:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-md);
  z-index: 3;
}

.cal-event-block:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  z-index: 4;
}

.cal-event-block__title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-block__time {
  opacity: 0.8;
  font-size: 10px;
  margin-top: 1px;
  white-space: nowrap;
}

.cal-event-block__location {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-block__attendees {
  display: flex;
  gap: 2px;
  margin-top: var(--space-1);
  flex-wrap: wrap;
}

.cal-event-block__avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* カテゴリ別カラー（週・日） */
.cal-event-block--sales {
  background: rgba(37,99,235,0.18);
  border-left: 3px solid var(--lp-brand-blue);
  color: #1a6ea0;
}

.cal-event-block--meeting {
  background: rgba(91,122,112,0.18);
  border-left: 3px solid var(--color-accent);
  color: #3a6b5f;
}

.cal-event-block--task {
  background: rgba(217,119,6,0.15);
  border-left: 3px solid var(--color-warning);
  color: #92400e;
}

.cal-event-block--holiday {
  background: rgba(102,102,102,0.1);
  border-left: 3px solid var(--color-text-light);
  color: var(--color-text-light);
}

.cal-event-block--alert {
  background: rgba(192,57,43,0.12);
  border-left: 3px solid var(--color-error);
  color: #8a2020;
}

/* 重複イベント（幅分割） */
.cal-event-block[data-col="0"][data-cols="2"] { right: calc(50% + 2px); }
.cal-event-block[data-col="1"][data-cols="2"] { left: calc(50% + 2px); right: 2px; }
.cal-event-block[data-col="0"][data-cols="3"] { right: calc(66.7% + 2px); }
.cal-event-block[data-col="1"][data-cols="3"] { left: calc(33.3% + 2px); right: calc(33.3% + 2px); }
.cal-event-block[data-col="2"][data-cols="3"] { left: calc(66.7% + 2px); right: 2px; }

/* ===========================
   日表示（DayView）
   =========================== */

.cal-day {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.cal-day__header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  gap: 2px;
}

.cal-day__header-dow {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

.cal-day__header-date {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day__header--today .cal-day__header-date {
  background: var(--lp-brand-blue);
  color: var(--color-white);
}

.cal-day__allday {
  padding: var(--space-2) var(--space-4) var(--space-2) 64px;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
  min-height: 36px;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.cal-day__allday-label {
  position: absolute;
  left: 0;
  width: 56px;
  text-align: right;
  padding-right: var(--space-2);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-light);
}

.cal-day__time-grid {
  display: grid;
  grid-template-columns: 56px 1fr;
  flex: 1;
  overflow-y: auto;
  position: relative;
  border-left: 1px solid var(--color-border);
}

.cal-day__column {
  position: relative;
  min-height: calc(24 * 60px);
}

/* ===========================
   年表示（YearView）
   =========================== */

.cal-year {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}

.cal-year__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.cal-year__month {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.cal-year__month:hover {
  box-shadow: var(--shadow-md);
}

.cal-year__month-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: color var(--transition);
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.cal-year__month-name:hover {
  color: var(--lp-brand-blue);
}

.cal-year__month-name:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.cal-year__mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.cal-year__mini-dow {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text-light);
  text-align: center;
  padding-bottom: var(--space-1);
}

.cal-year__mini-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  border-radius: 50%;
  font-size: 9px;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--transition);
  min-height: 20px;
  border: none;
  background: transparent;
}

.cal-year__mini-cell:hover {
  background: var(--color-bg-beige);
}

.cal-year__mini-cell:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 1px;
}

.cal-year__mini-cell--today {
  background: var(--lp-brand-blue);
  color: var(--color-white);
  font-weight: 700;
}

.cal-year__mini-cell--outside {
  color: var(--color-text-light);
  opacity: 0.4;
  pointer-events: none;
}

.cal-year__mini-cell--sun { color: var(--color-error); }
.cal-year__mini-cell--sat { color: var(--lp-brand-blue); }

.cal-year__mini-cell--today.cal-year__mini-cell--sun,
.cal-year__mini-cell--today.cal-year__mini-cell--sat {
  color: var(--color-white);
}

/* イベントドット（年表示） */
.cal-event-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.cal-event-dot--sales   { background: var(--lp-brand-blue); }
.cal-event-dot--meeting { background: var(--color-accent); }
.cal-event-dot--task    { background: var(--color-warning); }
.cal-event-dot--holiday { background: var(--color-text-light); }
.cal-event-dot--alert   { background: var(--color-error); }

/* ===========================
   イベント登録フォームモーダル
   =========================== */

.cal-form-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.cal-form-modal.is-open {
  display: flex;
}

.cal-form-modal__inner {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.2);
  margin: var(--space-4);
  max-height: 90vh;
  overflow-y: auto;
}

.cal-form-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.cal-form-modal__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.cal-form-modal__close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text-light);
  transition: background-color var(--transition), color var(--transition);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.cal-form-modal__close:hover {
  background: var(--color-bg-beige);
  color: var(--color-text);
}

.cal-form-modal__close:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

.cal-form-modal__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

/* カテゴリピッカー */
.cal-category-picker {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cal-category-option {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 5px var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  background: transparent;
  color: var(--color-text);
}

.cal-category-option:focus-visible {
  outline: 2px solid var(--lp-brand-blue);
  outline-offset: 2px;
}

.cal-category-option__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-category-option--sales .cal-category-option__dot   { background: var(--lp-brand-blue); }
.cal-category-option--meeting .cal-category-option__dot { background: var(--color-accent); }
.cal-category-option--task .cal-category-option__dot    { background: var(--color-warning); }
.cal-category-option--holiday .cal-category-option__dot { background: var(--color-text-light); }
.cal-category-option--alert .cal-category-option__dot   { background: var(--color-error); }

.cal-category-option--sales.is-selected {
  background: rgba(37,99,235,0.1);
  border-color: var(--lp-brand-blue);
  color: #1a6ea0;
}

.cal-category-option--meeting.is-selected {
  background: rgba(91,122,112,0.1);
  border-color: var(--color-accent);
  color: #3a6b5f;
}

.cal-category-option--task.is-selected {
  background: rgba(217,119,6,0.1);
  border-color: var(--color-warning);
  color: #92400e;
}

.cal-category-option--holiday.is-selected {
  background: rgba(102,102,102,0.1);
  border-color: var(--color-text-light);
}

.cal-category-option--alert.is-selected {
  background: rgba(192,57,43,0.1);
  border-color: var(--color-error);
  color: #8a2020;
}

/* ===========================
   モバイルアジェンダビュー
   =========================== */

.cal-mobile-agenda {
  display: none;
  border-top: 2px solid var(--color-border);
  padding: var(--space-4);
  background: var(--color-white);
  max-height: 220px;
  overflow-y: auto;
}

.cal-mobile-agenda__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.cal-mobile-agenda__empty {
  font-size: 13px;
  color: var(--color-text-light);
  text-align: center;
  padding: var(--space-4) 0;
}

.cal-mobile-agenda__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}

.cal-mobile-agenda__item:last-child {
  border-bottom: none;
}

.cal-mobile-agenda__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.cal-mobile-agenda__dot--sales   { background: var(--lp-brand-blue); }
.cal-mobile-agenda__dot--meeting { background: var(--color-accent); }
.cal-mobile-agenda__dot--task    { background: var(--color-warning); }
.cal-mobile-agenda__dot--holiday { background: var(--color-text-light); }
.cal-mobile-agenda__dot--alert   { background: var(--color-error); }

.cal-mobile-agenda__body {
  flex: 1;
  min-width: 0;
}

.cal-mobile-agenda__title {
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-mobile-agenda__time {
  font-size: 11px;
  color: var(--color-text-light);
}

/* ===========================
   ダークモード対応
   =========================== */

[data-theme="dark"] .cal-event-bar--sales {
  background: rgba(37,99,235,0.2);
  color: #7dd3f8;
  border-left-color: var(--lp-brand-blue);
}

[data-theme="dark"] .cal-event-bar--meeting {
  background: rgba(111,168,152,0.2);
  color: #6fa898;
  border-left-color: var(--color-accent);
}

[data-theme="dark"] .cal-event-bar--task {
  background: rgba(245,158,11,0.2);
  color: #fcd34d;
  border-left-color: var(--color-warning);
}

[data-theme="dark"] .cal-event-bar--holiday {
  background: rgba(139,150,170,0.15);
  color: #8b96aa;
  border-left-color: var(--color-text-light);
}

[data-theme="dark"] .cal-event-bar--alert {
  background: rgba(239,68,68,0.2);
  color: #f87171;
  border-left-color: var(--color-error);
}

[data-theme="dark"] .cal-event-block--sales {
  background: rgba(37,99,235,0.2);
  color: #7dd3f8;
  border-left-color: var(--lp-brand-blue);
}

[data-theme="dark"] .cal-event-block--meeting {
  background: rgba(111,168,152,0.2);
  color: #6fa898;
  border-left-color: var(--color-accent);
}

[data-theme="dark"] .cal-event-block--task {
  background: rgba(245,158,11,0.2);
  color: #fcd34d;
  border-left-color: var(--color-warning);
}

[data-theme="dark"] .cal-event-block--holiday {
  background: rgba(139,150,170,0.15);
  color: #8b96aa;
  border-left-color: var(--color-text-light);
}

[data-theme="dark"] .cal-event-block--alert {
  background: rgba(239,68,68,0.2);
  color: #f87171;
  border-left-color: var(--color-error);
}

[data-theme="dark"] .cal-month__cell {
  background: var(--color-white);
}

[data-theme="dark"] .cal-month__cell--outside {
  background: var(--color-bg);
}

[data-theme="dark"] .cal-year__month {
  background: var(--color-white);
}

[data-theme="dark"] .cal-overflow-panel {
  background: var(--color-white);
  border-color: var(--color-border);
}

[data-theme="dark"] .cal-form-modal__inner {
  background: var(--color-white);
}

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

@media (max-width: 1023px) {
  .cal-year__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cal-week__time-grid {
    grid-template-columns: 48px repeat(3, 1fr);
  }

  .cal-week__header-row {
    grid-template-columns: 48px repeat(3, 1fr);
  }

  .cal-week__allday {
    grid-template-columns: 48px repeat(3, 1fr);
  }

  /* 4日目以降を非表示（タブレットは3日表示） */
  .cal-week__col-header:nth-child(n+5),
  .cal-week__allday-cell:nth-child(n+5),
  .cal-week__column:nth-child(n+5) {
    display: none;
  }
}

@media (max-width: 767px) {
  .cal-header {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .cal-header__title {
    font-size: 14px;
    min-width: 110px;
  }

  .cal-mode-tab {
    padding: 4px var(--space-2);
    font-size: 11px;
  }

  .cal-add-btn .cal-add-btn__text {
    display: none;
  }

  .cal-month__grid {
    grid-auto-rows: minmax(52px, 1fr);
  }

  .cal-month__cell {
    min-height: 52px;
    padding: var(--space-1);
  }

  .cal-month__date {
    font-size: 12px;
    width: 22px;
    height: 22px;
  }

  /* モバイルではバーを非表示してドットのみ */
  .cal-event-bar {
    display: none;
  }

  .cal-month__cell--has-event::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--lp-brand-blue);
    margin: 2px auto 0;
    flex-shrink: 0;
  }

  .cal-mobile-agenda {
    display: block;
  }

  .cal-year__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .cal-form-modal__inner {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
  }

  /* モバイル週表示: デスクトップ版ヘッダー/グリッドを隠し、日付チップナビ + 1日タイムグリッドに切替 */
  .cal-week__header-row {
    display: none;
  }

  .cal-week__allday {
    display: none;
  }

  .cal-week__time-grid {
    grid-template-columns: 48px 1fr;
  }

  /* 選択中の日の列だけ表示 */
  .cal-week__column {
    display: none;
  }

  .cal-week__column.is-active-day {
    display: block;
  }

  /* モバイル日付チップナビ */
  .cal-week-mobile-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cal-week-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .cal-week-mobile-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-1) var(--space-2);
    min-width: 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
  }

  .cal-week-mobile-chip__dow {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-light);
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .cal-week-mobile-chip__date {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
  }

  .cal-week-mobile-chip--sun .cal-week-mobile-chip__dow {
    color: var(--color-error);
  }

  .cal-week-mobile-chip--sat .cal-week-mobile-chip__dow {
    color: var(--lp-brand-blue);
  }

  .cal-week-mobile-chip.is-active {
    background: var(--lp-brand-blue);
    border-color: var(--lp-brand-blue);
  }

  .cal-week-mobile-chip.is-active .cal-week-mobile-chip__dow,
  .cal-week-mobile-chip.is-active .cal-week-mobile-chip__date {
    color: var(--color-white);
  }

  .cal-week-mobile-chip--today {
    border-color: var(--lp-brand-blue);
  }

  .cal-year__mini-cell {
    min-height: 18px;
    font-size: 8px;
  }
}

/* ===========================
   prefers-reduced-motion
   =========================== */

@media (prefers-reduced-motion: reduce) {
  .cal-month__cell,
  .cal-event-bar,
  .cal-event-block,
  .cal-nav-btn,
  .cal-today-btn,
  .cal-mode-tab,
  .cal-add-btn,
  .cal-overflow,
  .cal-year__month,
  .cal-year__mini-cell,
  .cal-year__month-name,
  .cal-category-option,
  .cal-form-modal__close,
  .cal-week-mobile-chip {
    transition: none;
  }
}

/* ==============================================
   MAP コンポーネント — .ds-map-*
   Leaflet.js + OpenStreetMap ベースの地図表示
   ============================================== */

/* ── 地図ラッパー ── */
.ds-map__wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--color-bg-beige);
}

.ds-map__wrapper--mini {
  box-shadow: var(--shadow);
}

/* ── 地図コンテナ本体 ── */
.ds-map {
  width: 100%;
  height: 460px;
  display: block;
  background: var(--color-bg-beige);
}

.ds-map--mini {
  height: 200px;
}

.ds-map--fullscreen {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  z-index: 1000;
  border-radius: 0;
}

/* ── Leaflet ポップアップ上書き ── */
.leaflet-popup-content-wrapper {
  font-family: var(--font-sans);
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 0 !important;
  border: 1px solid var(--color-border);
  background: var(--color-white) !important;
  overflow: hidden;
  min-width: 200px;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}

.leaflet-popup-tip {
  background: var(--color-white) !important;
}

.leaflet-popup-close-button {
  color: var(--color-text-light) !important;
  font-size: 18px !important;
  top: 8px !important;
  right: 10px !important;
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  text-align: center;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.leaflet-popup-close-button:hover {
  background: var(--color-bg-beige) !important;
  color: var(--color-text) !important;
}

/* ── ポップアップカード ── */
.ds-map__popup-card {
  padding: var(--space-4) var(--space-5);
  min-width: 200px;
}

.ds-map__popup-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

.ds-map__popup-badge--blue {
  background: var(--repo-lp-brand-blue-light, rgba(37,99,235,0.08));
  color: var(--mobile-accent2);
}

.ds-map__popup-badge--green {
  background: rgba(91,122,112,0.12);
  color: var(--color-accent);
}

.ds-map__popup-badge--gold {
  background: rgba(184,154,90,0.12);
  color: var(--color-gold);
}

.ds-map__popup-badge--warning {
  background: rgba(245,158,11,0.12);
  color: var(--color-warning);
}

.ds-map__popup-badge--danger {
  background: rgba(239,68,68,0.10);
  color: var(--color-error);
}

.ds-map__popup-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
  margin-bottom: var(--space-1);
}

.ds-map__popup-addr {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-1);
}

.ds-map__popup-tel {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.5;
}

.ds-map__popup-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--mobile-accent2);
  text-decoration: none;
  border-bottom: 1px solid var(--repo-lp-brand-blue-mid, rgba(37,99,235,0.15));
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.ds-map__popup-link:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ── カスタムマーカーアイコン ── */
.ds-map__marker-icon {
  background: none !important;
  border: none !important;
}

.ds-map__marker-pin {
  width: 28px;
  height: 36px;
  background: var(--marker-color, var(--mobile-accent2));
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.ds-map__marker-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
}

/* マーカーカラーバリアント */
.ds-map__marker-icon--blue    { --marker-color: var(--mobile-accent2); }
.ds-map__marker-icon--green   { --marker-color: var(--color-accent); }
.ds-map__marker-icon--gold    { --marker-color: var(--color-gold); }
.ds-map__marker-icon--warning { --marker-color: var(--color-warning); }
.ds-map__marker-icon--danger  { --marker-color: var(--color-error); }
.ds-map__marker-icon--start   { --marker-color: var(--color-gold); }
.ds-map__marker-icon--end     { --marker-color: var(--color-accent); }

/* ── 凡例 ── */
.ds-map__legend {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ds-map__legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}

.ds-map__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ds-map__legend-dot--blue    { background: var(--mobile-accent2); }
.ds-map__legend-dot--green   { background: var(--color-accent); }
.ds-map__legend-dot--gold    { background: var(--color-gold); }
.ds-map__legend-dot--warning { background: var(--color-warning); }
.ds-map__legend-dot--danger  { background: var(--color-error); }

/* ── 検索バー（SearchMap） ── */
.ds-map__search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ds-map__search-input {
  flex: 1;
  height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ds-map__search-input:focus {
  border-color: var(--mobile-accent2);
  box-shadow: 0 0 0 3px var(--repo-lp-brand-blue-mid, rgba(37,99,235,0.15));
}

.ds-map__search-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ds-map__search-btn {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--transition);
}

.ds-map__search-btn:hover {
  background: var(--color-primary-dark);
}

.ds-map__search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ds-map__search-result {
  padding: var(--space-2) var(--space-4);
  font-size: 12px;
  color: var(--color-text-light);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  min-height: 28px;
}

/* SearchMap ラッパー（検索バーあり） */
.ds-map__wrapper--search {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ds-map__wrapper--search .ds-map {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── ローディング / エラー / 空状態 ── */
.ds-map__loading,
.ds-map__error,
.ds-map__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  z-index: 500;
  background: rgba(246,248,250,0.92);
  font-family: var(--font-sans);
}

.ds-map__loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--mobile-accent2);
  border-radius: 50%;
  animation: ds-map-spin 0.8s linear infinite;
}

@keyframes ds-map-spin {
  to { transform: rotate(360deg); }
}

.ds-map__loading-text,
.ds-map__error-text,
.ds-map__empty-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
}

.ds-map__error-text {
  color: var(--color-error);
}

.ds-map__retry-btn {
  height: 36px;
  padding: 0 var(--space-5);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.ds-map__retry-btn:hover {
  background: var(--color-primary-dark);
}

/* ── フルスクリーン専用要素 ── */
.ds-map__back-btn {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.ds-map__back-btn:hover {
  background: var(--color-bg-beige);
  box-shadow: var(--shadow-md);
}

.ds-map__info-panel {
  position: absolute;
  bottom: var(--space-10);
  right: var(--space-5);
  z-index: 1001;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  max-width: 300px;
}

.ds-map__info-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.ds-map__info-panel-body {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ── ズームコントロールのスタイル調整 ── */
.leaflet-bar a {
  font-family: var(--font-sans) !important;
  color: var(--color-primary) !important;
  font-weight: 700 !important;
}

.leaflet-bar a:hover {
  background: var(--color-bg-beige) !important;
}

/* ── attribution ── */
.leaflet-control-attribution {
  font-size: 10px !important;
  color: var(--color-text-light) !important;
  background: rgba(255,255,255,0.85) !important;
  padding: 2px var(--space-2) !important;
  border-radius: var(--radius) 0 0 0 !important;
}

.leaflet-control-attribution a {
  color: var(--mobile-accent2) !important;
}

/* ── レスポンシブ ── */
@media (max-width: 900px) {
  .ds-map {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .ds-map {
    height: 300px;
  }

  .ds-map--mini {
    height: 200px;
  }

  /* タッチデバイス向けズームコントロール大きめ */
  .leaflet-bar a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
  }

  .ds-map__legend {
    bottom: var(--space-3);
    left: var(--space-3);
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
  }

  .ds-map__legend-item {
    font-size: 11px;
  }

  .ds-map__info-panel {
    bottom: var(--space-5);
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
  }
}

/* ── ダークモード ── */
[data-theme="dark"] .ds-map__wrapper {
  background: #1a1e28;
}

[data-theme="dark"] .ds-map {
  background: #1a1e28;
}

[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: var(--color-white) !important;
  border-color: var(--color-border);
}

[data-theme="dark"] .leaflet-popup-tip {
  background: var(--color-white) !important;
}

[data-theme="dark"] .leaflet-bar a {
  background: var(--color-white) !important;
  border-color: var(--color-border) !important;
}

[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(26,30,40,0.85) !important;
  color: var(--color-text-light) !important;
}

[data-theme="dark"] .ds-map__legend {
  background: var(--color-white);
  border-color: var(--color-border);
}

[data-theme="dark"] .ds-map__search-bar {
  background: var(--color-white);
  border-color: var(--color-border);
}

[data-theme="dark"] .ds-map__search-input {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .ds-map__search-result {
  background: var(--color-bg);
}

[data-theme="dark"] .ds-map__loading,
[data-theme="dark"] .ds-map__error,
[data-theme="dark"] .ds-map__empty {
  background: rgba(26,30,40,0.92);
}

[data-theme="dark"] .ds-map__back-btn {
  background: var(--color-white);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .ds-map__back-btn:hover {
  background: var(--color-bg-beige);
}

[data-theme="dark"] .ds-map__info-panel {
  background: var(--color-white);
  border-color: var(--color-border);
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .ds-map__loading-spinner {
    animation: none;
    border-top-color: var(--color-text-light);
  }
  .ds-map__back-btn,
  .ds-map__search-btn,
  .ds-map__search-input,
  .ds-map__retry-btn {
    transition: none;
  }
}

/* ==============================================
   EmailComposer — メール作成画面
   .email-* 名前空間 / v1.0.0 / 2026-04-16
   chat.md v2.1 高齢者対応基準準拠
   全タッチターゲット 48px以上 / 本文フォント 16px以上
   ============================================== */

/* ── EmailComposer: ブランドカラー変数 ── */
:root {
  --email-brand: var(--lp-brand-blue);
  --email-brand-light: var(--lp-brand-blue-light);
  --email-brand-border: var(--lp-brand-blue-mid);
}

/* ── ベースコンテナ ── */
.email-composer {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-sans);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.email-composer--modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.email-composer--modal-wrap .email-composer {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
}

.email-composer--inline {
  position: fixed;
  bottom: 0;
  right: var(--space-6);
  width: 600px;
  max-height: 80vh;
  z-index: 500;
}

.email-composer--fullscreen {
  position: fixed;
  inset: 0;
  border-radius: 0;
  z-index: 700;
  max-height: 100vh;
}

/* ── ヘッダー ── */
.email-composer__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-2) 0 var(--space-4);
  height: 48px;
  min-height: 48px;
  background: var(--color-primary);
  color: var(--color-white);
  flex-shrink: 0;
  user-select: none;
}

.email-composer__title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.email-composer__controls {
  display: flex;
  gap: 0;
  align-items: center;
  flex-shrink: 0;
}

.email-composer__ctrl-btn {
  width: 40px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-size: 16px;
  padding: 0;
}

.email-composer__ctrl-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
}

.email-composer__ctrl-btn--close:hover {
  background: rgba(192,57,43,0.7);
  color: var(--color-white);
}

/* ── メタエリア（宛先・件名）共通 ── */
.email-composer__meta {
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
}

/* ── 宛先フィールド ── */
.email-recipient-field {
  display: flex;
  align-items: flex-start;
  padding: var(--space-1) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  min-height: 48px;
  position: relative;
  gap: var(--space-2);
  background: var(--color-white);
}

.email-recipient-field:last-child {
  border-bottom: none;
}

.email-recipient-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  width: 42px;
  flex-shrink: 0;
  line-height: 46px;
  letter-spacing: 0.02em;
}

.email-recipient-field__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex: 1;
  align-items: center;
  min-height: 46px;
  padding: var(--space-1) 0;
}

.email-recipient-field__input {
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  background: transparent;
  min-width: 120px;
  flex: 1;
  line-height: 1.6;
  padding: var(--space-1) 0;
}

.email-recipient-field__input::placeholder {
  color: var(--color-text-light);
}

.email-recipient-field__actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  line-height: 46px;
}

/* ── CC/BCC トグルボタン ── */
.email-cc-bcc-toggle {
  font-size: 12px;
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0 var(--space-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 32px;
  min-width: 44px;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.email-cc-bcc-toggle:hover { color: var(--color-primary); }

/* CC/BCC フィールド（デフォルト非表示） */
.email-recipient-field--hidden {
  display: none;
}
.email-recipient-field--hidden.is-visible {
  display: flex;
}

/* ── チップ（タグ） ── */
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(16,42,67,0.08);
  border: 1px solid rgba(16,42,67,0.15);
  border-radius: var(--radius-pill);
  padding: 3px var(--space-1) 3px 3px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  max-width: 240px;
  cursor: default;
  vertical-align: middle;
  transition: border-color var(--transition);
}

.email-chip--error {
  background: rgba(192,57,43,0.08);
  border-color: var(--color-error);
  color: var(--color-error);
}

.email-chip--focused {
  outline: 2px solid var(--email-brand);
  outline-offset: 1px;
}

.email-chip__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
}

.email-chip--error .email-chip__avatar {
  background: var(--color-error);
}

.email-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
  font-size: 12px;
}

.email-chip__remove {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 0;
  position: relative;
  font-size: 12px;
  line-height: 1;
}
/* タッチターゲット拡張（疑似要素で 44px 確保） */
.email-chip__remove::before {
  content: '';
  position: absolute;
  inset: -13px;
}
.email-chip__remove:hover {
  opacity: 1;
  background: rgba(0,0,0,0.08);
}

/* ── オートコンプリート ── */
.email-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 42px;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 2px;
}

.email-autocomplete.is-open { display: block; }

.email-autocomplete__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  min-height: 52px;
  transition: background var(--transition);
}

.email-autocomplete__item:hover,
.email-autocomplete__item[aria-selected="true"] {
  background: var(--color-bg);
}

.email-autocomplete__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.email-autocomplete__avatar--alt { background: var(--color-accent); }
.email-autocomplete__avatar--gold { background: var(--color-gold); }

.email-autocomplete__info { flex: 1; overflow: hidden; }

.email-autocomplete__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.email-autocomplete__email {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 件名フィールド ── */
.email-subject-wrap {
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--color-border);
  min-height: 52px;
  background: var(--color-white);
}

.email-subject-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  width: 42px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.email-subject {
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  flex: 1;
  line-height: 1.6;
  padding: var(--space-2) 0;
}

.email-subject::placeholder {
  color: var(--color-text-light);
  font-weight: 400;
}

/* ── ツールバー ── */
.email-toolbar {
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  min-height: 48px;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0;
}

.email-toolbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
  font-size: 17px;
  padding: 0;
}

/* タッチターゲット 48px 確保 */
.email-toolbar__btn::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.email-toolbar__btn:hover {
  background: rgba(16,42,67,0.07);
  color: var(--color-primary);
}

.email-toolbar__btn.is-active {
  background: var(--color-primary);
  color: var(--color-white);
}

.email-toolbar__btn:focus-visible {
  outline: 2px solid var(--email-brand);
  outline-offset: 1px;
}

.email-toolbar__separator {
  width: 1px;
  height: 22px;
  background: var(--color-border);
  margin: 0 var(--space-1);
  flex-shrink: 0;
}

/* テキスト色ピッカー */
.email-toolbar__color-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-toolbar__color-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── 本文エディタ ── */
.email-body-wrap {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  min-height: 200px;
  position: relative;
  background: var(--color-white);
}

.email-body {
  outline: none;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
  min-height: 200px;
  word-break: break-word;
  letter-spacing: 0.01em;
}

.email-body:empty::before {
  content: attr(data-placeholder);
  color: var(--color-text-light);
  pointer-events: none;
  font-weight: 400;
}

.email-body b,
.email-body strong { font-weight: 700; }

.email-body i,
.email-body em { font-style: italic; }

.email-body u { text-decoration: underline; }

.email-body ul {
  list-style: disc;
  margin-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.email-body ol {
  list-style: decimal;
  margin-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.email-body li { margin-bottom: var(--space-1); }

.email-body a {
  color: var(--email-brand);
  text-decoration: underline;
}

/* プレーンテキストモード */
.email-body[data-mode="plain"] {
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  font-size: 14px;
  white-space: pre-wrap;
}

.email-mode-toggle {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3px var(--space-2);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  min-height: 28px;
}
.email-mode-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
}

/* ── 署名ブロック ── */
.email-signature {
  padding: 0 var(--space-5) var(--space-3);
  background: var(--color-white);
}

.email-signature__divider {
  display: block;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-3) 0;
}

.email-signature__switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.email-signature__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
}

.email-signature__select {
  font-size: 12px;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px var(--space-3) 4px var(--space-2);
  color: var(--color-text);
  background: var(--color-white);
  cursor: pointer;
  min-height: 32px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.email-signature__select:focus {
  border-color: var(--email-brand);
}

.email-signature__text {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.8;
  white-space: pre-line;
}

/* ── 添付ファイルエリア ── */
.email-attachments {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}

.email-attachments:empty,
.email-attachments--empty {
  display: none;
}

.email-drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-light);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  cursor: pointer;
  margin: var(--space-3) var(--space-4);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.email-drop-zone:hover,
.email-drop-zone.is-dragover {
  border-color: var(--email-brand);
  background: var(--email-brand-light);
  color: var(--email-brand);
}

.email-drop-zone__icon {
  font-size: 20px;
  opacity: 0.6;
}

.email-attachment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
}

.email-attachment-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 52px;
}

.email-attachment-card__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  font-size: 18px;
}

.email-attachment-card__icon--pdf   { color: #c0392b; }
.email-attachment-card__icon--xlsx  { color: #15803d; }
.email-attachment-card__icon--docx  { color: #1e40af; }
.email-attachment-card__icon--image { color: #d97706; }
.email-attachment-card__icon--default { color: var(--color-text-light); }

.email-attachment-card__thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.email-attachment-card__info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.email-attachment-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.email-attachment-card__size {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.email-attachment-card__progress {
  height: 3px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  margin-top: 4px;
  overflow: hidden;
  display: none;
}

.email-attachment-card--uploading .email-attachment-card__progress {
  display: block;
}

.email-attachment-card__progress-fill {
  height: 100%;
  background: var(--email-brand);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.email-attachment-card__remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  cursor: pointer;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
  padding: 0;
  font-size: 16px;
  position: relative;
}
.email-attachment-card__remove::before {
  content: '';
  position: absolute;
  inset: -8px;
}
.email-attachment-card__remove:hover {
  background: rgba(192,57,43,0.08);
  color: var(--color-error);
}

/* ── テンプレート選択ドロップダウン ── */
.email-template-wrap {
  position: relative;
}

.email-template-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 0;
  width: 360px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.email-template-dropdown.is-open { display: block; }

.email-template-dropdown__header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-bg);
  position: sticky;
  top: 0;
}

.email-template-dropdown__category {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  padding: var(--space-3) var(--space-4) var(--space-1);
  text-transform: uppercase;
}

.email-template-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 52px;
}

.email-template-item:hover { background: var(--color-bg); }

.email-template-item__text {
  flex: 1;
  overflow: hidden;
}

.email-template-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 2px;
}

.email-template-item__preview {
  font-size: 11px;
  color: var(--color-text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-template-item__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: rgba(184,154,90,0.12);
  color: var(--color-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.email-template-item__use-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--email-brand);
  border: 1px solid var(--email-brand-border);
  border-radius: var(--radius);
  padding: 4px var(--space-3);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  min-height: 32px;
  flex-shrink: 0;
}
.email-template-item__use-btn:hover {
  background: var(--email-brand-light);
}

/* ── アクションバー ── */
.email-action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  flex-shrink: 0;
  flex-wrap: wrap;
  position: relative;
}

.email-action-bar__spacer { flex: 1; }

/* ── 送信ボタン ── */
.email-send-group {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(16,42,67,0.18);
}

.email-send-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 48px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.email-send-btn:hover:not(:disabled):not(.email-send-btn--sending):not(.email-send-btn--sent) {
  background: var(--color-primary-dark);
}

.email-send-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.email-send-btn--sending {
  pointer-events: none;
  opacity: 0.75;
}

.email-send-btn--sent {
  background: var(--color-success);
  pointer-events: none;
}

.email-send-btn--error {
  background: var(--color-error);
}

/* 送信スケジュールボタン（送信ボタン右の▼） */
.email-schedule-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 48px;
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  border: none;
  border-left: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
  padding: 0;
}
.email-schedule-btn:hover { background: #1a2f52; }

/* ── 下書き / 破棄ボタン ── */
.email-draft-btn,
.email-discard-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  white-space: nowrap;
}

.email-draft-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
  background: rgba(91,122,112,0.04);
}

.email-discard-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: rgba(192,57,43,0.04);
}

/* ── 送信スピナー ── */
@keyframes email-spin {
  to { transform: rotate(360deg); }
}

.email-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: email-spin 0.75s linear infinite;
  flex-shrink: 0;
}

/* ── エラーバー ── */
.email-error-bar {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(192,57,43,0.07);
  border-top: 1px solid rgba(192,57,43,0.18);
  font-size: 13px;
  color: var(--color-error);
  flex-shrink: 0;
}
.email-error-bar.is-visible { display: flex; }

.email-error-bar__icon { font-size: 16px; flex-shrink: 0; }

.email-error-bar__text { flex: 1; line-height: 1.5; }

.email-retry-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-error);
  background: transparent;
  border: 1px solid var(--color-error);
  border-radius: var(--radius);
  padding: 4px var(--space-3);
  cursor: pointer;
  min-height: 32px;
  transition: background var(--transition);
  white-space: nowrap;
}
.email-retry-btn:hover {
  background: rgba(192,57,43,0.08);
}

/* ── 最小化バー ── */
.email-composer-minimized {
  position: fixed;
  bottom: 0;
  right: var(--space-6);
  width: 320px;
  height: 48px;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 0 0 var(--space-4);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 500;
  user-select: none;
  transition: background var(--transition);
}
.email-composer-minimized:hover { background: var(--color-primary-dark); }

.email-composer-minimized__title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.email-composer-minimized__unread {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

.email-composer-minimized__actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.email-composer-minimized__btn {
  width: 40px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-size: 16px;
  padding: 0;
  border-radius: 0;
}
.email-composer-minimized__btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
}
.email-composer-minimized__btn:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

/* ── 送信スケジュール ドロップダウン ── */
.email-schedule-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 300;
  overflow: hidden;
  min-width: 200px;
}
.email-schedule-dropdown.is-open { display: block; }

.email-schedule-dropdown__header {
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.email-schedule-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 48px;
}
.email-schedule-item:hover { background: var(--color-bg); }

/* ── フォーカスリング（全インタラクティブ要素） ── */
.email-composer *:focus-visible {
  outline: 2px solid var(--email-brand);
  outline-offset: 2px;
}

/* ── ダークモード ── */
[data-theme="dark"] .email-composer,
[data-theme="dark"] .email-subject-wrap,
[data-theme="dark"] .email-body-wrap,
[data-theme="dark"] .email-signature,
[data-theme="dark"] .email-recipient-field,
[data-theme="dark"] .email-attachments {
  background: #1e2433;
  color: #e2e8f0;
}

[data-theme="dark"] .email-composer__header {
  background: #0d1117;
}

[data-theme="dark"] .email-toolbar,
[data-theme="dark"] .email-action-bar {
  background: #151b27;
}

[data-theme="dark"] .email-recipient-field {
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .email-subject-wrap {
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .email-subject,
[data-theme="dark"] .email-body,
[data-theme="dark"] .email-recipient-field__input {
  color: #e2e8f0;
}

[data-theme="dark"] .email-subject::placeholder,
[data-theme="dark"] .email-body:empty::before,
[data-theme="dark"] .email-recipient-field__input::placeholder {
  color: #5a6475;
}

[data-theme="dark"] .email-chip {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #90cdf4;
}

[data-theme="dark"] .email-chip__avatar { background: #2c5282; }

[data-theme="dark"] .email-autocomplete,
[data-theme="dark"] .email-template-dropdown,
[data-theme="dark"] .email-schedule-dropdown {
  background: #1a2030;
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .email-autocomplete__item:hover,
[data-theme="dark"] .email-autocomplete__item[aria-selected="true"],
[data-theme="dark"] .email-template-item:hover,
[data-theme="dark"] .email-schedule-item:hover {
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .email-autocomplete__name,
[data-theme="dark"] .email-template-item__name {
  color: #e2e8f0;
}

[data-theme="dark"] .email-autocomplete__email,
[data-theme="dark"] .email-template-item__preview,
[data-theme="dark"] .email-recipient-field__label,
[data-theme="dark"] .email-subject-label,
[data-theme="dark"] .email-signature__text {
  color: #8892a4;
}

[data-theme="dark"] .email-template-dropdown__header,
[data-theme="dark"] .email-schedule-dropdown__header {
  background: #151b27;
  color: #90cdf4;
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .email-attachment-card {
  background: #151b27;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .email-attachment-card__icon {
  background: #1e2433;
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .email-attachment-card__name { color: #e2e8f0; }
[data-theme="dark"] .email-attachment-card__size { color: #8892a4; }

[data-theme="dark"] .email-drop-zone {
  border-color: rgba(255,255,255,0.12);
  color: #8892a4;
}
[data-theme="dark"] .email-drop-zone:hover,
[data-theme="dark"] .email-drop-zone.is-dragover {
  border-color: var(--email-brand);
  background: rgba(37,99,235,0.07);
  color: var(--email-brand);
}

[data-theme="dark"] .email-toolbar__btn {
  color: #8892a4;
}
[data-theme="dark"] .email-toolbar__btn:hover {
  background: rgba(255,255,255,0.07);
  color: #e2e8f0;
}
[data-theme="dark"] .email-toolbar__separator { background: rgba(255,255,255,0.08); }

[data-theme="dark"] .email-action-bar { border-top-color: rgba(255,255,255,0.08); }

[data-theme="dark"] .email-draft-btn,
[data-theme="dark"] .email-discard-btn {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: #8892a4;
}
[data-theme="dark"] .email-draft-btn:hover {
  border-color: var(--color-accent);
  color: #e2e8f0;
}
[data-theme="dark"] .email-discard-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

[data-theme="dark"] .email-signature {
  border-top-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .email-signature__divider {
  background: rgba(255,255,255,0.08);
}

[data-theme="dark"] .email-error-bar {
  background: rgba(192,57,43,0.12);
  border-top-color: rgba(192,57,43,0.25);
}

[data-theme="dark"] .email-composer-minimized { background: #0d1117; }
[data-theme="dark"] .email-composer-minimized:hover { background: #161d2a; }

[data-theme="dark"] .email-mode-toggle {
  background: #151b27;
  border-color: rgba(255,255,255,0.1);
  color: #8892a4;
}
[data-theme="dark"] .email-signature__select {
  background: #151b27;
  border-color: rgba(255,255,255,0.12);
  color: #e2e8f0;
}

/* ── レスポンシブ ── */
@media (max-width: 1023px) {
  .email-composer--inline {
    width: 100%;
    right: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (max-width: 767px) {
  .email-composer--inline {
    width: 100%;
    right: 0;
    max-height: 100dvh;
    max-height: 100vh;
    border-radius: 0;
  }

  .email-composer--modal-wrap .email-composer {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .email-template-dropdown {
    width: 100%;
    left: 0;
    right: 0;
    bottom: 100%;
  }

  .email-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .email-toolbar::-webkit-scrollbar { display: none; }

  .email-draft-btn,
  .email-discard-btn {
    display: none;
  }

  .email-send-btn {
    flex: 1;
    justify-content: center;
  }

  .email-composer-minimized {
    width: calc(100% - var(--space-8));
    right: var(--space-4);
  }
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .email-spinner { animation: none; border-top-color: rgba(255,255,255,0.6); }
  .email-send-btn,
  .email-draft-btn,
  .email-discard-btn,
  .email-toolbar__btn,
  .email-chip__remove,
  .email-autocomplete__item,
  .email-template-item,
  .email-schedule-item,
  .email-attachment-card__remove,
  .email-drop-zone,
  .email-composer-minimized {
    transition: none;
  }
  .email-attachment-card__progress-fill { transition: none; }
}

/* ==============================================
   背景ユーティリティ（ds-bg-* / ds-section-* / ds-card-*)
   v2.2.0 — 2026-04-16
   画像不使用。CSSのみ。透過度 0.03〜0.08 原則。
   ============================================== */

/* ── CSS変数（ライト / ダーク 自動切替） ── */
:root {
  --bg-pattern-color:        rgba(16,42,67,0.06);
  --bg-pattern-color-mid:    rgba(16,42,67,0.04);
  --bg-pattern-color-soft:   rgba(16,42,67,0.03);
  --bg-gradient-brand-start: rgba(37,99,235,0.06);
  --bg-gradient-warm-start:  rgba(16,42,67,0.04);
  --bg-deco-opacity:         1;
}

[data-theme="dark"] {
  --bg-pattern-color:        rgba(255,255,255,0.04);
  --bg-pattern-color-mid:    rgba(255,255,255,0.03);
  --bg-pattern-color-soft:   rgba(255,255,255,0.025);
  --bg-gradient-brand-start: rgba(37,99,235,0.05);
  --bg-gradient-warm-start:  rgba(37,99,235,0.04);
  --bg-deco-opacity:         0.5;
}

/* =============================================
   1. 幾何学パターン背景
   ============================================= */

/* ドットパターン（20px間隔・控えめな水玉） */
.ds-bg-dots {
  background-image: radial-gradient(
    circle,
    var(--bg-pattern-color) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}

/* グリッドパターン（40px方眼・薄い格子線） */
.ds-bg-grid {
  background-image:
    linear-gradient(var(--bg-pattern-color-mid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-pattern-color-mid) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 斜線パターン（45度ストライプ） */
.ds-bg-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    var(--bg-pattern-color-soft) 10px,
    var(--bg-pattern-color-soft) 11px
  );
}

/* 波線パターン（正弦波繰り返し・SVG data URI） */
.ds-bg-wave {
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='20' viewBox='0 0 120 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 C30 0 60 20 90 10 C105 5 112 8 120 10' stroke='rgba(26%2C43%2C74%2C0.06)' fill='none' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 120px 20px;
  background-repeat: repeat-x;
  background-position: center;
}

[data-theme="dark"] .ds-bg-wave {
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='20' viewBox='0 0 120 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 C30 0 60 20 90 10 C105 5 112 8 120 10' stroke='rgba(255%2C255%2C255%2C0.04)' fill='none' stroke-width='1'/%3E%3C/svg%3E");
}

/* =============================================
   2. グラデーション背景
   ============================================= */

/* ブランドブルー→透明（上→下）/ Hero向け */
.ds-bg-gradient-brand {
  background: linear-gradient(
    180deg,
    var(--bg-gradient-brand-start) 0%,
    transparent 60%
  );
}

/* ネイビー→透明（上→下）/ Problem・中間セクション向け */
.ds-bg-gradient-warm {
  background: linear-gradient(
    180deg,
    var(--bg-gradient-warm-start) 0%,
    transparent 50%
  );
}

/* 斜めグラデーション（ブルー×スレートグリーン）/ Benefit向け */
.ds-bg-gradient-diagonal {
  background: linear-gradient(
    135deg,
    rgba(37,99,235,0.04) 0%,
    rgba(91,122,112,0.04) 100%
  );
}

[data-theme="dark"] .ds-bg-gradient-diagonal {
  background: linear-gradient(
    135deg,
    rgba(37,99,235,0.06) 0%,
    rgba(111,168,152,0.05) 100%
  );
}

/* ラジアルグラデーション（中央から放射）/ Solution向け */
.ds-bg-gradient-radial {
  background: radial-gradient(
    ellipse at center,
    rgba(37,99,235,0.06) 0%,
    transparent 70%
  );
}

[data-theme="dark"] .ds-bg-gradient-radial {
  background: radial-gradient(
    ellipse at center,
    rgba(37,99,235,0.05) 0%,
    transparent 70%
  );
}

/* =============================================
   3. ソリッド・ダーク背景
   ============================================= */

/* ネイビー単色（CTA・ダークセクション） */
.ds-bg-navy {
  background: var(--color-primary);
  color: #ffffff;
}

/* ネイビーグラデーション（微妙な立体感付き） */
.ds-bg-navy-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 50%,
    var(--color-primary) 100%
  );
  color: #ffffff;
}

[data-theme="dark"] .ds-bg-navy-gradient {
  background: linear-gradient(
    135deg,
    #0a0e18 0%,
    #111827 50%,
    #0a0e18 100%
  );
}

/* =============================================
   4. 装飾図形（::before / ::after）
   ============================================= */

/* 右上に大きな半透明円 */
.ds-bg-circle-accent {
  position: relative;
  overflow: hidden;
}

.ds-bg-circle-accent::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(37,99,235,0.05);
  top: -120px;
  right: -120px;
  pointer-events: none;
  z-index: 0;
  opacity: var(--bg-deco-opacity);
}

/* 左下に三角形（クリップパス代替・border trick） */
.ds-bg-triangle-accent {
  position: relative;
  overflow: hidden;
}

.ds-bg-triangle-accent::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 200px solid transparent;
  border-right: 0 solid transparent;
  border-bottom: 200px solid rgba(16,42,67,0.04);
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--bg-deco-opacity);
}

[data-theme="dark"] .ds-bg-triangle-accent::after {
  border-bottom-color: rgba(255,255,255,0.03);
}

/* 左上にブランドドットグリッド（小） */
.ds-bg-brand-dot {
  position: relative;
}

.ds-bg-brand-dot::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  width: 80px;
  height: 80px;
  background-image: radial-gradient(
    circle,
    rgba(37,99,235,0.2) 1.5px,
    transparent 1.5px
  );
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
  opacity: var(--bg-deco-opacity);
}

[data-theme="dark"] .ds-bg-brand-dot::before {
  background-image: radial-gradient(
    circle,
    rgba(37,99,235,0.15) 1.5px,
    transparent 1.5px
  );
}

/* 装飾図形を使用するセクション内のコンテンツ（z-index確保） */
.ds-bg-circle-accent > *,
.ds-bg-triangle-accent > *,
.ds-bg-brand-dot > * {
  position: relative;
  z-index: 1;
}

/* =============================================
   5. セクション区切り（波型・斜め）
   ============================================= */

/* 波型（上部）— ベージュ前セクションから遷移 */
.ds-section-wave-top {
  position: relative;
  padding-top: 60px;
}

.ds-section-wave-top::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 48' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48 C200 0 400 0 600 24 C800 48 1000 48 1200 24 L1200 48 Z' fill='%23F4F1EA'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

[data-theme="dark"] .ds-section-wave-top::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 48' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48 C200 0 400 0 600 24 C800 48 1000 48 1200 24 L1200 48 Z' fill='%230f1117'/%3E%3C/svg%3E");
}

/* 波型（上部）— 白前セクションから遷移 */
.ds-section-wave-top--white {
  position: relative;
  padding-top: 60px;
}

.ds-section-wave-top--white::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 48' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48 C200 0 400 0 600 24 C800 48 1000 48 1200 24 L1200 48 Z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

[data-theme="dark"] .ds-section-wave-top--white::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 48' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48 C200 0 400 0 600 24 C800 48 1000 48 1200 24 L1200 48 Z' fill='%231a1e28'/%3E%3C/svg%3E");
}

/* 斜めカット（上部） */
.ds-section-slant-top {
  clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%);
  padding-top: 96px;
}

/* 斜めカット（下部） */
.ds-section-slant-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), 0 100%);
  padding-bottom: 96px;
}

/* =============================================
   6. カード装飾
   ============================================= */

/* 右上角にアクセントドット */
.ds-card-dot-accent {
  position: relative;
}

.ds-card-dot-accent::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(37,99,235,0.3);
  pointer-events: none;
}

[data-theme="dark"] .ds-card-dot-accent::before {
  background: rgba(37,99,235,0.4);
}

/* 上辺グラデーションボーダー（ブルー→グリーン） */
.ds-card-gradient-top {
  position: relative;
}

.ds-card-gradient-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mobile-accent2), var(--color-accent));
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}

/* =============================================
   7. 背景ショーケース（backgrounds.html用）
   ============================================= */

.ds-bg-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.ds-bg-showcase__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ds-bg-showcase__preview {
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
}

.ds-bg-showcase__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-white);
  padding: 8px 16px;
  border-top: 1px solid var(--color-border);
}

.ds-bg-showcase__class {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
  background: var(--color-white);
  padding: 4px 16px 10px;
  border-top: 1px solid var(--color-border);
}

/* =============================================
   8. prefers-reduced-motion 対応
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  /* 将来的にアニメーション付き背景を追加した場合、ここで停止させる */
  .ds-bg-animated {
    animation: none;
  }
}

/* ==============================================
   MEDIA COMPONENTS — 画像・動画ユーティリティ
   v2.3.0 (2026-04-16)
   ============================================== */

/* =============================================
   1. アスペクト比コンテナ（.ds-aspect-*）
   ============================================= */

.ds-aspect-16-9,
.ds-aspect-4-3,
.ds-aspect-3-2,
.ds-aspect-1-1,
.ds-aspect-9-16 {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: block;
}

.ds-aspect-16-9  { aspect-ratio: 16 / 9; }
.ds-aspect-4-3   { aspect-ratio: 4  / 3; }
.ds-aspect-3-2   { aspect-ratio: 3  / 2; }
.ds-aspect-1-1   { aspect-ratio: 1  / 1; }
.ds-aspect-9-16  { aspect-ratio: 9  / 16; }

/* =============================================
   2. 基本画像クラス（.ds-img-*）
   ============================================= */

.ds-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.ds-img--cover   { object-fit: cover;   object-position: center; }
.ds-img--contain { object-fit: contain; object-position: center; }
.ds-img--top     { object-position: top; }

.ds-img--rounded { border-radius: var(--radius-lg); }
.ds-img--circle  { border-radius: 50%; }
.ds-img--shadow  { box-shadow: var(--shadow-md); }

/* アスペクト比コンテナ内での絶対配置 */
.ds-aspect-16-9 > .ds-img,
.ds-aspect-4-3  > .ds-img,
.ds-aspect-3-2  > .ds-img,
.ds-aspect-1-1  > .ds-img,
.ds-aspect-9-16 > .ds-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =============================================
   3. 画像オーバーレイ（.ds-img-overlay--*）
   ============================================= */

/* オーバーレイはアスペクト比コンテナに追加して使う */
.ds-img-overlay--dark::after,
.ds-img-overlay--brand::after,
.ds-img-overlay--light::after,
.ds-img-overlay--full-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* 下から黒グラデーション — カード下部テキスト用 */
.ds-img-overlay--dark::after {
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
}

/* ブランドネイビー→ブルー — Hero・CTA背景用 */
.ds-img-overlay--brand::after {
  background: linear-gradient(135deg, rgba(16,42,67,0.82) 0%, rgba(37,99,235,0.38) 100%);
}

/* 白半透明 — 暗い背景に白テキストを重ねたい場合 */
.ds-img-overlay--light::after {
  background: rgba(255,255,255,0.75);
}

/* 全面暗め — Hero で白テキストを確実に読ませる */
.ds-img-overlay--full-dark::after {
  background: rgba(0,0,0,0.45);
}

/* オーバーレイコンテナ内のテキストコンテンツは z-index:2 で前面に */
.ds-img-overlay--dark    > *:not(img):not(picture):not(video),
.ds-img-overlay--brand   > *:not(img):not(picture):not(video),
.ds-img-overlay--light   > *:not(img):not(picture):not(video),
.ds-img-overlay--full-dark > *:not(img):not(picture):not(video) {
  position: relative;
  z-index: 2;
}

/* =============================================
   4. フィギュア・キャプション（.ds-figure / .ds-figcaption）
   ============================================= */

.ds-figure {
  margin: 0 0 var(--space-6) 0;
}

.ds-figcaption {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
  text-align: center;
}

/* =============================================
   5. 画像プレースホルダー（.ds-img-placeholder-*）
   ============================================= */

.ds-img-placeholder {
  background: var(--color-bg-beige);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-text-light);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border);
}

.ds-img-placeholder__icon {
  font-size: 40px;
  opacity: 0.4;
}

.ds-img-placeholder__label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.6;
}

/* アイコンのみ */
.ds-img-placeholder--icon {
  background: var(--color-bg-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  border-radius: var(--radius-lg);
}

.ds-img-placeholder--icon .ds-img-placeholder__icon {
  font-size: 28px;
  opacity: 0.3;
}

/* スケルトンシマー */
.ds-img-placeholder--skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-beige) 0%,
    #e8e4db 40%,
    var(--color-bg-beige) 80%
  );
  background-size: 200% 100%;
  animation: ds-skeleton-shimmer 1.5s infinite linear;
  border-radius: var(--radius-lg);
}

@keyframes ds-skeleton-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-img-placeholder--skeleton {
    animation: none;
    background: var(--color-bg-beige);
  }
}

/* ダークモード */
[data-theme="dark"] .ds-img-placeholder,
[data-theme="dark"] .ds-img-placeholder--icon {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.35);
}

[data-theme="dark"] .ds-img-placeholder--skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 40%,
    rgba(255,255,255,0.06) 80%
  );
  background-size: 200% 100%;
}

/* =============================================
   6. 動画コンポーネント（.ds-video-*）
   ============================================= */

/* 背景動画ラッパー */
.ds-video-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* 背景動画本体（装飾目的） */
.ds-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 静止画フォールバック（prefers-reduced-motion: reduce 時に表示） */
.ds-video-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none; /* 通常は非表示 */
}

.ds-video-fallback-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .ds-video-bg { display: none; }
  .ds-video-fallback-img { display: block; }
}

/* 動画テキストオーバーレイコンテンツ */
.ds-video-content {
  position: relative;
  z-index: 2;
}

/* YouTube / iframe 埋め込みコンテナ */
.ds-video-embed {
  position: relative;
  overflow: hidden;
}

.ds-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 動画カバー（再生ボタン付き静止画） */
.ds-video-cover {
  position: relative;
  cursor: pointer;
}

.ds-video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  background: rgba(16,42,67,0.85);
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  z-index: 2;
}

.ds-video-play-btn:hover,
.ds-video-play-btn:focus-visible {
  background: var(--color-primary-dark);
  transform: scale(1.08);
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* =============================================
   7. ギャラリーグリッド（.ds-gallery-*）
   ============================================= */

.ds-gallery {
  display: grid;
  gap: var(--space-3);
  width: 100%;
}

.ds-gallery--2 { grid-template-columns: repeat(2, 1fr); }
.ds-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.ds-gallery--4 { grid-template-columns: repeat(4, 1fr); }

/* 段組みマソンリー */
.ds-gallery--masonry {
  display: block;
  columns: 3;
  column-gap: var(--space-3);
}

.ds-gallery--masonry > * {
  break-inside: avoid;
  margin-bottom: var(--space-3);
}

/* レスポンシブ縮退 */
@media (max-width: 900px) {
  .ds-gallery--4 { grid-template-columns: repeat(2, 1fr); }
  .ds-gallery--3 { grid-template-columns: repeat(2, 1fr); }
  .ds-gallery--masonry { columns: 2; }
}

@media (max-width: 600px) {
  .ds-gallery--2,
  .ds-gallery--3,
  .ds-gallery--4 { grid-template-columns: 1fr; }
  .ds-gallery--masonry { columns: 1; }
}

/* =============================================
   8. メディアショーケース（media.html 専用）
   ============================================= */

.ds-media-demo-section {
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--color-border);
}

.ds-media-demo-section:last-of-type {
  border-bottom: none;
}

.ds-media-demo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-2) 0;
}

.ds-media-demo-desc {
  font-size: 13px;
  color: var(--color-text-light);
  margin: 0 0 var(--space-6) 0;
  font-family: var(--font-mono);
  background: var(--color-bg-beige);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  display: inline-block;
}

.ds-media-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) {
  .ds-media-compare-grid { grid-template-columns: 1fr; }
}

.ds-media-compare-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ds-media-compare-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

/* =============================================
   9. Hero with Real Image（lp-hero 画像拡張）
   ============================================= */

/* Hero セクション内の実画像背景対応 */
.lp-hero--img-bg {
  position: relative;
  overflow: hidden;
}

.lp-hero--img-bg .lp-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.lp-hero--img-bg .lp-hero__inner {
  position: relative;
  z-index: 2;
}

.lp-hero--img-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16,42,67,0.85) 0%, rgba(37,99,235,0.35) 100%);
  z-index: 1;
  pointer-events: none;
}

/* =============================================
   10. Emergency Alert — 緊急アラートバー
   用途: 業務 SaaS の締切超過・システム障害・重要周知・災害情報の告知
   参照: components/emergency-alert.md
   ============================================= */

.emergency-alert {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 56px;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-sans);
  color: var(--color-text);
  animation: emergencyAlertIn var(--anim-duration-base, 300ms) var(--anim-ease-standard, cubic-bezier(0.4, 0.0, 0.2, 1));
  overflow: hidden;
}

.emergency-alert.is-closing {
  animation: emergencyAlertOut 200ms ease-in forwards;
}

/* ── severity: critical ── */
.emergency-alert--critical {
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.2);
}

/* ── severity: warning ── */
.emergency-alert--warning {
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.2);
}

/* ── severity: info ── */
.emergency-alert--info {
  background: rgba(26, 43, 74, 0.04);
  border-color: rgba(26, 43, 74, 0.15);
}

/* ── 左端ラベル ── */
.emergency-alert__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-5);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
  animation: emergencyLabelPulse 1.2s ease-in-out infinite;
  position: relative;
}

.emergency-alert--critical .emergency-alert__label {
  background: var(--color-error);
}

.emergency-alert--warning .emergency-alert__label {
  background: var(--color-warning);
}

.emergency-alert--info .emergency-alert__label {
  background: var(--color-primary);
  animation: none; /* info は点滅しない（緊急度が低いため） */
}

/* ── ラベル末尾の視覚的アクセント（色依存ではない形状でも severity を示す） ── */
.emergency-alert__label::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 10px;
  background: inherit;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  z-index: 1;
}

/* ── ticker ラッパー ── */
.emergency-alert__ticker-wrap {
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--space-3) 0 var(--space-3) var(--space-5);
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* ── 流れる本文テキスト ── */
.emergency-alert__ticker {
  display: inline-block;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  padding-left: 100%; /* 画面右端からスタート */
  animation: emergencyTicker 60s linear infinite;
}

.emergency-alert--critical .emergency-alert__ticker {
  animation-duration: 45s; /* critical はやや速く */
}

/* ── 時刻表示 ── */
.emergency-alert__time {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-4);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-left: 1px solid var(--color-border);
}

/* ── 閉じるボタン ── */
.emergency-alert__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-3);
  background: transparent;
  border: none;
  border-left: 1px solid var(--color-border);
  color: var(--color-text-light);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.emergency-alert__close:hover,
.emergency-alert__close:focus-visible {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text);
}

.emergency-alert__close:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}

.emergency-alert__close svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── 配置: top-fixed ── */
.emergency-alert--top-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  box-shadow: var(--shadow);
}

/* ── 配置: bottom-fixed ── */
.emergency-alert--bottom-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
}

.emergency-alert--bottom-fixed {
  animation-name: emergencyAlertInBottom;
}

/* ── 配置: banner（非固定・セクション区切り） ── */
.emergency-alert--banner {
  position: relative;
}

/* ── Keyframes ── */
@keyframes emergencyAlertIn {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes emergencyAlertInBottom {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes emergencyAlertOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes emergencyLabelPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

@keyframes emergencyTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── prefers-reduced-motion 完全対応 ── */
@media (prefers-reduced-motion: reduce) {
  .emergency-alert,
  .emergency-alert__label,
  .emergency-alert__ticker {
    animation: none !important;
  }

  /* ticker を静止表示 + 折り返し表示に変換 */
  .emergency-alert__ticker-wrap {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: var(--space-3) var(--space-5);
  }

  .emergency-alert__ticker {
    white-space: normal;
    padding-left: 0;
    line-height: 1.6;
  }
}

/* ── レスポンシブ（≤ 768px） ── */
@media (max-width: 768px) {
  .emergency-alert {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    min-height: 48px;
  }

  .emergency-alert__label {
    grid-column: 1;
    grid-row: 1 / -1;
    font-size: 13px;
    padding: 0 var(--space-3);
  }

  .emergency-alert__ticker-wrap {
    grid-column: 2;
    grid-row: 1 / -1;
    padding: var(--space-2) 0 var(--space-2) var(--space-4);
  }

  .emergency-alert__ticker {
    font-size: 14px;
  }

  .emergency-alert__time {
    display: none; /* モバイルでは時刻を非表示にして ticker を優先 */
  }

  .emergency-alert__close {
    grid-column: 3;
    grid-row: 1 / -1;
  }
}

/* ── ダークモード対応 ── */
[data-theme="dark"] .emergency-alert {
  background: var(--color-white);
  border-color: var(--color-border);
}

[data-theme="dark"] .emergency-alert--critical {
  background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .emergency-alert--warning {
  background: rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .emergency-alert--info {
  background: rgba(46, 167, 224, 0.08);
}
