/* Secret Santa Wishbox — She Curates "ice glass" brand system, with snow. */
:root {
  --blue: #2f6be8;
  --blue-deep: #1d4fc4;
  --blue-bright: #6fa5ff;
  --blue-ice: #cfe1ff;
  --blue-wash: #2f6be814;
  --blue-line: #d5e2f4;
  --ink: #0e1a2c;
  --text: #46566d;
  --muted: #6a7a91;
  --surface-050: #f3f7fc;
  --surface-100: #eef4fb;
  --surface-200: #e6eef9;
  --sky: #c4daf8;
  --white: #ffffff;
  --glass: #ffffff75;
  --glass-strong: #ffffffd1;
  --glass-edge: #ffffffdb;
  --line: #0e1a2c14;
  --error: #b42318;
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 30px;
  --radius-xl: 44px;
  --shadow-soft: 0 30px 60px -38px rgba(26, 64, 130, .42), inset 0 1px 0 rgba(255, 255, 255, .95);
  --shadow-lift: 0 50px 90px -44px rgba(26, 64, 130, .5), inset 0 1px 0 rgba(255, 255, 255, .95);
  --shadow-button: 0 18px 34px -16px rgba(47, 107, 232, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text);
  font: 400 16px/1.7 var(--font);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--surface-050) 0%, var(--surface-100) 45%, var(--surface-200) 100%) fixed;
  background-color: var(--surface-100);
}
/* Soft drifting light fields behind everything */
body::before {
  content: ''; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 35% at 18% 12%, #ffffffcc 0%, transparent 70%),
    radial-gradient(45% 40% at 85% 20%, #c4daf899 0%, transparent 70%),
    radial-gradient(50% 40% at 70% 85%, #ffffffb3 0%, transparent 70%),
    radial-gradient(40% 35% at 10% 75%, #c4daf880 0%, transparent 70%);
  filter: blur(20px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) scale(1.05); } }

/* Snow */
.snow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.snow i {
  position: absolute; top: -12px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px rgba(47, 107, 232, .45), 0 0 1px rgba(29, 79, 196, .6);
  animation: fall linear infinite;
}
@keyframes fall { to { transform: translate3d(var(--dx, 20px), 110vh, 0); } }

h1, h2, h3 { color: var(--ink); margin: 0 0 .4em; }
h1, h2 { font-weight: 300; letter-spacing: -.025em; line-height: 1.05; hyphens: manual; }
h1 { font-size: clamp(2.5rem, 9vw, 4.2rem); }
h2 { font-size: clamp(1.55rem, 5vw, 2rem); letter-spacing: -.02em; line-height: 1.12; }
h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -.005em; line-height: 1.35; }
h1 em, h2 em { font-style: normal; color: var(--blue); }
p { margin: 0 0 .8em; }
a { color: var(--blue-deep); }
b, strong { color: var(--ink); font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 80px; }

/* Hero: silk light, no dark section */
.hero { padding: 22px 16px 70px; position: relative; overflow: hidden; }
.hero .inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.hero p { max-width: 32em; font-size: 1.08rem; line-height: 1.75; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.eyebrow {
  display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 500; letter-spacing: .3em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px; line-height: 1.4;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .6; flex: none; }
.eyebrow.plain::before { display: none; }
.lift { margin-top: -36px; position: relative; z-index: 1; }

/* Christmas decor: string lights, frosted tree, twinkle */
.hero { padding-top: 58px; }
.lights { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 2; pointer-events: none; }
.lights svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bulb {
  position: absolute; width: 9px; height: 13px; margin-left: -4.5px; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--c) 60%); box-shadow: 0 0 10px 2px var(--c), 0 0 2px rgba(29, 79, 196, .4);
  animation: twinkle 2.8s ease-in-out infinite;
}
.bulb::before { content: ''; position: absolute; left: 2px; right: 2px; top: -4px; height: 5px; border-radius: 2px; background: #b7c9e6; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.tree { position: absolute; right: 0; top: 74px; width: 200px; }
.tree svg { width: 100%; height: auto; display: block; overflow: visible; }
.tree .star { transform-origin: 100px 24px; animation: shine 4s ease-in-out infinite; }
@keyframes shine { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.hero.has-tree .inner > :not(.top):not(.tree) { max-width: 70%; }
@media (max-width: 560px) {
  .tree { width: 92px; right: 0; top: -8px; }
  .hero.has-tree .inner > :not(.top):not(.tree) { max-width: none; }
  .hero.has-tree .top { padding-right: 96px; }
}

/* Glass card */
.card {
  background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 24px; margin-bottom: 16px;
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
}
.card.flat { background: var(--glass); box-shadow: none; }
@media (max-width: 520px) { .card { padding: 20px; border-radius: var(--radius-md); } }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
label .opt { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--blue-line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
input.pin { letter-spacing: .6em; font-size: 1.4rem; text-align: center; max-width: 180px; font-variant-numeric: tabular-nums; }
input.code { letter-spacing: .3em; text-transform: uppercase; font-weight: 500; text-align: center; font-size: 1.2rem; }
::placeholder { color: #9aa8bb; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 500; font-size: .92rem; letter-spacing: .02em; cursor: pointer;
  background: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue) 45%, var(--blue-deep) 100%); color: #fff;
  box-shadow: var(--shadow-button); text-decoration: none; transition: transform .15s, box-shadow .15s, filter .15s; min-height: 46px;
}
.btn:hover { transform: translateY(-2px); filter: saturate(1.1); }
.btn:active { transform: none; background: var(--blue-deep); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.pine, .btn.white, .btn.light { background: var(--white); color: var(--ink); box-shadow: 0 12px 26px -18px rgba(26, 64, 130, .55), inset 0 0 0 1px var(--blue-line); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--blue-line); }
.btn.ghost:hover, .btn.pine:hover, .btn.light:hover { background: var(--white); box-shadow: 0 16px 30px -18px rgba(26, 64, 130, .6), inset 0 0 0 1px var(--blue-line); }
.btn.small { padding: 8px 16px; min-height: 38px; font-size: .86rem; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--blue-deep); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--error) !important; }
.err { color: var(--error); font-size: .9rem; min-height: 1.2em; margin: 6px 0 0; }

