/* AGAMA: pulang pamasko + ginto */
:root {
  --bg: #fbf6f1; --card: #ffffff; --card-2: #f8efe7; --ink: #2a1a1a; --ink-2: #4a3333; --muted: #7a6262; --line: #eedfd5;
  --primary: #b3261e; --primary-2: #cf3a2f; --primary-ink: #ffffff; --primary-soft: #fbe3df;
  --accent: #e2a72e; --accent-ink: #2b1d00; --accent-soft: #fbefd2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1a1213; --card: #251a1b; --card-2: #2e2122; --ink: #f6ecea; --ink-2: #e0cfcc; --muted: #b59f9c; --line: #3d2c2d; --primary: #e0574c; --primary-2: #ec6a5f; --primary-ink: #1a0b0a; --primary-soft: #43201e; --accent: #f2c14e; --accent-ink: #2b1d00; --accent-soft: #3d3016; }
}
:root[data-theme="dark"] { --bg: #1a1213; --card: #251a1b; --card-2: #2e2122; --ink: #f6ecea; --ink-2: #e0cfcc; --muted: #b59f9c; --line: #3d2c2d; --primary: #e0574c; --primary-2: #ec6a5f; --primary-ink: #1a0b0a; --primary-soft: #43201e; --accent: #f2c14e; --accent-ink: #2b1d00; --accent-soft: #3d3016; }

/* home */
.hero-intro { text-align: center; padding: 18px 8px 6px; }
.hero-intro h1 { font-size: 26px; line-height: 1.15; margin: 12px 0 6px; }
.hero-intro p { color: var(--muted); margin: 0; }
.giftart { width: 84px; height: 84px; margin: 0 auto; border-radius: 26px; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 10px 30px rgba(179, 38, 30, .35); }
.giftart svg.ic { width: 46px; height: 46px; stroke: #fff; }
.steps { display: grid; gap: 8px; margin-top: 16px; }
.steps > div { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.steps b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
:root[data-theme="dark"] .steps b { color: var(--accent); }
.spin svg.ic { animation: wob 1s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* event card */
.card.event { background: linear-gradient(135deg, var(--primary), #8e1c16); color: #fff; }
.card.event .muted, .card.event .small { color: rgba(255, 255, 255, .85); }
.card.event .pill { background: rgba(255, 255, 255, .2); color: #fff; }
.card.event .btn { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }
.ev-name { font-size: 21px; font-weight: 800; line-height: 1.2; }
.ev-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ev-stats > div { background: rgba(255, 255, 255, .13); border-radius: 14px; padding: 10px 12px; }
.ev-stats.card > div { background: var(--card-2); }
.ev-stats b { display: block; font-size: 18px; }
.ev-stats span { font-size: 12.5px; opacity: .85; }

/* lists, chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 11px; border-radius: 99px; background: var(--card-2); font-size: 14px; }
.wish { margin: 6px 0 10px; padding-left: 22px; }
.wish li { margin: 4px 0; font-weight: 600; }
.howto { padding-left: 20px; margin: 0; } .howto li { margin: 6px 0; }
.list.flat { box-shadow: none; }
.codebox { text-align: center; font-size: 34px; font-weight: 800; letter-spacing: .08em; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--ink); margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.linkbox { word-break: break-all; padding: 10px 12px; border-radius: 12px; background: var(--card-2); margin-top: 8px; }
label.chk { display: flex; width: auto; height: auto; flex: initial; gap: 10px; align-items: flex-start; cursor: pointer; }
label.chk input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); margin-top: 1px; }
.drawcard .btn.big { margin-top: 4px; }

/* gift box (member opens their draw) */
.giftbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 18px; border: 2px dashed var(--accent); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer; margin: 14px 0; }
.giftbtn b { font-size: 22px; } .giftbtn span { color: var(--muted); font-size: 14.5px; }
.gift { position: relative; width: 120px; height: 112px; margin-bottom: 8px; animation: wob 1.6s ease-in-out infinite; }
.gift .body { position: absolute; left: 10px; right: 10px; bottom: 0; height: 74px; background: var(--primary); border-radius: 8px; }
.gift .lid { position: absolute; left: 0; right: 0; top: 18px; height: 26px; background: var(--primary-2); border-radius: 8px; z-index: 2; transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .7s; }
.gift .ribbon { position: absolute; left: 50%; width: 18px; margin-left: -9px; top: 18px; bottom: 0; background: var(--accent); z-index: 3; transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .7s; }
.gift .lid::before, .gift .lid::after { content: ""; position: absolute; top: -20px; width: 30px; height: 22px; border: 6px solid var(--accent); border-radius: 50% 50% 0 50%; }
.gift .lid::before { left: 50%; margin-left: -34px; transform: rotate(10deg); } .gift .lid::after { left: 50%; margin-left: 4px; transform: scaleX(-1) rotate(10deg); }
.giftbtn.opening .gift { animation: shake .3s linear 3; }
.giftbtn.opening .lid { transform: translateY(-70px) rotate(-25deg); opacity: 0; transition-delay: .55s; }
.giftbtn.opening .ribbon { transform: translateY(-70px); opacity: 0; transition-delay: .55s; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }

/* the drawn name, hidden until tapped (for when people are nearby) */
.matchcard { border: 2px solid var(--accent); }
.mname { display: block; width: 100%; border: 0; background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 16px; margin: 8px 0; font: inherit; cursor: pointer; position: relative; min-height: 70px; }
.mname span { font-size: 28px; font-weight: 800; filter: blur(14px); transition: filter .3s; display: block; }
.mname em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-style: normal; font-weight: 700; }
.mname.show span { filter: none; } .mname.show em { display: none; }

/* reveal mode */
body.stage .tabs, body.stage .top { display: none; }
body.stage main { padding-top: 12px; }
.stagebox { min-height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 14px; }
.stagetap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 28px; padding: 30px 16px; font: inherit; cursor: pointer; text-align: center; color: #fff; background: radial-gradient(circle at 50% 30%, var(--primary-2), #7a1611); min-height: 60vh; }
.stagetap .small { color: rgba(255, 255, 255, .85); font-size: 18px; }
.stagetap .to { font-size: clamp(34px, 9vw, 72px); font-weight: 800; line-height: 1.1; }
.stagetap .from { font-size: clamp(38px, 10vw, 84px); font-weight: 800; color: #f2c14e; line-height: 1.1; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.stagetap .hint { margin-top: 18px; font-size: 18px; opacity: .85; animation: wob 1.6s ease-in-out infinite; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.stagebox .btns .btn { flex: 1; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 100; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: translateX(40px) rotate(720deg); } }
