/* Layout: a storybook. A painted snowy-village hero, then parchment pages laid on a snowy ground,
   each opened by a hand-lettered heading under a sprig of holly. One warm look, deliberately single-theme. */
:root {
  --paper: #fbf1de;
  --paper-2: #f3e1bf;
  --paper-edge: #e2c79a;
  --ink: #3b2a1d;
  --ink-soft: #6b5440;
  --red: #b3262e;
  --red-deep: #8a1b22;
  --holly: #2f5a3a;
  --gold: #d99a2b;
  --gold-soft: #f6d58b;
  --snow: #f4f6f8;
  --ground: #dfe7ec;
  --night: #24323d;

  --f-logo: "Berkshire Swash", "Georgia", serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --f-body: "Alegreya", "Georgia", "Times New Roman", serif;

  --r: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px -12px rgba(59,42,29,.35), 0 2px 6px rgba(59,42,29,.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.075rem;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ground) 0%, var(--snow) 40%, #efe6d6 100%) fixed var(--snow);
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--red-deep); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--red); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hand { font-family: var(--f-hand); }
.center { display: flex; justify-content: center; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--f-hand); font-size: 1.5rem; font-weight: 700; line-height: 1;
  padding: .55em 1.1em .6em; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px) rotate(-.5deg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-red {
  background: var(--red); color: var(--paper);
  box-shadow: 0 0 0 2px var(--red), 0 0 0 4px var(--paper), 0 0 0 5.5px var(--red-deep) , 0 8px 16px -6px rgba(138,27,34,.6);
}
.btn-red:hover { background: var(--red-deep); }
.btn-ghost { background: rgba(251,241,222,.85); color: var(--red-deep); box-shadow: inset 0 0 0 2px var(--red); }
.btn-ghost:hover { background: var(--paper); }
.btn-small { font-size: 1.2rem; padding: .4em .8em .45em; }
.icon-btn { background: none; border: 0; font-size: 1.2rem; cursor: pointer; padding: 6px; border-radius: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding-block: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--red-deep);
  background-image: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  color: var(--paper);
  box-shadow: 0 3px 0 var(--gold), 0 6px 18px rgba(0,0,0,.25);
}
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; flex: 1 1 auto; justify-content: space-evenly; gap: 6px; }
.nav-links a {
  font-family: var(--f-hand); font-size: 1.35rem; font-weight: 700; color: var(--paper);
  text-decoration: none; padding: 8px 14px; border-radius: 8px; white-space: nowrap; text-align: center;
}
.nav-links a:hover { background: rgba(255,255,255,.14); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; margin-left: auto; background: rgba(255,255,255,.14); border: 0; color: var(--paper); font-family: var(--f-hand); font-size: 1.3rem; font-weight: 700; padding: 2px 12px; border-radius: 8px; cursor: pointer; }

@media (max-width: 1240px) {
  .nav { flex-wrap: wrap; gap: 10px; }
  .nav-toggle { display: block; }
  .nav-tools { order: 2; }
  .nav-links { display: none; order: 3; width: 100%; margin: 0; padding-bottom: 6px; }
  .nav-links.open { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .nav-links.open a { padding: 10px 6px; background: rgba(255,255,255,.1); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: url("../assets/village.webp") center 62% / cover no-repeat, #e8c9a6;
  border-bottom: 6px solid var(--paper-edge);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 18% 45%, rgba(251,241,222,.92) 0%, rgba(251,241,222,.7) 45%, rgba(251,241,222,0) 75%),
    linear-gradient(180deg, rgba(251,241,222,.35), rgba(251,241,222,0) 30%);
}
.hero-inner {
  position: relative; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .6fr); align-items: end; gap: 12px;
  padding-block: 36px 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.hero-copy { align-self: center; display: grid; gap: 12px; justify-items: start; padding-bottom: 190px; }
.eyebrow { font-size: 1.6rem; color: var(--holly); font-weight: 700; }
.logo { margin: -14px 0 0 -14px; line-height: 0; width: min(100%, 560px); }
.logo img { width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(59,42,29,.18)); }
.lead { font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.05; color: var(--ink); font-weight: 700; }
.lead span { color: var(--red); }
.tagline { max-width: 38ch; font-size: 1.15rem; color: var(--ink-soft); }
.countdown { display: flex; gap: 10px; margin-top: 8px; }
.countdown div {
  display: grid; justify-items: center; min-width: 74px;
  background: var(--paper); border-radius: 10px; padding: 8px 10px 6px;
  box-shadow: inset 0 0 0 2px var(--paper-edge), var(--shadow);
}
.countdown span { font-family: var(--f-logo); font-size: 2.2rem; color: var(--red); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.cd-label { font-size: clamp(1.8rem, 2.6vw, 2.2rem); line-height: 1.15; text-wrap: balance; color: var(--holly); margin-top: -4px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.pledge-msg { font-size: 1.5rem; color: var(--red-deep); }

.hero-tree { position: relative; display: flex; justify-content: center; }
.hero-tree .tree { width: min(100%, 400px); filter: drop-shadow(0 18px 24px rgba(59,42,29,.35)); animation: sway 7s ease-in-out infinite; transform-origin: 50% 100%; }
.tree-note { position: absolute; right: -22%; top: 8%; font-size: 1.9rem; color: var(--red-deep); transform: rotate(-12deg); line-height: 1; font-weight: 700; text-shadow: 0 0 10px var(--paper), 0 0 4px var(--paper); }
.hero-sign { display: grid; justify-items: center; align-self: center; padding-bottom: 60px; }
.sign-crisps { display: flex; align-items: flex-end; margin-bottom: -18px; position: relative; z-index: 1; animation: crisphop 5s ease-in-out infinite; }
.sign-crisps img { filter: drop-shadow(0 6px 6px rgba(59,42,29,.3)); }
.sign-crisps img:nth-child(1) { width: 58px; transform: rotate(-18deg) translateY(4px); }
.sign-crisps img:nth-child(2) { width: 70px; margin: 0 -10px; transform: rotate(6deg); position: relative; z-index: 1; }
.sign-crisps img:nth-child(3) { width: 54px; transform: rotate(22deg) translateY(6px); }
.wood-sign {
  width: 210px; aspect-ratio: 640/538; max-width: 100%;
  background: url("../assets/sign.webp") center / contain no-repeat;
  display: grid; place-items: center; text-align: center; padding: 28% 12% 8%;
  transform: rotate(3deg);
}
.wood-sign span { font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--ink); }

.crisp-bowl { position: absolute; left: max(8px, calc(50% - 630px)); bottom: 6px; width: 190px; height: 150px; transform-origin: left bottom; filter: drop-shadow(0 8px 10px rgba(59,42,29,.3)); }
.crisp-bowl img { position: absolute; width: 66px; }
.crisp-bowl .c1 { left: 6px; bottom: 50px; transform: rotate(-28deg); }
.crisp-bowl .c2 { left: 44px; bottom: 72px; width: 74px; transform: rotate(-6deg); }
.crisp-bowl .c3 { left: 96px; bottom: 60px; transform: rotate(18deg); }
.crisp-bowl .c4 { left: 128px; bottom: 44px; width: 58px; transform: rotate(34deg); }
.crisp-bowl .c5 { left: 66px; bottom: 44px; width: 60px; transform: rotate(8deg); }
.crisp-bowl .c6 { left: 150px; bottom: 96px; width: 34px; transform: rotate(-40deg); animation: sway 3s ease-in-out infinite; }
.crisp-bowl .bowl {
  position: absolute; left: 0; right: 0; bottom: 0; height: 76px;
  background: var(--red); border-radius: 8px 8px 50% 50% / 8px 8px 100% 100%;
  box-shadow: inset 0 9px 0 var(--red-deep), inset 0 -10px 0 rgba(0,0,0,.12);
}
.crisp-bowl .bowl::after { content: "Crispmas"; position: absolute; inset: 26px 0 auto; text-align: center; font-family: var(--f-logo); font-size: 1.35rem; color: var(--gold-soft); }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-sign { display: none; }
  .tree-note { right: 0; }
}
@media (max-width: 680px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 22px; }
  .hero-copy { padding-bottom: 0; }
  .hero::before { background: linear-gradient(180deg, rgba(251,241,222,.9) 0%, rgba(251,241,222,.75) 55%, rgba(251,241,222,.1) 100%); }
  .hero-tree .tree { width: 62%; }
    .countdown div { min-width: 0; flex: 1; }
  .tree-note { font-size: 1.5rem; right: 2%; }
  .cd-label { font-size: 1.65rem; }
}

