/* ============================================================
   調整くん — Apple Human Interface Guidelines ベースのデザイン
   SFシステムフォント / Appleセマンティックカラー / iOS風コンポーネント
   ============================================================ */

:root {
  /* --- Apple システムカラー（ライト） --- */
  --blue: #007AFF;
  --blue-press: #0062CC;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --yellow: #FFCC00;

  /* グレースケール（systemGray〜systemGray6） */
  --gray:  #8E8E93;
  --gray2: #AEAEB2;
  --gray3: #C7C7CC;
  --gray4: #D1D1D6;
  --gray5: #E5E5EA;
  --gray6: #F2F2F7;

  /* 背景（systemBackground 系） */
  --bg: #F2F2F7;                 /* systemGroupedBackground */
  --surface: #FFFFFF;            /* secondarySystemGroupedBackground */
  --surface-2: #F2F2F7;          /* tertiary */
  --elevated: #FFFFFF;

  /* テキスト（label 系） */
  --text: #1C1C1E;               /* label */
  --text-muted: rgba(60,60,67,0.60);   /* secondaryLabel */
  --text-faint: rgba(60,60,67,0.30);   /* tertiaryLabel */

  /* セパレータ */
  --border: rgba(60,60,67,0.18);
  --border-strong: rgba(60,60,67,0.29);

  /* 色の淡いトーン（塗り） */
  --blue-soft:  rgba(0,122,255,0.12);
  --green-soft: rgba(52,199,89,0.15);
  --orange-soft:rgba(255,149,0,0.16);
  --red-soft:   rgba(255,59,48,0.14);

  /* 意味づけエイリアス */
  --primary: var(--blue);
  --primary-dark: var(--blue-press);
  --primary-soft: var(--blue-soft);
  --ok: #248A3D;         --ok-soft: var(--green-soft);
  --maybe: #B25000;      --maybe-soft: var(--orange-soft);
  --ng: #D70015;         --ng-soft: var(--red-soft);

  /* マテリアル（ヘッダーのすりガラス） */
  --material: rgba(249,249,249,0.80);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 6px rgba(0,0,0,.05);
  --shadow-md: 0 8px 30px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);

  /* Apple風の連続的な角丸 */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --maxw: 980px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  --blue: #0A84FF;  --blue-press: #409CFF;
  --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --yellow: #FFD60A;
  --gray: #8E8E93; --gray2: #636366; --gray3: #48484A; --gray4: #3A3A3C; --gray5: #2C2C2E; --gray6: #1C1C1E;

  --bg: #000000;
  --surface: #1C1C1E;
  --surface-2: #2C2C2E;
  --elevated: #2C2C2E;

  --text: #FFFFFF;
  --text-muted: rgba(235,235,245,0.60);
  --text-faint: rgba(235,235,245,0.30);

  --border: rgba(84,84,88,0.55);
  --border-strong: rgba(84,84,88,0.75);

  --blue-soft: rgba(10,132,255,0.22);
  --green-soft: rgba(48,209,88,0.22);
  --orange-soft: rgba(255,159,10,0.22);
  --red-soft: rgba(255,69,58,0.22);

  --primary-soft: var(--blue-soft);
  --ok: #30D158; --maybe: #FF9F0A; --ng: #FF453A;

  --material: rgba(30,30,30,0.72);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 10px 34px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* アイコン（SF Symbols 風の線画） */
.ic {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  flex: none; display: block;
}
.ic-sm { width: 15px; height: 15px; stroke-width: 2; }

/* ---------- ヘッダー（すりガラスのナビバー） ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(180deg, #2a9bff, var(--blue));
  color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand-mark .ic { width: 18px; height: 18px; }
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-theme { width: 34px; height: 34px; border-radius: 50%; }
.theme-sun { display: none; } .theme-moon { display: block; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }

main.wrap { flex: 1 0 auto; padding-top: 28px; padding-bottom: 56px; }

.app-footer { border-top: 0.5px solid var(--border); background: var(--surface); padding: 22px 0; }
.app-footer p { margin: 0; color: var(--text-faint); font-size: 13px; text-align: center; }

/* ---------- ボタン（iOS/macOS 風） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 11px 18px; border-radius: 12px; border: none; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background .18s, box-shadow .18s, opacity .18s, transform .08s;
}
.btn:active { transform: scale(0.97); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-ghost { background: var(--gray6); color: var(--blue); }
:root[data-theme="dark"] .btn-ghost { background: var(--gray5); }
.btn-ghost:hover { background: var(--gray5); }
:root[data-theme="dark"] .btn-ghost:hover { background: var(--gray4); }
.btn-danger-ghost { background: var(--red-soft); color: var(--red); }
.btn-danger-ghost:hover { filter: brightness(0.96); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-xs { padding: 6px 11px; font-size: 13px; border-radius: 9px; gap: 5px; }
.btn-lg { padding: 14px 26px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.header-new .ic { width: 15px; height: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ---------- カード ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }

/* ---------- 見出し（HIG タイポグラフィ） ---------- */
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin: 4px 0; }
.page-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 16px; }
.section-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: none; margin: 0 0 12px;
}
.section-label .ic { width: 16px; height: 16px; color: var(--blue); }

