/* ============================================================
   RunLand AI婚活カルテ スタイル
   マッチング投票システム(css/matching.css)のデザインに統一
   primary=#546e7a(スレート) / 背景#f5f7f8 / 角丸12 / ピルボタン
   ============================================================ */
:root{
  --primary:      #546e7a;
  --primary-light:#eceff1;
  --primary-dark: #37474f;
  --accent:       #78909c;
  --gray:         #757575;
  --gray-light:   #f5f5f5;
  --border:       #e0e0e0;
  --radius:       12px;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --fg:           #333;
  --bg:           #f5f7f8;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:-apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background:var(--bg); color:var(--fg); line-height:1.6;
}
.container{ max-width:980px; margin:0 auto; padding:20px 16px 60px; }
a{ color:var(--primary); }
h1,h2,h3{ line-height:1.3; }

/* ---- ボタン（ピル型） ---- */
.btn{
  display:inline-block; padding:10px 22px; border:0; border-radius:50px;
  font-size:15px; cursor:pointer; transition:background .15s, box-shadow .15s, opacity .15s;
  text-decoration:none; text-align:center;
}
.btn--primary{ background:var(--primary); color:#fff; width:100%; box-shadow:0 3px 10px rgba(55,71,79,.25); }
.btn--primary:hover:not(:disabled){ background:var(--primary-dark); }
.btn--primary:disabled{ opacity:.6; cursor:default; }
.btn--ghost{ background:#fff; border:1px solid var(--primary); color:var(--primary); }
.btn--ghost:hover{ background:var(--primary-light); }
.btn--danger{ background:#fff; border:1px solid #ef9a9a; color:#e53935; }
.btn--danger:hover{ background:#ffebee; }
/* 顧客の取得経由バッジ（申込経由＝青系 / アンケート経由＝緑系） */
.src-chip{ display:inline-block; font-size:11px; line-height:1.6; padding:0 7px; border-radius:10px; border:1px solid #b0bec5; color:#455a64; background:#eceff1; margin:0 2px; vertical-align:middle; }
.src-chip--survey{ border-color:#a5d6a7; color:#2e7d32; background:#e8f5e9; }
/* イベント一覧 機能列：ボタン／状態バッジ／使用トグルを同じ横幅で列揃え */
.feat-list{ display:flex; flex-direction:column; gap:6px; }
.feat-row{ display:flex; align-items:center; gap:8px; }
.feat-row > form{ display:contents; } /* form内のトグルボタンを直接の横並び要素にする */
/* 3要素とも同じ横幅（機能ボタンに合わせる） */
.feat-row .btn,
.feat-row .badge,
.feat-row .feat-toggle{ min-width:104px; box-sizing:border-box; text-align:center; }
.feat-row .btn.is-muted{ opacity:.45; }
.badge--mute{ background:#f5f5f5; color:#9e9e9e; }
/* バッジとトグルを同じピル型・同寸法に統一 */
.feat-row .badge{ padding:3px 10px; font-size:12px; line-height:1.5; border:1px solid transparent; vertical-align:middle; }
.feat-toggle{ display:inline-block; padding:3px 10px; border-radius:50px; font-size:12px; line-height:1.5; background:#fff; border:1px solid var(--primary); color:var(--primary); cursor:pointer; white-space:nowrap; vertical-align:middle; }
.feat-toggle:hover{ background:var(--primary-light); }
/* 横に広い表（参加者一覧など）は横スクロール可能に */
.table-scroll{ overflow-x:auto; }
.table-scroll .table{ min-width:920px; }
/* パネル内の表は横幅が狭いので最小幅を強制しない（不要な横スクロールを出さない） */
.panel .table-scroll .table{ min-width:0; }
/* 操作列：ボタンが多い行は折り返して縦に積む（横にはみ出して切れるのを防ぐ）。
   「復元」と「完全削除」のように押し間違えると困るボタンが並ぶため、間隔をしっかり取る。 */
.actions-cell{ white-space:normal; padding-left:16px; }
.actions-cell .btn{ white-space:nowrap; }
.actions-cell .btn--sm{ padding:7px 16px; }   /* 押しやすさ優先で少し広め */
/* ボタンの並び。gap で横も縦も同じ間隔になり、折り返しても詰まらない。 */
.actions-cell__btns{ display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; align-items:center; }
.actions-cell__btns .inline{ display:inline-flex; margin:0; }
/* 「完全削除」は取り消せないので、隣のボタンからさらに離して押し間違いを防ぐ */
.actions-cell__btns .inline + .inline{ margin-left:6px; }
/* イベント内タブ（ハブ） */
.subnav{ display:flex; flex-wrap:wrap; align-items:center; gap:4px; border-bottom:2px solid var(--border); margin:0 0 18px; }
/* イベント名は1行占有して、タブは必ず次の行から始める（タイトルと同列だと区別がつかないため） */
.subnav__event{ flex:0 0 100%; font-weight:700; color:var(--primary-dark); padding:6px 2px 0; }
.subnav__link{ padding:8px 14px; color:var(--gray); text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-2px; white-space:nowrap; }
.subnav__link:hover{ color:var(--primary); }
.subnav__link.is-active{ color:var(--primary-dark); font-weight:700; border-bottom-color:var(--primary); }
.btn--auto{ width:auto; }
.btn--sm{ padding:6px 14px; font-size:13px; }
.inline{ display:inline; margin:0; }

/* ---- フォーム ---- */
.field{ display:block; margin-bottom:16px; }
.field__label{ display:block; font-size:13px; color:#555; margin-bottom:5px; font-weight:600; }
.field__input{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px;
  font-size:15px; background:#fff; transition:border-color .15s;
}
.field__input:focus{ outline:none; border-color:var(--primary); }
textarea.field__input{ resize:vertical; }
.field__error{ display:block; color:#e53935; font-size:13px; margin-top:4px; }
.field__hint{ display:block; color:var(--gray); font-size:12px; margin-top:4px; }
.req{ color:#e53935; font-size:11px; border:1px solid #ef9a9a; border-radius:4px; padding:0 5px; margin-left:4px; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
/* 1列に折り返したとき（姓/名・セイ/メイ）に入力欄が密着しないよう縦の間隔を入れる */
@media (max-width:560px){ .grid2{ grid-template-columns:1fr; gap:10px; } }

/* ---- アラート ---- */
.alert{ padding:11px 15px; border-radius:8px; margin-bottom:16px; font-size:14px; }
.alert--error{ background:#ffebee; color:#c62828; border:1px solid #ef9a9a; }
.alert--success{ background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.alert--warn{ background:#fff8e1; color:#8d6e00; border:1px solid #ffe082; }

/* ステータス説明（折りたたみヘルプ） */
.status-help{ margin:10px 0 4px; border:1px solid #e6e6e6; border-radius:8px; background:#fafafa; }
.status-help > summary{ cursor:pointer; padding:8px 14px; font-size:13px; color:#555; user-select:none; }
.status-help__body{ padding:4px 14px 12px; font-size:13px; line-height:1.8; }
.status-help__body p{ margin:6px 0; }

/* メールテンプレのプレビュー表示 */
.mail-preview{ border:1px solid #e0e0e0; border-radius:8px; overflow:hidden; }
.mail-preview__subject{ background:#f7f7f7; padding:10px 14px; border-bottom:1px solid #e0e0e0; font-weight:600; }
.mail-preview__body{ padding:14px; white-space:normal; line-height:1.7; font-size:14px; color:#333; }

/* ---- ヘッダ（matching admin-header に合わせる） ---- */
.topbar{
  display:flex; justify-content:space-between; align-items:center;
  background:var(--primary); color:#fff; padding:14px 18px;
  border-radius:var(--radius); box-shadow:0 2px 6px rgba(0,0,0,.15); margin-bottom:14px;
}
.topbar__brand a, .topbar__brand{ color:#fff; font-weight:700; text-decoration:none; font-size:17px; }
.topbar__right{ display:flex; gap:8px; align-items:center; }
.topbar__user{ color:rgba(255,255,255,.9); font-size:13px; }
.topbar__role{ color:rgba(255,255,255,.65); font-size:12px; }
.topbar .btn--ghost{
  background:rgba(255,255,255,.18); border:0; color:#fff; padding:6px 14px; border-radius:20px; font-size:13px;
}
.topbar .btn--ghost:hover{ background:rgba(255,255,255,.3); }

/* ---- ナビ ---- */
.nav{ display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.nav__link{ padding:9px 14px; text-decoration:none; color:var(--gray); border-bottom:2px solid transparent; font-size:14px; }
.nav__link:hover{ color:var(--primary); }
.nav__link.is-active{ color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
.nav__link--ext{ margin-left:auto; color:#9aa7ad; font-size:13px; }

/* ---- 見出し ---- */
.page-title{ font-size:22px; margin:0 0 16px; color:var(--primary-dark); }
.page-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; gap:10px; }
.page-head .page-title{ margin:0; }

/* ---- カード（ダッシュボード件数） ---- */
.cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:24px; }
.card{ background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px; text-align:center; }
.card--accent{ border-top:3px solid var(--primary); }
.card__num{ font-size:30px; font-weight:700; color:var(--primary-dark); }
.card__label{ color:var(--gray); font-size:13px; margin-top:4px; }

/* ---- パネル ---- */
.panel{ background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px; margin-bottom:16px; }
.panel__title{ font-size:16px; margin:0 0 12px; color:var(--primary); }
.panel .page-head{ margin-bottom:10px; }
.menu{ margin:0; padding-left:18px; }
.menu li{ margin:5px 0; }
.muted{ color:#9aa7ad; }
.sm{ font-size:12px; }

/* ---- テーブル ---- */
.table{ width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.table th, .table td{ padding:11px 13px; border-bottom:1px solid var(--border); text-align:left; font-size:14px; vertical-align:middle; }
.table thead th{ background:#f7f9fa; color:#555; font-weight:600; }
.table tr:last-child td{ border-bottom:0; }
.ta-right{ text-align:right; }
.tag{ display:inline-block; padding:3px 10px; background:var(--primary-light); border-radius:50px; font-size:12px; color:var(--primary-dark); }
.mono{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---- フォームカード ---- */
.form-card{ background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:24px; }
.form-actions{ display:flex; gap:10px; margin-top:8px; }

/* ---- ログイン ---- */
.auth{ max-width:380px; margin:8vh auto 0; background:#fff; padding:32px 28px; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); }
.auth__title{ margin:0 0 4px; font-size:20px; color:var(--primary-dark); }
.auth__sub{ margin:0 0 20px; color:var(--gray); font-size:14px; }

/* ---- バッジ ---- */
.badge{ display:inline-block; padding:3px 11px; border-radius:50px; font-size:12px; }
.badge--ok{ background:#e8f5e9; color:#2e7d32; }
.badge--used{ background:var(--primary-light); color:var(--primary-dark); }
.badge--off{ background:#f0f0f0; color:#888; }
.badge--warn{ background:#fff8e1; color:#8d6e00; border:1px solid #ffe082; }
.badge--info{ background:#e7f0fb; color:#235e92; }

/* 婚活CRM カルテのサマリーカード */
.crm-card{ border:1px solid #c5dbf5; background:#f7fbff; }
.crm-metrics{ display:flex; gap:10px; flex-wrap:wrap; margin:6px 0 14px; }
.crm-metric{ flex:1 1 110px; text-align:center; background:#fff; border:1px solid #d8e6f5; border-radius:10px; padding:10px 8px; }
.crm-metric .num{ display:block; font-size:24px; font-weight:700; color:#1f4e79; line-height:1.1; }
.crm-metric .lbl{ display:block; font-size:12px; color:#5a6b7b; margin-top:3px; }
.crm-rows{ display:flex; flex-direction:column; gap:8px; }
.crm-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 0; border-top:1px dashed #d8e6f5; }
.crm-row__label{ min-width:150px; font-weight:600; color:#2d3748; font-size:13.5px; }
@media (max-width:560px){ .crm-row__label{ min-width:100%; } }

/* ===== 当日受付モード（スマホ/タブレット前提・大きめタップ領域）===== */
.checkin-counts{ display:flex; gap:10px; margin:14px 0; flex-wrap:wrap; }
.checkin-count{ flex:1 1 80px; text-align:center; padding:12px 8px; border-radius:12px; background:#f5f5f5; border:2px solid transparent; }
.checkin-count__num{ display:block; font-size:28px; font-weight:700; line-height:1.1; }
.checkin-count__label{ display:block; font-size:12px; color:#666; margin-top:2px; }
.checkin-count--attended{ background:#e8f5e9; border-color:#a5d6a7; }
.checkin-count--attended .checkin-count__num{ color:#2e7d32; }
.checkin-count--pending{ background:#fff8e1; border-color:#ffe082; }
.checkin-count--pending .checkin-count__num{ color:#8d6e00; }
.checkin-count--absent{ background:#fafafa; border-color:#e0e0e0; }
.checkin-count--absent .checkin-count__num{ color:#9e9e9e; }
.checkin-count--total .checkin-count__num{ color:#333; }

.checkin-search{ display:flex; gap:8px; margin:12px 0 18px; }
.checkin-search .field__input{ flex:1; font-size:16px; padding:12px 14px; }

.checkin-list{ display:flex; flex-direction:column; gap:12px; }
.checkin-card{ border:1px solid #e6e6e6; border-radius:12px; padding:14px; background:#fff; border-left:6px solid #e0e0e0; }
.checkin-card--attended{ border-left-color:#43a047; background:#f6fbf6; }
.checkin-card--absent{ border-left-color:#bdbdbd; background:#fafafa; }
.checkin-card--pending{ border-left-color:#ffb300; }
.checkin-card__head{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.checkin-card__name{ font-size:19px; font-weight:700; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.checkin-card__meta{ display:flex; align-items:center; gap:10px; }
.checkin-state{ font-weight:600; }
.checkin-state--attended{ color:#2e7d32; }
.checkin-state--pending{ color:#8d6e00; }
.checkin-state--absent{ color:#9e9e9e; }

.checkin-actions{ display:flex; gap:10px; }
.checkin-actions form{ flex:1; margin:0; }
.checkin-btn{ width:100%; padding:16px 8px; font-size:17px; font-weight:700; border-radius:10px; border:2px solid transparent; cursor:pointer; background:#f0f0f0; color:#555; line-height:1.2; }
.checkin-btn--attended{ background:#e8f5e9; color:#2e7d32; border-color:#a5d6a7; }
.checkin-btn--absent{ background:#f5f5f5; color:#888; border-color:#ddd; }
.checkin-btn--pending{ background:#fff8e1; color:#8d6e00; border-color:#ffe082; }
.checkin-btn.is-current{ box-shadow:inset 0 0 0 2px currentColor; opacity:1; }
.checkin-btn--attended.is-current{ background:#43a047; color:#fff; border-color:#43a047; }
.checkin-btn--absent.is-current{ background:#9e9e9e; color:#fff; border-color:#9e9e9e; }
.checkin-btn--pending.is-current{ background:#ffb300; color:#fff; border-color:#ffb300; }
@media (max-width:480px){
  .checkin-card__name{ font-size:18px; }
  .checkin-btn{ padding:18px 6px; font-size:16px; }
}

/* ---- 発行結果ボックス ---- */
.issued{ background:#fff8e1; border:1px solid #ffe082; border-radius:var(--radius); padding:18px 20px; margin-bottom:20px; }
.issued__title{ margin:0 0 12px; font-size:15px; color:#8a6d00; }
.issued__row{ display:flex; gap:12px; align-items:baseline; margin:6px 0; }
.issued__row span{ width:90px; color:var(--gray); font-size:13px; flex:none; }
.issued__code{ background:#fff; border:1px solid var(--border); border-radius:6px; padding:6px 10px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; word-break:break-all; }
.issued__pw{ font-size:18px; letter-spacing:1px; color:var(--primary); }

/* ---- 顧客管理 ---- */
.search{ display:flex; gap:8px; margin-bottom:16px; max-width:540px; }
.kv{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px 20px; margin:0; }
.kv > div{ display:flex; gap:8px; border-bottom:1px dotted #eee; padding:5px 0; }
.kv dt{ color:var(--gray); min-width:64px; margin:0; font-size:13px; }
.kv dd{ margin:0; font-size:14px; }
.kv--block{ grid-template-columns:1fr; }
.kv--block > div{ flex-direction:column; gap:2px; }
.kv--block dt{ color:var(--primary); font-weight:600; }
.subblock{ padding:10px 0; border-bottom:1px solid #f2f2f2; }
.subblock:last-child{ border-bottom:0; }
.json{ background:#263238; color:#cfd8dc; padding:14px; border-radius:8px; overflow:auto; font-size:12px; max-height:360px; }
.notes{ list-style:none; padding:0; margin:12px 0 0; }
.notes li{ padding:8px 0; border-bottom:1px solid #f2f2f2; font-size:14px; }
.note-form__row{ display:flex; gap:8px; align-items:flex-start; }
.note-form__type{ width:120px; flex:none; }
.ocurl__name{ min-width:160px; flex:none; font-size:14px; align-self:center; }

/* タグ編集 */
.tags-wrap{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.tag--del{ display:inline-flex; align-items:center; gap:4px; }
.tag__x{ border:0; background:none; color:var(--primary-dark); cursor:pointer; font-size:14px; padding:0 0 0 2px; line-height:1; }
.tag__x:hover{ color:#e53935; }
.tag-add{ display:flex; gap:8px; max-width:360px; }

/* 参加結果の編集 */
.ce-edit{ border:1px solid var(--border); border-radius:8px; padding:12px; margin-bottom:10px; }
.ce-edit__head{ margin-bottom:8px; }
.ce-edit__row{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.ce-edit__f{ display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--gray); }
.ce-edit__f .field__input{ min-width:130px; }

/* ---- 相談・AI回答 ---- */
.filter{ display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.chip{ padding:5px 13px; border:1px solid var(--border); border-radius:50px; text-decoration:none; color:var(--gray); font-size:13px; }
.chip.is-active{ background:var(--primary); color:#fff; border-color:var(--primary); }
.subhead{ font-size:14px; color:var(--gray); margin:14px 0 6px; }
.bubble{ background:var(--gray-light); border-radius:10px; padding:12px 14px; font-size:14px; }
.bubble--sent{ background:var(--primary-light); }
.draft-block{ border:1px solid var(--border); border-radius:8px; margin:10px 0; overflow:hidden; }
.draft-block--reply{ border-color:var(--primary); }
.draft-block__head{ display:flex; justify-content:space-between; align-items:center; background:#f7f9fa; padding:7px 12px; font-size:13px; font-weight:600; color:#555; }
.draft-block--reply .draft-block__head{ background:var(--primary-light); color:var(--primary-dark); }
.draft-block__body{ padding:12px; font-size:14px; }

/* ---- マッチング連携 ---- */
.link-form{ display:flex; gap:6px; align-items:center; }
.link-select{ min-width:280px; }
.btn-row{ display:flex; gap:8px; flex-wrap:wrap; }

/* ---- 参加者アンケート（公開） ---- */
.survey-body{ background:var(--primary-light); }
.survey-wrap{ max-width:640px; margin:0 auto; padding:28px 16px 72px; }
.survey-card{ background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 6px 24px rgba(55,71,79,.10); padding:32px 28px; }
.survey-card--wide{ max-width:none; }
.survey-title{
  font-size:23px; line-height:1.35; text-align:center; font-weight:700;
  color:#fff; background:var(--primary);
  margin:-32px -28px 24px; padding:18px 28px; border-radius:16px 16px 0 0;
}
.survey-title a{ color:inherit; text-decoration:underline; text-underline-offset:3px; }
.survey-title a:hover{ opacity:.85; }
.survey-sub{ text-align:center; color:var(--primary); margin:0 0 18px; font-size:14px; }
.survey-lead{ color:#555; font-size:14px; margin:0 0 22px; padding-bottom:18px; border-bottom:1px solid var(--border); }
.survey-section{ font-size:15px; margin:24px 0 10px; padding-bottom:6px; border-bottom:2px solid var(--primary-light); color:var(--primary); }
.done-mark{ width:56px; height:56px; line-height:56px; margin:0 auto 18px; text-align:center; font-size:30px; color:#fff; background:var(--primary); border-radius:50%; }
.thanks-body{ text-align:left; font-size:14px; color:#444; }
.thanks-body p{ margin:0 0 14px; }
.thanks-body p:last-child{ margin-bottom:0; }

/* 恋愛タイプ診断 結果（diagnosis/done） */
.diag-typename{ text-align:center; font-size:22px; font-weight:700; color:var(--primary); margin:0 0 22px; padding:16px; background:var(--primary-light); border-radius:12px; }
.diag-result{ text-align:left; }
.diag-block{ margin:0 0 18px; }
.diag-block__title{ font-size:14px; font-weight:700; color:var(--primary); margin:0 0 6px; padding-left:10px; border-left:3px solid var(--primary); }
.diag-block__body{ font-size:14px; color:#444; line-height:1.7; margin:0; }

/* アンケート完了画面のサービス紹介導線（intake/done） */
.next-actions{ margin-top:24px; padding-top:20px; border-top:1px solid var(--border); text-align:center; }
.next-actions__title{ font-size:15px; color:var(--primary); margin:0 0 14px; }
.btn--block{ display:block; width:100%; box-sizing:border-box; margin:0 0 10px; }
.next-consult{ font-size:13px; color:#555; line-height:1.6; margin:10px 0 0; }

/* 相談サービス状態（顧客詳細）／お手本トグル（相談詳細） */
.svc-status{ display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:0 0 16px; padding:12px 14px; background:#f5f7f8; border-radius:10px; }
.svc-badge{ font-size:12px; font-weight:700; padding:4px 12px; border-radius:50px; }
.svc-badge--on{ color:#fff; background:var(--primary); }
.svc-badge--off{ color:#777; background:#e3e7ea; }
.svc-status .inline, .exemplary-form{ display:inline-flex; align-items:center; gap:8px; margin:0; }
.exemplary-form{ flex-wrap:wrap; margin-top:10px; }

/* 公開フォームの項目（タップしやすい・余白広め）※ .survey-body配下に限定 */
.survey-body .field{ margin-bottom:24px; }
.survey-body .field__label{ font-size:15px; color:#37474f; font-weight:700; margin-bottom:8px; }
.survey-body .field__hint{ font-size:13px; margin-top:2px; margin-bottom:8px; line-height:1.5; text-align:left; }
.survey-body .field__input{ font-size:16px; padding:13px 14px; border-radius:10px; }
.survey-body .field__input:focus{ box-shadow:0 0 0 3px rgba(84,110,122,.15); }

/* 選択肢：タップ可能なカードボタン */
.choices{ display:flex; flex-direction:column; gap:10px; }
.choice{
  display:flex; align-items:flex-start; gap:11px; font-size:15px; line-height:1.5;
  padding:13px 15px; cursor:pointer; background:#fff;
  border:1.5px solid var(--border); border-radius:10px;
  transition:border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover{ border-color:var(--accent); }
.choice input{ margin:2px 0 0; flex:none; width:19px; height:19px; accent-color:var(--primary); }
.choice:has(input:checked){ border-color:var(--primary); background:var(--primary-light); box-shadow:inset 0 0 0 1px var(--primary); }

/* 誓約事項 ※親カードが中央寄せなので、本文は明示的に左詰めにする */
.pledge{ background:var(--gray-light); border:1px solid var(--border); border-radius:10px; padding:14px 16px; font-size:13px; line-height:1.7; margin-bottom:10px; max-height:220px; overflow:auto; text-align:left; }

/* 「その他」を選んだときだけ開く自由記述欄 */
.other-text{
  margin-top:10px; padding:12px 14px; background:var(--primary-light);
  border:1px dashed var(--primary); border-radius:10px; text-align:left;
}

/* 生年月日 */
.bday{ display:flex; gap:10px; }
.bday .field__input{ width:auto; flex:1; min-width:0; }

/* 2人目以降ブロック */
.companion-block{
  border:1px solid var(--border); border-left:4px solid var(--primary);
  border-radius:12px; padding:18px 18px 2px; margin:6px 0 26px; background:#fafbfc;
}
.companion-head{ margin:0 0 10px; font-size:16px; color:var(--primary-dark); font-weight:700; }
.companion-block .field:last-of-type{ margin-bottom:18px; }

/* 参加人数の選択肢は少し詰める */
.party-size{ gap:8px; }
/* 参加人数で2名様以上を選んだときだけ出る注意書き（項目定義の multi_note） */
.party-note{
  margin:10px 0 0; padding:10px 12px; font-size:13px; line-height:1.7;
  background:#fff8e1; border:1px solid #ffe082; border-radius:8px; color:#7a5b00;
}

/* 送信ボタン */
.survey-body .form-actions{ margin-top:28px; }
.survey-body .form-actions .btn--primary{ padding:15px 22px; font-size:17px; }

/* スマホ最適化 */
@media (max-width:560px){
  .survey-wrap{ padding:14px 12px 80px; }
  .survey-card{ padding:20px 16px; border-radius:14px; }
  .survey-title{ font-size:20px; margin:-20px -16px 20px; padding:14px 16px; border-radius:14px 14px 0 0; }
  .survey-body .field{ margin-bottom:20px; }
  .companion-block{ padding:14px 14px 2px; }
  .bday{ gap:6px; }
  /* 送信ボタンを画面下に固定して押しやすく */
  .survey-body .form-actions{
    position:sticky; bottom:0; z-index:5;
    margin:28px -16px -20px; padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.96); border-top:1px solid var(--border);
    backdrop-filter:blur(4px);
  }
}

/* 投票・マッチング */
.vote-bar{ display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.vote-bar .field__label{ display:inline; }
.voter{ border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.voter__head{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.voter__choices{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.voter__c{ display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--gray); }
.voter__c .field__input{ min-width:150px; }
/* 名簿から外す：投票フォームと区切って余白を確保 */
.voter__remove{ margin-top:12px; padding-top:12px; border-top:1px dashed var(--border); display:flex; justify-content:flex-end; }

/* 開催イベント一覧：開催日と操作は折り返さず最小幅、イベント名に幅を割く */
.table--events td:first-child, .table--events th:first-child { white-space:nowrap; width:1%; }
.table--events td:last-child,  .table--events th:last-child  { white-space:nowrap; width:1%; text-align:right; }
.table--events .btn--sm { padding:5px 9px; }
.table--events td:last-child .btn, .table--events td:last-child form { margin-left:4px; }

/* 一覧の並び替えリンク */
.sort-link{ color:inherit; text-decoration:none; }
.sort-link:hover{ color:var(--primary); }

/* お支払い案内（PayPal）モーダル */
.pay-note{ text-align:center; margin:0 0 16px; font-size:14px; }
.pay-note a{ font-weight:600; text-decoration:underline; cursor:pointer; }
.pay-note .pay-note__ico{ margin-right:4px; }
.modal{ display:none; position:fixed; inset:0; z-index:1000; }
.modal.is-open{ display:block; }
.modal__overlay{ position:absolute; inset:0; background:rgba(38,50,56,.55); }
.modal__box{
  position:relative; max-width:440px; width:calc(100% - 32px);
  margin:0 auto; top:50%; transform:translateY(-50%);
  background:#fff; border-radius:var(--radius); box-shadow:0 12px 40px rgba(0,0,0,.25);
  padding:24px 22px; max-height:86vh; overflow:auto;
}
.modal__close{
  position:absolute; top:10px; right:12px; border:0; background:transparent;
  font-size:24px; line-height:1; color:var(--gray); cursor:pointer; padding:4px 8px;
}
.modal__close:hover{ color:var(--fg); }
.modal__title{ margin:0 0 6px; font-size:18px; color:var(--primary-dark); }
.modal__lead{ margin:0 0 16px; font-size:13px; color:#555; }
.pay-steps{ list-style:none; counter-reset:s; margin:0 0 16px; padding:0; }
.pay-steps li{
  counter-increment:s; position:relative; padding:0 0 14px 40px; font-size:14px; color:var(--fg);
}
.pay-steps li::before{
  content:counter(s); position:absolute; left:0; top:0;
  width:26px; height:26px; border-radius:50%; background:var(--primary); color:#fff;
  font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center;
}
.pay-steps li:not(:last-child)::after{
  content:''; position:absolute; left:13px; top:28px; bottom:2px; width:2px; background:var(--primary-light);
}
.pay-steps b{ color:var(--primary-dark); }
.pay-callout{
  background:var(--primary-light); border-radius:10px; padding:12px 14px; font-size:13px; color:var(--primary-dark);
}
.pay-callout .pay-callout__title{ font-weight:700; display:block; margin-bottom:3px; }

/* 申込者一覧：イベント履歴セル */
.table--customers td{ vertical-align:top; }
.ev-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.ev-item{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:13px; }
.ev-name{ font-weight:600; color:var(--fg); }
.ev-badge{ display:inline-block; font-size:11px; font-weight:700; line-height:1; padding:4px 8px; border-radius:50px; white-space:nowrap; }
.ev-badge--join{ background:#2e7d32; color:#fff; }
.ev-badge--apply{ background:var(--primary-light); color:var(--primary-dark); }
.ev-badge--off{ background:#f5f5f5; color:var(--gray); }
.ev-badge--pay{ background:#1565c0; color:#fff; }
.ev-chip{ display:inline-block; font-size:11px; line-height:1; padding:3px 7px; border-radius:6px; background:#eef3f5; color:var(--primary-dark); border:1px solid #dbe4e8; white-space:nowrap; }
.ev-chip--done{ background:#e8f5e9; color:#2e7d32; border-color:#a5d6a7; }
.ev-chip--wish{ background:#fff3e0; color:#e65100; border-color:#ffcc80; }
.wish-chips{ margin-top:4px; display:flex; flex-wrap:wrap; gap:4px; }
.filter__label{ font-size:12px; color:var(--gray); margin-right:4px; align-self:center; }

/* 申込者詳細：イベント行 */
.ce-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
  padding:10px 0; border-bottom:1px solid var(--border); }
.ce-row:last-child{ border-bottom:0; }
.ce-row__main{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.ce-row__chips{ display:inline-flex; flex-wrap:wrap; gap:6px; }
.ce-row__form{ display:flex; align-items:center; gap:8px; margin:0; }
.ce-row__form .field__input{ width:auto; padding:6px 10px; }

/* 申込管理：案内・送信の進捗トグル */
.flag-row{ display:flex; flex-wrap:wrap; gap:6px; }
.flag-btn{ display:inline-block; font-size:12px; line-height:1; padding:6px 10px; border-radius:50px;
  border:1px solid var(--border); background:#fff; color:var(--gray); cursor:pointer; white-space:nowrap; }
.flag-btn:hover{ border-color:var(--primary); color:var(--primary); }
.flag-btn--on{ background:#e8f5e9; border-color:#a5d6a7; color:#2e7d32; font-weight:700; }
.flag-btn--static{ cursor:default; }
.flag-btn--static:hover{ border-color:var(--border); color:var(--gray); }
.flag-row form{ margin:0; }

/* 公開フォーム：セクション見出し（事前アンケート等） */
.survey-body .form-section{ margin:28px 0 14px; padding-top:18px; border-top:2px solid var(--primary-light); }
.survey-body .form-section__title{ font-size:16px; color:var(--primary-dark); margin:0 0 4px; }
.survey-body .form-section__note{ font-size:13px; color:#666; margin:0; }

/* ダッシュボード・統計バー（一覧上部の男女比サマリ等） */
.dash-card{ text-decoration:none; color:inherit; display:block; transition:box-shadow .15s; }
.dash-card:hover{ box-shadow:0 4px 14px rgba(0,0,0,.12); }
.card--alert{ border-top:3px solid #e53935; }
.card--alert .card__num{ color:#c62828; }
.dash-hint{ background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:10px 14px; font-size:13px; color:#8a6d00; margin:0 0 16px; }

.statbar{ display:flex; gap:10px; flex-wrap:wrap; margin:0 0 16px; }
.statbar--sm{ margin-bottom:12px; }
.statbar__item{ background:#fff; border:1px solid var(--border); border-radius:10px; padding:8px 16px; display:flex; align-items:baseline; gap:8px; }
.statbar__label{ font-size:12px; color:var(--gray); }
.statbar__num{ font-size:22px; font-weight:700; color:var(--primary-dark); }
.statbar__sub{ font-size:12px; color:var(--gray); }

/* 性別ラベル（色分け） */
.gender{ display:inline-block; font-size:12px; font-weight:700; padding:1px 6px; border-radius:4px; margin-right:4px; }
.gender--male{ background:#e3f2fd; color:#1565c0; }
.gender--female{ background:#fce4ec; color:#c2185b; }
.gender--other, .gender--none{ background:#f0f0f0; color:#777; }

/* 絞り込みフォーム（複数条件） */
.search--multi{ flex-wrap:wrap; max-width:none; }
.search--multi .field__input{ width:auto; min-width:150px; flex:0 1 auto; }

/* 凡例 */
.legend{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 14px; }

/* 終了イベントの行（開催イベント一覧の下部にグレーで溜まる） */
.table tr.row--closed td{ background:#f5f6f7; color:#9aa7ad; }
.table tr.row--closed a{ color:#7a8a90; }
.table tr.row--closed strong{ color:#9aa7ad; font-weight:600; }

/* イベント管理：機能ボタン群（1段・折り返さない・コンパクト） */
.btn-group{ display:flex; flex-wrap:wrap; gap:4px; }
.table--events td:nth-child(4){ white-space:nowrap; }      /* 機能列は折り返さない */
.table--events .btn-group{ flex-wrap:nowrap; gap:4px; }
.table--events .btn-group .btn{ margin:0; padding:5px 8px; font-size:12px; }