/* ---------- Panels (parchment pages) ---------- */
main { display: grid; gap: 40px; padding-bottom: 40px; }
.panel {
  position: relative; width: min(1140px, calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))));
  margin: 0 auto; padding: clamp(24px, 4vw, 48px);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(217,154,43,.08), transparent 40%),
    radial-gradient(circle at 90% 92%, rgba(179,38,46,.06), transparent 45%),
    radial-gradient(rgba(107,84,64,.05) 1px, transparent 1px);
  background-size: auto, auto, 5px 5px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 0 0 8px var(--paper), 0 0 0 9px var(--paper-edge), 0 20px 40px -18px rgba(59,42,29,.45);
}
.hero + .panel { margin-top: 44px; }
.section-head { display: grid; justify-items: center; text-align: center; gap: 6px; margin-bottom: 28px; }
.section-head .holly { width: 90px; height: 48px; }
.section-head h2 { font-family: var(--f-logo); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.2rem); color: var(--red); }
.section-head p { max-width: 58ch; color: var(--ink-soft); font-size: 1.12rem; }
.panel h3 { font-family: var(--f-hand); font-size: 1.85rem; font-weight: 700; color: var(--red-deep); }
.small-print { font-size: .92rem; color: var(--ink-soft); margin-top: 18px; text-align: center; }
.tag { font-family: var(--f-hand); font-weight: 700; font-size: 1.3em; color: var(--red); }

