/* 幹事Navi WEB (organizer-next) — iPhoneアプリ(EnkaiPlanner)のUI/UXをWebで再現 */

:root {
  color-scheme: light;
  --ink: #1c212b;
  --quiet: #6d7a85;
  --faint: #98a2ad;
  --paper: #f2f2f7;          /* systemGroupedBackground 相当 */
  --surface: #ffffff;
  --raised: #f4f6f8;
  --hairline: rgba(28, 33, 43, 0.10);
  --hairline-strong: rgba(28, 33, 43, 0.16);
  --teal: #0a7d7a;
  --teal-ink: #086b68;
  --coral: #db4a3d;
  --gold: #b87a1f;
  --green: #29804d;
  --plum: #613875;
  --teal-soft: rgba(10, 125, 122, 0.10);
  --teal-soft-2: rgba(10, 125, 122, 0.08);
  --teal-border: rgba(10, 125, 122, 0.22);
  --gold-soft: rgba(184, 122, 31, 0.12);
  --coral-soft: rgba(219, 74, 61, 0.10);
  --shadow-card: 0 1px 2px rgba(28, 33, 43, 0.05), 0 14px 30px rgba(28, 33, 43, 0.06);
  --shadow-btn: 0 8px 18px rgba(10, 125, 122, 0.24);
  --shadow-header: 0 1px 0 var(--hairline);
  --radius-card: 16px;
  --radius: 12px;
  --radius-sm: 10px;
  --topbar-bg: rgba(242, 242, 247, 0.86);
  --footer-bg: rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef1f6;
  --quiet: #9aa6b2;
  --faint: #6f7c88;
  --paper: #0e1218;
  --surface: #161b22;
  --raised: #1d232c;
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --teal: #2ec4bc;
  --teal-ink: #4dd4cc;
  --coral: #f26a5f;
  --gold: #e0a53a;
  --green: #4bc47e;
  --plum: #b28fd0;
  --teal-soft: rgba(46, 196, 188, 0.14);
  --teal-soft-2: rgba(46, 196, 188, 0.10);
  --teal-border: rgba(46, 196, 188, 0.30);
  --gold-soft: rgba(224, 165, 58, 0.16);
  --coral-soft: rgba(242, 106, 95, 0.14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 30px rgba(0, 0, 0, 0.5);
  --shadow-btn: 0 8px 18px rgba(46, 196, 188, 0.28);
  --topbar-bg: rgba(14, 18, 24, 0.86);
  --footer-bg: rgba(22, 27, 34, 0.92);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #eef1f6;
    --quiet: #9aa6b2;
    --faint: #6f7c88;
    --paper: #0e1218;
    --surface: #161b22;
    --raised: #1d232c;
    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-strong: rgba(255, 255, 255, 0.18);
    --teal: #2ec4bc;
    --teal-ink: #4dd4cc;
    --coral: #f26a5f;
    --gold: #e0a53a;
    --green: #4bc47e;
    --plum: #b28fd0;
    --teal-soft: rgba(46, 196, 188, 0.14);
    --teal-soft-2: rgba(46, 196, 188, 0.10);
    --teal-border: rgba(46, 196, 188, 0.30);
    --gold-soft: rgba(224, 165, 58, 0.16);
    --coral-soft: rgba(242, 106, 95, 0.14);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 30px rgba(0, 0, 0, 0.5);
    --shadow-btn: 0 8px 18px rgba(46, 196, 188, 0.28);
    --topbar-bg: rgba(14, 18, 24, 0.86);
    --footer-bg: rgba(22, 27, 34, 0.92);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", Meiryo, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

/* ---------- レイアウト ---------- */
.flow-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.flow-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  padding: max(10px, env(safe-area-inset-top)) 0 0;
}

.header-inner {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 6px 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--teal);
  font-size: 18px;
  font-weight: 800;
}
.back-button:disabled { opacity: 0.4; }

.header-copy { flex: 1 1 auto; min-width: 0; }
.header-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.header-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
  margin-top: 1px;
}

.progress-chip {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 12px;
  border-radius: 14px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  text-align: center;
  line-height: 1.15;
}
.progress-chip b {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--teal);
}
.progress-chip span {
  font-size: 10px;
  font-weight: 700;
  color: var(--teal-ink);
  opacity: 0.8;
}

