:root {
  --pine: #0f2a20;
  --pine-2: #163a2c;
  --pine-3: #1f4d3a;
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --ink: #1d2420;
  --muted: #6b7068;
  --line: #e7dfcf;
  --berry: #b3262e;
  --berry-dark: #8e1b22;
  --gold: #d9a441;
  --gold-soft: #f3e3bd;
  --mint: #2f7a57;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 42, 32, .06), 0 8px 24px rgba(15, 42, 32, .10);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #24563f 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #1b4434 0%, transparent 55%),
    var(--pine);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.45;
}
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--berry); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(20px, env(safe-area-inset-left)) 12px max(20px, env(safe-area-inset-right));
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(15, 42, 32, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  color: var(--cream);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand svg { width: 34px; height: 34px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a, .tabbar a {
  position: relative; text-decoration: none; color: rgba(251, 246, 236, .72);
  font-weight: 600; border-radius: 999px;
}
.topnav a { padding: 8px 16px; }
.topnav a:hover { color: var(--cream); background: rgba(255, 255, 255, .06); }
.topnav a.active { color: var(--pine); background: var(--cream); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--berry); color: #fff; font-size: 11px; font-weight: 700;
  margin-left: 6px; vertical-align: 1px;
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(15, 42, 32, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; font-size: 12px; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--gold); }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-user { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(251, 246, 236, .75); text-decoration: none; font-weight: 600; }
.top-user span { display: none; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--cream); display: grid; place-items: center; cursor: pointer; }
.bell:hover { background: rgba(255,255,255,.14); }
.bell svg { width: 22px; height: 22px; }
.bell .badge { position: absolute; top: -2px; right: -4px; margin: 0; }

@media (min-width: 860px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .top-right { margin-left: 16px; }
  .top-user span { display: inline; }
}

/* ---------- layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 24px 16px calc(96px + var(--safe-bottom)); }
@media (min-width: 860px) { .page { padding: 40px 32px 80px; } }
.page-head { color: var(--cream); margin: 4px 0 20px; }
.page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 900; }
.page-head p { margin: 6px 0 0; color: rgba(251, 246, 236, .72); }
.back { display: inline-flex; align-items: center; gap: 6px; color: rgba(251, 246, 236, .75); text-decoration: none; font-weight: 600; margin-bottom: 12px; }
.back:hover { color: var(--cream); }

.grid-2 { display: grid; gap: 20px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.stack { display: grid; gap: 20px; }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; position: relative;
}
@media (min-width: 860px) { .card { padding: 26px; } }
.card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.card .sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 26px 22px; color: var(--cream);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(217, 164, 65, .28), transparent 70%),
    linear-gradient(135deg, var(--berry) 0%, var(--berry-dark) 100%);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .hero { padding: 34px 36px; } }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); font-weight: 900; }
.hero p { margin: 8px 0 0; opacity: .85; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); font-weight: 600; font-size: 14px;
}
.chip strong { font-family: var(--display); font-size: 1.15rem; }
.hero .ribbon-v, .hero .ribbon-h { position: absolute; background: rgba(217, 164, 65, .55); }
.hero .ribbon-v { top: 0; bottom: 0; right: 64px; width: 14px; }
.hero .ribbon-h { left: 0; right: 0; top: 56px; height: 14px; opacity: .0; }

/* ---------- match card ---------- */
.match { display: grid; gap: 16px; }
.match-name { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 6vw, 3rem); color: var(--berry); line-height: 1; }
.match-label { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; line-height: 1.1;
  background: var(--berry); color: #fff; transition: transform .12s ease, background .12s ease, box-shadow .12s;
  box-shadow: 0 2px 0 var(--berry-dark);
}
.btn:hover { background: #c22d36; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--cream); color: var(--pine); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.secondary:hover { background: #f4ecdb; }
.btn.ghost { background: transparent; color: var(--pine); box-shadow: none; padding: 10px 12px; }
.btn.ghost:hover { background: rgba(15, 42, 32, .06); }
.btn.gold { background: var(--gold); color: var(--pine); box-shadow: 0 2px 0 #a97c25; }
.btn.gold:hover { background: #e3b04d; }
.btn.green { background: var(--mint); box-shadow: 0 2px 0 #1f5a3e; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

label.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=url], input[type=password], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  font-size: 16px; outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 164, 65, .2); }
.form { display: grid; gap: 14px; }
.form-2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-2 { grid-template-columns: 1fr 1fr; } }
.pin-input { letter-spacing: .6em; font-size: 22px !important; text-align: center; font-weight: 700; }
.error { color: var(--berry); font-weight: 600; font-size: 14px; min-height: 1em; margin: 0; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f3ede1; padding: 4px; border-radius: 14px; }
.segmented button { border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 600; }
.toggle input { display: none; }
.toggle .track { width: 52px; height: 30px; border-radius: 999px; background: #d9d2c3; position: relative; transition: background .2s; flex: none; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked + .track { background: var(--mint); }
.toggle input:checked + .track::after { transform: translateX(22px); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 420px; }
.auth-logo { display: grid; justify-items: center; gap: 10px; color: var(--cream); text-align: center; margin-bottom: 22px; }
.auth-logo svg { width: 84px; height: 84px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.auth-logo h1 { font-size: 2.4rem; font-weight: 900; }
.auth-logo p { margin: 0; opacity: .75; }
.auth .switch { text-align: center; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.auth .switch button { background: none; border: 0; color: var(--berry); font-weight: 700; cursor: pointer; padding: 0; }

/* ---------- people ---------- */
.people-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 860px) { .people-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; } }
.person {
  display: grid; justify-items: center; gap: 8px; padding: 18px 12px; text-align: center;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: transform .15s ease;
}
.person:hover { transform: translateY(-3px); }
.person .count { color: var(--muted); font-size: 13px; }
.person.me { outline: 2px solid var(--gold); }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: #fff;
}
.avatar.lg { width: 76px; height: 76px; font-size: 2rem; }
.avatar.xs { width: 32px; height: 32px; font-size: .85rem; }
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.avatar.sm { width: 36px; height: 36px; font-size: 1rem; }
.person-name { font-weight: 700; }

