:root {
  --red: #b3261e;
  --red-dark: #8c1d17;
  --green: #1e6b3a;
  --bg: #f7f3ee;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --border: #e4ddd3;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.topbar {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  justify-content: space-between; align-items: center;
  padding: .75rem 1.25rem;
  background: var(--red); color: #fff;
}
.topbar a, .topbar .link { color: #fff; }
.brand { font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.who { opacity: .85; }
main { max-width: 900px; margin: 1.5rem auto; padding: 0 1rem; }
h1 { margin-top: 0; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
}
.hero { text-align: center; padding: 2.5rem 1.5rem; }
.muted { color: var(--muted); }
.ok { color: var(--green); font-weight: 600; }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.flash.success { background: #e3f2e7; color: var(--green); }
.flash.error { background: #fbe4e2; color: var(--red-dark); }
.flash.info { background: #e7eef9; color: #1d3f73; }
label { display: block; margin: .75rem 0 .25rem; font-weight: 500; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
input[type=text], input[type=date], select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
label.check input { width: auto; }
textarea { resize: vertical; }
button, .button {
  display: inline-block; font: inherit; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem 1rem; background: #fff; color: var(--text); text-decoration: none;
  margin-top: .75rem;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--red); border-color: var(--red); color: #fff; }
.primary:hover { background: var(--red-dark); }
.danger { background: #fff; border-color: var(--red); color: var(--red); }
.link {
  background: none; border: none; padding: 0; margin: 0;
  color: var(--red); text-decoration: underline; cursor: pointer;
}
.danger-text { color: var(--red); }
form.inline { display: inline; }
.spaced { margin-top: 1rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row input { flex: 1; min-width: 180px; }
.row button { margin-top: 0; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .two-cols { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--border); }
td form, td button { margin: 0; }
@media (max-width: 640px) { table { display: block; overflow-x: auto; } }
.people { columns: 2; padding-left: 1.2rem; }
.constraints li { margin: .3rem 0; }
.reveal { text-align: center; }
.secret { margin-top: 1rem; }
.pick-name { font-size: 2rem; font-weight: 700; color: var(--red); margin: .25rem 0 1rem; }
.wishlist { white-space: pre-wrap; background: var(--bg); padding: .75rem 1rem; border-radius: 8px; text-align: left; }
dialog.rules {
  max-width: 560px; width: calc(100% - 2rem);
  border: none; border-radius: var(--radius); padding: 1.5rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog.rules::backdrop { background: rgba(30, 10, 10, .55); }
dialog.rules li { margin: .45rem 0; }
.actions { text-align: right; }
code { background: var(--bg); padding: .05rem .3rem; border-radius: 4px; }
