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

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #1a1a2e;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

/* ── ステート表示制御 ── */
.state { animation: fadeIn .3s ease; }
.state.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── アイコン ── */
.icon {
  font-size: 40px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.icon--mail    { background: #e8f4fd; color: #2196f3; }
.icon--success { background: #e8f5e9; color: #4caf50; }
.icon--error   { background: #fdecea; color: #e53935; }
.icon--info    { background: #fff8e1; color: #f9a825; font-weight: bold; }

/* ── タイトル・本文 ── */
h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}
p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}

.email-display {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 10px 16px;
  margin: 16px 0 24px;
  word-break: break-all;
}

/* ── ボタン ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, opacity .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(0.92); }

.btn--danger    { background: #e53935; color: #fff; }
.btn--secondary { background: #e0e0e0; color: #333; }

/* ── スピナー ── */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e0e0e0;
  border-top-color: #2196f3;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ダイアログ ── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.dialog-overlay.hidden { display: none; }

.dialog {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: fadeIn .2s ease;
}
.dialog__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.dialog__body {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 24px;
}
.dialog__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