/* ---------- Rules ---------- */
.commandments { list-style: none; counter-reset: c; padding: 0; margin: 0 auto; max-width: 900px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.commandments li { counter-increment: c; position: relative; padding: 10px 0 10px 60px; border-bottom: 1px dashed var(--paper-edge); }
.commandments li::before {
  content: counter(c, upper-roman); position: absolute; left: 0; top: 8px;
  font-family: var(--f-logo); font-size: 1.6rem; color: var(--gold); width: 48px; text-align: center;
}
.commandments b { color: var(--red-deep); }
@media (max-width: 760px) { .commandments { grid-template-columns: 1fr; } }

/* ---------- Menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); grid-auto-flow: dense; gap: 18px; }
.menu-card {
  position: relative; display: grid; align-content: start; gap: 8px;
  background: #fffaf0; padding: 18px 20px 20px; border-radius: 4px;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 6px 14px -8px rgba(59,42,29,.4);
}
.menu-card.feature { grid-row: span 2; background: var(--holly); color: #f4ead2; box-shadow: 0 0 0 1px #1f3d27, 0 0 0 5px var(--holly), 0 0 0 6px var(--gold), 0 10px 20px -8px rgba(31,61,39,.6); }
.menu-card.feature h3 { color: var(--gold-soft); font-size: 2.2rem; }
.menu-card.feature .menu-time { color: var(--gold-soft); }
.menu-deco { width: 130px; justify-self: end; margin: -6px -6px -10px 0; transform: rotate(12deg); filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.menu-time { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--holly); }

.machine {
  margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  background: var(--red-deep); color: var(--paper); padding: 20px 24px; border-radius: 12px;
  box-shadow: inset 0 0 0 3px var(--gold), 0 10px 20px -10px rgba(138,27,34,.7);
}
.machine h3 { color: var(--gold-soft); }
.machine-reels { display: flex; gap: 8px; }
.reel {
  min-width: 140px; padding: 10px 12px; text-align: center; background: var(--paper); color: var(--ink);
  border-radius: 8px; font-family: var(--f-hand); font-size: 1.5rem; font-weight: 700; box-shadow: inset 0 3px 8px rgba(0,0,0,.25);
}
.reel.spin { animation: reel .12s linear infinite; }
.machine .btn-red { box-shadow: 0 0 0 2px var(--gold), 0 6px 12px -4px rgba(0,0,0,.4); background: var(--red); }
@media (max-width: 900px) {
  .machine { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .machine-reels { flex-wrap: wrap; justify-content: center; }
  .reel { min-width: 0; flex: 1 1 120px; }
}

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.tabs button {
  font-family: var(--f-hand); font-size: 1.4rem; font-weight: 700; cursor: pointer;
  padding: 6px 16px; border-radius: 10px; border: 0; background: var(--paper-2); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--paper-edge);
}
.tabs button[aria-selected="true"] { background: var(--red); color: var(--paper); box-shadow: 0 4px 10px -4px rgba(138,27,34,.6); }

/* ---------- Catcher ---------- */
.game-wrap { position: relative; max-width: 760px; margin: 0 auto; }
#catcher { display: block; width: 100%; height: auto; border-radius: 12px; touch-action: none; box-shadow: 0 0 0 3px var(--paper-edge), 0 14px 28px -12px rgba(36,50,61,.6); background: var(--night); }
.game-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px;
  background: rgba(251,241,222,.93); border-radius: 12px;
}
.game-overlay h3 { font-family: var(--f-logo); font-weight: 400; font-size: 2.4rem; color: var(--red); }
.game-overlay p { max-width: 44ch; }
.hint { font-size: .92rem; color: var(--ink-soft); }
.best { font-weight: 800; color: var(--holly); }

/* ---------- Quiz ---------- */
.quiz { max-width: 680px; margin: 0 auto; display: grid; gap: 14px; }
.quiz-step { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--holly); }
.quiz-q { font-family: var(--f-hand); font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz-opts button {
  text-align: left; padding: 14px 16px; border-radius: 10px; border: 0; cursor: pointer; background: #fffaf0;
  box-shadow: inset 0 0 0 1.5px var(--paper-edge); font-size: 1.05rem; transition: transform .12s, box-shadow .12s;
}
.quiz-opts button:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--red); }
@media (max-width: 560px) { .quiz-opts { grid-template-columns: 1fr; } }
.quiz-result { text-align: center; display: grid; gap: 12px; justify-items: center; }
.quiz-result .flavour { font-family: var(--f-logo); font-size: clamp(2.2rem, 6vw, 3.2rem); color: var(--red); line-height: 1; }
.quiz-result .flav-title { font-family: var(--f-hand); font-size: 1.8rem; font-weight: 700; color: var(--holly); }
.quiz-result img { width: 120px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); animation: sway 3s ease-in-out infinite; }
.quiz-result .row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Memory ---------- */
.memory-bar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: center; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; }
.mcard { aspect-ratio: 3 / 4; perspective: 700px; border: 0; padding: 0; background: none; cursor: pointer; max-width: 100%; }
.mcard-inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.flipped .mcard-inner, .mcard.matched .mcard-inner { transform: rotateY(180deg); }
.mcard-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; display: grid; place-items: center; }
.mcard-back {
  background: var(--red);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 8px, transparent 8px 16px);
  box-shadow: inset 0 0 0 3px var(--gold-soft), inset 0 0 0 6px var(--red);
}
.mcard-back::after { content: "★"; color: var(--gold-soft); font-size: 1.8rem; }
.mcard-front { transform: rotateY(180deg); background: #fffaf0; box-shadow: inset 0 0 0 2px var(--paper-edge); align-content: center; gap: 2px; padding: 6px; text-align: center; }
.mcard-front .em { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1; }
.mcard-front .nm { font-size: clamp(.62rem, 2vw, .82rem); font-weight: 800; color: var(--ink-soft); line-height: 1.1; }
.mcard.matched .mcard-front { box-shadow: inset 0 0 0 3px var(--holly); background: #eef4e6; }
.memory-win { text-align: center; font-size: 1.8rem; color: var(--holly); margin-top: 14px; font-weight: 700; }

/* ---------- Crackers ---------- */
.crackers { position: relative; display: grid; justify-items: center; gap: 18px; padding: 10px 0 30px; }
.cracker { position: relative; display: flex; height: 80px; width: min(420px, 100%); justify-content: center; }
.cracker-half { display: flex; align-items: center; transition: transform .6s cubic-bezier(.2,1.6,.4,1); }
.cracker-half .body { height: 56px; width: min(130px, 30vw); background: var(--red); background-image: repeating-linear-gradient(90deg, transparent 0 14px, rgba(246,213,139,.55) 14px 18px); box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), inset 0 6px 0 rgba(255,255,255,.18); }
.cracker-half .end { height: 74px; width: 40px; background: var(--gold); clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%); }
.cracker-half.right .end { clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%); }
.cracker-half.left .body { border-radius: 4px 0 0 4px; clip-path: polygon(0 0, 100% 0, 92% 20%, 100% 40%, 92% 60%, 100% 80%, 92% 100%, 0 100%); }
.cracker-half.right .body { clip-path: polygon(8% 0, 100% 0, 100% 100%, 8% 100%, 0 80%, 8% 60%, 0 40%, 8% 20%); }
.cracker.pulled .left { transform: translateX(-60px) rotate(-14deg); }
.cracker.pulled .right { transform: translateX(60px) rotate(14deg); }
.bang { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); font-family: var(--f-logo); font-size: 2rem; color: var(--gold); text-shadow: 2px 2px 0 var(--red-deep); pointer-events: none; }
.cracker.pulled .bang { animation: bang .7s ease forwards; }
.cracker-prize { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 520px; background: #fffaf0; padding: 22px 26px; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge), 0 10px 20px -10px rgba(59,42,29,.4); animation: pop .45s ease; }
.hat { width: 110px; height: 44px; clip-path: polygon(0 100%, 0 30%, 16% 0, 33% 30%, 50% 0, 67% 30%, 84% 0, 100% 30%, 100% 100%); }
.joke-q { font-size: 1.2rem; font-weight: 600; }
.joke-a { font-size: 2rem; color: var(--red); line-height: 1.1; font-weight: 700; }
.motto { font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.cracker-count { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Carols ---------- */
.carol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; align-items: start; }
.carol {
  background: #fffaf0; border-radius: 4px; padding: 20px 22px 22px; display: grid; gap: 10px;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 8px 16px -10px rgba(59,42,29,.45);
}
.carol-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.carol h3 { font-size: 2rem; }
.carol .tune { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--holly); }
.play-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--red); color: var(--paper); font-size: 1.1rem; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--red-deep); }
.play-btn.playing { background: var(--holly); animation: pulse 1s ease-in-out infinite; }
.lyrics { white-space: pre-line; font-size: 1.02rem; line-height: 1.55; max-height: 15.5em; overflow: hidden; position: relative; transition: max-height .4s ease; }
.lyrics::after { content: ""; position: absolute; inset: auto 0 0; height: 3em; background: linear-gradient(transparent, #fffaf0); transition: opacity .3s; }
.carol.open .lyrics { max-height: 120em; }
.carol.open .lyrics::after { opacity: 0; }
.lyrics .chorus { display: block; font-style: italic; color: var(--red-deep); }
.more-btn { justify-self: start; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--f-hand); font-size: 1.4rem; font-weight: 700; color: var(--red); }

/* ---------- Hunt ---------- */
.hunt-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.hunt-map { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--paper-edge), 0 14px 28px -14px rgba(59,42,29,.6); }
.hunt-map img { display: block; width: 100%; }
.challenge-progress { display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 16px; background: var(--paper-2); border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--paper-edge); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--red); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 8px, transparent 8px 16px); border-radius: 999px; transition: width .5s ease; }
@media (max-width: 860px) { .hunt-layout { grid-template-columns: 1fr; } }

