@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,800&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #12261e;
  --bg2: #1a3429;
  --paper: #fbf6ec;
  --ink: #23201b;
  --muted: #7a7266;
  --red: #c8323a;
  --red-d: #a3262d;
  --gold: #e3b45a;
  --green: #2f7a55;
  --line: #e7dfcf;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, #24493a 0, transparent 50%),
    radial-gradient(circle at 100% 100%, #2a1b1b 0, transparent 45%),
    var(--bg);
  min-height: 100vh;
  padding: 24px 16px 60px;
}
body::before { /* neige discrète */
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .35;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90px 120px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 160px 60px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 220px 170px, #fff 50%, transparent 51%);
  background-size: 260px 220px;
}
.wrap { max-width: 640px; margin: 0 auto; position: relative; }
header.top { text-align: center; color: var(--paper); margin-bottom: 22px; }
header.top .logo { font-size: 42px; line-height: 1; }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 34px; margin: 8px 0 4px; letter-spacing: -.5px; }
header.top p { margin: 0; color: #cfe0d6; }
.card {
  background: var(--paper); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35); margin-bottom: 16px;
}
h2 { font-family: Fraunces, Georgia, serif; font-size: 20px; margin: 0 0 4px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
input[type=text], input[type=date], textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; min-height: 64px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.add { display: flex; gap: 8px; }
.add input { flex: 1; }
button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; cursor: pointer;
  padding: 11px 16px; background: var(--green); color: #fff; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-red { background: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-big { width: 100%; padding: 15px; font-size: 17px; background: var(--red); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.person {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 13px;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
}
.person button { background: #eee6d6; color: var(--ink); width: 24px; height: 24px; padding: 0; border-radius: 50%; font-size: 14px; }
.excl-row { padding: 12px 0; border-top: 1px solid var(--line); }
.excl-row:first-of-type { border-top: 0; }
.excl-name { font-weight: 600; margin-bottom: 8px; }
.excl-name small { color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); padding: 5px 11px;
  border-radius: 999px; font-weight: 500; font-size: 14px;
}
.chip.on { background: var(--red); border-color: var(--red); color: #fff; text-decoration: line-through; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 0 0 6px; cursor: pointer; }
.status { padding: 10px 13px; border-radius: 10px; font-size: 14px; margin: 14px 0; font-weight: 500; }
.status.ok { background: #e3f1e8; color: #1e5a3c; }
.status.ko { background: #fbe4e4; color: var(--red-d); }
.error { color: var(--red-d); font-weight: 500; margin-top: 10px; }
.linkbox { display: flex; gap: 8px; margin: 8px 0; }
.linkbox input { flex: 1; font-size: 13px; background: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.list .who { flex: 1; font-weight: 600; min-width: 120px; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.badge.yes { background: #e3f1e8; color: #1e5a3c; }
.badge.no { background: #f1ebde; color: var(--muted); }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.names button { background: #fff; color: var(--ink); border: 1.5px solid var(--line); padding: 14px; font-size: 16px; }
.names button:hover:not(:disabled) { border-color: var(--red); }
.names button:disabled { text-decoration: line-through; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.meta span { background: rgba(255,255,255,.1); color: var(--paper); padding: 5px 12px; border-radius: 999px; font-size: 14px; }
.center { text-align: center; }
.gift { font-size: 96px; cursor: pointer; display: inline-block; transition: transform .2s; user-select: none; }
.gift:hover { transform: scale(1.06) rotate(-3deg); }
.gift.shake { animation: shake .6s; }
@keyframes shake { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-12deg)} 40%{transform:rotate(10deg)} 60%{transform:rotate(-8deg)} 80%{transform:rotate(6deg)} }
.target { font-family: Fraunces, Georgia, serif; font-size: 44px; font-weight: 800; color: var(--red); margin: 6px 0; animation: pop .5s ease-out; overflow-wrap: anywhere; }
@keyframes pop { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.quote { background: #fff; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 8px; text-align: left; white-space: pre-wrap; margin-top: 14px; }
.hidden { display: none !important; }
.mine a { color: var(--green); font-weight: 600; }
footer { text-align: center; color: #8fb0a0; font-size: 13px; margin-top: 20px; }
