@import url("https://fonts.googleapis.com/css2?family=Bungee+Shade&family=Inter:wght@400;600;700&family=Space+Grotesk:wght@600;700&display=swap");

/* Secret Santa: a modern app wearing loud 90s art.
   Ground: deep ink. Content: white cards. 90s: wrapping-paper hero bands,
   chrome WordArt headlines, die-cut clip-art stickers, neon accents. */
:root {
  --ink: #14062a;
  --ink-2: #1c0c34;
  --plum: #2b0a4a;
  --lime: #b8ff3c;
  --lime-d: #6fa80f;
  --pink: #ff2e93;
  --pink-d: #a3105a;
  --teal: #2de2e6;
  --yellow: #ffe53b;
  --violet: #6a0dad;
  --muted: #5b5470;
  --muted-on-ink: #cfc6e6;
  --line: #d9d3e6;
  --field: #f7f5fb;
  --soft: #f1edf8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: #fff;
  font: 400 16px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 110px; }
.shell.no-nav { padding-bottom: 32px; }
.content { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.wide { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 90s layer ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--plum) url(/img/paper.webp) repeat; background-size: 200px 200px;
  border-radius: 0 0 32px 32px; padding: 30px 20px 24px;
}
.stage { background: var(--plum) url(/img/paper.webp) repeat; background-size: 200px 200px; }
.wordart {
  font-family: "Bungee Shade", cursive; font-weight: 400; margin: 0; line-height: 1.06; padding-bottom: 4px;
  background: linear-gradient(180deg, #fff7a8 0%, var(--yellow) 30%, var(--pink) 62%, var(--teal) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 var(--ink)) drop-shadow(0 0 6px rgba(20, 6, 42, .9)) drop-shadow(0 0 18px rgba(255, 46, 147, .45));
  overflow-wrap: anywhere;
}
.plate {
  display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 7px 14px;
  font: 600 13px/1.2 "Space Grotesk", sans-serif; letter-spacing: .06em; text-transform: uppercase;
}
.plate.soft { background: rgba(20, 6, 42, .85); letter-spacing: 0; text-transform: none; }
.sticker {
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
          drop-shadow(0 14px 16px rgba(0, 0, 0, .45));
  pointer-events: none; user-select: none;
}
.hero .sticker { position: absolute; z-index: 0; }
.hero > :not(.sticker) { position: relative; z-index: 1; }
.hero .plate.soft { margin-top: 12px; }
.ticker {
  overflow: hidden; white-space: nowrap; background: var(--lime); color: var(--ink);
  font: 700 13px/1 "Space Grotesk", sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: 10px 0;
}
.ticker span { display: inline-block; padding-left: 100%; animation: mq 22s linear infinite; }
.burst {
  clip-path: polygon(50% 0%,57.2% 13.7%,69.1% 3.8%,70.6% 19.2%,85.4% 14.6%,80.8% 29.4%,96.2% 30.9%,86.3% 42.8%,100% 50%,86.3% 57.2%,96.2% 69.1%,80.8% 70.6%,85.4% 85.4%,70.6% 80.8%,69.1% 96.2%,57.2% 86.3%,50% 100%,42.8% 86.3%,30.9% 96.2%,29.4% 80.8%,14.6% 85.4%,19.2% 70.6%,3.8% 69.1%,13.7% 57.2%,0% 50%,13.7% 42.8%,3.8% 30.9%,19.2% 29.4%,14.6% 14.6%,29.4% 19.2%,30.9% 3.8%,42.8% 13.7%);
  animation: spin 12s linear infinite; background: var(--yellow);
}
.wobble { animation: wob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.float { animation: float 3s ease-in-out infinite; }
.shake { animation: shk .11s linear infinite; }
.pop { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.zoom { animation: zoom .7s .25s cubic-bezier(.2, 1.5, .4, 1) both; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 16px; border-radius: 2px; animation: fall 2.8s linear infinite; }
.flash { position: fixed; inset: 0; background: #fff; animation: flash .45s ease-out both; pointer-events: none; z-index: 6; }
@keyframes mq { to { transform: translateX(-100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wob { 0%,70%,100% { transform: rotate(-4deg); } 76% { transform: rotate(-12deg); } 83% { transform: rotate(4deg); } 90% { transform: rotate(-8deg); } 96% { transform: rotate(-2deg); } }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes shk { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-5px,1px) rotate(-6deg); } 50% { transform: translate(4px,-2px) rotate(5deg); } 75% { transform: translate(-3px,2px) rotate(-3deg); } 100% { transform: translate(0,0) rotate(0); } }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes zoom { from { transform: scale(2.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ticker span, .burst, .wobble, .float, .shake, .pop, .zoom, .confetti i, .flash { animation: none; }
  .ticker span { padding-left: 16px; }
  .confetti { display: none; }
}

/* ---------- modern layer ---------- */
.card {
  background: #fff; color: var(--ink); border-radius: 22px; padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 12px;
}
.card.yellow { background: var(--yellow); }
.card.alert { box-shadow: inset 0 0 0 3px var(--pink), 0 10px 30px rgba(0, 0, 0, .35); }
.h2 { margin: 0; font: 700 19px/1.2 "Space Grotesk", sans-serif; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 700 14px/1 "Space Grotesk", sans-serif; flex: none; }
.eyebrow { margin: 0; font: 700 12px/1 "Space Grotesk", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
.muted { color: var(--muted); }
.on-ink-muted { color: var(--muted-on-ink); }
.small { font-size: 14px; }
.center { text-align: center; }
p { margin: 0; }

.lbl { display: block; font: 600 14px/1.35 Inter, sans-serif; color: var(--ink); margin: 0 0 6px; }
.input {
  display: block; width: 100%; border: 1.5px solid var(--line); background: var(--field); border-radius: 14px;
  padding: 11px 14px; font: 400 16px/1.45 Inter, sans-serif; color: var(--ink); resize: vertical;
}
.input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 46, 147, .2); }
.input.pin { font: 700 24px/1 "Space Grotesk", sans-serif; letter-spacing: .5em; text-align: center; padding: 14px 8px; }
.req { font: 700 11px/1 "Space Grotesk", sans-serif; letter-spacing: .08em; background: var(--pink); color: var(--ink); border-radius: 999px; padding: 4px 8px; margin-left: 6px; vertical-align: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
  border: 0; border-radius: 999px; font: 700 16px/1.1 "Space Grotesk", sans-serif; cursor: pointer; text-decoration: none;
  background: var(--lime); color: var(--ink); box-shadow: 0 4px 0 var(--lime-d); text-align: center;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--lime-d); }
.btn.pink { background: var(--pink); box-shadow: 0 4px 0 var(--pink-d); }
.btn.light { background: var(--soft); box-shadow: none; min-height: 44px; font-size: 14px; }
.btn.ghost { background: rgba(20, 6, 42, .7); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); min-height: 44px; font-size: 14px; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .mini:focus-visible, .chip:focus-visible, .nav a:focus-visible, .seg button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.mini { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 13px/1 Inter, sans-serif; cursor: pointer; }
.mini:disabled { opacity: .45; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px 14px; font: 600 14px/1 "Space Grotesk", sans-serif; color: var(--ink); border: 1.5px solid var(--ink); background: #fff; }
button.chip { cursor: pointer; }
.chip.add { border-style: dashed; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font: 600 12px/1 "Space Grotesk", sans-serif; white-space: nowrap; }
.pill.ok { background: #e7ffc6; color: #2c5200; }
.pill.no { background: #ffe0ef; color: #8a0045; }
.pill.mid { background: var(--soft); color: var(--muted); }

.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--lime)); transition: width .3s; }

.status { min-height: 1.4em; font-size: 14px; }
.status.err { color: #b0005a; }
.status.ok { color: #2c5200; }
.on-ink .status.err, .status.on-ink.err { color: #ff8cc4; }
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px);
  background: #fff; color: var(--ink); border-radius: 999px; padding: 12px 18px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.toast.err { background: #ffe0ef; color: #8a0045; }

/* sliders */
.slider { display: grid; grid-template-columns: 86px 1fr 86px; align-items: center; gap: 10px; font: 600 13px/1.2 Inter, sans-serif; color: var(--ink); }
.slider input { accent-color: var(--pink); width: 100%; min-height: 32px; }
.slider span:last-child, .meter span:last-child { text-align: right; }
.meter { display: grid; grid-template-columns: 86px 1fr 86px; align-items: center; gap: 10px; font: 600 13px/1.2 Inter, sans-serif; color: var(--ink); }
.track { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--pink)); }
.track b { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transform: translate(-50%, -50%); }

.q { margin: 0 0 4px; font: 600 13px/1.3 Inter, sans-serif; color: var(--muted); }
.a { margin: 0; font: 600 16px/1.45 Inter, sans-serif; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.linkrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--field); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.linkrow a { color: var(--violet); font-weight: 600; overflow-wrap: anywhere; }
.inline-note { background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.inline-note b { color: var(--lime); }

/* countdown + roster */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 12px 6px; text-align: center; }
.tile b { display: block; font: 700 32px/1 "Space Grotesk", sans-serif; background: linear-gradient(180deg, var(--lime), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile span { display: block; margin-top: 6px; font: 600 11px/1 "Space Grotesk", sans-serif; letter-spacing: .1em; color: var(--muted-on-ink); }
.roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.av { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 12px/1.1 Inter, sans-serif; color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.av i { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; font: 700 18px/1 "Space Grotesk", sans-serif; font-style: normal; color: var(--ink); }
.av i b { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--lime); display: flex; align-items: center; justify-content: center; border: 2px solid #fff; font-size: 11px; }
.av.wait i { background: var(--soft); color: #8d84a6; border: 2px dashed #b9b0cc; }

/* bottom nav */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 10;
  width: calc(100% - 28px); max-width: 452px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 24px;
  background: rgba(28, 12, 52, .94); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
}
.nav button { border: 0; background: transparent; cursor: pointer; }
.nav a, .nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; border-radius: 18px; color: var(--muted-on-ink); text-decoration: none; font: 600 11px/1 "Space Grotesk", sans-serif; }
.nav a.on { background: var(--lime); color: var(--ink); }
.nav .off { color: #8d84a6; }
.dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--ink-2); }

/* sound toggle */
.sound { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 13px/1 "Space Grotesk", sans-serif; cursor: pointer; }
.sound[aria-pressed="true"] { background: var(--lime); color: var(--ink); }

/* hotline */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.seg button { position: relative; min-height: 52px; border: 0; border-radius: 14px; background: transparent; color: var(--muted-on-ink); font: 700 14px/1.15 "Space Grotesk", sans-serif; cursor: pointer; }
.seg button small { display: block; font: 500 12px/1.2 Inter, sans-serif; opacity: .85; }
.seg button.on { background: #fff; color: var(--ink); }
.seg .dot { top: 8px; right: 12px; }
.log { display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg .who { margin: 0 0 4px; font: 600 11px/1 "Space Grotesk", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-on-ink); }
.bub { margin: 0; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.mine .bub { background: var(--lime); color: var(--ink); border-bottom-right-radius: 6px; }
.theirs .bub { background: #fff; color: var(--ink); border-bottom-left-radius: 6px; }
.empty { border: 1.5px dashed rgba(255, 255, 255, .25); border-radius: 18px; padding: 18px; text-align: center; color: var(--muted-on-ink); font-size: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.chipbtn { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font: 600 13px/1 Inter, sans-serif; cursor: pointer; }
.composer { position: sticky; bottom: 92px; display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.composer input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 16px/1.4 Inter, sans-serif; color: var(--ink); outline: none; }
.send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--pink); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* unmask loop */
.loop { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.loop li { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; padding: 8px 12px; border-radius: 12px; font: 600 15px/1.2 "Space Grotesk", sans-serif; background: var(--field); }
.loop li span:nth-child(2) { text-align: center; color: var(--pink); }
.loop li span:last-child { text-align: right; }
.loop li.me { background: var(--lime); }

/* organiser */
.stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; padding: 16px 18px; }
.stat b { display: block; font: 700 34px/1 "Space Grotesk", sans-serif; color: #fff; }
.stat span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted-on-ink); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.steps li { padding: 8px 14px; border-radius: 999px; background: rgba(20, 6, 42, .85); color: var(--muted-on-ink); font: 600 13px/1 "Space Grotesk", sans-serif; }
.steps li.done { background: var(--ink); color: var(--lime); }
.steps li.now { background: var(--lime); color: var(--ink); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; }
th { text-align: left; font: 600 12px/1 "Space Grotesk", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 10px; border-bottom: 1.5px solid #ece7f4; }
td { padding: 10px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
.who-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.who-cell i { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font: 700 14px/1 "Space Grotesk", sans-serif; font-style: normal; color: var(--ink); flex: none; }
.pair { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--field); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.warn { background: #fff6c2; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.4; color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--ink); }
.toggle input { width: 22px; height: 22px; accent-color: var(--pink); }
select.input { appearance: auto; }
