:root {
  --red: #e84c3d;
  --red-dark: #c73a2c;
  --warm: #fff8f0;
  --text: #3d2c1e;
  --muted: #8a7a6a;
  --border: #f0e2d2;
}

* { box-sizing: border-box; }

/* hidden 属性必须始终生效（否则会被 .modal 等 display 规则覆盖） */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, #ffe3d0 0, transparent 45%),
    radial-gradient(circle at 85% 80%, #ffd9c9 0, transparent 45%),
    linear-gradient(160deg, #fff6ec, #ffe9da);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: #fffdfb;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(200, 120, 60, 0.18);
  padding: 32px 28px;
  border: 1px solid var(--border);
}

h1 { margin: 0 0 6px; font-size: 26px; text-align: center; }
.subtitle { text-align: center; margin: 0 0 4px; font-weight: 600; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field em { color: var(--red); font-style: normal; }

input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--warm);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(232, 76, 61, 0.12);
}
textarea { resize: vertical; }

.radio-group { display: flex; gap: 18px; }
.radio-group label {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; cursor: pointer;
}
.radio-group input { accent-color: var(--red); }

button[type="submit"] {
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f06552, var(--red));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
button[type="submit"]:hover { box-shadow: 0 8px 20px rgba(232, 76, 61, 0.35); }
button[type="submit"]:active { transform: scale(0.98); }
button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; }

.ghost-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  font-size: 14px;
  color: var(--red);
  background: transparent;
  border: 1px solid var(--red);
  border-radius: 10px;
  cursor: pointer;
}
.ghost-btn:hover { background: #fff1ec; }

.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 10px 0 0; text-align: center; }

.success { text-align: center; }
.success h2 { margin: 6px 0 4px; }
.success p { color: var(--muted); }

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-card {
  background: #fff;
  width: 100%; max-width: 460px; max-height: 80vh;
  overflow: auto;
  border-radius: 16px; padding: 24px;
}
.modal-card h2 { margin: 0 0 14px; text-align: center; }

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.list-item .row1 { display: flex; justify-content: space-between; align-items: center; }
.list-item .name { font-weight: 700; }
.list-item .badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge.attending { background: #e6f6e6; color: #2e7d32; }
.badge.declined { background: #fdecec; color: #c62828; }
.badge.pending { background: #fff4e0; color: #b26a00; }
.list-item .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.list-summary { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