/* ---------- フォーム ---------- */
.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.hint { color: var(--text-faint); font-size: 12.5px; font-weight: 400; }
p.hint { margin: 6px 0 0; line-height: 1.6; }
p.hint .ic { display: inline; vertical-align: -2px; margin-right: 2px; }
.field .hint { color: var(--text-faint); font-size: 12.5px; font-weight: 400; }
.input, .textarea, select.input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; border: 0.5px solid var(--border-strong); border-radius: var(--radius-xs);
  background: var(--surface); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none;
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] .textarea, :root[data-theme="dark"] select.input {
  background: var(--gray6);
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px var(--blue-soft);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* セグメンテッドコントロール（iOS UISegmentedControl 風） */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: var(--gray5); padding: 3px; border-radius: 12px;
}
:root[data-theme="dark"] .segmented { background: rgba(118,118,128,0.24); }
.seg-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 10px; border: none; background: transparent; border-radius: 9px;
  cursor: pointer; color: var(--text); font-family: inherit; font-weight: 600; font-size: 14px;
  transition: background .18s, box-shadow .18s;
}
.seg-btn .ic { width: 20px; height: 20px; margin-bottom: 2px; color: var(--text-muted); }
.seg-btn small { font-weight: 400; font-size: 11px; color: var(--text-faint); }
.seg-btn.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.seg-btn.active .ic { color: var(--blue); }

