*, *::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: flex-start;
  justify-content: center;
  padding: 24px;
  color: #1a1a2e;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  /* 画面幅の94%を基本に、480px（スマホ最小）〜900px（大画面上限）の間でなめらかに拡大縮小する。
     固定ブレークポイントだけで切り替えると「あと少しで届かない」幅で見た目が変わらず
     分かりにくくなるため、clamp() で連続的に追従させる。 */
  width: clamp(480px, 94vw, 900px);
  margin-top: 40px;
  overflow: hidden;
}

.card--center { text-align: center; padding: clamp(32px, 5vw, 56px) clamp(24px, 6vw, 64px); }
.card--notify { padding-bottom: 24px; }

/* ── レスポンシブ: 幅が狭い画面（スマホ）では画面いっぱいに使う ── */
@media (max-width: 520px) {
  body { padding: 0; align-items: stretch; }
  .card {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
}

/* ── ステート表示制御 ── */
.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--error   { background: #fdecea; color: #e53935; }
.icon--warning { 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;
}

/* ── タイトル帯（余白・文字サイズは画面幅に応じてなめらかに拡大） ── */
.notify-titlebar {
  background: linear-gradient(135deg, #1e3a5f, #2c5c8a);
  color: #fff;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4.5vw, 44px) clamp(18px, 2.6vw, 28px);
}
.notify-titlebar__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #9fc1e0;
  margin-bottom: 6px;
}
.notify-titlebar__subject {
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.5;
  word-break: break-word;
}

/* ── メタ情報 ── */
.notify-meta {
  padding: clamp(10px, 1.6vw, 16px) clamp(20px, 4.5vw, 44px);
  background: #f5f7fa;
  border-bottom: 1px solid #e6e9ee;
  font-size: clamp(0.8rem, 1vw, 0.88rem);
  color: #667;
}
.notify-meta__row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.notify-meta__label {
  font-weight: 700;
  color: #8a94a3;
  margin-right: 8px;
}

/* ── 連絡を取る ── */
.notify-contact {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.notify-contact__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8a94a3;
  width: 100%;
  margin-bottom: 2px;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eaf1f8;
  color: #2c5c8a;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #d5e4f0;
  transition: background .15s;
}
.contact-btn:hover { background: #dce9f4; }

.notify-body {
  width: 100%;
  min-height: 120px;
  border: none;
  display: block;
}

/* ── 今後受領しない（配信拒否） ── */
.refuse {
  margin: 8px clamp(20px, 4.5vw, 44px) 0;
  padding-top: 16px;
  border-top: 1px solid #eef0f3;
  text-align: center;
}
.refuse[hidden], .refuse [hidden] { display: none; }
.refuse__text { font-size: 0.8rem; color: #8a94a3; margin-bottom: 10px; }
.refuse__text--strong { color: #445; font-weight: 700; }
.refuse__actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.refuse-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #cfd6de;
  background: #fff;
  color: #556;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.refuse-btn:hover { background: #f5f7fa; border-color: #b8c1cc; }
.refuse-btn:disabled { opacity: .5; cursor: wait; }
.refuse-btn--danger { background: #e53935; border-color: #e53935; color: #fff; }
.refuse-btn--danger:hover { background: #c62828; border-color: #c62828; }
.refuse-btn--ghost { background: transparent; }
.refuse__done { font-size: 0.85rem; color: #2e7d32; font-weight: 700; }
.refuse__test { font-size: 0.8rem; color: #b26a00; background: #fff8e1; border-radius: 8px; padding: 8px 12px; display: inline-block; }
.refuse__error { font-size: 0.8rem; color: #e53935; margin-top: 8px; }

/* ── スピナー ── */
.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); } }
