/* Big Fam Sparkle Quest (QuestBreak engine) - build QB-S1c - ASCII only
   Visual language taken from the printed field guide:
   green leather cover, metallic gold filigree frames, faceted jewel corners,
   parchment pages with ink-blue task text, dark night-sky quest banners,
   holographic cover lettering, and the "Follow the Sparkle." script. */

:root {
  --leather: #0f2a1e;
  --leather-2: #16392a;
  --leather-3: #1e4935;
  --gold: #d9b45a;
  --gold-hi: #f7e7a6;
  --gold-lo: #8a6a27;
  --gold-metal: linear-gradient(135deg, #8a6a27 0%, #f7e7a6 18%, #c9962f 38%, #fff1c0 52%, #b88a2c 70%, #f3d98a 86%, #8a6a27 100%);
  --gold-text: linear-gradient(180deg, #fff6d2 0%, #f2d78c 38%, #c48f2b 58%, #f7e3a0 80%, #d9ae4f 100%);
  --parch: #f3e6c4;
  --parch-mid: #ecdab0;
  --parch-edge: #d8bf86;
  --ink: #2a1d0c;
  --ink-soft: #6b5530;
  --ink-blue: #1f3aa6;
  --ink-purple: #4b2a91;
  --rose: #d42d6a;
  --lavender: #ece4fb;
  --sacred: #f0a13a;
  --sacred-ink: #b75f0c;
  --sparkle: #d24fe0;
  --sparkle-ink: #9c1f93;
  --spectral: #3cc8ef;
  --spectral-ink: #0f7fae;
  --q: var(--gold);
  --q-ink: var(--ink-blue);
  --top-safe: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --nav-h: 66px;
  --ease-out: cubic-bezier(0.2, 0.85, 0.25, 1);
  --ease-spring: cubic-bezier(0.25, 1.35, 0.4, 1);
  --font-display: "Cinzel", "Trajan Pro", "Palatino Linotype", Georgia, serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-script: "Satisfy", "Brush Script MT", "Segoe Script", cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --parchment-bg: radial-gradient(ellipse at 50% 40%, #f8eed4 0%, #f1e2bd 55%, #e3cb95 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--leather);
  background-image:
    var(--grain),
    radial-gradient(120% 55% at 50% 0%, #21523c 0%, rgba(33, 82, 60, 0) 70%),
    radial-gradient(100% 60% at 50% 110%, #07170f 0%, rgba(7, 23, 15, 0) 70%);
  background-attachment: fixed;
  color: var(--parch);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  padding-top: var(--top-safe);
  padding-bottom: calc(var(--nav-h) + var(--bottom-safe) + 8px);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- ripple (added by JS on tap) ---------- */
.btn, .chip, .tab-btn, .check, .claim, .place-btn, .person-pick, .who, .task-more, .icon-btn, .crest {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(247, 226, 150, 0.6) 0%, rgba(214, 170, 60, 0.28) 45%, rgba(214, 170, 60, 0) 70%);
  transform: scale(0);
  animation: ripple 0.6s var(--ease-out) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- metallic helpers ---------- */
.gold-text {
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gem {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  border: 2px solid #efcf75;
  background: conic-gradient(from 20deg, #c9a6ff, #5fdcff, #ffffff, #7b3fe0, #33c2f0, #efe2ff, #9b64ff, #c9a6ff);
  box-shadow: 0 0 10px rgba(170, 130, 255, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.gem.tl { top: -8px; left: -8px; }
.gem.tr { top: -8px; right: -8px; }
.gem.bl { bottom: -8px; left: -8px; }
.gem.br { bottom: -8px; right: -8px; }

/* ---------- header ---------- */
.top {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 4px;
}
.crest {
  width: 56px;
  height: 56px;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: var(--gold-metal);
  box-shadow: 0 0 18px rgba(217, 180, 90, 0.35), 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.crest img { width: 52px; height: 52px; border-radius: 50%; }
.crest.spin img { animation: crestSpin 0.9s var(--ease-spring); }
@keyframes crestSpin { from { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.12); } to { transform: rotate(360deg) scale(1); } }
.brand { min-width: 0; }
.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 33px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #f4e1a2 0%, #ffffff 14%, #d7b8ff 26%, #9ee8ff 38%, #fff6cc 50%, #f2b75d 62%, #ffffff 76%, #e7c46a 88%, #f4e1a2 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #4b3410) drop-shadow(0 0 10px rgba(217, 180, 90, 0.3));
  animation: holo 9s linear infinite;
}
@keyframes holo { from { background-position: 0% 50%; } to { background-position: 260% 50%; } }
.brand-sub {
  margin: 4px 0 0;
  font-style: italic;
  font-size: 15px;
  color: #d9c79c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-height: 46px;
  max-width: 116px;
  padding: 6px 12px;
  border: 1px solid rgba(217, 180, 90, 0.6);
  border-radius: 14px;
  background: rgba(10, 30, 21, 0.75);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), border-color 0.2s ease;
}
.who:active { transform: scale(0.96); }
.who-label { font-size: 11px; color: #bfae83; line-height: 1.2; }
.who-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-hi);
  line-height: 1.35;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tagline {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 0 16px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.tagline i { font-style: normal; color: #b58cff; text-shadow: 0 0 6px rgba(181, 140, 255, 0.8); margin: 0 0.2em; }

/* ---------- layout ---------- */
main { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
.noscript { padding: 24px; }
.tab.from-right { animation: inRight 0.34s var(--ease-out); }
.tab.from-left { animation: inLeft 0.34s var(--ease-out); }
@keyframes inRight { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 2px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-title span {
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.section-title::before, .section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 180, 90, 0), var(--gold) 50%, rgba(217, 180, 90, 0));
}
.lede { margin: 6px 2px 14px; color: #d9c79c; font-size: 16px; }

/* ---------- parchment cards ---------- */
.card {
  position: relative;
  margin: 18px 0 0;
  padding: 3px;
  border-radius: 16px;
  background: var(--gold-metal);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.card-inner {
  position: relative;
  border-radius: 13px;
  padding: 16px;
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  box-shadow: inset 0 0 26px rgba(120, 80, 20, 0.28);
}
.card-inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(138, 106, 39, 0.45);
  border-radius: 9px;
  pointer-events: none;
}
.card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: var(--ink-blue);
}
.card p { margin: 0 0 10px; }
.card .small, .small { font-size: 14px; color: var(--ink-soft); }
.on-leather .small, .lede .small { color: #cdbb90; }

/* ---------- banners (in-app browser, storage) ---------- */
#banners { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  border: 2px solid var(--gold);
  font-size: 15px;
  line-height: 1.45;
  animation: dropIn 0.4s var(--ease-spring);
}
.notice p { margin: 0; flex: 1; }
.notice .x {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 24px;
  cursor: pointer;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- intro ---------- */
.intro .card-inner { text-align: center; padding: 22px 18px 20px; }
.intro h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink-blue);
}
.script {
  font-family: var(--font-script);
  font-size: 36px;
  line-height: 1.1;
  color: #1a1206;
  margin: 8px 0 14px;
}
.intro.leaving { animation: leave 0.35s var(--ease-out) forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-12px) scale(0.97); } }

/* ---------- summary (the raffle box) ---------- */
.summary .card-inner { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; }
.summary h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink-purple);
}
.summary-count {
  grid-column: 1 / 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
}
.summary-count b { font-weight: 900; font-size: 34px; color: var(--ink-blue); margin-right: 4px; display: inline-block; }
.summary-count b.bump { animation: bump 0.45s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.35); } }
.offline-chip {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(107, 85, 48, 0.5);
  color: var(--ink-soft);
  white-space: nowrap;
  background: rgba(255, 250, 235, 0.6);
}
.offline-chip.ready { color: #1c6b3c; border-color: #3f9a64; }
.offline-chip.ready::before { content: "\2726  "; color: #3f9a64; }
.progress {
  grid-column: 1 / -1;
  position: relative;
  height: 12px;
  margin: 8px 0 4px;
  border-radius: 999px;
  background: rgba(120, 88, 34, 0.18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  overflow: visible;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--gold-metal);
  background-size: 200% 100%;
  box-shadow: 0 0 8px rgba(217, 180, 90, 0.7);
  transition: width 0.7s var(--ease-out);
}
.progress-fill::after {
  content: "\2726";
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 20px;
  line-height: 1;
  color: #fffbe8;
  text-shadow: 0 0 6px #ffe89a, 0 0 12px #d9b45a;
}
.progress-fill.zero::after { display: none; }
.progress-fill.glint { animation: glint 0.9s ease-out; }
@keyframes glint { from { background-position: 100% 0; } to { background-position: -100% 0; } }
#collectSlot { grid-column: 1 / -1; }
.summary-note { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); }
.collect {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #6a4bd0;
  background: var(--lavender);
  animation: dropIn 0.45s var(--ease-spring);
}
.collect-num { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; color: var(--rose); }
.collect-text { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; line-height: 1.35; color: var(--ink-purple); }

/* ---------- quest card ---------- */
.quest {
  --q: var(--gold);
  --q-ink: var(--ink-blue);
  position: relative;
  margin: 40px 0 0;
  padding: 3px;
  border-radius: 16px;
  background: var(--gold-metal);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}
.quest.q-sacred { --q: var(--sacred); --q-ink: var(--sacred-ink); --banner: linear-gradient(90deg, #1b1308 0%, #2c1c09 48%, #3a250b 100%); }
.quest.q-sparkle { --q: var(--sparkle); --q-ink: var(--sparkle-ink); --banner: linear-gradient(90deg, #170a33 0%, #2b0f5c 50%, #45157a 100%); }
.quest.q-spectral { --q: var(--spectral); --q-ink: var(--spectral-ink); --banner: linear-gradient(90deg, #050f2a 0%, #0a2257 52%, #0e2f78 100%); }
.quest-host {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  margin: 0;
  padding: 3px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: #0b1f16;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.quest-inner { border-radius: 13px; overflow: hidden; background: var(--parch); }
.banner {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 120px;
  padding: 20px 14px 14px;
  background: var(--banner);
  border-bottom: 2px solid var(--gold);
  isolation: isolate;
}
.banner-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 64%;
  z-index: -1;
  background-size: cover;
  background-position: right center;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.nw { white-space: nowrap; }
.quest-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 5.3vw, 24px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.85));
}
.quest-motto {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f4ead0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.quest-motto i { font-style: normal; color: var(--gold); margin: 0 0.25em; text-shadow: 0 0 6px rgba(255, 220, 130, 0.9); }
.quest-tally {
  display: inline-block;
  margin: 8px 0 0;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff8e6;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.medal { position: relative; width: 92px; height: 92px; }
.medal img {
  position: absolute;
  inset: 12px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 0, 0, 0.6);
  transition: filter 0.5s ease;
}
.quest:not(.done) .medal img { filter: saturate(0.8) brightness(0.92); }
.medal svg { position: absolute; inset: 0; width: 92px; height: 92px; overflow: visible; }
.ring .track { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 5; stroke-linecap: round; }
.ring .fill {
  fill: none;
  stroke: var(--q);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 0.6s var(--ease-out) var(--d, 0s);
  filter: drop-shadow(0 0 3px var(--q));
}
.ring .fill.on { stroke-dashoffset: 0; }
.medal.stamp { animation: stamp 0.75s var(--ease-spring); }
@keyframes stamp { 0% { transform: scale(1); } 30% { transform: scale(1.25) rotate(-8deg); } 100% { transform: scale(1) rotate(0); } }

.page {
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  padding: 4px 10px 12px;
  box-shadow: inset 0 0 26px rgba(120, 80, 20, 0.25);
}
.values {
  margin: 0 -10px 2px;
  padding: 7px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3d2e14;
  border-bottom: 1px solid rgba(138, 106, 39, 0.35);
}
.values i { font-style: normal; color: var(--gold-lo); margin: 0 0.2em; }

.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  border-top: 1px solid rgba(110, 80, 30, 0.2);
  transition: background-color 0.4s ease;
}
.tasks .task:first-child { border-top: 0; }
.task.flash { animation: rowFlash 0.9s ease-out; }
@keyframes rowFlash { 0% { background-color: rgba(247, 226, 150, 0.85); } 100% { background-color: rgba(247, 226, 150, 0); } }
.check {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.box {
  justify-self: center;
  position: relative;
  width: 27px;
  height: 27px;
  border-radius: 4px;
  border: 2px solid #2b2112;
  background: #fcf6e4;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.18s var(--ease-out), border-color 0.25s ease, box-shadow 0.3s ease;
}
.box svg { position: absolute; left: -3px; top: -6px; width: 32px; height: 32px; overflow: visible; }
.box svg path {
  fill: none;
  stroke: var(--q-ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset 0.32s var(--ease-out);
}
.check[aria-checked="true"] .box { border-color: var(--q-ink); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(217, 180, 90, 0.35); }
.check[aria-checked="true"] .box svg path { stroke-dashoffset: 0; }
.check:active .box { transform: scale(0.86); }
.check.pop .box { animation: boxPop 0.45s var(--ease-spring); }
@keyframes boxPop { 0% { transform: scale(0.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.task-copy { display: flex; flex-direction: column; padding-right: 4px; min-width: 0; }
.task-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: var(--ink-blue);
  transition: color 0.35s ease;
}
.strike {
  background-image: linear-gradient(transparent 52%, rgba(160, 118, 40, 0.85) 52%, rgba(160, 118, 40, 0.85) 60%, transparent 60%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.45s var(--ease-out);
}
.is-done .task-text { color: #7f6c49; }
.is-done .strike { background-size: 100% 100%; }
.task-meta { font-style: italic; font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }
.task-more {
  width: 40px;
  height: 52px;
  border: 0;
  background: none;
  color: var(--gold-lo);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.task-more svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease-out); }
.task-more:active svg { transform: translateX(3px); }

/* seal block: the pamphlet's "QUEST COMPLETE / 6 RAFFLE TICKETS" stamp */
.seal-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  margin: 10px 2px 0;
  padding: 10px 12px 10px 8px;
  border: 1.5px solid rgba(138, 106, 39, 0.55);
  border-radius: 12px;
  background: rgba(255, 250, 235, 0.55);
}
.seal { position: relative; width: 96px; height: 96px; }
.seal svg { position: absolute; inset: 0; width: 96px; height: 96px; }
.seal-ring { fill: none; stroke: #8a6a27; stroke-width: 1.6; stroke-dasharray: 2 3; transition: stroke 0.4s ease; }
.seal-ring-2 { fill: none; stroke: rgba(138, 106, 39, 0.5); stroke-width: 1; }
.seal-text { font-family: var(--font-display); font-weight: 700; font-size: 9.6px; letter-spacing: 0.08em; fill: #4a3a1c; }
.seal img {
  position: absolute;
  left: 25px;
  top: 25px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  filter: grayscale(1) sepia(0.4) opacity(0.5);
  transition: filter 0.6s ease;
}
.quest.done .seal img { filter: none; }
.quest.done .seal-ring { stroke: var(--q-ink); stroke-dasharray: none; stroke-width: 2.4; }
.quest.done .seal-text { fill: var(--q-ink); }
.seal.stamp { animation: sealStamp 0.8s var(--ease-spring); }
@keyframes sealStamp {
  0% { transform: scale(1.7) rotate(-18deg); opacity: 0.2; }
  55% { transform: scale(0.92) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.seal-copy { font-size: 15px; line-height: 1.45; color: var(--ink); }
.seal-copy b { font-family: var(--font-display); color: var(--q-ink); }
.claim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 44px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-blue);
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink-blue);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s var(--ease-out), background-color 0.3s ease, color 0.3s ease;
}
.claim:active { transform: scale(0.97); }
.claim[aria-pressed="true"] { background: var(--gold-metal); color: var(--ink); border-color: var(--gold-lo); }

/* ---------- rows inside cards (follows, side quest) ---------- */
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(110, 80, 30, 0.2);
}
.row.first { border-top: 0; }
.goose { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: center; margin-bottom: 8px; }
.goose img { width: 80px; height: 95px; object-fit: cover; border-radius: 12px; border: 2px solid var(--gold); transform: rotate(-3deg); }
.goose h3 { color: var(--ink-purple); }
.goose-prize { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--rose); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-blue);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink-blue);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.96); }
.btn-gold {
  background: var(--gold-metal);
  background-size: 180% 100%;
  color: #20160a;
  border: 1px solid #7a5c1f;
  box-shadow: 0 3px 0 #6b4f18, 0 6px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s ease, background-position 0.6s ease;
}
.btn-gold:active { transform: translateY(2px) scale(0.98); box-shadow: 0 1px 0 #6b4f18, 0 3px 8px rgba(0, 0, 0, 0.3); background-position: 100% 0; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.btn-row.center { justify-content: center; }

/* ---------- map ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 90, 0.6);
  background: rgba(10, 30, 21, 0.6);
  color: #eadcb5;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.15s var(--ease-out), background-color 0.25s ease, color 0.25s ease;
}
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--gold-metal); color: #20160a; border-color: #7a5c1f; }
.map-card { position: relative; padding: 3px; border-radius: 16px; background: var(--gold-metal); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); }
.map-frame {
  position: relative;
  border-radius: 13px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 70vh;
  background: #0d2218;
}
.map-inner { position: relative; width: 100%; transition: width 0.45s var(--ease-out); }
.map-frame.zoomed .map-inner { width: 220%; }
.map-inner img { width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.pin {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pins-intro .pin {
  animation: pinIn 0.55s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 90ms + 150ms);
}
@keyframes pinIn { from { transform: translateY(-18px) scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
.pin-gem {
  position: relative;
  width: 26px;
  height: 26px;
  transform: rotate(45deg);
  border: 2px solid #fff4cf;
  border-radius: 4px;
  background: conic-gradient(from 30deg, #ffffff, var(--pin), #1b1b1b, var(--pin), #ffffff, var(--pin), var(--pin));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45), 0 0 14px var(--pin);
  transition: transform 0.25s var(--ease-spring);
}
.pin-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  color: #1a1206;
  text-shadow: 0 0 3px #fff, 0 0 6px #fff;
  pointer-events: none;
}
.pin.open .pin-gem { animation: pinGlow 2.6s ease-in-out infinite; }
@keyframes pinGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45), 0 0 8px var(--pin); }
  50% { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45), 0 0 24px var(--pin), 0 0 40px var(--pin); }
}
.pin.dim { opacity: 0.22; }
.pin.finished .pin-gem { background: conic-gradient(from 30deg, #ffffff, #f7e7a6, #c9962f, #f7e7a6, #ffffff); }
.pin:active .pin-gem, .pin.focus .pin-gem { transform: rotate(45deg) scale(1.35); }
.pin::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--pin);
  opacity: 0;
  pointer-events: none;
}
.pin.tapped::after { animation: pinRing 0.6s var(--ease-out); }
@keyframes pinRing { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(2.2); } }
.map-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 12px 2px 0; color: #cdbb90; font-size: 14px; }
.map-tools .btn { border-color: var(--gold); color: var(--gold-hi); background: rgba(10, 30, 21, 0.6); }
.editor { margin: 0 0 14px; }
.editor select {
  width: 100%;
  min-height: 46px;
  margin: 8px 0;
  border-radius: 10px;
  background: #fffaf0;
  color: var(--ink);
  border: 1.5px solid var(--gold-lo);
  font: inherit;
  padding: 6px 10px;
}
.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li { border-top: 1px solid rgba(110, 80, 30, 0.2); }
.place-list li:first-child { border-top: 0; }
.place-btn {
  width: 100%;
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.place-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-blue); }
.place-count { font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-style: italic; }

/* ---------- sheet (a parchment page) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 12, 7, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease-out;
}
.sheet-backdrop.closing { animation: fadeOut 0.25s ease-in forwards; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-width: 640px;
  margin: 0 auto;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  box-shadow: 0 -2px 0 #c9962f, 0 -5px 0 #f7e7a6, 0 -7px 0 #8a6a27, 0 -16px 40px rgba(0, 0, 0, 0.55);
  animation: sheetUp 0.42s var(--ease-spring);
  padding-bottom: var(--bottom-safe);
  will-change: transform;
}
.sheet.closing { animation: sheetDown 0.26s ease-in forwards; }
.sheet.dragging { animation: none; transition: none; }
.sheet.snap { transition: transform 0.3s var(--ease-spring); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(105%); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet-handle { flex: none; padding: 10px 0 6px; touch-action: none; cursor: grab; }
.sheet-grip { width: 48px; height: 5px; border-radius: 3px; background: rgba(107, 85, 48, 0.5); margin: 0 auto; }
.sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}
.sheet-close:active { transform: rotate(90deg) scale(0.9); }
.sheet-body { overflow-y: auto; padding: 0 18px 24px; -webkit-overflow-scrolling: touch; }
.sheet-body > * { animation: rise 0.45s var(--ease-out) both; }
.sheet-body > *:nth-child(2) { animation-delay: 0.04s; }
.sheet-body > *:nth-child(3) { animation-delay: 0.08s; }
.sheet-body > *:nth-child(4) { animation-delay: 0.12s; }
.sheet-body > *:nth-child(n+5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sheet h2 {
  margin: 2px 40px 6px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink-blue);
}
.sheet p { margin: 0 0 10px; }
.sheet-kicker { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 2px; }
.photo { margin: 10px 0 12px; border-radius: 12px; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 6px 16px rgba(80, 50, 10, 0.3); }
.photo img { width: 100%; height: auto; }
.photo-empty {
  display: grid;
  place-items: center;
  height: 118px;
  margin: 10px 0 12px;
  border-radius: 12px;
  border: 1.5px dashed rgba(138, 106, 39, 0.7);
  color: var(--ink-soft);
  font-style: italic;
  font-size: 14px;
  background: radial-gradient(circle at 50% 45%, rgba(217, 180, 90, 0.28), rgba(217, 180, 90, 0) 70%);
}
.field { display: block; margin: 12px 0; }
.field span { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--gold-lo);
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(110, 80, 30, 0.2); }
.people li:first-child { border-top: 0; }
.person-pick {
  flex: 1;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.person-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.person-pick[aria-current="true"] .person-name { color: var(--ink-blue); }
.person-pick[aria-current="true"] .person-name::before { content: "\2726  "; color: var(--gold-lo); }
.person-meta { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- guide ---------- */
.rules { margin: 0; padding-left: 0; list-style: none; }
.rules li { position: relative; margin: 8px 0; padding-left: 24px; }
.rules li::before { content: "\2726"; position: absolute; left: 2px; top: 0; color: var(--gold-lo); }
.event {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  padding: 12px 6px;
  border-top: 1px solid rgba(110, 80, 30, 0.2);
  border-radius: 10px;
}
.event.first { border-top: 0; }
.event-when { font-family: var(--font-display); font-weight: 700; color: var(--ink-blue); line-height: 1.15; font-size: 13px; }
.event-when b { display: block; font-size: 20px; font-weight: 900; }
.event-title { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.event.now { background: rgba(212, 45, 106, 0.08); box-shadow: inset 3px 0 0 var(--rose); }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  vertical-align: 2px;
}

/* ---------- share ---------- */
.card-preview {
  margin: 14px auto 0;
  max-width: 250px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 12px 28px rgba(60, 40, 10, 0.45);
  animation: cardIn 0.6s var(--ease-spring);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) rotate(-4deg) scale(0.9); } to { opacity: 1; transform: none; } }
.qr {
  width: 210px;
  max-width: 70%;
  margin: 12px auto 6px;
  padding: 10px;
  border-radius: 14px;
  background: #fffaf0;
  border: 2px solid var(--gold);
}
.qr img { width: 100%; height: auto; }
.center { text-align: center; }
.handles { display: flex; flex-wrap: wrap; gap: 8px; }
.build { margin: 30px 4px 0; font-size: 12px; color: rgba(217, 180, 90, 0.55); text-align: center; font-family: var(--font-display); letter-spacing: 0.08em; }

/* ---------- nav ---------- */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--bottom-safe));
  padding-bottom: var(--bottom-safe);
  background-color: rgba(9, 27, 19, 0.97);
  background-image: var(--grain);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tabs::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--gold-metal);
}
.tab-gem {
  position: absolute;
  top: -7px;
  left: 0;
  width: 25%;
  height: 14px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateX(calc(var(--ti, 0) * 100%));
  transition: transform 0.5s var(--ease-spring);
}
.tab-gem::before {
  content: "";
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border: 2px solid #efcf75;
  background: conic-gradient(from 20deg, #c9a6ff, #5fdcff, #ffffff, #7b3fe0, #33c2f0, #efe2ff, #c9a6ff);
  box-shadow: 0 0 12px rgba(170, 130, 255, 0.9);
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: #a99c78;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.3s ease;
}
.tab-btn svg { width: 24px; height: 24px; transition: transform 0.3s var(--ease-spring); }
.tab-btn[aria-current="page"] { color: var(--gold-hi); }
.tab-btn[aria-current="page"] svg { transform: translateY(-2px); filter: drop-shadow(0 0 6px rgba(247, 231, 166, 0.6)); }
.tab-btn.bounce svg { animation: tabBounce 0.5s var(--ease-spring); }
@keyframes tabBounce { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-6px) scale(1.15); } 100% { transform: translateY(-2px) scale(1); } }

/* ---------- toast, fx, celebrate ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--bottom-safe) + 16px);
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  border: 2px solid var(--gold);
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.4s var(--ease-spring);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(0.95); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: #07150e;
  background-image: var(--grain), radial-gradient(circle at 50% 42%, #3a4a26 0%, #10281d 45%, #07150e 80%);
  animation: fadeIn 0.35s ease-out;
}
.celebrate-inner { text-align: center; max-width: 420px; }
.celebrate-star {
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  border-radius: 50%;
  filter: drop-shadow(0 0 26px rgba(217, 180, 90, 0.65)) drop-shadow(0 0 60px rgba(170, 130, 255, 0.4));
  animation: starIn 0.9s var(--ease-spring), medalGlow 3.2s ease-in-out 0.9s infinite;
}
@keyframes medalGlow { 50% { transform: scale(1.04); filter: drop-shadow(0 0 40px rgba(247, 231, 166, 0.9)) drop-shadow(0 0 80px rgba(170, 130, 255, 0.55)); } }
.celebrate-quiet { color: var(--gold-hi); border-color: var(--gold); background: rgba(10, 30, 21, 0.6); }
@keyframes starIn { from { transform: scale(0) rotate(-120deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes starSpin { to { transform: rotate(360deg); } }
.celebrate-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  text-transform: uppercase;
  background: linear-gradient(100deg, #f4e1a2 0%, #ffffff 14%, #d7b8ff 26%, #9ee8ff 38%, #fff6cc 50%, #f2b75d 62%, #ffffff 76%, #e7c46a 88%, #f4e1a2 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo 5s linear infinite;
}
.celebrate-script {
  font-family: var(--font-script);
  font-size: 52px;
  line-height: 1.1;
  margin: 14px 0;
  color: #fff6de;
  text-shadow: 0 0 24px rgba(217, 180, 90, 0.8);
  animation: rise 0.7s var(--ease-out) 0.3s both;
}
.celebrate-text { margin: 0 0 24px; font-size: 17px; color: #eadcb5; animation: rise 0.7s var(--ease-out) 0.45s both; }
.celebrate .btn-row { animation: rise 0.7s var(--ease-out) 0.6s both; }

/* ================= QB-S1c additions ================= */
.ico { width: 18px; height: 18px; flex: none; }
.summary-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.upload-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-purple);
}
.up-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.up-dot.live { animation: dotPing 1.1s ease-in-out infinite; }
@keyframes dotPing { 50% { transform: scale(1.5); opacity: 0.5; } }