/* 候補行 / スロット */
.cand-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.cand-datetime { display: flex; gap: 8px; flex: 1; }
.cand-datetime .input { flex: 1; min-width: 0; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 11px;
  border: none; background: var(--gray6); color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer; transition: all .15s;
}
:root[data-theme="dark"] .icon-btn { background: var(--gray5); }
.icon-btn:hover { color: var(--red); background: var(--red-soft); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn:disabled:hover { color: var(--text-muted); background: var(--gray6); }

.add-cand-btn {
  margin-top: 4px; width: 100%; padding: 12px; border: none; border-radius: var(--radius-xs);
  background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  transition: filter .15s;
}
.add-cand-btn:hover { filter: brightness(0.97); }

.slot-block { padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 10px; }
:root[data-theme="dark"] .slot-block { background: var(--gray5); }
.slot-inputs { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.slot-inputs .mini { display: flex; flex-direction: column; font-size: 11px; color: var(--text-muted); gap: 3px; flex: 1; min-width: 88px; }
.slot-inputs .mini .input { padding: 9px 10px; font-size: 14px; }
.slot-inputs .icon-btn { width: 40px; height: 40px; }
.slot-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.slot-chip { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.slot-empty { font-size: 12px; color: var(--text-faint); }

.form-actions { margin-top: 28px; display: flex; gap: 12px; }
.check-row {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  font-size: 14px; color: var(--text); cursor: pointer; user-select: none;
}
.check-row input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.check-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- トップ：ヒーロー & ステップ ---------- */
.hero { text-align: center; padding: 12px 0 30px; }
.hero-icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px;
  background: linear-gradient(180deg, #2a9bff, var(--blue)); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
}
.hero-icon .ic { width: 38px; height: 38px; stroke-width: 1.6; }
.hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 10px; }
.hero p { color: var(--text-muted); margin: 0 auto 24px; max-width: 540px; font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 34px; }
.step { text-align: center; padding: 20px 14px; }
.step-num {
  width: 30px; height: 30px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); font-weight: 700;
  display: grid; place-items: center; font-size: 14px;
}
.step .ic { width: 26px; height: 26px; color: var(--blue); margin: 0 auto 8px; }
.step h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.step p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- タブ ---------- */
.tabs {
  display: inline-flex; gap: 3px; background: var(--gray5); padding: 3px;
  border-radius: 11px; margin: 8px 0 18px;
}
:root[data-theme="dark"] .tabs { background: rgba(118,118,128,0.24); }
.tab {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 14px; color: var(--text); transition: background .18s, box-shadow .18s;
}
.tab.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.tab-count {
  font-size: 12px; background: var(--gray4); color: var(--text-muted);
  padding: 1px 8px; border-radius: 20px; font-weight: 700;
}
.tab.active .tab-count { background: var(--blue); color: #fff; }

/* ---------- イベントカード（グリッド） ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ev-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit; transition: transform .12s, box-shadow .18s;
}
.ev-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ec-type { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ec-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.ec-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-faint); margin-top: auto; }
.ec-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ec-meta .meta-closed { color: var(--red); }
.ec-foot { font-size: 12.5px; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.tag-ok { background: var(--green-soft); color: var(--ok); }
.tag-live { background: var(--blue-soft); color: var(--blue); }
.tag-closed { background: var(--gray5); color: var(--text-muted); }

/* リスト（回答者管理など） */
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 12px; }
.list-head h2 { font-size: 17px; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.event-list { display: grid; gap: 10px; }
.event-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit; transition: transform .12s;
}
.event-item .ei-icon { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.event-item .ei-body { flex: 1; min-width: 0; }
.event-item .ei-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.event-item .ei-meta { font-size: 12.5px; color: var(--text-faint); display: flex; gap: 12px; margin-top: 2px; }
.event-item .ei-meta span { display: inline-flex; align-items: center; gap: 4px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty-state .ic { width: 42px; height: 42px; margin: 0 auto 12px; stroke-width: 1.4; }
.empty-state p { margin: 0; font-size: 14.5px; line-height: 1.6; }

.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 70px 0; color: var(--text-faint); }
.loading .ic { width: 30px; height: 30px; animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- イベントページ ---------- */
.event-top { margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--blue); text-decoration: none; font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.back-link .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.event-title { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin: 0; word-break: break-word; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 20px; background: var(--gray6); color: var(--text-muted); }
:root[data-theme="dark"] .chip { background: var(--gray5); }
.chip-live { background: var(--blue-soft); color: var(--blue); }
.chip-closed { background: var(--red-soft); color: var(--red); }
.chip-owner { background: var(--green-soft); color: var(--ok); }

.event-memo { margin: 14px 0 0; padding: 14px 16px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); color: var(--text-muted); font-size: 14.5px; white-space: pre-wrap; }

.final-banner {
  display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 16px 18px;
  background: var(--green-soft); border-radius: var(--radius); flex-wrap: wrap;
}
.fb-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.fb-icon .ic { width: 24px; height: 24px; }
.fb-body { flex: 1; min-width: 140px; }
.fb-label { font-size: 12.5px; font-weight: 600; color: var(--ok); }
.fb-date { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.share-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-top: 18px; }
.share-label .ic { color: var(--blue); }
.share-label .hint { font-weight: 400; }
.owner-url-label .ic { color: var(--maybe); }
.share-box + .share-label { margin-top: 14px; }
.share-label + .share-box { margin-top: 6px; }
.owner-url { color: var(--maybe) !important; }
.share-box { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.share-box .input { flex: 1; min-width: 180px; font-size: 13px; color: var(--text-muted); background: var(--surface-2); }

.lock-banner, .info-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); margin: 18px 0 0;
}
.lock-banner { background: var(--red-soft); color: var(--ng); }
.lock-banner .ic { width: 24px; height: 24px; flex: none; }
.lock-banner b { display: block; font-size: 14.5px; }
.lock-banner span { font-size: 13px; color: var(--text-muted); }
.info-banner { background: var(--blue-soft); color: var(--blue); font-size: 13.5px; }
.info-banner .ic { width: 20px; height: 20px; flex: none; }

/* ツールバー */
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 26px; margin-bottom: 12px; flex-wrap: wrap; }
.table-tools { display: flex; gap: 8px; }

