/* ALLF hunt: shared styles for guest, guide, and gallery. Big type, big taps, brand colors only. */
:root {
  --buttercream: #F7EFDA; --maroon: #660000; --red: #B80C1B; --gold: #f0e020;
  --charcoal: #1D2429; --pavement: #384042; --surface: #FDF8EC; --rule: #e2d6b8; --muted: #6b6a62;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--buttercream); color: var(--pavement);
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif; font-size: 18px; line-height: 1.45; }
.topbar { background: var(--charcoal); color: var(--buttercream); display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; position: sticky; top: 0; z-index: 5; }
.topbar-logo { height: 26px; width: auto; }
.topbar-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main { padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; }
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; color: var(--maroon); margin: 0 0 8px; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 38px; font-weight: 700; } h2 { font-size: 30px; font-weight: 700; }
h3 { color: var(--red); font-size: 20px; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.loading, .muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 16px; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px;
  border-radius: 8px; border: 2px solid var(--maroon); background: var(--surface); color: var(--maroon);
  font: inherit; font-weight: 600; font-size: 18px; cursor: pointer; width: 100%; text-decoration: none; }
.btn-primary { background: var(--maroon); color: var(--buttercream); }
.btn-primary:active { background: var(--red); border-color: var(--red); }
.btn-ghost { border-color: var(--rule); color: var(--pavement); }
.btn[disabled] { opacity: .5; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.stack { display: grid; gap: 10px; }
.team-btn { border-left-width: 14px; text-align: left; justify-content: flex-start; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea { width: 100%; font: inherit; font-size: 18px; padding: 12px;
  border: 1px solid var(--rule); border-radius: 6px; background: #fff8; color: var(--charcoal); }
.release-box { max-height: 180px; overflow-y: auto; background: #fff6; border: 1px solid var(--rule); padding: 12px; font-size: 15px; margin: 8px 0; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; }
.checkline input { width: 22px; height: 22px; margin-top: 2px; }
.tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.tabs button { flex: 1; min-height: 44px; border: 1px solid var(--rule); background: var(--surface); color: var(--pavement); font: inherit; font-weight: 600; border-radius: 6px; }
.tabs button.active { background: var(--maroon); color: var(--buttercream); border-color: var(--maroon); }
.score-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.score-line strong { font-size: 26px; color: var(--maroon); font-variant-numeric: tabular-nums; }
.section-head { font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 22px 0 10px; }
.challenge { display: grid; grid-template-columns: 1fr 88px; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.challenge .prompt { font-size: 19px; line-height: 1.35; color: var(--charcoal); }
.challenge .pts { font-size: 14px; color: var(--muted); margin-top: 4px; }
.challenge .thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; background: var(--rule); }
/* A finished video sits in the same 88px corner as a photo. Dark behind it,
   because a clip that has not loaded its first frame yet shows through. */
.challenge video.thumb { background: var(--charcoal); }
.challenge .cam { width: 88px; height: 88px; border-radius: 6px; background: var(--maroon); color: var(--buttercream);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; border: 0; font-family: inherit; }
/* A card that takes either one stacks the two buttons in the same corner. */
.cam-stack { display: grid; gap: 6px; }
.cam-stack .cam { height: 41px; font-size: 14px; }
/* Says what this card wants before the guest opens the camera in the wrong mode. */
.media-tag { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--gold); color: var(--charcoal); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }
.challenge.done { border-color: #3c7a4a; background: #eef5ea; }
.challenge.locked { opacity: .55; }
.challenge.locked .cam { background: var(--pavement); }
.pending { font-size: 14px; color: var(--muted); }
.board { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 20px; }
.board .swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.board .pts { margin-left: auto; font-weight: 600; color: var(--maroon); font-variant-numeric: tabular-nums; }
.board li.winner { font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid figure { margin: 0; background: var(--surface); border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); }
.grid img, .grid video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.grid video { background: var(--charcoal); }
.grid figcaption { padding: 8px 10px; font-size: 14px; line-height: 1.3; }
.badge { display: inline-block; background: var(--gold); color: var(--charcoal); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--charcoal);
  color: var(--buttercream); padding: 12px 16px; border-radius: 8px; text-align: center; z-index: 9; }
.error { color: var(--red); font-weight: 600; }
/* Body-copy links, brand colors only: maroon at rest, red under a thumb. The
   browser default is a blue nothing else on this site uses. */
a { color: var(--maroon); }
a:active, a:hover { color: var(--red); }
/* The privacy notice is the one screen here that is prose with bullets. Its own
   class, because .board li in the leaderboard is a flex row and must stay one. */
.notice-list { margin: 0 0 12px; padding-left: 20px; }
.notice-list li { margin-bottom: 6px; }
.hidden { display: none !important; }

/* ---------- Bonus question card ----------
   A challenge that carries trivia becomes a two-faced card, like a playing card
   turning face up. Whichever face is showing sits in the normal flow and sets
   the height, so a long question can be taller than the photo prompt without
   the rest of the list jumping when it turns. */
.flipper { perspective: 1200px; margin-bottom: 10px; }
.flip-inner { position: relative; transform-style: preserve-3d; transition: transform .6s ease; }
.flipper.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back { position: absolute; top: 0; left: 0; width: 100%; transform: rotateY(180deg); }
.flipper.flipped .flip-front { position: absolute; top: 0; left: 0; width: 100%; }
.flipper.flipped .flip-back { position: relative; }
/* The face turned away is invisible but still sits on top of the other one.
   Taking its taps away is what keeps Snap it, and the answer buttons, reachable. */
.flip-back, .flipper.flipped .flip-front { pointer-events: none; }
.flipper.flipped .flip-back { pointer-events: auto; }
.flipper .challenge { margin-bottom: 0; }
.challenge-back { background: var(--surface); border: 2px solid var(--maroon); border-radius: 8px; padding: 16px; }
.challenge-back .q { font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; font-weight: 700;
  color: var(--maroon); line-height: 1.15; margin-bottom: 14px; text-wrap: balance; }
.challenge-back .choice { text-align: left; justify-content: flex-start; margin-bottom: 10px; }
.challenge-back .picked { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.challenge-back .result { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.challenge-back .result.right { color: var(--maroon); }
.challenge-back .result.wrong { color: var(--pavement); }
.challenge-back .fact { font-size: 16px; color: var(--charcoal); margin-bottom: 10px; }
.bonus-pill { display: inline-block; min-height: 36px; margin-top: 8px; padding: 6px 14px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--charcoal); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.bonus-pill:focus-visible { outline: 3px solid var(--maroon); outline-offset: 2px; }
.bonus-back { background: none; color: var(--maroon); font-weight: 600; padding: 6px 0; text-decoration: underline; }
.bonus-badge { display: block; margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--maroon); }
.bonus-badge.missed { color: var(--muted); }
.bonus-wait { margin-top: 6px; font-size: 14px; color: var(--muted); }
/* The guide's feed: one line under the challenge title saying how the team did. */
.feed-trivia { font-size: 15px; font-weight: 600; color: var(--maroon); }
.feed-trivia.missed, .feed-trivia.waiting { color: var(--muted); font-weight: 400; }

/* Reduced motion: the faces swap outright, with no rotation. */
@media (prefers-reduced-motion: reduce) {
  .flip-inner, .flipper.flipped .flip-inner { transition: none; transform: none; }
  .flip-face { backface-visibility: visible; -webkit-backface-visibility: visible; }
  .flip-back, .flipper.flipped .flip-front { display: none; }
  .flipper.flipped .flip-back { display: block; position: relative; transform: none; }
}

/* ---------- Self-guided hunts ---------- */
.progress { margin: 6px 0 14px; }
.progress-line { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.progress-bar { height: 10px; background: var(--rule); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--maroon); border-radius: 999px; transition: width .4s ease; }
.countdown h2 { font-size: 26px; }
.tod-tag { display: inline-block; margin: 0 0 6px 6px; padding: 2px 8px; border-radius: 999px; background: var(--rule);
  color: var(--pavement); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.again { margin-top: 6px; font-size: 14px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--maroon); text-decoration: underline; cursor: pointer; }
.party-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.party-item img, .party-item video { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
.party-item video { background: var(--charcoal); }
.party-actions { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.heart { min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--maroon); background: var(--surface);
  color: var(--maroon); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.heart.on { background: var(--maroon); color: var(--buttercream); }
.heart:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.organizer-bar { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
.organizer-bar p { margin-top: 8px; font-size: 14px; }
.reel video.reel { width: 100%; max-height: 70vh; background: var(--charcoal); border-radius: 8px; }
.picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.picker .pick { position: relative; display: block; background: var(--surface); border: 2px solid var(--rule); border-radius: 8px; overflow: hidden; }
.picker .pick.on, .picker .pick:has(input:checked) { border-color: var(--maroon); }
.picker .pick input { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; accent-color: var(--maroon); z-index: 2; }
.picker img, .picker video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.picker span { display: block; padding: 6px 8px; font-size: 13px; }