/* scavenger hunt */
.scav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scav {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold);
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}
.scav-photo { aspect-ratio: 1 / 1; background: #0d2218; position: relative; }
.scav-photo img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.5s ease; }
.scav-photo.empty { display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 40px; color: var(--gold); }
.scav.is-done .scav-photo img { filter: saturate(1.15) brightness(1.05); }
.scav.is-done .scav-photo::after {
  content: "\2713";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-metal);
  color: #20160a;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  animation: stamp 0.6s var(--ease-spring);
}
.scav-body { padding: 4px 8px 10px; }
.scav .check { grid-template-columns: 40px 1fr; min-height: 50px; }
.scav .task-text { font-size: 13.5px; }
.scav .btn-row { gap: 6px; margin-top: 6px; }
.scav .btn-small { min-height: 36px; padding: 6px 10px; font-size: 11.5px; }
.scav.flash { animation: rowFlash 0.9s ease-out; }
@media (max-width: 359px) { .scav-grid { grid-template-columns: 1fr; } }

/* map: focus, beacon, label, upload hotspot */
.focus-bar, .fs-focus {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background-color: var(--parch);
  background-image: var(--grain), var(--parchment-bg);
  color: var(--ink);
  border: 2px solid var(--gold);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  animation: dropIn 0.45s var(--ease-spring);
}
.focus-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--rose); animation: dotPing 1.2s ease-in-out infinite; }
.focus-text { flex: 1; font-size: 15px; line-height: 1.3; }
.focus-text b { font-family: var(--font-display); color: var(--ink-blue); }
.pin.target { z-index: 6; }
.pin.target .pin-gem {
  transform: rotate(45deg) scale(1.5);
  animation: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), 0 0 26px var(--pin), 0 0 54px var(--pin);
}
.beacon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 3px solid var(--rose);
  pointer-events: none;
  animation: beacon 1.8s ease-out infinite;
}
.beacon.b2 { animation-delay: 0.9s; }
@keyframes beacon { from { transform: scale(0.5); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }
.pin-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -16px);
  padding: 6px 12px;
  border-radius: 10px;
  white-space: nowrap;
  background: var(--parch);
  color: var(--ink-blue);
  border: 2px solid var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: labelIn 0.55s var(--ease-spring) both;
}
.pin-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: var(--gold);
}
@keyframes labelIn { from { opacity: 0; transform: translate(-50%, 0) scale(0.6); } to { opacity: 1; transform: translate(-50%, -16px) scale(1); } }
.qr-hot {
  position: absolute;
  left: 1.5%;
  top: 52%;
  width: 19%;
  height: 37.5%;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 2px dashed rgba(255, 240, 180, 0.9);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-decoration: none;
  animation: hotPulse 2.6s ease-in-out infinite;
}
@keyframes hotPulse { 50% { box-shadow: 0 0 0 4px rgba(247, 231, 166, 0.35), 0 0 22px rgba(247, 231, 166, 0.6); } }
.qr-hot-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold-metal);
  color: #20160a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(70%) scale(var(--inv, 1));
  transform-origin: top center;
}
.qr-hot-label .ico { width: 14px; height: 14px; }