/* ---------- 集計テーブル ---------- */
.table-scroll {
  overflow-x: auto; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch;
}
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
table.grid th, table.grid td { padding: 12px 13px; text-align: center; border-bottom: 0.5px solid var(--border); }
table.grid thead th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--text-muted); position: sticky; top: 0; white-space: nowrap; }
table.grid .col-date { text-align: left; min-width: 150px; position: sticky; left: 0; z-index: 2; background: var(--surface); }
table.grid thead .col-date { z-index: 3; background: var(--surface-2); }
table.grid .col-name { min-width: 92px; }
table.grid .col-name .ic { display: inline; vertical-align: -2px; margin-left: 3px; color: var(--text-faint); }
/* 名前をタップするとその人の回答を編集できる */
.name-edit {
  font: inherit; color: var(--blue); background: none; border: none; cursor: pointer;
  padding: 5px 8px; margin: -5px -4px; border-radius: 8px; max-width: 100%;
  display: inline-flex; align-items: center; gap: 2px; transition: background-color .15s;
}
.name-edit:hover, .name-edit:focus-visible { background: var(--blue-soft); }
.name-edit .ic { color: var(--blue); opacity: .75; width: 14px; height: 14px; }
table.grid .date-main { font-weight: 600; color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
table.grid .date-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
table.grid .date-dl { color: var(--orange); display: inline-flex; align-items: center; gap: 3px; }
table.grid tbody tr:last-child td { border-bottom: none; }
.date-cell { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.finalize-btn { flex: none; width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--gray6); color: var(--text-faint); cursor: pointer; display: grid; place-items: center; transition: all .15s; }
:root[data-theme="dark"] .finalize-btn { background: var(--gray5); }
.finalize-btn:hover { color: var(--green); background: var(--green-soft); }
.finalize-btn.active { background: var(--green); color: #fff; }

.total-pill { display: inline-flex; align-items: baseline; gap: 3px; justify-content: center; }
.total-pill b { font-size: 15px; color: var(--ok); }
.total-pill small { color: var(--text-faint); font-weight: 600; }

.best-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--ok); background: var(--green-soft); padding: 2px 7px; border-radius: 20px; }
.badge-final { color: #fff; background: var(--green); }
.lock-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--text-muted); background: var(--gray5); padding: 2px 7px; border-radius: 20px; }
tr.is-best .col-date { box-shadow: inset 3px 0 0 var(--green); }
tr.is-final td { background: var(--green-soft); }
tr.is-final .col-date { background: var(--green-soft); }
tr.is-locked .date-main { color: var(--text-muted); }
tr.is-locked td:not(.col-date) { opacity: .55; }

/* 出欠マーク */
.mark { display: inline-grid; place-items: center; width: 26px; height: 26px; }
.mark .ic { width: 22px; height: 22px; stroke-width: 2.3; }
.mark-o { color: var(--ok); } .mark-t { color: var(--maybe); } .mark-x { color: var(--ng); }
.mark-none { color: var(--gray3); } .mark-none .ic { width: 12px; height: 2px; }

