:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text-strong: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --error: #dc2626;

  /* ===== アクセント色（配色の単一の出所 / single source） =====
     アプリ本体(app/)のアクセント = ティール #1e8dae。
     姉妹アプリ Placory（/Users/rroot/Desktop/risho-app/）の public/index.html と統一。
     ここ1か所を変えればボタン/アクティブ状態/リンク強調などに反映される。
     ※ ホーム(home/)はブルー系（KarukuLab --kl-primary #2563eb）を別途使用。 */
  --accent: #1e8dae; /* 主要アクセント：ボタン/アクティブ状態/リンク強調 */
  --accent-dark: #1a7894; /* hover/pressed/ダーク系（#1e8dae を基準に少し濃く） */
  --accent-soft: #e3f6fc; /* 淡いティールの下地（選択/アクティブ背景）＝ Placory --surface-accent */
  --focus-ring: 0 0 0 4px rgba(30, 141, 174, 0.18); /* teal フォーカスリング（Placory 流儀） */

  /* 後方互換エイリアス（--primary を参照する既存コードが壊れないように） */
  --primary: var(--accent);
  --primary-dark: var(--accent-dark);

  /* 募集状況の色（カレンダー） */
  --open: #16a34a; /* 募集中（空き） */
  --full: #9ca3af; /* 満員 */
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* 画面遷移スライド中に子がはみ出しても横スクロールを出さない（clip は縦軸を巻き込まない） */
  overflow-x: clip;
}

/* 画面遷移アニメーション（back=左から / forward=右から入ってくる）。
   #app 自体ではなく画面要素を動かす（body の横スクロールを防ぐ）。 */
