/* ============ Family Secret Santa ============ */
:root {
  --pine: #0d3526;
  --pine-2: #14503a;
  --holly: #1e6b47;
  --holly-dark: #134a31;
  --berry: #c4232c;
  --berry-dark: #8f161e;
  --gold: #f4c34f;
  --gold-dark: #b8860b;
  --cream: #fffaf0;
  --cream-2: #fbf0dc;
  --ink: #2d1e15;
  --muted: #7b6656;
  --line: #ead8b8;
  --radius: 20px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.38), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
  --display: "Mountains of Christmas", "Georgia", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--pine);
  background-image:
    radial-gradient(900px 520px at 50% -8%, rgba(60, 160, 110, 0.45), transparent 65%),
    radial-gradient(600px 400px at 100% 100%, rgba(196, 35, 44, 0.18), transparent 70%),
    radial-gradient(600px 400px at 0% 90%, rgba(244, 195, 79, 0.10), transparent 70%),
    linear-gradient(180deg, #11402e 0%, #0b2e21 55%, #071f16 100%);
  background-attachment: fixed;
  padding-top: 40px;
  overflow-x: hidden;
}

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
main, .site-foot { position: relative; z-index: 1; }
main { max-width: 880px; margin: 0 auto; padding: 12px 16px 28px; }

a { color: var(--holly); font-weight: 700; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- string lights ---------- */
.lights {
  position: fixed; top: 0; left: 0; right: 0; height: 46px;
  z-index: 20; display: flex; overflow: hidden; pointer-events: none;
}
.light { flex: 0 0 62px; height: 46px; position: relative; }
.light::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -12px; height: 24px;
  border-bottom: 2px solid #1d2b23; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.light i {
  position: absolute; left: 50%; top: 16px; width: 12px; height: 19px; margin-left: -6px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c);
  box-shadow: 0 0 14px 4px var(--c);
  animation: twinkle 1.8s ease-in-out infinite;
  animation-delay: var(--d);
}
.light i::before {
  content: ""; position: absolute; top: -5px; left: 2px; width: 8px; height: 6px;
  background: #2f3a33; border-radius: 2px;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; box-shadow: 0 0 16px 5px var(--c); }
  50% { opacity: 0.45; box-shadow: 0 0 4px 1px var(--c); }
}

/* ---------- header ---------- */
.site-head { text-align: center; margin: 14px 0 18px; }
.site-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 4.3rem); line-height: 1;
  color: var(--gold);
  text-shadow: 0 2px 0 #7a5608, 0 4px 0 #5a3f05, 0 10px 24px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}