.comment-row td { text-align: left; font-size: 13px; color: var(--text-muted); background: var(--surface-2); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 13px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { width: 20px; height: 20px; } .legend .mark .ic { width: 17px; height: 17px; }

.answer-panel { margin-top: 20px; }
.participant-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 回答フォーム内 */
.quick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.quick-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.gcal-btn { margin-left: auto; }
.answer-grid { display: grid; gap: 10px; margin: 6px 0 4px; }
.answer-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
:root[data-theme="dark"] .answer-item { background: var(--gray5); }
.answer-item.ai-locked { opacity: .6; }
.answer-item .ai-date .date-main { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.answer-item .ai-date .date-sub { font-size: 12px; color: var(--text-faint); }
.choice-group { display: inline-flex; gap: 6px; flex: none; }
.choice {
  width: 48px; height: 46px; border: 1.5px solid var(--border-strong); border-radius: 11px;
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
  color: var(--text-faint); transition: all .12s;
}
:root[data-theme="dark"] .choice { background: var(--gray6); }
.choice .ic { width: 22px; height: 22px; stroke-width: 2.3; }
.choice:active { transform: scale(0.94); }
.choice:disabled { opacity: .4; cursor: not-allowed; }
.choice.sel-o.active { border-color: var(--ok); background: var(--green-soft); color: var(--ok); }
.choice.sel-t.active { border-color: var(--maybe); background: var(--orange-soft); color: var(--maybe); }
.choice.sel-x.active { border-color: var(--ng); background: var(--red-soft); color: var(--ng); }

/* ---------- モーダル ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .2s ease;
}
.modal {
  background: var(--elevated); border-radius: 22px; box-shadow: var(--shadow-md);
  width: 100%; max-width: 440px; padding: 26px; animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
}
.modal-lg { max-width: 540px; }
/* モーダル表示中は背面をスクロールさせない（スマホで保存ボタンに届かなくなるのを防ぐ） */
body.modal-open { overflow: hidden; }
.modal h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.modal h3 .ic { width: 22px; height: 22px; color: var(--blue); }
.modal p { margin: 0 0 18px; color: var(--text-muted); font-size: 14.5px; }
/* 内容が長くても保存ボタンが常に見えるよう、モーダル下部に貼り付ける */
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  position: sticky; bottom: -26px; z-index: 1;
  margin: 22px -26px -26px; padding: 14px 26px;
  background: var(--elevated); border-top: 0.5px solid var(--border);
  border-radius: 0 0 22px 22px;
}
.modal-actions .btn-primary { flex: 1; justify-content: center; min-width: 160px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- トースト ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(40,40,42,0.92); color: #fff; padding: 13px 22px; border-radius: 14px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-md); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  display: inline-flex; align-items: center; gap: 8px; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ic { width: 18px; height: 18px; color: var(--green); }
.toast.toast-error .ic { color: var(--orange); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 640px) {
  main.wrap { padding-top: 18px; }
  .wrap { padding: 0 16px; }
  .brand-text { font-size: 17px; }
  .header-new span { display: none; }
  .header-new { padding: 9px; }
  .card-pad { padding: 18px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .step { display: flex; align-items: center; text-align: left; gap: 14px; padding: 14px; }
  .step-num, .step .ic { margin: 0; }
  .step .ic { width: 24px; height: 24px; }
  .hero h1 { font-size: 27px; }
  .page-title, .event-title { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .cand-datetime { flex-direction: column; }
  .answer-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .choice-group { justify-content: space-between; }
  .choice { flex: 1; }
  .share-box { flex-direction: column; align-items: stretch; }
  .share-box .btn, .share-box .input { width: 100%; }
  .table-tools { width: 100%; }
  .table-tools .btn { flex: 1; }
  .gcal-btn { margin-left: 0; width: 100%; }
  .fb-actions { width: 100%; }
  .fb-actions .btn { flex: 1; }
}

/* ---------- 回答するボタン（上部アクション） ---------- */
.answer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 22px 0; padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-soft), rgba(0,122,255,.04));
  border: 1px solid rgba(0,122,255,.28);
}
:root[data-theme="dark"] .answer-cta { border-color: rgba(10,132,255,.42); }
.answer-cta.is-closed {
  background: var(--surface-2); border-color: var(--border);
}
:root[data-theme="dark"] .answer-cta.is-closed { background: var(--gray5); }
.cta-text { min-width: 0; }
.cta-text b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.cta-text span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 14px; }

.cta-btn {
  flex: none; min-width: 230px; font-size: 18px; padding: 17px 34px; border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,122,255,.38);
}
.cta-btn .ic { width: 21px; height: 21px; }
.cta-btn:hover { box-shadow: 0 8px 26px rgba(0,122,255,.48); }
.cta-btn:disabled { box-shadow: none; }

/* 読み込み直後だけ軽く脈打たせて、見落としを防ぐ */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0,122,255,.38); }
  50%      { box-shadow: 0 6px 20px rgba(0,122,255,.38), 0 0 0 10px rgba(0,122,255,.14); }
}
.cta-attract { animation: ctaPulse 1.9s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) { .cta-attract { animation: none; } }

.share-section { margin-bottom: 22px; }
.share-section .share-label:first-child { margin-top: 0; }

/* ---------- 並び替えコントロール ---------- */
.sort-ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; }
.sort-ctl .ic { color: var(--blue); }
.sort-ctl select { width: auto; padding: 8px 12px; font-size: 14px; }