/* Tabs: floating glass pill */
.tabs {
  display: flex; gap: 4px; background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: 999px;
  padding: 5px; margin: 0 0 18px; position: sticky; top: 10px; z-index: 5; box-shadow: var(--shadow-soft); overflow-x: auto;
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
}
.tabs button {
  flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 999px; font-weight: 500;
  color: var(--text); cursor: pointer; white-space: nowrap; font-size: .88rem;
}
.tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); color: #fff; box-shadow: var(--shadow-button); }
.tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-bright); margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 2px #fff; }

/* Facts */
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); color: var(--ink); font-size: .86rem; font-weight: 500;
  box-shadow: 0 10px 24px -18px rgba(26, 64, 130, .5);
}
.chip svg { width: 16px; height: 16px; color: var(--blue); flex: none; }

/* Invite */
.invite { background: linear-gradient(135deg, #ffffffe6 0%, #e4efffe6 100%); }
.codebox {
  font-size: 1.9rem; letter-spacing: .22em; font-weight: 300; color: var(--blue-deep);
  background: var(--white); border-radius: var(--radius-sm); padding: 6px 16px 6px 22px; display: inline-block; border: 1px dashed var(--blue-bright);
}

/* Gift reveal */
.reveal { text-align: center; padding: 30px 20px; }
.giftbox { width: 150px; height: 150px; margin: 8px auto 16px; position: relative; cursor: pointer; border: 0; background: none; padding: 0; display: block; }
.giftbox .box { position: absolute; left: 15px; right: 15px; bottom: 0; height: 90px; border-radius: 12px;
  background: radial-gradient(120% 120% at 30% 10%, var(--blue-bright) 0%, var(--blue) 55%, var(--blue-deep) 100%);
  box-shadow: var(--shadow-button); }
.giftbox .lid {
  position: absolute; left: 5px; right: 5px; top: 38px; height: 28px; border-radius: 10px;
  background: linear-gradient(180deg, #8fb9ff 0%, var(--blue) 100%);
  transition: transform .7s cubic-bezier(.3, 1.3, .5, 1), opacity .5s .2s; transform-origin: 10% 100%;
}
.giftbox .ribbon { position: absolute; left: 50%; width: 16px; margin-left: -8px; top: 38px; bottom: 0; background: linear-gradient(90deg, #fff, var(--blue-ice)); opacity: .95; }
.giftbox .bow { position: absolute; left: 50%; top: 6px; width: 64px; transform: translateX(-50%); transition: transform .7s, opacity .5s; }
.giftbox:hover .lid { transform: rotate(-4deg); }
.giftbox.open .lid { transform: translate(-20px, -60px) rotate(-35deg); opacity: 0; }
.giftbox.open .bow { transform: translate(-50%, -80px); opacity: 0; }
.giftbox { animation: wiggle 3.2s ease-in-out infinite; }
.giftbox.open { animation: none; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-4deg); } 88% { transform: rotate(4deg); } 92% { transform: rotate(-2deg); } }
.giftee-name { font-size: clamp(2.6rem, 11vw, 4rem); color: var(--blue); font-weight: 300; letter-spacing: -.03em; line-height: 1.05; animation: pop .6s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Wishes */
.wish { border-top: 1px solid var(--line); padding: 18px 0; }
.wish:first-child { border-top: 0; padding-top: 4px; }
.wish h3 { margin-bottom: 4px; }
.wish .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .9rem; margin-bottom: 6px; }
.price { background: var(--blue-wash); color: var(--blue-deep); padding: 3px 12px; border-radius: 999px; font-weight: 500; font-size: .82rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.photos img, .thumb img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; cursor: zoom-in;
  background: var(--surface-200); border: 1px solid var(--blue-line);
}
.photos.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { position: relative; width: 84px; }
.thumb button {
  position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--ink); color: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.addphoto {
  width: 84px; height: 84px; border: 1.5px dashed var(--blue-line); border-radius: var(--radius-sm); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--muted); cursor: pointer; font-size: .78rem; gap: 2px; background: var(--white);
}
.addphoto:hover { border-color: var(--blue); color: var(--blue); }
.addphoto span { font-size: 1.5rem; line-height: 1; font-weight: 300; }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 16px; background: var(--white); border: 1px solid var(--blue-line); color: var(--blue); }
.empty .ico svg { width: 26px; height: 26px; }

/* People */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; color: #fff; flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 16px -10px rgba(26, 64, 130, .6);
}
.person .grow { flex: 1; min-width: 0; }
.person .name { font-weight: 500; color: var(--ink); }
.tag { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .24em; background: var(--blue-wash); color: var(--blue-deep); padding: 4px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
details.person-wishes { border-top: 1px solid var(--line); }
details.person-wishes:first-of-type { border-top: 0; }
details.person-wishes summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 0; }
details.person-wishes summary::-webkit-details-marker { display: none; }
details.person-wishes summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
details.person-wishes[open] summary::after { transform: rotate(-135deg); }
details.person-wishes .inner { padding: 0 0 12px 52px; }
@media (max-width: 520px) { details.person-wishes .inner { padding-left: 0; } }