@keyframes nav-from-left {
  from {
    transform: translateX(-32px);
    opacity: 0.35;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes nav-from-right {
  from {
    transform: translateX(32px);
    opacity: 0.35;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.nav-back {
  animation: nav-from-left 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-forward {
  animation: nav-from-right 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .nav-back,
  .nav-forward {
    animation: none;
  }
}

.screen {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ヒーロー */
.hero {
  text-align: center;
  padding: 24px 8px 8px;
}
.brand {
  line-height: 0;
  margin: 0 0 8px;
}
.brand-logo {
  display: block;
  width: min(100%, 400px);
  height: auto;
  margin: 0 auto;
}
.lead {
  color: var(--muted);
  margin: 0;
}

/* カード */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card h2,
.card h3 {
  margin: 0;
}
.placeholder {
  color: var(--muted);
}
.placeholder ul {
  margin: 0;
  padding-left: 1.2em;
}

/* フォーム */
.label {
  font-weight: 600;
  font-size: 0.9rem;
}
.input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}
.error {
  color: var(--error);
  font-size: 0.9rem;
  margin: 0;
}

/* ボタン */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:hover {
  background: #f9fafb;
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
/* 主要アクション：ティールアクセント（Placory の .btn = teal 流儀） */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
/* 副次アクション（Placory の .btn-secondary 流儀：中立グレー） */
.btn-secondary {
  background: #eef2f7;
  border-color: var(--border);
  color: var(--text-strong);
}
.btn-secondary:hover {
  background: #e2e8f0;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn-danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}
.danger-zone {
  border-color: #fecaca;
}
.danger-zone > h3 {
  color: var(--error);
}
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-row .btn {
  flex: 1 1 auto;
}

/* トップバー */
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-sm {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand-logo-sm {
  display: block;
  width: 128px;
  height: auto;
}
.spacer {
  flex: 1;
}
.user-chip {
  font-size: 0.85rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.user-chip .icon {
  color: var(--accent);
}
.topbar-title {
  font-size: 1.1rem;
  margin: 0;
}

/* アイコンボタン（戻る/設定/月送り/削除など） */
.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
}
/* アイコンボタンの通知バッジ（承認待ち人数など）。右上に重ねる。 */
.btn-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* display 指定が UA の [hidden] を上書きするため、明示的に非表示にする（0件で消す） */
.btn-badge[hidden] {
  display: none;
}
.icon-btn:hover {
  background: #f9fafb;
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.icon-btn:disabled:hover {
  background: #fff;
}
.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.icon-btn.danger {
  color: var(--error);
  border-color: transparent;
  background: transparent;
}

/* フォーム部品 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.15em;
}
.input.cap {
  width: 92px;
  flex: 0 0 auto;
}
.btn.sm {
  padding: 6px 12px;
  font-size: 0.9rem;
}
.pad {
  padding: 16px;
}

/* 曜日チップ */
.weekday-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weekday-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.weekday-chip input {
  accent-color: var(--accent);
}

/* 行追加（入力＋ボタン） */
.add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.add-row .input {
  flex: 1 1 auto;
}
.subfield {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* 日付チップ */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}
.chip-x {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* リスト */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  flex-wrap: wrap;
}
.list-item.link {
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
}
/* ホバー色はマウス端末のみ（タッチではタップ後に色が残る＝誤った行が選択中に見える問題を防ぐ） */
@media (hover: hover) {
  .list-item.link:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
  }
}
/* 選択中（モーダルを開いているメンバー）の行を明示ハイライト */
.list-item.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.list-item-title {
  flex: 1 1 auto;
  font-weight: 600;
}
.badge {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
/* メンバー行の操作ボタン群（昇格/降格/削除）。狭い画面では折り返す。 */
.member-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  justify-content: flex-end;
}

/* 参加コード表示 */
.code-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.code {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  flex: 1 1 auto;
}
/* 参加方法（オープン参加トグル・URL・QR） */
.switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
.switch-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.hint.warn {
  color: #b45309;
  font-weight: 600;
}
.qr-box {
  display: flex;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.qr-box svg {
  width: 200px;
  height: 200px;
  max-width: 100%;
}
.qr-actions {
  display: flex;
  justify-content: center;
}
.join-url {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.url-text {
  flex: 1 1 200px;
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

/* 承認待ちカード */
.card.pending {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* 枠タブ */
/* 枠の選択（プルダウン） */
.slot-select-card {
  padding-top: 14px;
  padding-bottom: 14px;
}
.slot-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.slot-select-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  flex: 0 0 auto;
}
.slot-select {
  flex: 1 1 auto;
  min-width: 0;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 36px 10px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  /* 右端に下向き矢印（インライン SVG）。teal アクセント。 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231e8dae' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.slot-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* カレンダー */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  margin-top: 8px;
}
.cal-dow-cell {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 2px 0;
}
.cal-dow-cell.sun {
  color: #dc2626;
}
.cal-dow-cell.sat {
  color: #2563eb;
}
.cal-cell {
  position: relative;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fff;
}
.cal-cell.out {
  background: transparent;
}
.cal-cell.out .cal-day {
  color: #cbd5e1;
}
.cal-day {
  font-size: 0.78rem;
  color: var(--text);
  align-self: flex-start;
}
.cal-cell.sun .cal-day {
  color: #dc2626;
}
.cal-cell.sat .cal-day {
  color: #2563eb;
}
.cal-cell.target {
  border-color: var(--border);
}
.cal-badge {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}
.cal-cell.open {
  background: #eafaf0;
  border-color: #bbf7d0;
}
.cal-cell.open .cal-badge {
  color: #15803d;
}
.cal-cell.full {
  background: #f3f4f6;
  border-color: #e5e7eb;
}
.cal-cell.full .cal-badge,
.cal-cell.full .cal-day {
  color: #9ca3af;
}
.cal-cell.mine {
  background: var(--accent);
  border-color: var(--accent-dark);
}
.cal-cell.mine .cal-day,
.cal-cell.mine .cal-badge {
  color: #fff;
}
.cal-cell.clickable {
  cursor: pointer;
}
.cal-cell.clickable:hover {
  filter: brightness(0.97);
}
.cal-cell.clickable:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* 凡例 */
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.legend-dot.open {
  background: #eafaf0;
  border: 1px solid #bbf7d0;
}
.legend-dot.full {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.legend-dot.mine {
  background: var(--accent);
}

.group-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* トースト */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 80;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* アイコン（Placory 風ライン SVG） */
.icon {
  display: block;
  flex: 0 0 auto;
}
.btn.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn.block {
  width: 100%;
}

/* 詳細パネル（モーダル） */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal-panel {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: modal-in 0.16s ease-out;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 8px;
}
.modal-heading {
  flex: 1;
}
.modal-title {
  margin: 0;
  font-size: 1.15rem;
}
.modal-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.modal-body {
  padding: 4px 16px;
}
.modal-footer {
  padding: 12px 16px 16px;
}
.vol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.vol-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow-y: auto;
}
.vol-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.vol-item.me {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.vol-name {
  flex: 1;
  font-weight: 600;
}
.vol-you {
  font-size: 0.75rem;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
}

/* 履歴リスト */
.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 46vh;
  overflow-y: auto;
}
.log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border);
}
.log-item:last-child {
  border-bottom: none;
}
.log-badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.log-badge.join {
  color: #15803d;
  background: #eafaf0;
}
.log-badge.withdraw {
  color: #b45309;
  background: #fef3c7;
}
.log-badge.mjoin {
  color: #1e8dae;
  background: #e3f6fc;
}
.log-badge.mleave {
  color: #6b7280;
  background: #f3f4f6;
}
.log-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.log-actor {
  font-weight: 600;
}
.log-ctx {
  font-size: 0.78rem;
  color: var(--muted);
}
.log-when {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* 祝日（赤）。曜日色より後に定義して優先させる */
.cal-cell.holiday .cal-day {
  color: #dc2626;
}

/* カレンダー/一覧 切替（セグメント） */
.cal-toggle {
  display: inline-flex;
  align-self: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.seg {
  appearance: none;
  border: none;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.seg.active {
  background: var(--accent);
  color: #fff;
}
/* ログイン/新規登録の切替（全幅セグメント） */
.seg-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.seg-group .seg {
  flex: 1 1 0;
  justify-content: center;
}
/* welcome のアカウント導線 / profile のアカウント欄 */
.account-entry-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.account-entry-actions .btn {
  flex: 1;
}
.account-email {
  font-weight: 600;
  word-break: break-all;
  margin: 0;
}
.account-verify {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}
.account-verify.ok {
  color: var(--open);
}
.account-verify.warn {
  color: #b45309;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 0.85rem;
}
/* テキストリンク風ボタン（パスワード再設定など） */
.linklike {
  appearance: none;
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: underline;
}
.linklike:disabled {
  opacity: 0.6;
  cursor: default;
}
/* アカウントの開閉フォーム（メール/パスワード変更） */
.account-toggle {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 12px;
}
.account-toggle > summary {
  cursor: pointer;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  list-style-position: inside;
}
.account-toggle[open] > summary {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.change-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 10px;
}

/* メール未確認のソフトバナー */
.verify-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.verify-banner-text {
  margin: 0;
  font-size: 0.85rem;
  color: #9a3412;
}
.verify-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-gridwrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 月の一覧ビュー（日ごと） */
.month-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.month-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.month-row.open {
  border-left-color: #16a34a;
}
.month-row.full {
  border-left-color: #9ca3af;
}
.month-row.mine {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.month-row:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.month-date {
  flex: 0 0 auto;
  width: 96px;
  font-weight: 600;
  font-size: 0.9rem;
}
.month-date.sun {
  color: #dc2626;
}
.month-date.sat {
  color: #2563eb;
}
.month-vols {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 枠のインライン編集 */
.list-item.editing .input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 8px 10px;
}
.list-item.editing .input.cap {
  flex: 0 0 auto;
  width: 80px;
}

/* プロフィール導線（クリック可能チップ） */
.user-chip {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
}
.user-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* メンバー一覧（名前＋bio） */
.member-item {
  align-items: center;
}
.member-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.member-bio {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* プロフィール bio テキストエリア */
textarea.input {
  resize: vertical;
  min-height: 64px;
  font-family: inherit;
}

/* アバター（画像 or 頭文字）＋ ログイン状態ドット */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.status-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 13px;
  height: 13px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.status-dot.online {
  background: #16a34a;
}
.status-dot.recent {
  background: #eab308;
}
.status-dot.idle {
  background: #9ca3af;
}
.status-dot.stale {
  background: #fff;
  color: #6b7280;
  border-color: #9ca3af;
}
.status-dot.gone {
  background: #dc2626;
}
.status-dot.unknown {
  background: #e5e7eb;
}

/* プロフィール画面のアバター編集（Placory 流儀：隅のバッジ） */
.avatar-edit-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 10px;
}
/* ゲスト向けのアバター注意書き：アイコンから離して右側・小さめ */
.guest-avatar-note {
  margin-left: 16px;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: left;
  max-width: 190px;
}
.avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
}
.avatar-circle {
  width: 72px;
  height: 72px;
}
.avatar-badge {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}
.avatar-badge-edit {
  right: -3px;
  bottom: -3px;
  background: var(--accent);
  color: #fff;
}
.avatar-badge-delete {
  left: -3px;
  bottom: -3px;
  background: #fff1f2;
  color: #be123c;
}
.avatar-badge[hidden] {
  display: none;
}

/* メンバー一覧：立候補数チップ */
.count-chip {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* メンバー詳細モーダル */
.member-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.member-dates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
  overflow-y: auto;
}
.member-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.md-date {
  font-weight: 600;
}
.md-slot {
  font-size: 0.85rem;
  color: var(--muted);
}
/* メンバー詳細モーダルの操作群（昇格/降格/削除/脱退） */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.you-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* 枠ごとの掲示板（チャット） */
.screen-board {
  height: 100dvh;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
}
.screen-board .topbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.board-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 細く・通常は非表示、スクロール中だけ表示（.scrolling は JS で付与） */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.board-list.scrolling {
  scrollbar-color: rgba(15, 23, 42, 0.25) transparent;
}
.board-list::-webkit-scrollbar {
  width: 6px;
}
.board-list::-webkit-scrollbar-track {
  background: transparent;
}
.board-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}
.board-list.scrolling::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.25);
}
.board-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.board-msg.mine {
  flex-direction: row-reverse;
}
.board-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 78%;
  min-width: 0;
}
.board-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.72rem;
  color: var(--muted);
}
.board-msg.mine .board-meta {
  flex-direction: row-reverse;
}
.board-author {
  font-weight: 600;
}
.board-bubble {
  background: #fff;
  border: 1px solid var(--border);
  /* 相手の吹き出し：左上の角だけ角張らせる（TL TR BR BL） */
  border-radius: 4px 16px 16px 16px;
  padding: 8px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.board-msg.mine .board-bubble {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.board-bubble.deleted {
  color: var(--muted);
  font-style: italic;
  background: var(--surface-soft);
}
/* 自分の吹き出し：右上の角だけ角張らせる（TL TR BR BL） */
.board-msg.mine .board-bubble {
  border-radius: 16px 4px 16px 16px;
}
.sm-del {
  width: 28px;
  height: 28px;
  align-self: center;
}
.board-composer {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  padding: 8px 8px 8px 4px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
/* LINE 風：入力欄はピル型・淡い下地。左右のアイコンは丸ボタン */
.board-composer .input {
  flex: 1;
  resize: none;
  max-height: 120px;
  border-radius: 20px;
  padding: 9px 14px;
  background: var(--surface-soft);
}
.icon-btn.send {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  flex: 0 0 auto;
}
.board-bubble.actionable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* トーク画像（添付）＝ゴースト（枠なし）の丸ボタンを入力欄の左に控えめに置く */
.icon-btn.attach {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 999px;
}
.icon-btn.attach:hover {
  background: var(--surface-soft);
  color: var(--accent);
}
/* 画像を含む吹き出しは余白を詰めて画像を主役に */
.board-bubble.has-image {
  padding: 4px;
}
.board-image-wrap {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
}
.board-image {
  display: block;
  max-width: 220px;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: cover;
  background: var(--surface-soft);
}
/* 画像＋テキスト併用時、テキストは画像の下に少し余白を空けて */
.board-bubble.has-image .board-text {
  padding: 6px 8px 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 送信前の添付プレビュー */
.composer-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.composer-preview-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.composer-preview-remove {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.composer-preview-remove:hover {
  color: var(--error);
  border-color: var(--error);
}

/* 画像の全画面表示（ライトボックス） */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 90;
  cursor: zoom-out;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* リアクション */
.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
}
/* 自分の投稿はバーを右寄せ（並びは [チップ][＋][既読] のまま） */
.reaction-bar.mine {
  justify-content: flex-end;
}
.reaction-chip,
.reaction-add {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 19px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.68rem;
  line-height: 1;
  color: var(--text);
}
.reaction-emoji {
  font-size: 0.72rem;
}
.reaction-chip:hover,
.reaction-add:hover {
  border-color: var(--accent);
}
.reaction-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.reaction-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.reaction-chip.active .reaction-count {
  color: var(--accent-dark);
}
/* 追加ボタンは「＋」のみ・控えめに */
.reaction-add {
  color: var(--muted);
  opacity: 0.65;
  padding: 0 7px;
}
.reaction-add:hover {
  opacity: 1;
}
/* リアクション絵文字ピッカー（ボトムシート） */
.reaction-picker {
  padding: 8px;
}
.reaction-picker-row {
  display: flex;
  justify-content: space-around;
  gap: 6px;
}
.reaction-picker-item {
  appearance: none;
  border: 1px solid transparent;
  background: var(--surface);
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.reaction-picker-item:hover {
  background: var(--surface-soft);
}
.reaction-picker-item.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* 既読人数（自分の投稿の下・右寄せ） */
/* 既読：リアクションバー内・追加ボタン(＋)のすぐ右に並ぶ小さなラベル */
.read-receipt {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
  padding: 0 2px;
  white-space: nowrap;
  cursor: pointer;
}
.read-receipt:hover {
  color: var(--accent);
  text-decoration: underline;
}
.readers-title {
  padding: 14px 16px 8px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.readers-list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px 0;
}
.readers-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.95rem;
}
/* リアクション一覧の絵文字列（アバターの左に揃える） */
.reactor-emoji {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex: 0 0 auto;
}

/* 操作シートのタイトル／確認文（マイ予定など） */
.sheet-title {
  padding: 14px 16px 6px;
  font-weight: 600;
  text-align: center;
}
.sheet-prompt {
  padding: 0 16px 12px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
/* 確認シート内の注意書き（同じ日の重複立候補など） */
.sheet-caution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 16px 10px;
  padding: 8px 10px;
  background: #fff7e6;
  border: 1px solid #f0b23d;
  border-radius: 8px;
  color: #9a6a12;
  font-size: 0.82rem;
  line-height: 1.4;
}
.sheet-caution .icon {
  flex: 0 0 auto;
}

/* マイ予定（場所×日付マトリクス） */
.mysched-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mysched-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.mysched-title {
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}
.mysched-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mysched-grid {
  display: grid;
  gap: 4px;
  min-width: max-content;
}
.mysched-corner,
.mysched-rowhead {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
}
.mysched-rowhead {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.82rem;
  padding-right: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mysched-daycol {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.15;
  padding-bottom: 2px;
}
.mysched-dnum {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
}
.mysched-daycol.sun .mysched-dnum,
.mysched-daycol.sun .mysched-dwk {
  color: #dc2626;
}
.mysched-daycol.sat .mysched-dnum,
.mysched-daycol.sat .mysched-dwk {
  color: #2563eb;
}
.mysched-cell {
  appearance: none;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.mysched-cell.off {
  border: none;
  background: var(--surface-soft);
  cursor: default;
}
.mysched-cell.mine {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}
.mysched-cell.waiting {
  background: #fff7e6;
  border-color: #f0b23d;
  color: #9a6a12;
}
.mysched-cell.full {
  background: var(--surface-soft);
  color: var(--muted);
}
.mysched-cell.open {
  border-style: dashed;
  color: var(--muted);
}
.mysched-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--muted);
}
.mysched-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mysched-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  border: 0.5px solid var(--border);
}
.mysched-swatch.mine {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.mysched-swatch.waiting {
  background: #fff7e6;
  border-color: #f0b23d;
}
.mysched-swatch.open {
  border-style: dashed;
}
.mysched-swatch.full {
  background: var(--surface-soft);
}

/* ホームの「直近の予定」リマインダー */
.remind-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.remind-item {
  appearance: none;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}
.remind-item:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
}
.remind-date {
  font-weight: 700;
  min-width: 82px;
  flex: 0 0 auto;
  color: var(--text);
}
.remind-date.sun {
  color: #dc2626;
}
.remind-date.sat {
  color: #2563eb;
}
.remind-slot {
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.remind-group {
  color: var(--muted);
  font-size: 0.78rem;
  flex: 0 1 auto;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.remind-more {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 4px 0 0;
}
/* .card の display:flex が [hidden] を上書きするため、明示的に非表示にする（読込前/未参加で空カードを出さない） */
.remind-card[hidden] {
  display: none;
}

/* 利用上の注意・免責事項の同意UI（登録画面） */
.auth-terms {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-terms[hidden] {
  display: none;
}
.auth-terms-title {
  font-weight: 600;
  margin: 0;
}
.auth-terms-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-terms-summary p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-terms-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}
.auth-terms-detail {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
}
.auth-terms-detail[hidden] {
  display: none;
}
.auth-terms-detail h3 {
  font-size: 0.9rem;
  margin: 12px 0 4px;
}
.auth-terms-detail h3:first-child {
  margin-top: 0;
}
.auth-terms-detail p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.auth-terms-detail ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.auth-terms-detail li {
  font-size: 0.82rem;
  margin-bottom: 3px;
}
.auth-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}
.auth-terms-check input {
  margin-top: 2px;
  flex: 0 0 auto;
}

/* 全文ドキュメントのモーダル（利用規約など） */
.doc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}
.doc-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  animation: modal-in 0.16s ease-out;
}
.doc-modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.doc-modal-head h3 {
  margin: 0;
  flex: 1;
}
.doc-modal-body {
  overflow-y: auto;
  padding: 14px 16px;
}
.doc-modal-body h3 {
  font-size: 0.95rem;
  margin: 16px 0 6px;
}
.doc-modal-body h3:first-child {
  margin-top: 0;
}
.doc-modal-body p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.doc-modal-body ul {
  margin: 0 0 10px;
  padding-left: 1.2em;
}
.doc-modal-body li {
  font-size: 0.88rem;
  margin-bottom: 4px;
}

/* 長押しアクションシート（LINE 風） */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  z-index: 70;
}
.action-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  animation: modal-in 0.16s ease-out;
}
.sheet-item {
  appearance: none;
  border: none;
  background: var(--surface);
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.sheet-item:last-child {
  border-bottom: none;
}
.sheet-item:hover {
  background: var(--surface-soft);
}
.sheet-item.danger {
  color: var(--error);
  font-weight: 600;
}

/* 枠の情報（メモ＋写真） */
.card-actions {
  display: flex;
  gap: 10px;
}
.card-actions .btn {
  flex: 1;
}
.memo-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.photo-item {
  position: relative;
  width: 100px;
  height: 100px;
  flex: 0 0 auto;
}
.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.photo-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.78rem;
  color: var(--muted);
}
.photo-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}
.add-photo {
  margin-top: 10px;
}

/* 地図（Leaflet + OSM） */
.slot-map {
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
/* しずく型ピン（Placory 流。下が尖る／teal 本体＋中央に白丸） */
.map-pin-icon {
  background: none !important;
  border: none !important;
  position: relative;
  width: 22px;
  height: 32px;
}
.map-pin-shape {
  position: absolute;
  top: 0;
  left: 1px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.map-pin-core {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
}
.map-hint {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.map-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

/* キャンセル待ち */
.wl-section {
  margin-top: 14px;
}
.cal-wait {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: #d97706;
}
.wl-mark {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
}
/* 日付メモ（セルの印・モーダルの編集欄） */
.cal-note-dot {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
/* mine は teal 背景なので白。open/full は明るい背景なのでデフォルトの teal のまま。 */
.cal-cell.mine .cal-note-dot {
  background: #fff;
}
.note-section {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.month-note {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.csv-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* トーク未読ドット（トークボタン） */
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-left: 4px;
  flex: 0 0 auto;
}

/* ローディング（スピナー＋文言・Placory 流儀） */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ボタンの処理中スピナー（is-loading を付けるとテキスト前にインライン表示） */
.btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
  opacity: 0.9;
}

/* メンバー一覧の行（アバター＋本文＋バッジ） */
.member-item .avatar {
  margin-right: 2px;
}

/* 立候補者一覧・履歴のアバター */
.vol-item .avatar,
.log-item .avatar {
  flex: 0 0 auto;
}