/* ---------- wishlist items ---------- */
.items { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 860px) { .items { gap: 18px; } }
.item {
  display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.item-img { aspect-ratio: 4 / 3; background: #f3ede1; display: grid; place-items: center; overflow: hidden; }
.item-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.item-img .ph { width: 54px; height: 54px; opacity: .35; }
.item-body { padding: 14px 16px 16px; display: grid; gap: 6px; flex: 1; align-content: start; }
.item-title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.item-price { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.item-notes { color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.item-actions { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap; align-items: center; }
.bought-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: #dff0e6; color: #1f5a3e; font-weight: 700; font-size: 14px; line-height: 1; }
.bought-pill svg { width: 16px; height: 16px; }
.item-img { position: relative; }
.bought-overlay { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--mint); color: #fff; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; line-height: 1; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.bought-overlay svg { width: 18px; height: 18px; }
.prio { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.prio-1 { background: #fde3e4; color: var(--berry-dark); }
.prio-2 { background: var(--gold-soft); color: #7a5512; }
.prio-3 { background: #dff0e6; color: #1f5a3e; }
.item.is-bought .item-img img, .item.is-bought .item-img .ph, .item.is-bought .item-body { opacity: .5; }
.removed-note { background: #fff4d6; color: #7a5512; font-size: 14px; padding: 10px 12px; border-radius: 10px; margin: 0 16px 12px; }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; opacity: .5; margin-bottom: 8px; }
.empty h3 { color: var(--ink); font-size: 1.2rem; margin-bottom: 6px; }

/* ---------- profile card ---------- */
.profile-card dl { margin: 0; display: grid; gap: 12px; }
.profile-card dl div { display: grid; gap: 2px; }
.profile-card dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.profile-card dd { margin: 0; white-space: pre-wrap; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sizes div { background: #f6f0e3; border-radius: 12px; padding: 10px; text-align: center; }
.sizes dd { font-weight: 700; font-family: var(--display); font-size: 1.1rem; }
.person-head { display: flex; align-items: center; gap: 16px; color: var(--cream); margin-bottom: 20px; }
.person-head h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 900; }

/* ---------- questions ---------- */
.qa { display: grid; gap: 10px; }
.q { background: #f6f0e3; border-radius: 14px; padding: 12px 14px; }
.q .question { font-weight: 600; }
.q .answer { margin-top: 6px; padding-left: 12px; border-left: 3px solid var(--gold); }
.q .waiting { margin-top: 4px; color: var(--muted); font-size: 14px; font-style: italic; }
.q.unanswered { background: #fff4d6; }
.q form { display: flex; gap: 8px; margin-top: 8px; }
.q form input { flex: 1; }

/* ---------- admin ---------- */
.admin-list { display: grid; gap: 8px; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f8f3e8; border-radius: 12px; }
.admin-row .name { flex: 1; font-weight: 600; }
.history-grid { display: grid; gap: 8px; }
.history-grid .hrow { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 10px; align-items: center; }
.history-grid .arrow { color: var(--muted); }
.invite { display: flex; gap: 8px; align-items: stretch; }
.invite input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: #f6f0e3; border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; color: var(--pine); }
.stat span { font-size: 13px; color: var(--muted); }
.progress { height: 10px; border-radius: 999px; background: #ebe3d2; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #49a777); border-radius: inherit; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eee6d5; font-size: 12px; font-weight: 700; color: var(--muted); }
.warn { background: #fff4d6; color: #7a5512; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
details.peek summary { cursor: pointer; font-weight: 700; color: var(--berry); }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 22, 16, .6);
  display: grid; align-items: end; justify-items: center;
  animation: fade .18s ease;
}
@media (min-width: 700px) { .modal-back { align-items: center; padding: 24px; } }
.modal {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--paper);
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + var(--safe-bottom));
  animation: up .22s ease;
}
@media (min-width: 700px) { .modal { border-radius: 22px; padding: 28px; } }
.modal h2 { font-size: 1.5rem; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.preview-box { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; background: #f6f0e3; border-radius: 14px; padding: 10px; }
.preview-box .thumb { width: 96px; height: 96px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.preview-box .thumb img { width: 100%; height: 100%; object-fit: contain; }
.preview-box .thumb .ph { width: 38px; opacity: .35; }
.img-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(0,0,0,.15); border-top-color: var(--berry); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 860px) { #toast { bottom: 32px; } }

/* ---------- demo bar ---------- */
.demo-bar {
  position: relative; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center;
  padding: 8px 12px; background: var(--gold); color: var(--pine); font-size: 14px; font-weight: 600;
}
.demo-bar select { width: auto; padding: 4px 8px; border-radius: 8px; font-size: 14px; border: 1px solid rgba(0,0,0,.2); }
.demo-bar button { background: var(--pine); color: var(--cream); border: 0; border-radius: 8px; padding: 5px 10px; font-weight: 700; cursor: pointer; font-size: 13px; }

/* ---------- reveal ---------- */
.reveal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #2a5c45 0%, #0f2a20 55%, #07150f 100%);
  color: var(--cream); text-align: center;
  animation: fade .4s ease;
}
.reveal canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reveal .spot {
  position: absolute; left: 50%; top: 46%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 233, 170, .0) 0%, transparent 40%);
  transition: background 1.2s ease; pointer-events: none;
}
.reveal.glow .spot { background: radial-gradient(circle, rgba(255, 220, 140, .35) 0%, rgba(255, 220, 140, .08) 18%, transparent 38%); }
.reveal-inner { position: relative; display: grid; justify-items: center; gap: 18px; padding: 24px; width: 100%; max-width: 640px; }
.reveal-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.8rem, 6vw, 2.8rem); }
.reveal-sub { opacity: .75; margin: -8px 0 0; }
.gift { width: min(62vw, 280px); height: min(62vw, 280px); position: relative; }
.gift svg { width: 100%; height: 100%; overflow: visible; }
.gift .lid { transform-origin: 50% 40%; transform-box: fill-box; }
.gift.shake-1 { animation: wobble .5s ease-in-out infinite; }
.gift.shake-2 { animation: wobble .28s ease-in-out infinite; }
.gift.shake-3 { animation: wobble-hard .12s linear infinite; }
.gift.open .lid { animation: lidoff 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
.gift.open .box { animation: boxdown .9s ease forwards .15s; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) translateY(-2px); } 75% { transform: rotate(4deg) translateY(-2px); } }
@keyframes wobble-hard { 0%, 100% { transform: rotate(-6deg) translate(-2px, -3px) scale(1.03); } 50% { transform: rotate(6deg) translate(2px, -6px) scale(1.05); } }
@keyframes lidoff { to { transform: translate(60px, -260px) rotate(38deg); opacity: 0; } }
@keyframes boxdown { to { transform: translateY(60px) scale(.9); opacity: 0; } }
.reveal-btn {
  font-size: 1.25rem; padding: 18px 34px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #f0c25d, #d9a441); color: var(--pine); font-weight: 800;
  box-shadow: 0 4px 0 #a97c25, 0 0 0 0 rgba(240, 194, 93, .6); animation: pulse 1.8s ease infinite;
}
@keyframes pulse { 0% { box-shadow: 0 4px 0 #a97c25, 0 0 0 0 rgba(240, 194, 93, .55); } 70% { box-shadow: 0 4px 0 #a97c25, 0 0 0 22px rgba(240, 194, 93, 0); } 100% { box-shadow: 0 4px 0 #a97c25, 0 0 0 0 rgba(240, 194, 93, 0); } }
.reveal-name-wrap { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; pointer-events: none; }
.reveal-name-wrap .label { opacity: 0; letter-spacing: .25em; text-transform: uppercase; font-weight: 700; font-size: 14px; color: var(--gold); }
.reveal-name { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 15vw, 7.5rem); line-height: 1; color: #fff; text-shadow: 0 6px 40px rgba(255, 200, 100, .55); }
.reveal-name span { display: inline-block; opacity: 0; transform: translateY(40px) scale(.4) rotate(-12deg); }
.reveal-name span.in { animation: letter .6s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes letter { to { opacity: 1; transform: none; } }
.reveal-name-wrap .label.in { animation: fade-in .6s ease forwards; }
@keyframes fade-in { to { opacity: 1; } }
.reveal-after { position: absolute; bottom: calc(40px + var(--safe-bottom)); left: 0; right: 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 16px; opacity: 0; transition: opacity .6s; pointer-events: none; }
.reveal-after.in { opacity: 1; pointer-events: auto; }
.mute-btn { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; background: rgba(255,255,255,.12); border: 0; color: var(--cream); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.mute-btn svg { width: 22px; height: 22px; }
.reveal .flash { position: absolute; inset: 0; background: #fff7e0; opacity: 0; pointer-events: none; }
.reveal .flash.go { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 10% { opacity: .9; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .gift.shake-1, .gift.shake-2, .gift.shake-3 { animation: none; }
  .reveal-btn { animation: none; }
}

/* ---------- notifications ---------- */
.push-box { background: #f6f0e3; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.push-box p { margin: 0 0 8px; }
.push-box p:last-child { margin: 0; }
.notes { display: grid; gap: 8px; }
.note { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); }
.note.unread { border-color: var(--gold); background: #fffaf0; }
.note span { color: var(--muted); font-size: 14px; }
.note small { color: var(--muted); font-size: 12px; }
.push-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--gold-soft); color: #7a5512; display: grid; place-items: center; flex: none; }
.push-icon svg { width: 24px; height: 24px; }
.state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.state.yes { color: var(--mint); }
.state svg { width: 14px; height: 14px; }

/* ---------- newsfeed ---------- */
.feed { display: grid; gap: 4px; }
.feed-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 8px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.feed-row + .feed-row { border-top: 1px solid var(--line); border-radius: 0; }
.feed-row:hover { background: #f8f3e8; border-radius: 14px; }
.feed-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.feed-text { line-height: 1.35; }
.feed-list { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-main small { color: var(--muted); font-size: 12px; }
.feed-thumbs { display: flex; gap: 6px; }
.feed-thumb { width: 56px; height: 56px; border-radius: 10px; background: #f3ede1; display: grid; place-items: center; overflow: hidden; flex: none; }
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.feed-thumb .ph { width: 26px; height: 26px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mint); text-transform: uppercase; letter-spacing: .08em; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: livepulse 2s ease infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