/* Chat */
.thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 360px; overflow-y: auto; }
.bubble { max-width: 82%; padding: 10px 15px; border-radius: 18px; background: var(--white); border: 1px solid var(--blue-line); color: var(--ink); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); border: 0; color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble:not(.mine) { border-bottom-left-radius: 6px; }
.bubble .t { display: block; font-size: .72rem; opacity: .7; margin-top: 2px; }
.compose { display: flex; gap: 8px; align-items: flex-end; }
.compose textarea { min-height: 46px; height: 46px; }

/* Steps */
.steps { counter-reset: s; display: grid; gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step::before {
  counter-increment: s; content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--blue-line); color: var(--blue); display: grid; place-items: center; font-weight: 500;
}
.mygroups a { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.mygroups a:first-child { border-top: 0; }

/* Overlays */
.lightbox { position: fixed; inset: 0; background: rgba(14, 26, 44, .9); display: grid; place-items: center; z-index: 50; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: var(--radius-sm); }
.modal-bg { position: fixed; inset: 0; background: rgba(14, 26, 44, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface-050); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lift); }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { border-radius: var(--radius-lg); padding: 28px; } }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px); background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 999px; font-weight: 500; z-index: 60; transition: transform .25s; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { transform: translate(-50%, 0); }
.countdown { font-size: 3rem; color: var(--blue); font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.foot { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 32px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--blue-line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 80px 0; color: var(--muted); }

/* She Curates credit */
.sc-mark { flex: none; display: block; }
.sc-by {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); color: var(--text); text-decoration: none; font-size: .8rem; white-space: nowrap;
  box-shadow: 0 10px 24px -18px rgba(26, 64, 130, .5);
}
.sc-by b, .sc-foot b { font-weight: 500; color: var(--ink); }
.sc-by:hover { background: var(--white); }
.sc-card .eyebrow { color: var(--blue-deep); }
.sc-link { color: var(--blue-deep); font-weight: 500; text-decoration: none; }
.sc-link:hover { text-decoration: underline; }
.sc-foot { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .86rem; }
.sc-foot:hover span { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .snow i { top: var(--y); } }
.reveal .eyebrow { justify-content: center; }
.reveal .eyebrow::before { display: none; }