/* ステップタブ */
.step-tabs {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.step-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-radius: 11px;
  background: transparent;
  color: var(--quiet);
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s;
}
.step-tab .tab-icon { font-size: 15px; font-weight: 800; line-height: 1; }
.step-tab .tab-label { font-size: 12px; font-weight: 700; }
.step-tab.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 14px rgba(10, 125, 122, 0.28);
}
.step-tab.done { color: var(--teal); }
.step-tab.done .tab-icon::after { content: ""; }

/* ---------- 本体 ---------- */
.flow-body {
  flex: 1 1 auto;
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 132px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-title {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 4px 0 2px;
}
.page-lead {
  font-size: 13px;
  font-weight: 600;
  color: var(--quiet);
  margin: -4px 0 2px;
}

/* カード */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card.tight { gap: 10px; }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.card-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 18px;
}
.card-icon.coral { background: var(--coral-soft); color: var(--coral); }
.card-icon.gold { background: var(--gold-soft); color: var(--gold); }
.card-icon.plum { background: rgba(97, 56, 117, 0.12); color: var(--plum); }
.card-head-copy { flex: 1 1 auto; min-width: 0; }
.card-title { font-size: 17px; font-weight: 800; }
.card-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
  margin-top: 3px;
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.field-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
}

.divider { height: 1px; background: var(--hairline); border: 0; margin: 2px 0; }

/* メトリクス */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.metric-tile {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 74px;
}
.metric-tile .m-icon { font-size: 14px; font-weight: 800; }
.metric-tile.teal .m-icon { color: var(--teal); }
.metric-tile.coral .m-icon { color: var(--coral); }
.metric-tile.gold .m-icon { color: var(--gold); }
.metric-tile.green .m-icon { color: var(--green); }
.metric-tile.plum .m-icon { color: var(--plum); }
.metric-tile .m-value { font-size: 17px; font-weight: 800; line-height: 1.1; }
.metric-tile .m-label { font-size: 11px; font-weight: 700; color: var(--quiet); }

/* 進捗バー（カード内） */
.mini-progress {
  height: 8px;
  border-radius: 5px;
  background: var(--hairline);
  overflow: hidden;
}
.mini-progress > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--teal);
  transition: width 0.4s ease;
}
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--quiet);
}
.progress-row b { color: var(--teal); font-size: 13px; }

/* トグルピル（種別など） */
.pill-group { display: flex; flex-direction: column; gap: 8px; }
.toggle-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  min-height: 58px;
  width: 100%;
  text-align: left;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--hairline);
  transition: background 0.16s, border-color 0.16s;
}
.toggle-pill .p-icon {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 15px;
}
.toggle-pill .p-copy { flex: 1 1 auto; min-width: 0; }
.toggle-pill .p-title { font-size: 14px; font-weight: 800; }
.toggle-pill .p-sub { font-size: 11px; font-weight: 600; color: var(--quiet); margin-top: 1px; }
.toggle-pill .p-check { color: var(--faint); font-size: 17px; }
.toggle-pill.selected {
  background: var(--teal-soft-2);
  border-color: var(--teal-border);
}
.toggle-pill.selected .p-check { color: var(--teal); }
.toggle-pill.selected.coral { background: var(--coral-soft); border-color: rgba(219,74,61,0.3); }
.toggle-pill.selected.coral .p-icon,
.toggle-pill.selected.coral .p-check { color: var(--coral); }
.toggle-pill.selected.plum { background: rgba(97,56,117,0.10); border-color: rgba(97,56,117,0.3); }
.toggle-pill.selected.plum .p-icon,
.toggle-pill.selected.plum .p-check { color: var(--plum); }
.toggle-pill.coral .p-icon { background: var(--coral-soft); color: var(--coral); }
.toggle-pill.plum .p-icon { background: rgba(97,56,117,0.12); color: var(--plum); }

/* ステータスチップ（会場ステータス3択・出欠3択など） */
.chip-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.status-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  padding: 8px 6px;
  border-radius: var(--radius);
  background: var(--teal-soft-2);
  border: 1px solid transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}
.status-chip.selected { background: var(--teal); color: #fff; }

/* 入力フィールド */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 800; }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 13px;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--teal-border);
  box-shadow: 0 0 0 3px var(--teal-soft-2);
}
.textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236d7a85' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}
.input-row { display: flex; align-items: center; gap: 10px; }
.input-row .field { flex: 1 1 auto; }

