/* ============================================================
   White Eagles 出欠管理 — スタイル
   チームカラー #1F1F29 / アクセント（ロゴのスカイブルー）#2FA9DE
   ============================================================ */

/* ── Design tokens ── */
:root {
  --team:   #1F1F29;
  --team-2: #2A2A38;
  --accent: #2FA9DE;
  --accent-deep: #1786B8;
  --bg:     #F3F4F7;
  --card:   #FFFFFF;
  --line:   #E4E6EC;
  --ink:    #1F1F29;
  --mute:   #8A8D99;
  --green:  #0E7F5B; /* チームカラー（ネイビー×スカイブルー）に馴染む青寄りの緑 */
  --red:    #B5261E;
  --r: 6px;
  --shadow: 0 1px 2px rgba(31,31,41,.05), 0 2px 8px rgba(31,31,41,.05);
}

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

body {
  font-family: -apple-system, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--ink);
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  height: 100dvh;
}

button { font-family: inherit; }
button:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { display: flex; flex-direction: column; height: 100%; }

/* ── ローディング（スプラッシュ兼用） ── */
.loading-screen {
  position: fixed; inset: 0; z-index: 900;
  background: var(--team);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  max-width: 480px; margin: 0 auto;
  transition: opacity .4s ease, visibility .4s;
}
.loading-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo { width: 200px; height: auto; }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,.15);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .loading-screen { transition: none; }
}