/* ---------- 時間枠：カレンダー ---------- */
.ts-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.ts-cal { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
:root[data-theme="dark"] .ts-cal { background: var(--gray5); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 700; font-size: 15px; }
.cal-nav { width: 32px; height: 32px; border: none; border-radius: 8px; background: transparent; color: var(--blue); display: grid; place-items: center; cursor: pointer; }
.cal-nav:hover { background: var(--gray5); }
:root[data-theme="dark"] .cal-nav:hover { background: var(--gray4); }
.cal-nav .ic { width: 18px; height: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { margin-bottom: 2px; }
.cal-wdlabel { text-align: center; font-size: 11px; color: var(--text-faint); font-weight: 600; padding: 2px 0; }
.cal-wdlabel.sun { color: var(--red); } .cal-wdlabel.sat { color: var(--blue); }
.cal-cell { aspect-ratio: 1 / 1; }
.cal-day { border: none; background: transparent; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--text); display: grid; place-items: center; width: 100%; height: 100%; transition: background .12s, color .12s, transform .06s; }
.cal-day:hover:not(:disabled) { background: var(--gray5); }
:root[data-theme="dark"] .cal-day:hover:not(:disabled) { background: var(--gray4); }
.cal-day:active { transform: scale(0.9); }
.cal-day.sun { color: var(--red); } .cal-day.sat { color: var(--blue); }
.cal-day.sel { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day.sel.sun, .cal-day.sel.sat { color: #fff; }
.cal-day.past { color: var(--text-faint); cursor: not-allowed; opacity: .4; }
.ts-side { display: flex; flex-direction: column; gap: 12px; }
.ts-times { display: flex; gap: 8px; }
.ts-times .mini { display: flex; flex-direction: column; font-size: 11px; color: var(--text-muted); gap: 3px; flex: 1; min-width: 0; }
.ts-times .mini .input { padding: 9px 10px; font-size: 14px; }
.ts-preview { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow: auto; }
.ts-daylabel { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
.slot-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chip { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); }
.slot-empty { font-size: 12.5px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 時間枠：回答カレンダー（時間割グリッド） ---------- */
.tt-help { font-size: 12.5px; color: var(--text-muted); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; margin: 6px 0 12px; line-height: 1.7; }
:root[data-theme="dark"] .tt-help { background: var(--gray5); }
.tt-help .ic { display: inline; vertical-align: -2px; margin-right: 3px; }
.tt-o { color: var(--ok); font-weight: 700; } .tt-t { color: var(--maybe); font-weight: 700; } .tt-x { color: var(--ng); font-weight: 700; }
.tt-scroll { overflow-x: auto; border-radius: var(--radius-sm); border: 0.5px solid var(--border); -webkit-overflow-scrolling: touch; }
.tt-grid { border-collapse: separate; border-spacing: 0; width: 100%; }
.tt-grid th, .tt-grid td { border-bottom: 0.5px solid var(--border); border-right: 0.5px solid var(--border); }
.tt-grid tr td:last-child, .tt-grid tr th:last-child { border-right: none; }
.tt-grid tbody tr:last-child th, .tt-grid tbody tr:last-child td { border-bottom: none; }
.tt-corner { position: sticky; left: 0; background: var(--surface-2); z-index: 3; width: 46px; }
.tt-corner .ic { margin: 0 auto; color: var(--text-faint); }
.tt-dhead { background: var(--surface-2); padding: 7px 10px; font-size: 12px; white-space: nowrap; text-align: center; }
.tt-dhead .tt-md { display: block; font-weight: 700; font-size: 13px; color: var(--text); }
.tt-dhead .tt-wd { display: block; font-size: 11px; color: var(--text-faint); }
.tt-dhead.sun .tt-wd, .tt-dhead.sun .tt-md { color: var(--red); }
.tt-dhead.sat .tt-wd, .tt-dhead.sat .tt-md { color: var(--blue); }
.tt-time { position: sticky; left: 0; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 6px 10px; white-space: nowrap; text-align: right; z-index: 2; }
.tt-time .tt-tend { display: block; font-size: 10.5px; color: var(--text-faint); font-weight: 400; }
.tt-td { padding: 3px; }
.tt-empty { background: var(--surface-2); }
:root[data-theme="dark"] .tt-empty { background: var(--gray6); }
.tcell { width: 100%; min-width: 54px; height: 46px; border: none; border-radius: 8px; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--text-faint); transition: background .12s, color .12s, transform .06s; }
:root[data-theme="dark"] .tcell { background: var(--gray5); }
.tcell:hover:not(:disabled) { filter: brightness(0.96); }
.tcell:active:not(:disabled) { transform: scale(0.9); }
.tcell .ic { width: 22px; height: 22px; stroke-width: 2.3; }
.tcell-plus { opacity: .3; width: 16px !important; height: 16px !important; }
.tcell[data-state="o"] { background: var(--green-soft); color: var(--ok); }
.tcell[data-state="t"] { background: var(--orange-soft); color: var(--maybe); }
.tcell[data-state="x"] { background: var(--red-soft); color: var(--ng); }
.tcell:disabled { cursor: not-allowed; color: var(--text-faint); opacity: .55; }

/* ---------- 時間枠：作成時の日付×時間 選択グリッド ---------- */
.ts-grid-section { margin-top: 16px; }
.ts-grid-empty { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 28px 20px; color: var(--text-faint); background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13.5px; text-align: center; }
:root[data-theme="dark"] .ts-grid-empty { background: var(--gray5); }
.ts-grid-empty .ic { width: 24px; height: 24px; flex: none; }
.tsel-count { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tsel-count b { color: var(--blue); font-size: 15px; }
.tsel-count .ic { color: var(--blue); }
.tsel-count .hint { font-size: 11.5px; }
.tsel-head { cursor: pointer; user-select: none; }
.tsel-head:hover { background: var(--gray5); }
:root[data-theme="dark"] .tsel-head:hover { background: var(--gray4); }
.tsel-badge { display: block; margin-top: 3px; font-size: 9.5px; font-weight: 700; color: var(--text-faint); }
.tsel-row { cursor: pointer; user-select: none; }
.tsel-row:hover { color: var(--blue); }
.tsel-cell { width: 100%; min-width: 54px; height: 40px; border: none; border-radius: 8px; cursor: pointer; display: grid; place-items: center; transition: background .12s, transform .06s; }
.tsel-cell.on { background: var(--blue-soft); color: var(--blue); }
.tsel-cell.off { background: var(--surface-2); color: transparent; }
:root[data-theme="dark"] .tsel-cell.off { background: var(--gray6); }
.tsel-cell:hover { filter: brightness(0.96); }
.tsel-cell:active { transform: scale(0.9); }
.tsel-cell .ic { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .ts-layout { grid-template-columns: 1fr; }
  .answer-cta { padding: 18px; gap: 14px; }
  .cta-text b { font-size: 17px; }
  .cta-btn { width: 100%; min-width: 0; font-size: 17px; padding: 15px 20px; }

  .tcell { min-width: 46px; height: 42px; }
  .tsel-cell { min-width: 44px; height: 38px; }
}

/* ---------- 調整方式の回答イメージ ミニ図 ---------- */
.method-fig { width: 100%; max-width: 138px; height: auto; margin: 10px auto 0; display: block; }
.method-fig .mf-bar { fill: var(--gray4); }
.method-fig .mf-sel { fill: var(--gray5); }
.method-fig .mf-sel-o { fill: var(--green-soft); }
.method-fig .mf-sel-t { fill: var(--orange-soft); }
.method-fig .mf-sel-x { fill: var(--red-soft); }
.method-fig .mf-o { fill: none; stroke: var(--green); stroke-width: 2; }
.method-fig .mf-t { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; }
.method-fig .mf-x { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }
.method-fig .mf-head { fill: var(--gray3); }
.method-fig .mf-cell { fill: var(--gray5); }
.method-fig .mf-cell.on { fill: var(--green); }
:root[data-theme="dark"] .method-fig .mf-cell { fill: var(--gray4); }

/* ---------- フッター ---------- */
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text); }
.footer-mark { width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(180deg, #2a9bff, var(--blue)); color: #fff; display: grid; place-items: center; }
.footer-mark .ic { width: 15px; height: 15px; }
.footer-company { margin: 6px 0 0; font-size: 13px; color: var(--text-faint); }
.footer-company a { color: var(--blue); text-decoration: none; font-weight: 600; }
.footer-company a:hover { text-decoration: underline; }

/* ---------- LP（トップ下部） ---------- */
.lp { margin-top: 52px; padding-top: 44px; border-top: 0.5px solid var(--border); }
.lp-head { text-align: center; margin-bottom: 28px; }
.lp-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--blue); background: var(--blue-soft); padding: 4px 12px; border-radius: 20px; }
.lp-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 6px; }
.lp-head p { color: var(--text-muted); margin: 0; font-size: 15px; }
.lp-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lp-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.lp-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 12px; }
.lp-ic .ic { width: 23px; height: 23px; }
.lp-card h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.lp-card p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

