*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --attending: #16a34a;
  --undecided: #b45309;
  --absent:    #dc2626;
  --muted:     #6b7280;
  --border:    #d1d5db;
  --font: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: #111;
  background: #fff;
  line-height: 1.6;
}

/* ヘッダー */
.site-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.header-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2px 0 10px;
}

.header-stats {
  font-size: 0.95rem;
}

.stats-count {
  font-size: 1.5rem;
  font-weight: 700;
}

/* メイン */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

/* フィルター */
.filters-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.status-tabs {
  display: flex;
  gap: 8px;
}

.tab {
  flex: 1;
  padding: 10px 4px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tab.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-select,
.filter-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 1rem;
  color: #111;
  background: #fff;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l5 6 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select:focus,
.filter-input:focus {
  outline: 2px solid #111;
  outline-offset: -1px;
}

/* 更新ボタン行 */
.refresh-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.refresh-btn {
  padding: 8px 16px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.85rem;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.refresh-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.last-updated {
  font-size: 0.78rem;
  color: var(--muted);
}

/* 件数 */
.result-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

/* カード */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-top: 1px solid var(--border);
}

.card {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.badge.attending { color: var(--attending); background: #dcfce7; }
.badge.undecided { color: var(--undecided); background: #fef3c7; }
.badge.absent    { color: var(--absent);    background: #fee2e2; }

.card-current-name {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.card-comment {
  margin-top: 8px;
  font-size: 0.875rem;
  color: #333;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ステート */
.state-block {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.state-error { color: var(--absent); }

.retry-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
}

/* イベント概要・FAQ共通 */
.info-section,
.faq-section {
  max-width: 640px;
  margin: 32px auto 0;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* イベント概要リスト */
.info-list {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-list li {
  font-size: 0.95rem;
  display: flex;
  gap: 12px;
}

.info-label {
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 3em;
  padding-top: 2px;
}

/* CTAボタン */
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-form,
.btn-line {
  display: block;
  text-align: center;
  padding: 14px 16px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-form {
  border: 1px solid #111;
  color: #111;
  background: #fff;
}

.btn-line {
  border: none;
  color: #fff;
  background: #06c755;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item dt {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.faq-item dd {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.7;
  margin-left: 0;
}

/* フッター */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
