*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #4F7EF7;
  --primary-dark: #3563E9;
  --ok-bg:        #DCFCE7;
  --ok-text:      #16A34A;
  --ng-bg:        #FEE2E2;
  --ng-text:      #DC2626;
  --maybe-bg:     #FEF9C3;
  --maybe-text:   #B45309;
  --none-bg:      #F1F5F9;
  --none-border:  #CBD5E1;
  --card-bg:      #fff;
  --page-bg:      #EEF2FF;
  --text:         #1E293B;
  --muted:        #64748B;
  --border:       #E2E8F0;
  --radius:       12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
}

/* ── ヘッダー ── */
.app-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(79,126,247,.25);
}
.app-header h1 { font-size: 17px; font-weight: 700; }
.app-logo { font-size: 20px; }
.app-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  display: block;
  object-fit: contain;
}

/* ── コンテナ ── */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px;
}

/* ── カード ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── フォーム ── */
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: .03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

/* ── ボタン ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(.96); }
.btn-primary  { background: var(--primary); color: #fff; width: 100%; }
.btn-success  { background: #22C55E; color: #fff; }
.btn-outline  { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-sm       { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── カレンダー（候補日選択） ── */
.calendar {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 14px;
  user-select: none;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-title { font-size: 15px; font-weight: 800; }
.cal-nav {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  line-height: 1;
}
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.cal-nav:active:not(:disabled) { transform: scale(.92); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
}
.cal-dow.sun { color: var(--ng-text); }
.cal-dow.sat { color: var(--primary); }
.cal-day {
  aspect-ratio: 1 / 1;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all .1s;
}
.cal-day.sun { color: var(--ng-text); }
.cal-day.sat { color: var(--primary); }
.cal-day:active:not(.past) { transform: scale(.9); }
.cal-day.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cal-day.range-start {
  background: #FEF3C7;
  border-color: #F59E0B;
  border-style: dashed;
  color: #92400E;
}
.cal-day.past {
  opacity: .3;
  cursor: not-allowed;
  background: var(--none-bg);
}

/* ── 選択中の日付チップ ── */
.selected-dates { margin-top: 12px; }
.sel-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.sel-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sel-chip {
  padding: 6px 10px;
  border-radius: 16px;
  border: 1.5px solid var(--primary);
  background: #EFF6FF;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.sel-chip:active { transform: scale(.94); }

/* ── チップ（間隔選択） ── */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .1s;
}
.chip:active { transform: scale(.94); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── 候補時間ボタン ── */
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.time-btn {
  padding: 9px 0;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .1s;
}
.time-btn:active { transform: scale(.94); }
.time-btn.sel {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── 日ごとの候補時間（アコーディオン） ── */
.day-time {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}
.day-time.open { border-color: var(--primary); }
.day-time-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #1F2937);
  cursor: pointer;
}
.day-time.open .day-time-head { background: #EFF6FF; }
.dt-date { flex: 1; text-align: left; }
.dt-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #EFF6FF;
  border-radius: 12px;
  padding: 3px 10px;
}
.day-time.open .dt-count { background: #fff; }
.dt-caret {
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--muted);
  transition: transform .15s;
}
.day-time.open .dt-caret { transform: rotate(90deg); }
.day-time .time-grid { padding: 8px 14px 14px; }
.dt-actions { padding: 10px 14px 0; }
.dt-all {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #EFF6FF;
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  padding: 5px 12px;
  cursor: pointer;
}
.dt-all:active { transform: scale(.94); }
.add-time-row { display: flex; gap: 8px; align-items: center; }
.add-time-row input[type="time"],
.add-time-row input[type="number"] {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
#add-extra { white-space: nowrap; }
#interval-chips .iv-input,
#fb-dur-chips .iv-input {
  width: 72px; padding: 7px 10px;
  border: 1.5px solid var(--border); border-radius: 20px;
  font-size: 13px; font-weight: 700; font-family: inherit;
  background: #fff; color: var(--text); text-align: center;
}
#interval-chips .iv-input:focus,
#fb-dur-chips .iv-input:focus { border-color: var(--primary); outline: none; }
.extra-chip { border-color: var(--primary); color: var(--primary-dark); background: #EFF6FF; }

/* ── スロットプレビュー ── */
.slot-preview {
  background: var(--none-bg);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}
.slot-count { font-size: 28px; font-weight: 800; color: var(--primary); }

/* ── スケジュールテーブル共通 ── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.schedule-table {
  border-collapse: collapse;
  min-width: max-content;
  width: 100%;
}
.schedule-table th,
.schedule-table td {
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

/* 日付ヘッダー */
.schedule-table .th-date {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}
/* 時間ヘッダー（2行目） */
.schedule-table .th-time {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
}
/* 左端の固定列 */
.schedule-table .td-sticky {
  background: #F8FAFF;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 5px 10px;
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 2px solid var(--border);
  min-width: 64px;
}
.schedule-table thead .td-sticky {
  background: var(--primary);
  color: rgba(255,255,255,.9);
  z-index: 3;
}

/* ── 回答ページ：回答セル ── */
.answer-cell { padding: 3px; width: 48px; min-width: 48px; }
.answer-btn {
  width: 42px;
  height: 34px;
  border: 1.5px solid var(--none-border);
  border-radius: 6px;
  background: var(--none-bg);
  font-size: 15px;
  cursor: pointer;
  transition: transform .1s, background .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.answer-btn:active { transform: scale(.88); }
.answer-btn.ok    { background: var(--ok-bg);    border-color: var(--ok-text); }
.answer-btn.ng    { background: var(--ng-bg);    border-color: var(--ng-text); }
.answer-btn.maybe { background: var(--maybe-bg); border-color: var(--maybe-text); }
.answer-btn.video { background: #DBEAFE;         border-color: #2563EB; }

/* ── 回答ページ：マトリクス（列＝日時／行＝✕△○📹） ── */
.opt-label { font-size: 16px; font-weight: 800; text-align: center; }
.opt-label.ng    { color: var(--ng-text); }
.opt-label.maybe { color: var(--maybe-text); }
.opt-label.ok    { color: var(--ok-text); }
.opt-label.video { color: #2563EB; }
.mx-btn {
  width: 40px;
  height: 32px;
  border: 1.5px solid var(--none-border);
  border-radius: 6px;
  background: #fff;
  color: #CBD5E1;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: transform .08s;
}
.mx-btn:active { transform: scale(.88); }
.mx-btn.sel { font-weight: 800; }
.mx-btn.sel.ng    { background: var(--ng-bg);    border-color: var(--ng-text);    color: var(--ng-text); }
.mx-btn.sel.maybe { background: var(--maybe-bg); border-color: var(--maybe-text); color: var(--maybe-text); }
.mx-btn.sel.ok    { background: var(--ok-bg);    border-color: var(--ok-text);    color: var(--ok-text); }
.mx-btn.sel.video { background: #DBEAFE;          border-color: #2563EB;           color: #2563EB; }

/* ── 回答ページ：日付タブ＋時間ごとの4ボタン ── */
.date-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.date-tab {
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.date-tab:active { transform: scale(.95); }
.date-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ans-date {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary-dark);
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
}
.ans-date:first-child { margin-top: 0; }
.ans-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.ans-time { width: 58px; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.ans-opts { display: flex; gap: 8px; flex: 1; }
.opt {
  flex: 1;
  max-width: 60px;
  height: 42px;
  border: 1.5px solid var(--none-border);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .08s;
}
.opt:active { transform: scale(.9); }
.opt.sel { font-weight: 800; }
.opt.sel.ng    { background: var(--ng-bg);    border-color: var(--ng-text); }
.opt.sel.maybe { background: var(--maybe-bg); border-color: var(--maybe-text); }
.opt.sel.ok    { background: var(--ok-bg);    border-color: var(--ok-text); }
.opt.sel.video { background: #DBEAFE;         border-color: #2563EB; }

/* ── 結果ページ：回答表示 ── */
.r-ok    { background: var(--ok-bg); }
.r-ng    { background: var(--ng-bg); }
.r-maybe { background: var(--maybe-bg); }
.r-video { background: #DBEAFE; }
.r-none  { background: var(--none-bg); color: var(--muted); }

/* 参加可カウント行 */
.count-row td {
  font-size: 12px;
  font-weight: 700;
  background: #EFF6FF;
  color: var(--primary-dark);
  padding: 5px;
}
.count-row td.best {
  background: var(--primary);
  color: #fff;
}

/* ── ヘッダーのサブ見出し（例：日程回答） ── */
.app-sub {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}
/* ヘッダー右端の「＋新規作成」ボタン（回答・結果画面から日程作成へ） */
.header-new {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #fff;
  border-radius: 12px;
  padding: 5px 12px;
  text-decoration: none;
  white-space: nowrap;
}
.header-new:active { transform: scale(.96); }
/* ヘッダー右側のボタン群（日程作成画面：使い方・新規作成・トップへ） */
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-actions .header-new { margin-left: 0; }
/* ヘッダーの「📖 使い方」ボタン（新規作成の左） */
.header-help {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.22);
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 12px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.header-help:active { transform: scale(.96); }
/* 狭い画面ではタイトルを潰さず、ボタン群を2段目に折り返す */
@media (max-width: 480px) {
  .app-header { flex-wrap: wrap; row-gap: 8px; }
  .app-header .header-actions { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
/* ── 使い方マニュアルモーダル ── */
.help-body { font-size: 13.5px; line-height: 1.7; color: var(--text); }
.hm-lead { margin: 0 0 14px; }
.hm-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 800; color: var(--text);
  margin: 18px 0 8px;
}
.hm-step:first-of-type { margin-top: 2px; }
.hm-badge {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 800; color: #fff;
  background: var(--primary);
  border-radius: 10px; padding: 2px 9px;
  white-space: nowrap;
}
.hm-sub { font-size: 13px; font-weight: 800; color: var(--primary-dark); margin: 8px 0 4px; }
.hm-list { margin: 0 0 6px; padding-left: 20px; }
.hm-list li { margin-bottom: 4px; }
.hm-foot {
  margin: 14px 0 0; padding: 10px 12px;
  background: #EFF6FF; border-radius: 10px;
  font-size: 13px;
}
/* ── 主催者リンク・回答済みメモ ── */
.host-link { margin: 4px 0 14px; }
.host-link .btn { width: 100%; }
.status-note {
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: var(--ok-bg);
  border: 1.5px solid var(--ok-text);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ok-text);
}

/* ── イベント情報 ── */
.ev-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.ev-desc  { font-size: 13px; color: var(--muted); }

/* ── URLコピーボックス ── */
.url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--none-bg);
  border-radius: 8px;
  padding: 9px 12px;
  margin-top: 6px;
}
.url-box span {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}

/* ── 送信バー（固定） ── */
.sticky-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  z-index: 9;
}

/* ── 完了画面 ── */
.success-wrap { text-align: center; padding: 28px 20px; }
.success-icon  { font-size: 48px; margin-bottom: 10px; }
.success-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.success-desc  { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.url-section   { margin-bottom: 12px; text-align: left; }
.url-label     { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }

/* ── トースト ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1E293B;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .2s ease;
  z-index: 100;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ユーティリティ ── */
.text-muted { color: var(--muted); font-size: 13px; }
.flex-gap   { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt12 { margin-top: 12px; }
.mb0  { margin-bottom: 0 !important; }

/* ── ローディング ── */
.loading-text {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ── 選択中の日付チップ（タップ＝時間設定／✕＝削除） ── */
.sel-chip { display: inline-flex; align-items: center; gap: 0; padding: 0; overflow: hidden; }
.sel-chip-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; cursor: pointer; }
.sel-chip-count {
  font-size: 11px; font-weight: 800; color: #fff; background: var(--primary);
  border-radius: 10px; padding: 1px 7px;
}
.sel-chip-x {
  border: 0; background: transparent; color: var(--primary-dark);
  font-size: 12px; font-weight: 700; padding: 6px 10px 6px 6px;
  cursor: pointer; font-family: inherit; line-height: 1;
}
.sel-chip-x:active { transform: scale(.9); }

/* ── 日付ごとの時間設定ポップアップ ── */
body.modal-open { overflow: hidden; }
/* ポップアップ表示中は「ご意見」ボタンを隠す（モーダルのボタンに重なるため） */
body.modal-open #fb-fab { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 23, 42, .5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 520px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
  animation: modal-up .2s ease;
}
@keyframes modal-up {
  from { transform: translateY(24px); opacity: .5; }
  to   { transform: translateY(0);    opacity: 1;  }
}
.modal-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 800; color: var(--text); }
.tm-applyall {
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--primary-dark); background: #EFF6FF;
  border: 1.5px solid var(--primary); border-radius: 16px;
  padding: 5px 11px; cursor: pointer; white-space: nowrap;
}
.tm-applyall:active { transform: scale(.94); }
.modal-close {
  margin-left: auto;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--none-bg); color: var(--muted);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.modal-close:active { transform: scale(.92); }
.modal-body { padding: 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tm-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tm-label { font-size: 14px; font-weight: 800; color: var(--text); }
.tm-note  { font-size: 11px; font-weight: 700; color: var(--muted); }
.tm-hint  { font-size: 12px; margin-bottom: 10px; }
.tm-expand {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #EFF6FF;
  border: 1.5px dashed var(--primary);
  border-radius: 10px;
  padding: 9px 0;
  margin: 4px 0;
  cursor: pointer;
}
.tm-expand:active { transform: scale(.98); }
.tm-divider { height: 1px; background: var(--border); margin: 18px 0; }
.modal-foot {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.modal-foot .btn { margin: 0; }
.modal-foot .btn-outline { width: auto; flex: 0 0 auto; }
.modal-foot .btn-primary { width: auto; flex: 1; }
.tm-allday-note {
  padding: 20px; text-align: center;
  background: #EFF6FF; border: 1.5px dashed var(--primary);
  border-radius: 10px; color: var(--primary-dark);
  font-size: 16px; font-weight: 800;
}

/* ── レスポンシブ ── */
@media (max-width: 480px) {
  .form-row.three { grid-template-columns: 1fr 1fr; }
  .form-row.three .form-group:last-child { grid-column: 1 / -1; }
}

/* ── マイカレンダーパネル（回答画面・Googleカレンダー表示） ── */
/* スマホ〜タブレット：アコーディオン形式（「表示する」ボタンで開閉） */
.gcal-panel {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 16px 0;
}
.gcal-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.gcal-acc-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  background: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.gcal-acc-toggle:active { background: #F8FAFF; }
.gcal-acc-icon { font-size: 22px; flex: 0 0 auto; }
.gcal-acc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gcal-acc-title { font-size: 14px; font-weight: 800; color: var(--primary); }
.gcal-acc-sub { font-size: 11.5px; color: #6B7280; line-height: 1.4; }
.gcal-acc-caret {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 12px;
  transition: transform .25s ease;
}
.gcal-card.open .gcal-acc-caret { transform: rotate(180deg); }
.gcal-acc-body { display: none; padding: 0 16px 16px; }
.gcal-card.open .gcal-acc-body { display: block; }
.gcal-pc-title { display: none; }           /* PC用タイトルはスマホでは出さない */
.gcal-test-banner {
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  color: #9A3412;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.gcal-lead { font-size: 13.5px; color: #374151; margin: 0 0 12px; line-height: 1.6; }
.gcal-login-btn { margin-bottom: 12px; }
.gcal-safety {
  list-style: none;
  padding: 12px 14px;
  margin: 0;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  font-size: 12.5px;
  color: #166534;
  line-height: 1.7;
}
.gcal-safety li + li { margin-top: 8px; }
.gcal-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  font-size: 12.5px;
  color: #1E40AF;
  line-height: 1.6;
}
.gcal-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.gcal-status { font-size: 12.5px; color: #16A34A; font-weight: 600; }
.gcal-logout-btn { width: 100%; padding: 9px 13px; font-size: 13px; border-radius: 8px; }
.gcal-foot { font-size: 11.5px; color: #6B7280; margin: 10px 0 0; line-height: 1.6; }
#gcal-calendar { font-size: 12px; }
#gcal-calendar .fc-toolbar-title { font-size: 15px; }
#gcal-calendar .fc-button { padding: 3px 8px; font-size: 12px; }

/* PC（広い画面）では左＝カレンダー／右＝回答の2ペイン（アコーディオンなし・常時表示） */
@media (min-width: 1100px) {
  .page-split {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 1280px;
    margin: 0 auto;
  }
  .gcal-panel {
    display: block;
    flex: 0 0 520px;
    position: sticky;
    top: 12px;
    padding: 16px 0 16px 16px;
    max-width: none;
    margin: 0;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
  .gcal-card { margin-bottom: 0; padding: 20px; overflow: visible; }
  .gcal-acc-toggle { display: none; }
  .gcal-pc-title { display: flex; }
  .gcal-acc-body { display: block; padding: 0; }
  .page-split .container { flex: 1 1 auto; min-width: 0; }
  .page-split .page-main { flex: 1 1 auto; min-width: 0; }
  .page-split .page-main .container { max-width: 700px; }
}

/* ── 空き時間から選ぶモード（作成画面・gcal-slots.js） ── */
.pick-mode-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.pick-mode-btn {
  flex: 1 1 0;
  padding: 12px 8px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #6B7280;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.pick-mode-btn.active {
  border-color: var(--primary);
  background: #EFF4FF;
  color: var(--primary);
}
.pick-mode-btn:active { transform: scale(.97); }

.fb-period-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fb-period-row input[type="date"] {
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}
.fb-kara { font-size: 13px; color: #6B7280; }
#fb-end-wrap { display: flex; align-items: center; gap: 6px; }

.fb-holiday-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
}
.fb-holiday-check input { width: 17px; height: 17px; accent-color: var(--primary); }

/* 対象日カレンダー：祝日マーク */
.cal-day.fb-holiday-day { position: relative; }
.fb-holiday-dot {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 8px;
  color: #DC2626;
  font-weight: 700;
  line-height: 1;
}

/* 検索結果 */
.fb-results-head {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #374151;
}
.fb-day {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.fb-day-head {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fb-day-off-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #6B7280;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.fb-day-off-btn:active { transform: scale(.96); }
.fb-day-off { background: #F9FAFB; }
.fb-day-off .fb-day-head span { color: #9CA3AF; }
.fb-day-off-note {
  font-size: 12px;
  color: #9CA3AF;
}
.fb-holiday-tag { font-size: 11.5px; font-weight: 600; color: #DC2626; }
.fb-block { margin-bottom: 10px; }
.fb-block:last-child { margin-bottom: 0; }
.fb-block-free {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 6px;
}
.fb-cand.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.fb-shift-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #F8FAFF;
  color: var(--primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.fb-shift-btn:active { transform: scale(.96); }
.fb-manual-btn {
  margin-top: 8px;
  margin-left: 8px;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #F8FAFF;
  color: var(--primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.fb-manual-btn:active { transform: scale(.96); }
.fb-manual-btn:first-child,
.fb-block + .fb-manual-btn { margin-left: 0; }
.fb-manual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.fb-manual-time {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}
.fb-manual-dur {
  font-size: 12.5px;
  color: #6B7280;
}
.fb-manual-add {
  padding: 6px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.fb-manual-add:active { transform: scale(.96); }

#fb-search-btn { margin-top: 4px; }
#fb-note { margin-top: 10px; }
#fb-preview { margin-top: 14px; }