/* full-screen map */
html.fs-lock, html.fs-lock body { overflow: hidden; }
.fsmap {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: flex;
  flex-direction: column;
  background-color: #06140d;
  background-image: var(--grain);
  animation: fadeIn 0.25s ease-out;
}
.fs-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--top-safe) + 8px) 10px 8px 18px;
  border-bottom: 2px solid rgba(217, 180, 90, 0.6);
}
.fs-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.fs-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(10, 30, 21, 0.88);
  color: var(--gold-hi);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s var(--ease-out);
}
.fs-btn:active { transform: scale(0.9); }
.fs-close { font-size: 30px; }
.fs-wide { width: auto; padding: 0 16px; border-radius: 24px; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.fs-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; }
.fs-content { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.fs-content.glide { transition: transform 0.32s var(--ease-out); }
.fs-content > img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; pointer-events: none; }
.fs-pins, .fs-hot { position: absolute; inset: 0; pointer-events: none; }
.fs-pins .pin, .fs-hot .qr-hot { pointer-events: auto; }
.fs-pins .pin { transform: scale(var(--inv, 1)); }
.fs-tools {
  position: absolute;
  right: 14px;
  bottom: calc(var(--bottom-safe) + 18px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fs-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bottom-safe) + 24px);
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 30, 21, 0.85);
  color: #d9c79c;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  animation: hintFade 4.5s ease forwards;
}
@keyframes hintFade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.fs-focus { position: absolute; top: calc(var(--top-safe) + 78px); left: 12px; right: 12px; z-index: 2; margin: 0; }