.site-title .star { display: inline-block; animation: spin-star 6s linear infinite; }
@keyframes spin-star { 0%, 85% { transform: rotate(0) scale(1); } 92% { transform: rotate(20deg) scale(1.25); } 100% { transform: rotate(0) scale(1); } }
.tagline { color: #e6f4ea; font-weight: 700; margin: 10px 0 0; opacity: 0.92; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 18px;
}
.hello { font-family: var(--display); font-weight: 700; color: #fff; font-size: 2rem; line-height: 1.1; text-shadow: 0 3px 10px rgba(0,0,0,.4); }
.countdown {
  display: inline-block; margin-top: 6px;
  background: var(--gold); color: #4a3205; font-weight: 900; font-size: 0.92rem;
  padding: 4px 12px; border-radius: 999px; box-shadow: 0 3px 0 var(--gold-dark);
}
.topnav { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- cards ---------- */
.card {
  position: relative; overflow: hidden;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 20px 22px;
  margin: 0 0 22px;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 11px;
  background: repeating-linear-gradient(-45deg, var(--berry) 0 13px, #fff 13px 26px);
}
.card::after {
  content: ""; position: absolute; top: 12px; right: 10px; width: 58px; height: 58px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M31 33C25 20 12 17 3 21c6 3 6 7 2 11 7 0 9 5 6 9 9-4 15-3 20-8z' fill='%231e6b47'/%3E%3Cpath d='M33 33c6-13 19-16 28-12-6 3-6 7-2 11-7 0-9 5-6 9-9-4-15-3-20-8z' fill='%23288a5b'/%3E%3Cpath d='M31 33C25 20 12 17 3 21' stroke='%23134a31' stroke-width='1.2' fill='none'/%3E%3Cpath d='M33 33c6-13 19-16 28-12' stroke='%23134a31' stroke-width='1.2' fill='none'/%3E%3Ccircle cx='27' cy='36' r='6' fill='%23c4232c'/%3E%3Ccircle cx='37' cy='36' r='6' fill='%23d9343d'/%3E%3Ccircle cx='32' cy='28' r='6' fill='%23b01d25'/%3E%3Ccircle cx='30' cy='26' r='1.8' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='25' cy='34' r='1.8' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='35' cy='34' r='1.8' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.95;
}
.card h2 {
  font-family: var(--display); font-weight: 700; color: var(--berry);
  font-size: clamp(1.8rem, 6vw, 2.3rem); line-height: 1.1; margin: 2px 56px 8px 0;
}
.card h4 { font-size: 1rem; font-weight: 900; margin: 18px 0 8px; color: var(--holly-dark); }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.fine { color: var(--muted); font-size: 0.85rem; text-align: center; margin: 12px 0 0; }
.center { text-align: center; }
.loading { color: #fff; text-align: center; font-weight: 800; font-size: 1.2rem; padding: 60px 0; }

.empty { text-align: center; padding: 14px 10px 6px; }
.empty p { margin: 6px 0; }
.empty .lead { font-weight: 900; font-size: 1.15rem; }
.big-emoji { font-size: 3.4rem; line-height: 1; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; display: inline-block; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }

/* ---------- notice ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff3c8; color: #4f3a10;
  border-radius: 16px; padding: 14px 16px; margin: 0 0 22px;
  border: 2px dashed var(--gold-dark);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  font-weight: 700; white-space: pre-line;
}
.notice-icon { font-size: 1.5rem; line-height: 1; }
.notice-secret { background: #eaf6ee; color: var(--holly-dark); border-color: var(--holly); }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 800; font-size: 1rem;
  border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; line-height: 1.2;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); }
.btn:focus-visible, .chip:focus-visible, .chip-toggle:focus-visible, .icon-btn:focus-visible, .present:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; filter: grayscale(0.3); }
.btn.busy { cursor: progress; }
.btn-red { background: linear-gradient(180deg, #df3a43, var(--berry)); color: #fff; box-shadow: 0 4px 0 var(--berry-dark), 0 10px 18px rgba(196, 35, 44, 0.3); }
.btn-green { background: linear-gradient(180deg, #278556, var(--holly)); color: #fff; box-shadow: 0 4px 0 var(--holly-dark), 0 10px 18px rgba(30, 107, 71, 0.3); }
.btn-gold { background: linear-gradient(180deg, #ffd770, var(--gold)); color: #4a3205; box-shadow: 0 4px 0 var(--gold-dark); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 2px solid rgba(255, 255, 255, 0.45); }
.btn-ghost-dark { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-danger-soft { background: #fff; color: var(--berry-dark); border: 2px solid #f0b9bc; }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.btn-big { width: 100%; padding: 15px 24px; font-size: 1.15rem; margin-top: 16px; }
.btn-red:active { box-shadow: 0 2px 0 var(--berry-dark); }
.btn-green:active { box-shadow: 0 2px 0 var(--holly-dark); }

.icon-btn {
  font: inherit; background: #fff; border: 2px solid var(--line); border-radius: 12px;
  width: 38px; height: 38px; cursor: pointer; font-size: 1rem; display: inline-grid; place-items: center;
}
.icon-btn:hover { border-color: var(--holly); }

/* ---------- forms ---------- */
.lbl { display: block; font-weight: 900; margin: 16px 0 6px; }
.field {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.field { resize: vertical; min-height: 84px; }
select.field {
  appearance: none; -webkit-appearance: none; font-weight: 800; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%23c4232c' stroke-width='2.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  padding-right: 42px;
}
.field:focus { outline: none; border-color: var(--holly); box-shadow: 0 0 0 4px rgba(30, 107, 71, 0.18); }
.item-form { display: grid; gap: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-actions.center { justify-content: center; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form .field { flex: 1; min-width: 0; }
.inline-form .btn { flex: none; }

/* ---------- PIN boxes ---------- */
.pin { display: flex; gap: 12px; justify-content: center; margin: 4px 0; }
.pin-box {
  width: 58px; height: 66px; text-align: center; font: inherit; font-size: 1.9rem; font-weight: 900;
  border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  caret-color: var(--berry); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.04);
}
.pin-box:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 4px rgba(196, 35, 44, 0.16); }
.pin.shake { animation: shake 0.42s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- login ---------- */
.login-card { max-width: 460px; margin: 0 auto 22px; padding-top: 34px; }
.login-card h2 { margin-right: 0; text-align: center; }
.santa-bob { font-size: 4rem; text-align: center; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
.pin-area .lbl { text-align: center; }
.setup-hello { text-align: center; margin: 18px 0 0; }
.setup-hello strong { color: var(--berry); }

/* ---------- presents (unwrap) ---------- */
.giftees { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 760px) { .giftees { grid-template-columns: 1fr 1fr; } }

.present {
  appearance: none; border: 2px dashed var(--line); background: #fff; border-radius: 18px;
  cursor: pointer; font: inherit; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 12px 20px;
  -webkit-tap-highlight-color: transparent;
}
.present:hover .gift { animation: wiggle 0.6s ease-in-out; }
.gift { position: relative; width: 150px; height: 138px; }
.gift .box {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 92px; border-radius: 6px;
  background: var(--berry); box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.13);
}
.gift .box::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 22px; margin-left: -11px; background: var(--gold); }
.gift .lid {
  position: absolute; left: 0; right: 0; top: 22px; height: 30px; border-radius: 6px; z-index: 2;
  background: #db3740; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.7s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.7s ease;
}
.gift .lid::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 24px; margin-left: -12px; background: var(--gold); }
.gift .bow { position: absolute; left: 50%; top: -22px; width: 0; height: 0; }
.gift .bow::before, .gift .bow::after {
  content: ""; position: absolute; top: 0; width: 34px; height: 24px;
  border: 7px solid var(--gold); border-radius: 50% 50% 50% 50%;
}
.gift .bow::before { right: 0; transform: rotate(-24deg); }
.gift .bow::after { left: 0; transform: rotate(24deg); }
.present.alt .gift .box { background: var(--holly); }
.present.alt .gift .lid { background: #23794f; }
.present.alt .gift .box::before, .present.alt .gift .lid::before { background: #fff; }
.present.alt .gift .bow::before, .present.alt .gift .bow::after { border-color: #ff5a63; }
.present .tap { font-weight: 900; color: var(--holly-dark); font-size: 1.05rem; }
.present .tap small { display: block; font-weight: 700; color: var(--muted); font-size: 0.85rem; text-align: center; }
.present.opening .gift .lid { transform: translate(30px, -90px) rotate(28deg); opacity: 0; }
.present.opening .gift { animation: wiggle 0.5s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 75% { transform: rotate(-3deg); } }

/* ---------- giftee card ---------- */
.giftee { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 18px 16px 16px; min-width: 0; }
.giftee.pop { animation: pop-in 0.6s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes pop-in { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.giftee-head { text-align: center; padding-bottom: 10px; border-bottom: 2px dashed var(--line); }
.kicker { font-size: 0.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.giftee-name { font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1.05; color: var(--holly); word-break: break-word; }
.giftee h4:first-of-type { margin-top: 14px; }

/* ---------- wishes ---------- */
.wishes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.wish {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: var(--cream-2); border-radius: 14px; padding: 10px 12px;
  border: 1px solid #f1e2c6;
}
.wish-main { flex: 1 1 180px; min-width: 0; }
.wish-title { font-weight: 800; overflow-wrap: anywhere; }
.wish-title a { text-decoration-thickness: 2px; text-underline-offset: 2px; }
.wish-note { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.wish-side { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.wish.is-bought { background: #f3efe6; }
.wish.is-bought .wish-title { text-decoration: line-through; text-decoration-color: var(--berry); text-decoration-thickness: 2px; opacity: 0.7; }
.wish.editing { display: block; background: #fff; border: 2px dashed var(--holly); }
.wish-list-empty { margin: 6px 0 0; }

.chip {
  font: inherit; font-size: 0.86rem; font-weight: 900; white-space: nowrap;
  border-radius: 999px; padding: 6px 12px; border: 2px solid transparent; cursor: pointer;
}
.chip-buy { background: #fff; color: var(--holly-dark); border-color: var(--holly); }
.chip-buy:hover { background: var(--holly); color: #fff; }
.chip-mine { background: var(--holly); color: #fff; }
.chip-mine:hover { background: var(--holly-dark); }
.chip-taken { background: #fde3e4; color: var(--berry-dark); cursor: default; }

.log { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.log li { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #f7f3ea; }
.log li.mine { background: #e7f4ec; }
.log .who { flex: none; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.8px; color: var(--holly-dark); }
.log li.other .who { color: var(--berry-dark); }
.log .what { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.log .from-list { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.log .x { flex: none; border: 0; background: none; cursor: pointer; font-size: 1rem; color: var(--muted); padding: 0 4px; }
.log .x:hover { color: var(--berry); }

/* ---------- family lists ---------- */
.fam { background: #fff; border: 2px solid var(--line); border-radius: 16px; margin: 0 0 10px; overflow: hidden; }
.fam summary {
  list-style: none; cursor: pointer; padding: 13px 16px; display: flex; align-items: center; gap: 10px; font-weight: 900;
}
.fam summary::-webkit-details-marker { display: none; }
.fam summary::before { content: "🎁"; transition: transform 0.2s; }
.fam[open] summary::before { content: "📜"; }
.fam .fam-name { flex: 1; }
.fam .count { font-size: 0.85rem; color: var(--muted); font-weight: 800; }
.fam .wishes { margin: 0; padding: 0 12px 12px; }
.fam .pad { padding: 0 16px 14px; margin: 0; }

/* ---------- admin ---------- */
.members { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.members li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.member-name { font-weight: 900; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.member-status { flex: 1 1 160px; font-size: 0.9rem; }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 900; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.badge-ok { background: #e1f3e8; color: var(--holly-dark); }
.badge-wait { background: #fff1cc; color: #7a5608; }
.badge-lock { background: #fde3e4; color: var(--berry-dark); }
.badge-gold { background: var(--gold); color: #4a3205; }

.switch { display: flex; align-items: center; gap: 10px; font-weight: 800; margin: 12px 0 6px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--holly); }
.rule { padding: 12px 0; border-top: 2px dashed var(--line); }
.rule:first-of-type { border-top: 0; }
.rule-name { font-weight: 900; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle {
  font: inherit; font-weight: 800; font-size: 0.92rem; cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 6px 13px;
}
.chip-toggle:hover { border-color: var(--holly); }
.chip-toggle[aria-pressed="true"] { background: #fde3e4; border-color: var(--berry); color: var(--berry-dark); }
.chip-toggle[aria-pressed="true"] .nm { text-decoration: line-through; }

.checks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.checks .ic { flex: none; width: 24px; text-align: center; }
.problems { margin: 0 0 12px; padding: 12px 14px 12px 34px; background: #fde3e4; color: var(--berry-dark); border-radius: 14px; font-weight: 700; }
.btn-magic {
  font-size: 1.3rem; padding: 18px 34px; margin-top: 8px;
  background: linear-gradient(110deg, #c4232c, #e0434b 35%, #f4c34f 50%, #e0434b 65%, #c4232c);
  background-size: 250% 100%;
  animation: shimmer 3.2s linear infinite;
}
.btn-magic[disabled] { animation: none; background: #b9a99a; box-shadow: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.drawn { text-align: center; padding: 6px 0 4px; }
.drawn-title { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--holly); margin: 4px 0; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 20, 14, 0.66);
  display: grid; place-items: center; padding: 16px; animation: fade-in 0.18s ease;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.overlay.out { animation: fade-out 0.18s ease forwards; }
.modal { width: 100%; max-width: 430px; margin: 0; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal p { margin: 4px 0 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.globe { text-align: center; color: #fff; }
.globe .orb { font-size: 5.5rem; display: inline-block; animation: shake-globe 0.5s ease-in-out infinite; }
.globe .msg { font-family: var(--display); font-weight: 700; font-size: 2rem; margin-top: 10px; text-shadow: 0 3px 10px rgba(0,0,0,.5); }
@keyframes shake-globe { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg) translateY(-6px); } }

/* ---------- toasts ---------- */
#toasts {
  position: fixed; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast {
  max-width: 520px; background: #fff; color: var(--ink); font-weight: 800;
  padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-left: 6px solid var(--holly); animation: toast-in 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.toast-err { border-left-color: var(--berry); }
.toast.out { animation: fade-out 0.3s ease forwards; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } }

/* ---------- confetti ---------- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti {
  position: absolute; width: 9px; height: 14px; border-radius: 2px;
  animation: burst 1.5s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes burst {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  45% { transform: translate(var(--dx), var(--dy)) rotate(calc(var(--r) * 0.5)); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.25), calc(var(--dy) + 320px)) rotate(var(--r)); opacity: 0; }
}
.emoji-rain { position: absolute; top: -60px; font-size: 2rem; animation: rain linear forwards; }
@keyframes rain { to { transform: translateY(calc(100vh + 120px)) rotate(var(--r)); } }

.site-foot { text-align: center; color: rgba(255, 255, 255, 0.6); font-weight: 700; font-size: 0.85rem; padding: 4px 16px 30px; }

@media (max-width: 520px) {
  .card { padding: 28px 16px 18px; border-radius: 18px; }
  .card::after { width: 46px; height: 46px; }
  .hello { font-size: 1.75rem; }
  .pin { gap: 10px; }
  .pin-box { width: 54px; height: 62px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
