/* WannaSched ゲスト回答 Web（CF Pages 静的配信）
 * 仕様: docs/local/specs/wanna-sched/guest-web.md §4 セピア CSS
 * design-system §4 トークンを CSS 変数で写経する。
 */

:root {
  --bg-top: #f0e6d2;
  --bg-bot: #e2d2b4;
  --surface: #f8f0de;
  --subtle: #eee3cb;
  --accent: #a8531e;
  --accent-tint: #ead6b8;
  --ink: #3e3326;
  --sub: #6e6150;
  --line: #d5c5a6;
  --warn: #9e3a28;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bot));
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  min-height: 100vh;
  padding-bottom: 96px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.title {
  font-size: 26px;
  margin: 4px 0 4px;
  font-weight: 400;
}

.organizer { color: var(--sub); margin-bottom: 12px; font-size: 14px; }

.name-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 16px;
}

/* 1 候補を縦に圧縮（端末アプリ 07-answer と同方針）。日付＋○△× を 1 行に並べ、
   できるだけ多くの候補を 1 画面に収める。△ 選択時のみ時刻条件を下に展開する。 */
.candidate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.candidate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.candidate-date { font-size: 15px; }

.choices {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.choice {
  width: 48px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-top);
  color: var(--sub);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.choice[aria-pressed="true"] {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* △ の「補足」折りたたみ（アプリ回答画面と同 UI・変更予定日はゲスト web には無い・
   ユーザー指示 2026-07-02）。ヘッダをタップで body を開閉、既定は閉じる。 */
.supplement { margin-top: 10px; }
.supp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}
.supp-header-text { font-weight: 600; }
.supp-caret { font-size: 12px; }
.supp-header[aria-expanded="true"] .supp-caret { transform: rotate(180deg); display: inline-block; }
.supp-body { padding-top: 4px; }
.supp-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.supp-label { color: var(--sub); font-size: 12px; min-width: 40px; }
.time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-row input[type="time"] {
  background: var(--bg-top);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--ink);
  min-height: 44px;
}
.time-sep { color: var(--sub); font-size: 13px; }

.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
}
.cta button {
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.cta button[disabled] { opacity: .6; cursor: default; }

.loading, .error, .completed { color: var(--sub); text-align: center; padding: 32px 0; }
.error { color: var(--warn); }

/* 確定済時の読み取り専用表示（Codex 06-19 06:30 P2 #7） */
.confirmed-status {
  display: inline-block;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 12px;
}
.my-name { color: var(--sub); font-size: 14px; margin-bottom: 8px; }
.candidate-confirmed {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.readonly-note { color: var(--sub); font-size: 13px; margin-top: 16px; text-align: center; }

/* 確定後の「他の候補」の見出し。開催日の並びと区切るだけなので面は持たせない。 */
.other-candidates-label { color: var(--sub); font-size: 13px; margin: 16px 0 8px; }

/* #142: 未導入者向け獲得バナー（最上部・訴求＋App Store CTA）と予定詳細折りたたみ。 */
.acq-banner {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  text-align: center;
}
.acq-pitch { color: var(--ink); font-size: 13px; margin: 0 0 8px; }
.appstore-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  min-height: 24px;
  line-height: 24px;
}
.event-details { margin-bottom: 12px; }
.details-header {
  display: flex; align-items: center; gap: 6px; width: 100%;
  border: none; background: transparent; color: var(--accent);
  padding: 8px 0; min-height: 44px; cursor: pointer;
}
.details-header[aria-expanded="true"] .supp-caret { transform: rotate(180deg); display: inline-block; }
.details-body { padding: 4px 0 8px; }
.detail-line { color: var(--ink); font-size: 14px; margin: 4px 0; }
.detail-label { color: var(--sub); font-size: 12px; min-width: 40px; display: inline-block; }
.detail-url { color: var(--accent); font-size: 14px; word-break: break-all; }

/* --- グループ招待フォールバック（要点ごとに改行）: 段落を要点ごとに区切り、
 *     手順は箇条書きにする。CSP default-src 'self' のためインライン style/script は使えない。 */
.invite-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-bottom: 16px;
}
.invite-section h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}
.invite-steps {
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
  margin: 0;
  padding-left: 18px;
}
.invite-steps li { margin-bottom: 4px; }