/* share sheet */
.seg {
  display: flex;
  gap: 4px;
  margin: 10px 0 12px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(120, 88, 34, 0.14);
  border: 1.5px solid rgba(138, 106, 39, 0.5);
}
.seg button {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s var(--ease-out);
}
.seg button:active { transform: scale(0.96); }
.seg button[aria-pressed="true"] { background: var(--gold-metal); color: #20160a; box-shadow: 0 3px 8px rgba(80, 50, 10, 0.35); }
.spectral-word {
  background: linear-gradient(90deg, #c2189f, #0f86c4, #d9760b, #3f9e22, #c2189f);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo 3s linear infinite;
}
.sh-preview { display: flex; justify-content: center; margin: 2px 0 12px; }
.sh-preview img, .sh-preview canvas {
  width: min(58vw, 250px);
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: 0 12px 28px rgba(60, 40, 10, 0.45);
  animation: cardIn 0.6s var(--ease-spring);
}
.sh-wait { height: 320px; display: grid; place-items: center; color: var(--ink-soft); font-style: italic; }
.sh-progress { margin: 0 0 12px; font-size: 14px; color: var(--ink-purple); }
.sh-bar { height: 10px; margin-bottom: 6px; border-radius: 999px; background: rgba(120, 88, 34, 0.2); overflow: hidden; }
.sh-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e04fd0, #3cc8ef, #f0a13a, #7ee07a); transition: width 0.15s linear; }
.sh-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 4px; margin: 6px 0 8px; }
.sh-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.sh-ico {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.25s var(--ease-spring);
}
.sh-tile:active .sh-ico { transform: scale(0.86); }
.sh-ico svg { width: 26px; height: 26px; }
.sh-x, .sh-threads { background: #111111; }
.sh-facebook { background: #1877f2; }
.sh-whatsapp { background: #25d366; }
.sh-instagram { background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%); }
.sh-tiktok { background: #111111; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55, 0 4px 10px rgba(0, 0, 0, 0.28); }
.sh-youtube { background: #e62117; }
.sh-sms { background: #34c759; }
.sh-email { background: #8a6a27; }
.sh-more { background: var(--gold-metal); }
.sh-note { margin: 2px 0 12px; }
.sh-link { display: flex; gap: 8px; align-items: center; }
.sh-link input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--gold-lo);
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.sh-qr { margin-top: 12px; text-align: center; animation: rise 0.4s var(--ease-out); }
.sh-qr img { width: 200px; margin: 0 auto 6px; padding: 10px; border-radius: 12px; background: #ffffff; border: 2px solid var(--gold); }

/* upload sheet */
.field select {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--gold-lo);
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
}
.pick { display: block; position: relative; margin: 12px 0 8px; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pick-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 12px;
  border: 2px dashed var(--gold-lo);
  border-radius: 16px;
  background: rgba(255, 250, 235, 0.6);
  color: var(--ink-blue);
  text-align: center;
  transition: transform 0.15s var(--ease-out), background-color 0.2s ease;
}
.pick:active .pick-face { transform: scale(0.98); background: rgba(247, 226, 150, 0.4); }
.pick input:focus-visible + .pick-face { outline: 2px solid var(--ink-blue); outline-offset: 2px; }
.pick-face svg { width: 40px; height: 40px; }
.pick-face b { font-family: var(--font-display); font-size: 16px; }
.up-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.up-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid var(--gold); animation: thumbIn 0.4s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 60ms); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
@keyframes thumbIn { from { opacity: 0; transform: scale(0.5) rotate(-8deg); } to { opacity: 1; transform: none; } }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 15px; line-height: 1.4; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink-blue); }
.consent.shake { animation: shake 0.45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (min-width: 700px) {
  .brand-title { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ring .fill.on, .check[aria-checked="true"] .box svg path { stroke-dashoffset: 0; }
}