.lp-usecases { text-align: center; margin: 40px 0; }
.lp-usecases h3 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.lp-usechips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lp-usechip { font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface); border: 0.5px solid var(--border); box-shadow: var(--shadow-sm); padding: 9px 16px; border-radius: 22px; }

.lp-cta { text-align: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 38px 24px; margin: 36px 0 30px; }
.lp-cta-icon { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 17px; background: linear-gradient(180deg, #2a9bff, var(--blue)); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md); }
.lp-cta-icon .ic { width: 32px; height: 32px; stroke-width: 1.7; }
.lp-cta h3 { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.lp-cta p { color: var(--text-muted); margin: 0 0 20px; font-size: 15px; }

.lp-credit { text-align: center; padding: 8px 0 4px; }
.lp-credit p { margin: 0 0 12px; font-size: 14px; color: var(--text-muted); }
.lp-credit a { color: var(--blue); text-decoration: none; font-weight: 700; }
.lp-credit p a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .lp { margin-top: 40px; }
  .lp-head h2 { font-size: 22px; }
  .lp-features { grid-template-columns: 1fr; }
}

/* ヘッダーのアイコンボタン hover を中立色に */
.header-theme:hover { color: var(--blue); background: var(--gray5); }
:root[data-theme="dark"] .header-theme:hover { background: var(--gray4); }

/* ---------- オプション行（チェックボックス設定） ---------- */
.opt-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; }
.opt-row input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin-top: 1px; }
.opt-row span { display: flex; flex-direction: column; gap: 2px; }
.opt-row b { font-size: 14px; font-weight: 600; }
.opt-row small { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ---------- 主催者メニュー ---------- */
.owner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -8px 0 22px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
:root[data-theme="dark"] .owner-actions { background: var(--gray5); }
.owner-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; }
.owner-label .ic { color: var(--blue); }