/* スライダー + ステッパー */
.slider-block { display: flex; flex-direction: column; gap: 10px; }
.slider-value {
  display: flex; align-items: baseline; gap: 6px;
}
.slider-value b { font-size: 24px; font-weight: 800; }
.slider-value.gold b { color: var(--gold); }
.slider-value span { font-size: 13px; font-weight: 700; color: var(--quiet); }
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: var(--hairline);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: pointer;
}
input[type="range"].gold::-webkit-slider-thumb { border-color: var(--gold); }
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 1px solid var(--hairline-strong);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18); cursor: pointer;
}
.stepper-row { display: flex; align-items: center; gap: 10px; }
.step-btn {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--teal);
  font-size: 20px; font-weight: 800;
}
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px; font-weight: 800;
}
.preset-btn.active { background: var(--gold-soft); border-color: rgba(184,122,31,0.3); color: var(--gold); }

/* 招待状デザインプレビュー */
.design-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.design-card {
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  transition: border-color 0.16s, transform 0.1s;
}
.design-card.selected { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-border); }
.design-preview {
  min-height: 96px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.design-preview .d-emoji { font-size: 20px; }
.design-preview .d-name { font-size: 13px; font-weight: 800; }
.design-foot { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; }
.design-foot .d-desc { font-size: 11px; font-weight: 600; color: var(--quiet); }
.design-foot .d-mark { font-size: 14px; color: var(--faint); }
.design-card.selected .d-mark { color: var(--teal); }

/* ボタン */
.btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:disabled { box-shadow: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  min-height: 48px;
  font-size: 15px;
}
.btn-ghost { background: transparent; color: var(--teal); min-height: 44px; font-size: 14px; }
.btn-danger-soft { background: var(--coral-soft); color: var(--coral); min-height: 44px; font-size: 14px; }
.btn-small {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

/* フッター固定 */
.footer-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: var(--footer-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hairline);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
}
.footer-inner {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 招待者リスト行 */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  min-height: 62px;
}
.list-row + .list-row { border-top: 1px solid var(--hairline); }
.avatar {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 15px; font-weight: 800;
}
.list-copy { flex: 1 1 auto; min-width: 0; }
.list-name { font-size: 16px; font-weight: 800; }
.list-sub { font-size: 12px; font-weight: 600; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.badge.attending { background: rgba(41,128,77,0.12); color: var(--green); }
.badge.declined { background: var(--coral-soft); color: var(--coral); }
.badge.pending { background: var(--gold-soft); color: var(--gold); }
.badge.sent { background: var(--teal-soft); color: var(--teal); }
.badge.not_sent { background: var(--hairline); color: var(--quiet); }
.icon-btn {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  font-size: 14px;
}
.icon-btn.edit { background: var(--teal-soft); color: var(--teal); }
.icon-btn.remove { background: var(--coral-soft); color: var(--coral); }

.empty-state {
  text-align: center;
  padding: 28px 12px;
  color: var(--quiet);
}
.empty-state .e-icon { font-size: 30px; color: var(--teal); }
.empty-state .e-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-top: 8px; }
.empty-state .e-msg { font-size: 13px; font-weight: 600; margin-top: 4px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* トースト */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(28, 33, 43, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }

/* ローディング */
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--teal-soft);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
body.is-loading .footer-bar { opacity: 0.7; pointer-events: none; }

/* リンク */
a { color: var(--teal); font-weight: 700; text-decoration: none; }

/* デスクトップ調整 */
@media (min-width: 600px) {
  .flow-body { padding-top: 22px; }
}

/* ---------- 認証ゲート ---------- */
.auth-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-mark {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 12px; background: var(--teal-soft); color: var(--teal);
  font-size: 20px; font-weight: 900;
}
.auth-title { font-size: 20px; font-weight: 900; }
.auth-sub { font-size: 12px; font-weight: 700; color: var(--quiet); }
.auth-lead { font-size: 13px; font-weight: 600; color: var(--quiet); line-height: 1.6; }
.auth-note { font-size: 12px; font-weight: 600; color: var(--faint); text-align: center; margin: 2px 0 0; }
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 4px; }
.seg-tab { padding: 9px; border-radius: 8px; font-size: 14px; font-weight: 800; color: var(--quiet); }
.seg-tab.active { background: var(--surface); color: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ---------- グループ別集計 ---------- */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.group-cell { background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 10px; text-align: center; }
.group-cell .g-name { font-size: 12px; font-weight: 800; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-cell .g-num { font-size: 20px; font-weight: 900; color: var(--teal); margin-top: 2px; }
.group-cell .g-num span { font-size: 12px; font-weight: 700; color: var(--faint); }

/* ---------- フィルタチップ・一覧 ---------- */
.filter-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.chip-filter {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--hairline);
  color: var(--quiet); font-size: 13px; font-weight: 800; white-space: nowrap;
}
.chip-filter.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.guest-table { display: flex; flex-direction: column; }

/* ---------- パスワード表示トグル ---------- */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 8px; background: transparent; font-size: 17px; line-height: 1; color: var(--quiet);
}
.input-toggle:active { background: var(--raised); }