.printable { margin-top: 34px; padding: 24px; border: 2px dashed var(--paper-edge); border-radius: 8px; background: #fffaf0; }
.printable-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.printable-head p { max-width: 60ch; color: var(--ink-soft); }
.home-clues { margin: 0; padding-left: 1.6em; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 30px; }
.home-clues em { display: block; font-style: normal; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--holly); }
@media (max-width: 760px) { .home-clues { grid-template-columns: 1fr; } }

/* ---------- Party ---------- */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.party-card { display: grid; align-content: start; gap: 8px; padding: 18px 20px; background: #fffaf0; border-radius: 4px; box-shadow: 0 0 0 1px var(--paper-edge), 0 6px 14px -8px rgba(59,42,29,.4); }
.party-card h3 { font-size: 1.65rem; }
.pc-meta { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--holly); margin-top: auto; }
.party-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }
.wheel-box, .charades-box { position: relative; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 24px; border-radius: 10px; background: var(--holly); color: #f4ead2; box-shadow: inset 0 0 0 3px var(--gold), 0 10px 20px -10px rgba(31,61,39,.7); }
.wheel-box h3, .charades-box h3 { color: var(--gold-soft); font-size: 2rem; }
.wheel-wrap { position: relative; width: min(340px, 100%); }
#wheel { width: 100%; height: auto; display: block; transition: transform 4.2s cubic-bezier(.12,.8,.18,1); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid var(--gold); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.wheel-result { min-height: 2.4em; font-size: 1.7rem; color: var(--gold-soft); line-height: 1.1; font-weight: 700; }
.charade-card { width: min(340px, 100%); aspect-ratio: 5 / 3; max-width: 100%; display: grid; place-items: center; padding: 18px; background: var(--paper); color: var(--red); font-size: 2.1rem; font-weight: 700; line-height: 1.05; border-radius: 10px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--red), 0 12px 20px -8px rgba(0,0,0,.5); transform: rotate(-1.5deg); }
.charade-card.flip { animation: cardflip .5s ease; }
.charade-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.charade-clock { font-family: var(--f-logo); font-size: 2rem; color: var(--gold-soft); min-height: 1.3em; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .party-tools { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Challenge ---------- */
.challenge-progress { max-width: 640px; margin: 0 auto 22px; }
.challenges { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.challenges label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; background: #fffaf0; border-radius: 6px; cursor: pointer; box-shadow: 0 0 0 1px var(--paper-edge); transition: background .2s, box-shadow .2s; }
.challenges input { appearance: none; width: 28px; height: 28px; margin: 2px 0 0; border-radius: 50%; border: 2px solid var(--paper-edge); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.challenges input:checked { background: var(--holly); border-color: var(--holly); }
.challenges input:checked::after { content: "✓"; color: var(--paper); font-weight: 800; font-size: .95rem; }
.challenges label:has(input:checked) { background: #eef4e6; box-shadow: 0 0 0 1.5px var(--holly); }
.challenges b { display: block; color: var(--red-deep); font-size: 1.05rem; }
.challenges span { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Wall ---------- */
.wall-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
.submit-form { position: relative; display: grid; gap: 8px; padding: 22px; background: #fffaf0; border-radius: 8px; box-shadow: 0 0 0 1px var(--paper-edge), 0 10px 20px -12px rgba(59,42,29,.45); }
.submit-form > label:not(.file-drop):not(.check) { font-weight: 600; font-size: .95rem; margin-top: 4px; }
.submit-form input:not([type="checkbox"]):not([type="file"]), .submit-form select, .modal input:not([type="checkbox"]) {
  font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--paper-edge); background: var(--paper); color: var(--ink); width: 100%;
}
.file-drop { position: relative; display: grid; place-items: center; min-height: 130px; margin-top: 8px; border: 2px dashed var(--paper-edge); border-radius: 10px; background: var(--paper); cursor: pointer; text-align: center; padding: 12px; color: var(--ink-soft); overflow: hidden; }
.file-drop.drag { border-color: var(--red); background: #fff3e0; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop img { max-height: 200px; border-radius: 6px; }
.check { display: flex; gap: 10px; align-items: start; font-size: .9rem; margin: 6px 0; }
.check input { margin-top: 4px; accent-color: var(--red); }
.form-msg { min-height: 1.4em; font-size: .95rem; color: var(--holly); font-weight: 600; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { border: 0; cursor: pointer; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); font-size: .92rem; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--paper-edge); }
.chip.active { background: var(--holly); color: var(--paper); box-shadow: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.polaroid { background: #fff; padding: 10px 10px 12px; box-shadow: 0 8px 18px -8px rgba(59,42,29,.5); transform: rotate(var(--tilt, 0deg)); transition: transform .2s; display: grid; gap: 6px; }
.polaroid:hover { transform: rotate(0) scale(1.03); }
.polaroid .ph { aspect-ratio: 1; max-width: 100%; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; }
.polaroid .ph img { width: 100%; height: 100%; object-fit: cover; }
.polaroid .ph.example { background: radial-gradient(circle at 50% 60%, #fdf3df, #f0d9b0); }
.polaroid .ph.example img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.polaroid .dish { font-family: var(--f-hand); font-size: 1.45rem; font-weight: 700; line-height: 1.05; color: var(--ink); }
.polaroid .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-soft); }
.polaroid .ex { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--gold); }
.vote { border: 0; cursor: pointer; background: var(--paper-2); border-radius: 999px; padding: 3px 10px; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vote.voted { background: var(--red); color: var(--paper); }
.del { border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: .8rem; text-decoration: underline; padding: 0; }
@media (max-width: 820px) { .wall-layout { grid-template-columns: 1fr; } }

/* ---------- Share ---------- */
.share-band { position: relative; background: var(--red-deep); background-image: linear-gradient(180deg, var(--red), var(--red-deep)); color: var(--paper); text-align: center; box-shadow: 0 -4px 0 var(--gold), 0 4px 0 var(--gold); }
.share-inner { position: relative; max-width: 900px; margin: 0 auto; display: grid; gap: 14px; justify-items: center; padding-block: 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.share-band h2 { font-family: var(--f-logo); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--gold-soft); }
.share-band p { max-width: 52ch; }
.share-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.share-band .btn-red { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px var(--red-deep), 0 0 0 5.5px var(--gold-soft); }
.share-band .btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 2px var(--gold-soft); }
.hashtag { font-family: var(--f-hand); font-size: 2.6rem; font-weight: 700; color: var(--gold-soft); }

.fb-big {
  display: inline-flex; align-items: center; gap: 18px; max-width: 100%; margin: 8px 0 4px;
  padding: 20px 34px 20px 22px; border-radius: 18px; background: #1877F2; color: #fff;
  text-decoration: none; text-align: left; font-family: var(--f-body);
  box-shadow: 0 0 0 4px var(--gold-soft), 0 0 0 7px var(--red-deep), 0 16px 30px -10px rgba(0,0,0,.55);
  transition: transform .15s ease, background .15s; animation: fbpulse 2.8s ease-in-out infinite;
}
.fb-big:hover { background: #0f63d6; transform: translateY(-3px) scale(1.02); }
.fb-big svg { width: 60px; height: 60px; flex: none; }
.fb-big b { display: block; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.1; }
.fb-big small { display: block; font-size: 1rem; opacity: .92; margin-top: 4px; }
.fb-follow { font-family: var(--f-hand); font-size: 1.6rem; font-weight: 700; color: var(--paper); text-decoration: none; border-bottom: 2px solid var(--gold-soft); }
@keyframes fbpulse { 0%,100% { box-shadow: 0 0 0 4px var(--gold-soft), 0 0 0 7px var(--red-deep), 0 16px 30px -10px rgba(0,0,0,.55); } 50% { box-shadow: 0 0 0 4px var(--gold-soft), 0 0 0 7px var(--red-deep), 0 0 34px 10px rgba(246,213,139,.55); } }
@media (max-width: 560px) { .fb-big { width: 100%; padding: 16px 18px; gap: 14px; } .fb-big svg { width: 48px; height: 48px; } }

/* ---------- Footer ---------- */
.footer { display: grid; justify-items: center; gap: 6px; text-align: center; padding-block: 34px 90px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); color: var(--ink-soft); }
.footer-crisps { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.footer .small-print { margin-top: 0; max-width: 70ch; }

.tip-fab {
  position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  min-height: 50px; padding: 8px 18px 8px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fbf1de; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--red-deep), 0 8px 18px rgba(0,0,0,.3);
}
.tip-fab[hidden] { display: none; }

/* ---------- Modal, toast, confetti ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(36,50,61,.6); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 10px; padding: 24px; background: var(--paper); border-radius: 10px; box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--gold), 0 30px 60px rgba(0,0,0,.4); }
.modal-card h3 { font-family: var(--f-logo); font-weight: 400; font-size: 2rem; color: var(--red); padding-right: 40px; }
.modal-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--paper-2); font-size: 1.1rem; }
.cert-name { font-weight: 600; font-size: .95rem; }
#cert-canvas { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  transform: translate(-50%, 140%); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .2s, visibility .2s;
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 600; box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 85; overflow: hidden; }
.confetti i { position: absolute; top: -40px; width: 30px; height: 30px; background: center / contain no-repeat; animation: fall linear forwards; }

/* ---------- Animations ---------- */
@keyframes sway { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }
@keyframes crisphop { 0%,88%,100% { transform: translateY(0); } 92% { transform: translateY(-10px) rotate(-2deg); } 96% { transform: translateY(0); } }
@keyframes bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.3); } }
@keyframes reel { 0% { transform: translateY(-3px); } 50% { transform: translateY(3px); } 100% { transform: translateY(-3px); } }
@keyframes bang { 0% { transform: translate(-50%,-50%) scale(0) rotate(-10deg); opacity: 1; } 60% { transform: translate(-50%,-50%) scale(1.3) rotate(4deg); opacity: 1; } 100% { transform: translate(-50%,-80%) scale(1) rotate(0); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes cardflip { 0% { transform: rotate(-1.5deg) rotateY(90deg); } 100% { transform: rotate(-1.5deg) rotateY(0); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print: only the home hunt clues ---------- */
@media print {
  body.print-hunt > *:not(main), body.print-hunt main > *:not(#hunt), body.print-hunt #hunt > *:not(#home-hunt) { display: none !important; }
  body.print-hunt main { display: block; padding: 0; }
  body.print-hunt { background: #fff; }
  body.print-hunt #hunt, body.print-hunt #home-hunt { box-shadow: none; background: none; border: 0; padding: 0; margin: 0; width: auto; }
  body.print-hunt .printable-head button { display: none !important; }
  body.print-hunt .home-clues { display: block; font-size: 15pt; }
  body.print-hunt .home-clues li { break-inside: avoid; padding: 16px 0; border-bottom: 1px dashed #999; }
  body.print-hunt .home-clues em { display: none; }
  body.print-hunt .answer-key { display: block; break-before: page; font-size: 14pt; }
}

/* ---------- Impact counter ---------- */
.impact { font-size: 1.05rem; color: var(--ink); background: rgba(251,241,222,.85); padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--paper-edge); font-variant-numeric: tabular-nums; }
.impact b { color: var(--red); font-family: var(--f-logo); font-weight: 400; font-size: 1.25em; }
.demo-tag { font-size: .8em; color: var(--ink-soft); font-style: italic; }

/* ---------- Shared form layout ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: .88em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--paper-edge); background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: 2px solid rgba(179,38,46,.2); outline-offset: 0; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 14px; }
.submit-row .form-msg { flex: 1 1 240px; margin: 0; }
.turnstile:empty { display: none; }
.fine { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; }
.linklike { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; cursor: pointer; font-size: inherit; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Pledge dialog ---------- */
.pledge-card { width: min(640px, 100%); }
.pledge-card h3 { text-align: center; padding: 0; }
.pledge-logo { display: block; width: 220px; margin: -6px auto 0; }
.pledge-oath { text-align: center; font-size: 1.5rem; color: var(--holly); line-height: 1.15; margin: 4px 0 14px; font-weight: 700; }
.pledge-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 10px 0; }
.pledge-big { font-size: 1.8rem; color: var(--holly); font-weight: 700; }
.pledge-number { font-family: var(--f-logo); font-size: clamp(3rem, 12vw, 4.6rem); line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.ref-box { display: flex; gap: 8px; width: 100%; max-width: 460px; }
.ref-box input { flex: 1; min-width: 0; font: inherit; font-size: .95rem; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--paper-edge); background: #fffaf0; color: var(--ink); }
.ref-count { font-weight: 700; color: var(--holly); }
.pledge-done .share-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Recipe book ---------- */
.book-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.book-bar .gallery-filters { margin: 0; }
.sort { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.sort select { font: inherit; font-size: .95rem; padding: 5px 8px; border-radius: 8px; border: 1.5px solid var(--paper-edge); background: var(--paper); color: var(--ink); }
#recipes .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); min-height: 120px; }
.polaroid button.ph { border: 0; padding: 0; cursor: pointer; width: 100%; }
.gallery .loading, .gallery .empty { grid-column: 1 / -1; text-align: center; font-size: 1.6rem; color: var(--ink-soft); padding: 30px 0; }
#book-more { margin-top: 18px; }
#recipes .submit-form { margin-top: 34px; padding: clamp(18px, 3vw, 28px); }
.submit-intro { margin-bottom: 14px; padding-right: 40px; }
.submit-intro p { color: var(--ink-soft); }
#recipes .file-drop { margin-top: 0; }

/* ---------- Recipe view ---------- */
.recipe-card { width: min(820px, 100%); }
.rv-photo { width: 100%; max-height: 52vh; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.recipe-card h3 { padding-right: 0; }
.rv-by { color: var(--ink-soft); margin-top: -4px; }
.rv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-top: 8px; }
.rv-cols h4 { font-family: var(--f-hand); font-size: 1.5rem; color: var(--holly); margin: 0 0 4px; }
.rv-cols ul, .rv-cols ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.vote.big { font-size: 1.05rem; padding: 8px 16px; }
@media (max-width: 620px) { .rv-cols { grid-template-columns: 1fr; } }

.answer-key { display: none; }

/* ---------- The dig (Crispmas Island) ---------- */
.dig-grid { position: absolute; left: 0; right: 0; top: 5%; bottom: 5%; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(6, 1fr); }
.dig-cell {
  margin: 1px; padding: 0; border: 1.5px dashed rgba(90,60,28,.55); border-radius: 6px; cursor: pointer;
  background: rgba(255,248,222,.42); color: #fff; font-family: var(--f-logo); font-size: clamp(1rem, 2.4vw, 1.7rem); line-height: 1;
  transition: background .12s, transform .12s;
}
.dig-cell:hover:not(.dug):not(:disabled) { background: rgba(255,248,222,.85); transform: scale(1.06); }
.dig-cell:disabled { cursor: default; }
.dig-cell.dug { border: 0; cursor: default; animation: pop .22s ease; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.is-crisp { background: #fff3c4 url("../assets/crisp-crinkle.webp") center / 74% no-repeat; }
.is-miss { background: #fff8de url("../assets/dig-x.svg") center / 62% no-repeat; }
.is-present { background: #e6f2d8 url("../assets/dig-present.svg") center / 72% no-repeat; }
.dig-cell.dug.is-crisp { box-shadow: 0 0 14px 4px rgba(255,215,0,.9); }
.dig-cell.reveal { opacity: .9; border-style: solid; }
.dig-side { display: grid; gap: 14px; }
.dig-score { display: flex; gap: 26px; align-items: flex-end; }
.dig-score div { display: grid; gap: 2px; }
.dig-score small { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--ink-soft); }
.dig-big { font-family: var(--f-logo); font-size: 3.4rem; line-height: 1; color: var(--red); font-variant-numeric: tabular-nums; }
.dig-pips { display: flex; gap: 4px; min-height: 42px; align-items: center; }
.dig-pip { width: 36px; height: 36px; background: url("../assets/crisp-crinkle.webp") center / contain no-repeat; filter: grayscale(1) opacity(.3); transition: filter .25s; }
.dig-pip.got { filter: sepia(1) saturate(4) brightness(1.15) drop-shadow(0 0 5px rgba(255,215,0,.9)); }
.dig-msg { font-size: 1.65rem; font-weight: 700; line-height: 1.1; color: var(--holly); min-height: 3.3em; }
.dig-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dig-actions:not(:has(button:not([hidden]))) { display: none; }
.dig-how { display: grid; gap: 8px; font-size: 1rem; padding: 12px 14px; background: #fffaf0; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge); }
.dig-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; font-size: 1rem; }
.dig-legend li { display: flex; align-items: center; gap: 10px; }
.dig-legend i { flex: none; width: 34px; height: 34px; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge); }
#hunt-cert { justify-self: start; }
#hunt-cert:disabled { opacity: .55; }

/* ---------- Players, table and today's question ---------- */
.btn-link { border: 0; background: none; padding: 0; font: inherit; font-size: 1rem; color: var(--red); text-decoration: underline; cursor: pointer; justify-self: start; }
.nav-chip { color: var(--paper, #fbf1de); font-weight: 800; text-decoration: none; white-space: nowrap; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor; font-size: .95rem; }
.dig-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: #fff3c4; border-radius: 6px; font-weight: 700; box-shadow: 0 0 0 1px var(--paper-edge); }
.poll-band { max-width: 760px; margin: 24px auto; padding: 22px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; background: #fffaf0; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge), 0 0 0 6px #fffaf0, 0 0 0 7px var(--paper-edge); width: calc(100% - 32px); }
.poll-band h2 { font-family: var(--f-logo); font-weight: 400; color: var(--red); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; }
.poll-eyebrow { font-size: 1.5rem; color: var(--holly); margin: 0; }
.poll-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.poll-option { --pct: 0%; position: relative; overflow: hidden; display: flex; justify-content: center; gap: 10px; align-items: center; min-height: 64px; padding: 10px 14px; border: 0; border-radius: 8px; font: inherit; font-weight: 800; font-size: 1.1rem; color: var(--ink); cursor: pointer; background: #efe2c8; }
.poll-option:hover:not(:disabled) { background: #f2c94c; }
.poll-option:disabled { cursor: default; }
.poll-option::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct); background: #f2c94c; transition: width .5s ease; }
.poll-option.picked { box-shadow: inset 0 0 0 3px var(--red); }
.poll-option > span { position: relative; }
.poll-note { min-height: 1.4em; margin: 0; color: var(--ink-soft); }
.poll-nudge { margin: 0; }
.table-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.table-side { display: grid; gap: 16px; }
.crunch-table { list-style: none; margin: 0; padding: 0; background: #fffaf0; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge); max-height: 620px; overflow-y: auto; }
.table-row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto 4em; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px dashed var(--paper-edge); }
.table-row:nth-child(-n+3) .t-rank { color: var(--red); font-size: 1.5rem; }
.table-row.me { background: #fff3c4; }
.t-rank { font-family: var(--f-logo); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.t-name { font-weight: 700; overflow-wrap: anywhere; }
.t-streak { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.t-points { font-family: var(--f-logo); color: var(--red); font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.table-empty { padding: 26px 16px; text-align: center; color: var(--ink-soft); }
.table-total { text-align: center; color: var(--ink-soft); margin-top: 10px; min-height: 1.4em; }
.me-card { display: grid; gap: 8px; padding: 16px; background: #fff3c4; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge); }
.me-card h3 { font-family: var(--f-logo); font-weight: 400; color: var(--red); font-size: 1.6rem; line-height: 1.15; margin: 0; }
.me-card .btn { justify-self: start; }
.me-label { margin: 6px 0 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--ink-soft); }
.me-stats { display: flex; gap: 22px; }
.me-stats div { display: grid; }
.me-stats b { font-family: var(--f-logo); font-weight: 400; color: var(--red); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.me-stats small { color: var(--ink-soft); font-size: .85rem; }
.me-today { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.me-today li::before { content: "○ "; color: var(--ink-soft); }
.me-today li.done { color: var(--holly); font-weight: 700; }
.me-today li.done::before { content: "✓ "; color: var(--holly); }
.dig-how h3 { margin: 0; font-size: 1.1rem; }
.score-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.score-list li { display: flex; justify-content: space-between; gap: 12px; }
.score-list b { color: var(--red); white-space: nowrap; }
.signin-form { display: grid; gap: 10px; text-align: left; }
.signin-form label { font-weight: 700; }
.signin-msg { min-height: 1.4em; margin: 0; }
@media (max-width: 860px) { .table-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .table-row { grid-template-columns: 2.2em minmax(0, 1fr) 3.4em; } .t-streak { display: none; } .poll-options { grid-template-columns: 1fr; } }

/* busy mode and tip jar */
.busy-banner { background: var(--red); color: #fbf1de; text-align: center; padding: 12px 16px; font-weight: 700; }
.busy-banner[hidden], .tip-line[hidden] { display: none; }
.tip-line { margin: 10px 0 0; font-size: 1rem; }
.tip-line a { color: var(--red); font-weight: 700; }
.tip-line span { display: block; font-size: .9rem; color: var(--ink-soft); }
.nav-fb { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.nav-fb:hover { filter: brightness(1.12); }
@media (max-width: 520px) {
  .nav { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .brand img { height: 32px; }
  .nav-toggle { font-size: 1.05rem; padding: 2px 8px; }
  .nav-tools { gap: 5px; }
  .nav-chip { font-size: .82rem; padding: 3px 7px; }
  .nav-fb svg { width: 28px; height: 28px; }
  #sound-toggle { padding: 0; font-size: 1rem; }
}
.wheel-box, .charades-box, .charade-card { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

/* phone layout: centred hero, nothing stacked on top of anything else */
@media (max-width: 680px) {
  .hero-copy { justify-items: center; text-align: center; }
  .logo { margin: 0 auto; }
  .countdown { width: 100%; max-width: 380px; gap: 8px; margin-top: 10px; }
  .countdown div { flex: 1 1 0; gap: 4px; padding: 12px 4px 10px; }
  .countdown span { font-size: 2.5rem; }
  .countdown small { font-size: .78rem; letter-spacing: .06em; }
  .cd-label { margin-top: 2px; }
  .hero-ctas { justify-content: center; }
  .hero-tree { flex-direction: column; align-items: center; gap: 10px; }
  .tree-note { position: static; order: -1; text-align: center; transform: rotate(-3deg); }
  .crisp-bowl { position: relative; left: auto; bottom: auto; margin: 6px auto 14px; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs button { font-size: 1.2rem; line-height: 1.1; padding: 8px 6px; }
  .game-wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
  .game-wrap > * { grid-area: 1 / 1; }
  #catcher { align-self: center; }
  .game-overlay { position: relative; inset: auto; padding: 18px 14px; background: #fbf1de; }
  .game-overlay h3 { font-size: 2rem; }
}
@media (max-width: 680px) { .game-wrap:has(.game-overlay:not([hidden])) #catcher { visibility: hidden; } }

/* ---------- Crisp makers: an open letter beside a pinned list of offers ---------- */
.brands-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); align-items: start; }
.brands-letter { display: grid; gap: 12px; justify-items: start; }
.brands-letter h2 { font-family: var(--f-logo); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.2rem); color: var(--red); line-height: 1.1; }
.brands-to, .brands-sign { font-family: var(--f-hand); font-size: 1.6rem; color: var(--red-deep); line-height: 1.2; }
.brands-sign { margin-top: 4px; }
.brands-letter p { margin: 0; max-width: 56ch; }
.brands-letter .btn { margin-top: 6px; }
.brands-offers { list-style: none; margin: 0; padding: 22px 22px 22px 26px; display: grid; gap: 16px; background: var(--paper-2); border-radius: 4px; transform: rotate(1.2deg); box-shadow: 0 0 0 1px var(--paper-edge), 0 14px 26px -14px rgba(59,42,29,.5); border-left: 6px solid var(--gold); }
.brands-offers li { padding-bottom: 14px; border-bottom: 1px dashed var(--paper-edge); }
.brands-offers li:last-child { padding-bottom: 0; border-bottom: 0; }
.brands-offers b { display: block; font-family: var(--f-hand); font-size: 1.55rem; color: var(--red-deep); line-height: 1.15; }
.brands-note { margin: 28px auto 0; max-width: 78ch; padding-top: 18px; border-top: 1px dashed var(--paper-edge); font-size: .95rem; color: var(--ink-soft); text-align: center; }
@media (max-width: 820px) {
  .brands-layout { grid-template-columns: minmax(0, 1fr); }
  .brands-offers { transform: none; }
}

/* ---------- Crisp Dash (platformer) ---------- */
#runner { display: block; width: 100%; height: auto; border-radius: 12px; touch-action: none; box-shadow: 0 0 0 3px var(--paper-edge), 0 14px 28px -12px rgba(36,50,61,.6); background: var(--night); }
.runner-pad { display: none; max-width: 760px; margin: 12px auto 0; gap: 10px; grid-template-columns: 1fr 1fr 2fr; touch-action: none; -webkit-user-select: none; user-select: none; }
.runner-pad button { font-family: var(--f-logo); font-size: 1.5rem; padding: 16px 8px; border-radius: 14px; border: 2px solid var(--paper-edge); background: #fbf1de; color: var(--red); touch-action: none; -webkit-touch-callout: none; }
.runner-pad button.jump { background: var(--red); color: #fff; border-color: #8a1b22; }
.runner-pad button.on { transform: translateY(2px); filter: brightness(.9); }
@media (pointer: coarse), (max-width: 680px) { .runner-pad { display: grid; } }
@media (max-width: 680px) { .game-wrap:has(.game-overlay:not([hidden])) #runner { visibility: hidden; } #runner { align-self: center; } }

/* ---------- Hall of Fame (saved arcade scores) ---------- */
.hof { max-width: 560px; margin: 26px auto 0; }
.hof h3 { text-align: center; }
.hof-list { list-style: none; margin: 10px 0 0; padding: 0; background: #fffaf0; border-radius: 6px; box-shadow: 0 0 0 1px var(--paper-edge); counter-reset: hof; }
.hof-list li { counter-increment: hof; display: flex; align-items: baseline; gap: 12px; padding: 8px 16px; border-bottom: 1px dashed var(--paper-edge); }
.hof-list li:last-child { border-bottom: 0; }
.hof-list li:not(.table-empty)::before { content: counter(hof); width: 1.6em; font-family: var(--f-hand); font-size: 1.5rem; font-weight: 700; color: var(--gold); text-align: right; }
.hof-list li.me { background: var(--paper-2); }
.hof-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hof-list b { font-family: var(--f-hand); font-size: 1.5rem; color: var(--red-deep); }
.hof .tip-line, .hof .small-print { text-align: center; }
.score-msg { min-height: 1.4em; margin: 0; color: var(--holly); }
.score-msg span { display: block; font-size: .92rem; color: var(--ink-soft); margin-top: 4px; }
