[hidden] { display: none !important; }
:root {
  --night: #10223a;
  --night2: #1b3557;
  --cream: #fff8ef;
  --red: #d62839;
  --red-dark: #a91d2b;
  --green: #1f7a4d;
  --gold: #f2b632;
  --ink: #2b2b2b;
  --muted: #7a7166;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse at top, var(--night2), var(--night) 70%) fixed;
  min-height: 100vh;
  line-height: 1.5;
}
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.title {
  font-family: 'Mountains of Christmas', 'Nunito', cursive;
  color: #fff; text-align: center; font-size: clamp(46px, 11vw, 78px); margin: 10px 0 0;
  text-shadow: 0 4px 0 var(--red-dark), 0 8px 24px rgba(0,0,0,.4); letter-spacing: 1px;
}
.subtitle { color: #e9dfcf; text-align: center; margin: 4px 0 26px; font-size: 18px; }
.card {
  background: var(--cream); border-radius: var(--radius); padding: 22px 20px; margin: 18px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.card h2 { margin: 0 0 14px; color: var(--green); font-size: 21px; display: flex; align-items: center; gap: 8px; }
.card h2 .step {
  background: var(--red); color: #fff; width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 15px; flex: none;
}
label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: 15px; }
input, textarea, select {
  width: 100%; font: inherit; padding: 11px 13px; border-radius: 12px; border: 2px solid #e6d9c6; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font: inherit; font-weight: 800; padding: 12px 20px; border-radius: 999px; background: var(--red); color: #fff;
  box-shadow: 0 4px 0 var(--red-dark); transition: transform .1s, box-shadow .1s; text-decoration: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.green { background: var(--green); box-shadow: 0 4px 0 #145236; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid #e6d9c6; }
.btn.small { padding: 7px 13px; font-size: 14px; }
.btn.big { padding: 16px 28px; font-size: 19px; width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.hint { background: #fff; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.danger { color: var(--red); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); z-index: 50;
  background: #222; color: #fff; padding: 12px 20px; border-radius: 999px; transition: transform .3s; max-width: 92vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

/* ---------- Avatars parodiques ---------- */
.avatar { position: relative; display: inline-block; flex: none; }
.avatar .pic {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
  border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25); background: #e6d9c6;
}
.avatar .placeholder {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800;
  border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.avatar .deco { position: absolute; pointer-events: none; }
.avatar .deco.hat { width: 92%; left: 2%; top: -42%; transform: rotate(-12deg); }
.avatar .deco.antlers { width: 110%; left: -5%; top: -36%; }
.avatar .deco.crown { width: 64%; left: 18%; top: -34%; transform: rotate(-6deg); }
.avatar .nose {
  position: absolute; width: 18%; height: 18%; left: 41%; top: 52%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff7a7a, #d10000 60%); box-shadow: 0 0 12px #ff2a2a;
}
.wanted {
  display: inline-block; background: #f1dfb3; padding: 10px 10px 8px; text-align: center; border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); font-family: Georgia, 'Times New Roman', serif; color: #4a3218;
  transform: rotate(-2deg); border: 2px dashed #b08a52;
}
.wanted .w-title { font-weight: 900; letter-spacing: 3px; line-height: 1; }
.wanted img, .wanted .placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(.8) contrast(1.1); border: 3px solid #4a3218; display: block; border-radius: 0; box-shadow: none; }
.wanted .w-sub { line-height: 1.1; margin-top: 4px; font-style: italic; }
.nick {
  display: inline-block; background: var(--gold); color: #4a3200; font-weight: 800; font-size: 13px;
  padding: 3px 10px; border-radius: 999px; margin-top: 8px;
}

/* ---------- Admin ---------- */
.plist { display: grid; gap: 12px; }
.pitem { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 14px; padding: 12px; padding-top: 22px; }
.pitem .info { flex: 1; min-width: 0; }
.pitem .name { font-weight: 800; font-size: 17px; }
.pitem .email { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eee; font-weight: 700; }
.badge.ok { background: #d8f0e2; color: #145236; }
.badge.warn { background: #ffe8c2; color: #7a4d00; }
.badge.err { background: #ffd9dc; color: var(--red-dark); }
.frames { display: flex; gap: 8px; flex-wrap: wrap; }
.frames button {
  border: 2px solid #e6d9c6; background: #fff; border-radius: 12px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 14px;
}
.frames button.on { border-color: var(--red); background: #fff0f1; font-weight: 800; }
.photo-pick { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding-top: 18px; }
.excl-giver { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.excl-giver .who { font-weight: 800; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid #e6d9c6; background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 14px;
}
.chip.on { background: var(--red); border-color: var(--red); color: #fff; text-decoration: line-through; }
.status-big { font-size: 18px; font-weight: 800; }
dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: 520px; width: 94vw; background: var(--cream); }
dialog::backdrop { background: rgba(10,20,35,.7); }
dialog .card { margin: 0; box-shadow: none; }
.keybox { word-break: break-all; background: #fff; padding: 10px; border-radius: 10px; font-family: monospace; font-size: 13px; }

/* ---------- Page participant ---------- */
.countdown { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.countdown div { background: rgba(255,255,255,.1); color: #fff; border-radius: 14px; padding: 8px 10px; min-width: 66px; text-align: center; }
.countdown b { display: block; font-size: 28px; line-height: 1.1; }
.countdown span { font-size: 12px; opacity: .8; }
.countdown-label { text-align: center; color: #e9dfcf; font-size: 15px; }
.stage { position: relative; min-height: 380px; display: grid; place-items: center; margin: 64px 0 20px; }
.gift { position: relative; width: 190px; height: 190px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gift .box {
  position: absolute; bottom: 0; left: 10px; width: 170px; height: 140px; border-radius: 8px;
  background: linear-gradient(90deg, transparent 43%, var(--gold) 43%, var(--gold) 57%, transparent 57%), linear-gradient(#e63946, #b81f2e);
  box-shadow: inset 0 -12px 0 rgba(0,0,0,.12), 0 18px 30px rgba(0,0,0,.35);
}
.gift .lid {
  position: absolute; top: 18px; left: 0; width: 190px; height: 44px; border-radius: 8px;
  background: linear-gradient(90deg, transparent 43%, #ffd25e 43%, #ffd25e 57%, transparent 57%), linear-gradient(#f04452, #c92434);
  box-shadow: 0 6px 0 rgba(0,0,0,.15); transform-origin: 20% 100%; z-index: 2;
}
.gift .bow { position: absolute; left: 50%; top: -30px; width: 0; height: 0; }
.gift .bow::before, .gift .bow::after {
  content: ''; position: absolute; width: 46px; height: 32px; border: 10px solid var(--gold); border-radius: 50% 50% 50% 50%; top: 0;
}
.gift .bow::before { right: 2px; transform: rotate(-20deg); }
.gift .bow::after { left: 2px; transform: rotate(20deg); }
.gift.wiggle { animation: wiggle 2.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-6deg); } 88% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
.gift.shake { animation: shake .12s linear infinite; }
@keyframes shake { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-4px,1px) rotate(-4deg); } 50% { transform: translate(3px,-2px) rotate(3deg); } 75% { transform: translate(-2px,2px) rotate(-2deg); } 100% { transform: translate(0,0) rotate(0); } }
.gift.open .lid { animation: lidoff .9s cubic-bezier(.2,.7,.3,1) forwards; }
.gift.open .box { animation: boxdown .9s .25s ease-in forwards; }
@keyframes lidoff { to { transform: translate(-60px,-260px) rotate(-70deg); opacity: 0; } }
@keyframes boxdown { to { transform: translateY(40px) scale(.7); opacity: 0; } }
.tap-hint { color: #fff; text-align: center; font-weight: 800; font-size: 18px; margin-top: 14px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.reveal { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.reveal.show { display: flex; animation: pop .8s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.1) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.reveal .lead { color: #e9dfcf; font-size: 18px; margin: 34px 0 6px; }
.reveal .who { font-family: 'Mountains of Christmas', 'Nunito', cursive; color: #fff; font-size: 52px; line-height: 1; text-shadow: 0 3px 0 var(--red-dark); margin: 4px 0 4px; }
.confetti { position: fixed; width: 10px; height: 14px; top: 0; left: 0; z-index: 40; pointer-events: none; border-radius: 2px; }
.wishlist-view { white-space: pre-wrap; background: #fff; border-radius: 12px; padding: 12px 14px; }
.center { text-align: center; }
footer { text-align: center; color: #9fb0c8; font-size: 13px; margin-top: 30px; }