/* ---------- 押下フィードバック ---------- */
.btn, .toggle-pill, .status-chip, .design-card, .chip-filter, .preset-btn, .step-btn, .seg-tab, .list-row[data-open-event] {
  transition: transform 0.08s ease, opacity 0.12s ease, background 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled), .step-btn:active { transform: scale(0.98); opacity: 0.92; }
.toggle-pill:active, .status-chip:active, .design-card:active, .chip-filter:active, .preset-btn:active, .seg-tab:active, .list-row[data-open-event]:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.55; }

/* ---------- トースト色分け ---------- */
.toast.ok { background: rgba(41, 128, 77, 0.96); }
.toast.err { background: rgba(180, 45, 38, 0.96); }

/* ---------- ボトムシート（招待者編集など） ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 24, 30, 0.42); display: flex; align-items: flex-end; justify-content: center; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet {
  width: min(560px, 100%);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 -8px 34px rgba(0,0,0,0.24);
  animation: sheet-up 0.2s ease;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-title { font-size: 17px; font-weight: 800; }
.sheet-close { width: 34px; height: 34px; border-radius: 50%; background: var(--raised); border: 1px solid var(--hairline); font-size: 14px; color: var(--quiet); }
@media (min-width: 600px) { .sheet-overlay { align-items: center; } .sheet { border-radius: 16px; } }

/* ---------- 招待状プレビュー ---------- */
.invite-hero { position: relative; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--hairline); min-height: 172px; box-shadow: 0 6px 18px rgba(28,33,43,0.08); }
.invite-hero .ih-body { position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; gap: 7px; }
.ih-emoji { font-size: 26px; line-height: 1; }
.ih-title { font-size: 20px; font-weight: 900; }
.ih-headline { font-size: 14px; font-weight: 800; }
.ih-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ih-pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; border: 1px solid; background: rgba(255,255,255,0.55); white-space: nowrap; }
.invite-hero.night .ih-pill { background: rgba(255,255,255,0.08); }
.ih-msg { font-size: 12px; font-weight: 600; line-height: 1.6; margin-top: 2px; }
.ih-orn { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.invite-hero.clean .ih-orn { background: repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(10,125,120,0.07) 22px, rgba(10,125,120,0.07) 23px); }
.invite-hero.bloom .ih-orn::before { content:""; position:absolute; top:-32%; right:-16%; width:230px; height:230px; border-radius:50%; background: radial-gradient(circle, rgba(219,74,61,0.16), transparent 68%); }
.invite-hero.bloom .ih-orn::after { content:"✿ ❀ ✿"; position:absolute; bottom:10px; left:16px; font-size:14px; color:rgba(184,122,31,0.30); letter-spacing:6px; }
.invite-hero.formal .ih-orn { box-shadow: inset 0 0 0 8px rgba(97,56,117,0.06), inset 0 0 0 9px rgba(97,56,117,0.14); }
.invite-hero.night .ih-orn::before { content:"✦ ★ ✦ ✧ ★"; position:absolute; top:12px; right:14px; font-size:12px; color:rgba(224,165,58,0.42); letter-spacing:4px; }
.design-pills { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.design-pill { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--hairline); font-size: 12px; font-weight: 800; color: var(--quiet); }
.design-pill span { font-size: 18px; }
.design-pill.selected { background: var(--teal-soft-2); border-color: var(--teal-border); color: var(--teal); }

/* ---------- 招待リンクボックス ---------- */
.invite-link-box { background: var(--raised); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ilb-url { font-size: 12px; font-weight: 600; color: var(--teal); word-break: break-all; }