/* ── ロール選択（初回登録）画面 ── */
.role-screen {
  position: fixed; inset: 0; z-index: 800;
  background: var(--team);
  max-width: 480px; margin: 0 auto;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 32px 28px;
}
.role-screen.show { display: flex; }
.role-logo { width: 172px; height: auto; margin-bottom: 8px; }
.role-screen h2 { font-size: 17px; font-weight: 700; color: #fff; }
.role-lead { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.role-step { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.role-btn {
  width: 100%; padding: 16px 18px;
  background: rgba(47,169,222,.08);
  border: 2px solid var(--accent); border-radius: var(--r);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left;
}
.role-btn:active { background: rgba(47,169,222,.22); }
.role-btn-main { font-size: 16px; font-weight: 700; }
.role-confirm-label { font-size: 22px; font-weight: 700; color: var(--accent); margin: 2px 0 6px; }
.role-name-note { font-size: 13px; color: rgba(255,255,255,.55); margin: -8px 0 14px; }
.role-confirm-btn {
  width: 100%; padding: 16px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--r);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.role-confirm-btn:active { opacity: .85; }
.role-confirm-btn:disabled { background: #555; }
.role-back-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.45); font-size: 13px; margin-top: 4px;
}

/* ── エラー / メンテナンス画面 ── */
.error-screen {
  position: fixed; inset: 0; z-index: 850;
  background: var(--team);
  max-width: 480px; margin: 0 auto;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 32px; text-align: center;
}
.error-screen.show { display: flex; }
.error-screen h2 { font-size: 18px; font-weight: 700; color: #fff; }
.error-screen p { font-size: 14px; color: rgba(255,255,255,.65); line-height: 1.6; }

/* ── ヘッダー ── */
.header {
  background: var(--team);
  color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; z-index: 100;
  border-bottom: 2px solid var(--accent);
}
.header-logo { flex: 1; min-width: 0; }
.header-logo img { display: block; }
.header-icon-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.65); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.header-icon-btn:active { color: #fff; }

/* ── 管理者モードバー ── */
.admin-bar {
  display: none;
  background: #15151D;
  padding: 8px 12px;
  align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(47,169,222,.35);
  flex-shrink: 0;
}
.admin-bar-label {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 2px 7px; border-radius: 3px;
}
.admin-seg {
  display: flex; margin-left: auto;
  border: 1px solid #3A3A4A; border-radius: 16px; overflow: hidden;
}
.admin-seg button {
  background: none; border: none; cursor: pointer;
  color: #9A9DA8; font-size: 11px; font-weight: 600; padding: 5px 12px;
}
.admin-seg button.active { background: var(--accent); color: #fff; }

/* ── タブ ── */
.tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.tab {
  flex: 1; padding: 13px 0; text-align: center;
  font-size: 12px; font-weight: 600; color: #999;
  cursor: pointer; border-bottom: 2px solid transparent;
  letter-spacing: .4px; transition: color .2s;
}
.tab.active { color: var(--team); border-bottom-color: var(--accent); }

.tab-body { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
#tab-list-wrap { flex: 1; display: none; flex-direction: column; overflow: hidden; min-height: 0; }
#list-content { flex: 1; overflow-y: auto; min-height: 0; }
.content { padding: 12px; }

/* ── ホーム ── */
.home-greeting {
  background: var(--team);
  border-radius: var(--r);
  padding: 13px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 13px; font-weight: 600;
}
.home-greeting strong { color: var(--accent); }
.greeting-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px;
}
.greeting-icon.warn { background: var(--red); }

.home-section-title {
  font-size: 12px; font-weight: 700; color: var(--mute);
  padding: 4px 2px 8px; letter-spacing: .5px;
}
.home-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 16px; gap: 8px; text-align: center;
}
.home-empty-text { font-size: 15px; font-weight: 600; color: #bbb; }
.home-empty-sub { font-size: 13px; color: #ccc; line-height: 1.5; }

.pending-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 10px; overflow: hidden; position: relative;
}
.pending-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--red);
}
.pending-body { padding: 14px 16px 14px 19px; cursor: pointer; }
.pending-title-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; gap: 8px; }
.pending-name { font-size: 14px; font-weight: 700; }
.pending-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--red); border: 1px solid var(--red);
  padding: 2px 7px; border-radius: 3px; white-space: nowrap;
}
.pending-meta { font-size: 12px; color: #555; }
.pending-count { font-size: 11px; color: var(--mute); margin-top: 3px; }
.pending-actions { display: flex; border-top: 1px solid var(--line); }
.pending-btn {
  flex: 1; padding: 12px 0; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.pending-btn.join { background: var(--green); color: #fff; }
.pending-btn.absent { background: var(--card); color: var(--red); border-left: 1px solid var(--line); }
.pending-btn.detail { background: var(--card); color: #666; border-left: 1px solid var(--line); font-size: 12px; font-weight: 500; flex: none; width: 68px; }

/* ── イベントカード ── */
.event-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 8px; cursor: pointer;
  display: flex; align-items: center; overflow: hidden;
  transition: opacity .15s;
}
.event-card:active { opacity: .75; }
.event-date-block {
  width: 52px; flex-shrink: 0; text-align: center;
  padding: 12px 8px; border-right: 1px solid var(--line);
}
.event-month { font-size: 10px; color: var(--mute); font-weight: 500; letter-spacing: .5px; }
.event-day { font-size: 22px; font-weight: 800; line-height: 1.1; }
.event-weekday { font-size: 10px; color: var(--mute); font-weight: 500; margin-top: 1px; }
.event-weekday.sun { color: var(--red); }
.event-weekday.sat { color: #1F4B8F; }
.event-body { flex: 1; padding: 12px 14px; min-width: 0; }
.event-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.event-title-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.event-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; flex-shrink: 0;
}
.tag-join { background: #E2F2EC; color: var(--green); }
.tag-absent { background: #FDECEA; color: var(--red); }
.tag-pending { background: #FFF8E1; color: #B45309; }
.tag-past { background: #F0F1F4; color: #888; }
.aud-badge {
  font-size: 9px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
  color: var(--accent-deep); border: 1px solid var(--accent);
  padding: 1px 6px; border-radius: 3px;
}
.event-time { font-size: 11.5px; color: #666; margin-bottom: 7px; }
.event-progress { display: flex; align-items: center; gap: 8px; }
.progress-bar { flex: 1; height: 3px; background: #EBECF1; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.progress-text { font-size: 10px; color: var(--mute); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── カレンダー ── */
.calendar-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 12px;
}
.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.cal-nav-btn { background: none; border: none; font-size: 22px; color: var(--mute); cursor: pointer; padding: 4px 10px; border-radius: var(--r); }
.cal-nav-btn:active { background: var(--bg); }
.cal-month { font-size: 16px; font-weight: 800; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  text-align: center; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; color: var(--mute); padding: 0 8px 6px;
}
.cal-weekdays span:first-child { color: var(--red); }
.cal-weekdays span:last-child { color: #1F4B8F; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); padding: 0 8px 12px; gap: 2px; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 4px; border-radius: var(--r); cursor: pointer;
}
.cal-day:active { background: var(--bg); }
.cal-day.today .day-num { background: var(--accent); color: #fff; border-radius: 50%; }
.cal-day.selected { background: #E7F5FC; }
.cal-day.sunday .day-num { color: var(--red); }
.cal-day.saturday .day-num { color: #1F4B8F; }
.cal-day.other-month .day-num { color: #ccc; }
.day-num {
  font-size: 13px; font-weight: 500;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.day-dots { display: flex; gap: 2px; margin-top: 2px; flex-wrap: wrap; justify-content: center; }
.day-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.legend { display: flex; gap: 12px; padding: 0 4px 12px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #555; }

.day-events {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 12px;
}
.day-events-header { padding: 10px 16px; background: var(--team); font-size: 13px; font-weight: 700; color: #fff; }
.day-event-row { padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; border-top: 1px solid var(--line); }
.day-event-row:first-child { border-top: none; }
.day-event-row:active { background: var(--bg); }
.day-event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.day-event-info { flex: 1; }
.day-event-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.day-event-time { font-size: 12px; color: var(--mute); margin-top: 2px; }
.day-no-events { padding: 20px 16px; text-align: center; color: #bbb; font-size: 14px; }

/* ── 一覧 ── */
#list-filters { display: flex; gap: 8px; padding: 12px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.filter-chip {
  flex-shrink: 0; padding: 7px 16px;
  border: 1.5px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 12px; font-weight: 700;
  color: #888; cursor: pointer;
}
.filter-chip.active {
  background: var(--team); border-color: var(--team); color: #fff;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.filter-chip.past { color: #aaa; }
.filter-chip.past.active { background: #757575; border-color: #757575; box-shadow: none; color: #fff; }
.section-header { display: flex; align-items: center; gap: 8px; padding: 8px 4px; margin-bottom: 6px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.section-badge { font-size: 10px; font-weight: 800; background: var(--team); color: #fff; padding: 2px 7px; border-radius: 3px; }

/* ── FAB ── */
.fab {
  position: fixed; bottom: 24px; right: max(24px, calc(50% - 216px));
  width: 52px; height: 52px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--team); border-radius: 50%;
  font-size: 26px; line-height: 1;
  box-shadow: 0 6px 20px rgba(47,169,222,.45), 0 2px 6px rgba(0,0,0,.15);
  cursor: pointer; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.fab:active { transform: scale(.92); }

/* ── 詳細画面 ── */
.detail-screen {
  display: none; position: fixed; inset: 0;
  background: var(--bg); max-width: 480px; margin: 0 auto;
  z-index: 200; flex-direction: column;
}
.detail-screen.open { display: flex; }
.detail-header {
  background: var(--team); color: #fff;
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--accent); flex-shrink: 0;
}
.detail-header-text { flex: 1; min-width: 0; }
.back-btn { background: none; border: none; color: rgba(255,255,255,.85); font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1; }
.icon-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.85); flex-shrink: 0;
}
.icon-btn:active { background: rgba(255,255,255,.2); }
.detail-title { font-size: 16px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-subtitle { font-size: 11px; opacity: .7; margin-top: 2px; }
.detail-body { padding: 12px; flex: 1; overflow-y: auto; }

.info-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.info-card h3 { font-size: 12px; color: var(--mute); margin-bottom: 12px; font-weight: 700; letter-spacing: .5px; }
.memo-text { font-size: 14px; color: #444; margin-top: -4px; white-space: pre-wrap; line-height: 1.6; }

.stats-row { display: flex; gap: 10px; }
.stat-box { flex: 1; text-align: center; padding: 12px 8px; border-radius: var(--r); }
.stat-box.green { background: #E2F2EC; }
.stat-box.red { background: #FDECEA; }
.stat-box.gray { background: #F0F1F4; }
.stat-num { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-box.green .stat-num { color: var(--green); }
.stat-box.red .stat-num { color: var(--red); }
.stat-box.gray .stat-num { color: #757575; }
.stat-label { font-size: 11px; color: var(--mute); margin-top: 3px; }

.member-role-label { font-size: 10px; font-weight: 700; color: var(--mute); letter-spacing: .5px; margin: 10px 0 6px; }
.member-role-label:first-child { margin-top: 0; }
.member-list { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip {
  display: flex; align-items: center; gap: 6px;
  border-radius: 20px; padding: 5px 12px 5px 5px;
  font-size: 12px; font-weight: 600;
}
.member-chip.joined { background: #E2F2EC; color: var(--green); }
.member-chip.absent { background: #FDECEA; color: var(--red); }
.member-chip.pending { background: #FFF8E1; color: #B45309; }
.member-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.member-chip.joined .member-avatar { background: var(--green); }
.member-chip.absent .member-avatar { background: var(--red); }
.member-chip.pending .member-avatar { background: #D97706; }
.member-avatar-img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* コメント */
.comments-empty { font-size: 13px; color: #bbb; padding: 4px 0; }
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f2; }
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.comment-body-wrap { flex: 1; min-width: 0; }
.comment-name { font-size: 11px; font-weight: 700; color: #555; margin-bottom: 2px; }
.comment-text { font-size: 14px; color: #333; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.comment-time { font-size: 11px; color: #bbb; margin-top: 3px; }
.comment-actions { display: flex; gap: 8px; margin-top: 4px; }
.comment-action-btn {
  font-size: 11px; color: var(--mute); background: none; border: none;
  padding: 0; cursor: pointer; text-decoration: underline;
}
.comment-action-btn.delete { color: #c62828; }
.comment-action-btn.cancel { color: #aaa; }
.comment-edit-input {
  width: 100%; margin-top: 4px; padding: 6px 10px;
  border: 1.5px solid var(--accent); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit;
}
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-input {
  flex: 1; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 20px;
  font-size: 14px; outline: none; font-family: inherit;
}
.comment-input:focus { border-color: var(--accent); }
.comment-send-btn {
  background: var(--accent); color: #fff; border: none;
  border-radius: 20px; padding: 8px 14px;
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}

.action-bar {
  background: var(--card); padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; flex-shrink: 0;
}
.btn { flex: 1; padding: 14px; border: none; border-radius: var(--r); font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.btn:active { opacity: .8; }
.btn-join { background: var(--green); color: #fff; }
.btn-absent { background: var(--card); color: var(--red); border: 1.5px solid var(--line); }
.btn-disabled { background: #F0F1F4; color: #888; }

/* ── 削除確認ダイアログ ── */
.dialog-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(31,31,41,.55); z-index: 300;
  align-items: flex-end; justify-content: center;
}
.dialog-overlay.open { display: flex; }
.dialog {
  background: var(--card); border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px; width: 100%; max-width: 480px;
}
.dialog h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.dialog p { font-size: 14px; color: #666; margin-bottom: 20px; line-height: 1.6; }
.dialog-btns { display: flex; flex-direction: column; gap: 10px; }
.dialog-btn { padding: 14px; border: none; border-radius: var(--r); font-size: 15px; font-weight: 700; cursor: pointer; }
.dialog-btn.danger { background: var(--red); color: #fff; }
.dialog-btn.primary { background: var(--accent); color: #fff; }
.dialog-btn.cancel { background: #f2f3f5; color: #555; }

/* 設定シート内のセクション（ホーム画面に追加 など） */
.settings-section { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.settings-section-title { font-size: 12px; color: #888; font-weight: 700; letter-spacing: .5px; margin-bottom: 8px; }
.settings-guide-desc { font-size: 12px; color: var(--mute); line-height: 1.7; margin-bottom: 10px; }
.settings-copy-btn {
  width: 100%; padding: 11px; background: #fff; color: var(--accent-deep);
  border: 1.5px solid var(--accent); border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}

/* 出欠の代理編集（管理者のみ） */
.member-chip.editable { cursor: pointer; box-shadow: 0 0 0 1.5px currentColor inset; }
.att-status-btn { padding: 14px; border: none; border-radius: var(--r); font-size: 15px; font-weight: 700; cursor: pointer; }
.att-status-btn.join { background: #E2F2EC; color: var(--green); }
.att-status-btn.absent { background: #FDECEA; color: var(--red); }
.att-status-btn.pending { background: #F0F1F4; color: #757575; }

/* ── 作成・設定シート ── */
.create-sheet {
  display: none; position: fixed; inset: 0;
  background: rgba(31,31,41,.55); z-index: 300;
  align-items: flex-end; justify-content: center;
}
.create-sheet.open { display: flex; }
.create-body {
  background: var(--card); border-radius: 20px 20px 0 0;
  padding: 20px 20px 36px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.create-sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.create-sheet-header h3 { font-size: 17px; font-weight: 700; }
.create-close-btn { background: #f2f3f5; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 14px; color: #888; cursor: pointer; }
.create-label { font-size: 12px; color: #888; font-weight: 600; margin-bottom: 6px; margin-top: 14px; }
.create-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  font-size: 15px; outline: none; font-family: inherit;
}
.create-input:focus { border-color: var(--accent); }
.event-name-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.event-name-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r);
  font-size: 14px; font-weight: 600; color: #555;
  cursor: pointer; background: var(--card);
}
.event-name-chip.selected { border-color: var(--team); border-width: 2px; background: var(--team); color: #fff; }
.event-name-chip .chip-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.time-row { display: flex; gap: 8px; align-items: center; }
.time-row .create-input { flex: 1; }
.place-chip {
  padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 14px; color: #555;
  cursor: pointer; font-weight: 500;
}
.place-chip.selected { background: var(--team); border-color: var(--team); color: #fff; }
.place-chip.other { color: #aaa; }
.place-chip.other.selected { background: #888; border-color: #888; color: #fff; }
.aud-help { font-size: 11px; color: #a0a3ae; margin-top: 8px; line-height: 1.5; }
.past-attendee-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.past-attendee-row:last-child { border-bottom: none; }
.past-attendee-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.past-attendee-role { font-size: 10px; color: var(--mute); min-width: 38px; font-weight: 600; }
.past-attendee-name { font-size: 13px; font-weight: 500; }
.past-attendee-row.checked .past-attendee-name { font-weight: 700; }
.create-submit {
  width: 100%; padding: 14px; margin-top: 20px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--r);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.create-submit:active { opacity: .85; }
.create-submit:disabled { background: #a8b2bb; }
.create-cancel { width: 100%; padding: 12px; border: none; background: none; color: #aaa; font-size: 14px; margin-top: 6px; cursor: pointer; }

/* ── トースト ── */
.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--team); color: #fff; border: 1px solid rgba(47,169,222,.5);
  padding: 10px 20px; border-radius: 24px;
  font-size: 14px; opacity: 0;
  transition: all .3s; pointer-events: none;
  white-space: nowrap; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