/* ---------- 編集不可の注記 ---------- */
.lock-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: var(--orange-soft); color: var(--maybe); font-size: 13px; line-height: 1.6; }
.lock-note .ic { flex: none; margin-top: 2px; }

/* ---------- イベント編集：候補リスト ---------- */
.edit-cand-list { max-height: 190px; overflow: auto; border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 6px; margin-top: 8px; }
.edit-cand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.edit-cand-row small { color: var(--text-faint); }
.edit-cand-row.removed { opacity: .5; text-decoration: line-through; }
.edit-cand-row.removed .ec-del { color: var(--blue); background: var(--blue-soft); }

/* ---------- 設定・連携画面 ---------- */
.settings-card { margin-bottom: 16px; }
.settings-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 4px; }
.settings-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.settings-ic .ic { width: 25px; height: 25px; }
.settings-head h2 { font-size: 18px; margin: 2px 0 5px; font-weight: 700; }
.settings-head p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }
.settings-status { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-muted); }
:root[data-theme="dark"] .settings-status { background: var(--gray5); }
.settings-status.ok { background: var(--green-soft); color: var(--ok); }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.settings-help { margin-top: 20px; font-size: 13px; }
.settings-help summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: 4px 0; }
.settings-help ol { margin: 10px 0 4px; padding-left: 22px; color: var(--text-muted); line-height: 1.9; }
.settings-help a { color: var(--blue); }
.settings-help code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
:root[data-theme="dark"] .settings-help code { background: var(--gray5); }

/* ---------- ログイン / アバター ---------- */
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; background: var(--gray5); }
.avatar-ini { background: linear-gradient(180deg, #2a9bff, var(--blue)); color: #fff; font-weight: 700; font-size: 14px; }
.avatar-lg { width: 52px; height: 52px; font-size: 22px; }
.user-chip { display: inline-flex; align-items: center; text-decoration: none; border-radius: 50%; box-shadow: var(--shadow-sm); }
.user-chip:hover { box-shadow: 0 0 0 3px var(--blue-soft); }
.account-box { display: flex; align-items: center; gap: 14px; margin-top: 6px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
:root[data-theme="dark"] .account-box { background: var(--gray5); }
.account-info { flex: 1; min-width: 0; }
.account-name { font-weight: 700; font-size: 15px; }
.account-email { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-lead { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin: 4px 0 16px; }

/* テーマ切替時の色トランジション */
body, .card, .ev-card, .event-item, .input, .modal, .chip, table.grid th, table.grid td {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
