/* Day-of and after-event pages: secret role, projector board, special edition, certificate,
   plus the organisers' check-in and game control screens. Tokens come from app.css and chronicle.css. */

/* ---------- Links into the game from the card and landing pages ---------- */
.edition-banner {
  display: block; margin: 0 0 16px; padding: 11px 14px;
  background: var(--c-ink); color: #F4EBD8; text-decoration: none;
  font: 400 14px/1.35 var(--f-serif); border-radius: 2px;
}
.edition-banner b { display: block; font: 900 17px/1.1 var(--f-head); font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em; color: var(--c-yellow); }
.edition-banner-front { margin: 12px 10px 0; }
/* Invite letter on the landing page: who brought you here. */
.invite-banner {
  display: flex; align-items: center; gap: 14px; margin: 14px 10px 0; padding: 12px 14px 12px 12px;
  border: 1.5px dashed var(--c-ink); background: rgba(253, 250, 241, .7); color: var(--c-ink); text-decoration: none;
}
.invite-face { flex: none; display: block; width: 72px; height: 72px; padding: 3px; background: #FCF9F0; box-shadow: 0 2px 6px rgba(60, 40, 15, .3); rotate: -3deg; }
.invite-face img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) contrast(1.05); }
.invite-text { display: grid; gap: 4px; min-width: 0; }
.invite-text small { font: 700 10px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--c-red-dark); }
.invite-text b { font: 900 19px/1.05 var(--f-head); font-stretch: 75%; text-transform: uppercase; overflow-wrap: anywhere; }
.invite-text em { font: italic 400 13px/1.3 var(--f-serif); }
.motion .invite-banner { animation: paste-on .6s var(--ease-press) .3s both; }
.role-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 12px 14px;
  background: #3b1712; color: #F7EADB; text-decoration: none; border-radius: 10px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 220, 200, .18);
}
.role-banner span { display: grid; gap: 2px; font-size: .85rem; line-height: 1.35; opacity: .92; }
.role-banner b { font: 400 1.05rem var(--font-slab); color: var(--yellow); }
.role-banner em { flex: none; font: 700 .9rem var(--font-body); font-style: normal; white-space: nowrap; }

/* ---------- Secret role ---------- */
.role-page { min-height: 100vh; padding-bottom: 40px; }
.role-to { margin: 16px 16px 0; text-align: center; font: 400 14px/1.4 var(--f-serif); }
.role-to b { font-weight: 700; }
.role-note { margin: 22px 16px 0; padding: 18px 16px 16px; border: 1.5px dashed #34302B; text-align: center; }
.role-note h1 { margin: 6px 0 8px; font: 900 30px/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.role-note p:last-child { font: 400 14px/1.45 var(--f-serif); }
.role-envelope { display: grid; justify-items: center; gap: 14px; margin: 18px 16px 0; }
.role-card {
  position: relative; z-index: 7; /* above the paper folds */ width: min(100%, 330px); aspect-ratio: 3 / 4; padding: 0; overflow: hidden;
  border: 0; border-radius: 6px; background: #F8F1E0; color: var(--c-ink); cursor: pointer;
  box-shadow: 0 2px 0 #8a6a3c, 0 18px 30px -16px rgba(50, 30, 10, .65);
  touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.role-card:focus-visible { outline: 3px solid var(--c-red); outline-offset: 4px; }
.role-reveal {
  position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 10px; padding: 26px 22px;
  border-top: 10px solid var(--crew, var(--c-green)); visibility: hidden;
  background: url("../img/texture/newsprint.webp") 0 0 / 300px, #FBF6EA;
}
.role-kicker { font: 700 11px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--c-muted); }
.role-card { container-type: inline-size; }
/* Scales with the card (cqi) so "Impostor" fits inside its padding on a 320px phone too. */
.role-name { font: 900 min(64px, 18cqi)/.9 var(--f-head); font-stretch: 62.5%; text-transform: uppercase; color: var(--c-green); }
.role-reveal.is-impostor .role-name { color: var(--c-red); }
.role-stamp { width: 92px; height: 92px; rotate: -8deg; opacity: .95; }
.role-mission { max-width: min(260px, 100%); text-align: center; font: 400 14px/1.45 var(--f-serif); }
.role-card.is-open .role-reveal { visibility: visible; }
.role-help { max-width: 320px; text-align: center; text-wrap: balance; font: 400 13px/1.45 var(--f-ui); color: var(--c-muted); }
.role-foot { margin: 26px 0 0; text-align: center; font: italic 700 15px var(--f-serif); text-transform: uppercase; }

/* ---------- Projector board (16:9 stage; 1rem = 1% of the stage width) ---------- */
html:has(.page-board) { font-size: calc(min(100vw, 100vh * 16 / 9) / 100); }
.page-board { min-height: 100vh; overflow: hidden; background: #1b1712; }
.board {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: flex; flex-direction: column; width: 100rem; height: 56.25rem; padding: 1.6rem 2.4rem 0; overflow: hidden;
  color: var(--c-ink);
  background:
    url("../img/texture/newsprint.webp") 0 0 / 30rem,
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(160, 118, 52, .25)),
    var(--c-paper);
}
.board-mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-top: .6rem; border-top: .2rem solid var(--c-line); }
.board-ear { font: 600 .8rem/1.3 var(--f-serif); letter-spacing: .06em; text-transform: uppercase; }
.board-ear:last-child { text-align: right; }
.board-title { display: grid; justify-items: center; margin: 0; text-transform: uppercase; font-family: var(--f-head); font-stretch: 62.5%; }
.board-title span { font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: .02em; }
.board-title b { font-weight: 900; font-size: 4rem; line-height: .86; letter-spacing: -.02em; }
.board-dateline {
  display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; padding: .45rem .2rem;
  border-top: .12rem solid var(--c-line); border-bottom: .12rem solid var(--c-line);
  font: 600 .8rem/1 var(--f-serif); letter-spacing: .08em; text-transform: uppercase;
}
.board-dateline b { font-variant-numeric: tabular-nums; }
.board-live { display: inline-block; width: .6rem; height: .6rem; margin-right: .5rem; border-radius: 50%; background: var(--c-red); vertical-align: .05rem; }
.motion .board-live { animation: fade 1s steps(2, jump-none) infinite alternate; }
.board.is-offline .board-live { background: var(--c-muted); animation: none; }

.board-live-view { flex: 1; display: grid; grid-template-columns: 1fr 31rem; gap: 2.4rem; min-height: 0; padding: 1.4rem 0 1.2rem; }
.board-live-view[hidden], .board-results[hidden] { display: none; }
.board-main { display: flex; flex-direction: column; min-width: 0; }
.board-breaking {
  display: inline-flex; align-items: center; gap: .6rem; width: fit-content; padding: .45rem .9rem;
  background: var(--c-red); color: #fff; font: 700 .95rem/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase;
}
.board-breaking i { width: .5rem; height: .5rem; border-radius: 50%; background: #fff; }
.board-headline {
  margin: .9rem 0 0; font: 900 4rem/.94 var(--f-head); font-stretch: 62.5%; letter-spacing: -.01em; text-transform: uppercase;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance;
}
.board-headline.is-long { font-size: 3rem; -webkit-line-clamp: 3; }
.motion .board-headline.is-fresh { animation: ink-stamp .45s var(--ease-press) both; }
.board-round {
  display: flex; align-items: baseline; gap: 1.4rem; width: fit-content; margin-top: 1.4rem; padding: .7rem 1.4rem .6rem;
  border: .2rem solid var(--c-ink); background: rgba(253, 250, 241, .6); box-shadow: .3rem .3rem 0 var(--c-ink);
}
.board-round[hidden] { display: none; }
.board-round-title { font: 700 1.1rem/1.2 var(--f-serif); letter-spacing: .06em; text-transform: uppercase; }
.board-round-time { font: 400 4.2rem/1 var(--font-slab); font-variant-numeric: tabular-nums; }
.board-round.is-ending .board-round-time, .board-round.is-over .board-round-time { color: var(--c-red); }
.motion .board-round.is-ending { animation: shake .5s ease 0s 1; }
.motion .board-round.is-over .board-round-time { animation: fade .6s steps(2, jump-none) infinite alternate; }
/* Crew progress: one row per crew in a fixed order, never ranked (MOM 8 Oktober). */
.board-section { display: flex; align-items: baseline; gap: 1rem; margin: auto 0 .6rem; padding-top: 1rem; font: 900 1.25rem/1 var(--f-head); font-stretch: 70%; letter-spacing: .04em; text-transform: uppercase; }
.board-section small { font: italic 400 .95rem/1 var(--f-serif); letter-spacing: 0; text-transform: none; color: var(--c-muted); }
.board-crews { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.board-crew {
  position: relative; display: grid; grid-template-columns: 12rem auto 1fr auto; align-items: center; gap: 1.2rem;
  height: 4.8rem; padding: 0 1.2rem 0 1.1rem; background: rgba(253, 250, 241, .55); border-left: .55rem solid var(--crew);
  box-shadow: 0 .1rem 0 rgba(42, 38, 34, .25);
}
.board-crew-name { display: grid; gap: .25rem; min-width: 0; }
.board-crew-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 2rem/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.board-crew-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: italic 400 .9rem/1 var(--f-serif); color: var(--c-muted); }
.board-emblems { display: flex; gap: .45rem; }
.board-emblem { display: block; width: 3.3rem; height: 3.3rem; }
.board-emblem img { width: 100%; height: 100%; border-radius: 50%; filter: grayscale(1) sepia(.2); opacity: .09; }
.board-emblem.is-won img { filter: none; opacity: 1; box-shadow: 0 .12rem .35rem rgba(60, 40, 15, .35); }
.motion .board-emblem.is-new img { animation: stamp-slam .6s var(--ease-slam) both; }
.board-crew-status { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; min-width: 0; height: 1.6rem; }
.board-free { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: italic 400 1rem/1.2 var(--f-serif); color: var(--c-muted); }
.board-crew-status .board-face { width: 1.9rem; padding: .1rem; rotate: -4deg; }
.board-caught { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.board-caught-text { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 1.1rem/1 var(--f-serif); }
.board-caught-tag, .board-won-tag { flex: none; padding: .25rem .5rem; border: .14rem solid var(--c-red); color: var(--c-red); rotate: -6deg; font: 800 .8rem/1 var(--f-ui); font-style: normal; letter-spacing: .14em; text-transform: uppercase; }
.board-won-tag { padding: .4rem .7rem; border-color: var(--c-green); background: var(--c-green); color: #fff; font-size: 1rem; rotate: -4deg; }
.motion .board-crew.is-won .board-won-tag { animation: stamp-slam .5s var(--ease-slam) both; }
.board-crew.is-won { background: rgba(46, 74, 46, .14); }
.board-progress { display: grid; grid-template-columns: 1fr 4.6rem; align-items: center; column-gap: .9rem; row-gap: .35rem; min-width: 0; }
.board-bar { position: relative; height: 1.1rem; border: .14rem solid var(--c-ink); background: rgba(253, 250, 241, .7); }
.board-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--crew); transition: width .9s var(--ease-press); }
.board-progress > b { justify-self: end; font: 400 2.2rem/1 var(--font-slab); font-variant-numeric: tabular-nums; }
.motion .board-crew.is-scored .board-progress > b { animation: ink-stamp .5s var(--ease-press) both; }
.board-meta { display: grid; justify-items: start; gap: .45rem; width: 11.5rem; } /* same width on every row, so the bars line up */
.board-dots { display: flex; align-items: center; gap: .3rem; }
.board-dots i { width: .8rem; height: .8rem; border: .12rem solid var(--c-ink); border-radius: 50%; opacity: .4; }
.board-dots i.is-on { opacity: 1; background: var(--c-ink); }
.board-mission-dots i { border-color: var(--c-red); }
.board-mission-dots i.is-on { background: var(--c-red); }
/* Bonus missions (more than 3): smaller dots in the same space. */
.board-mission-dots.is-many { gap: .18rem; }
.board-mission-dots.is-many i { width: .52rem; height: .52rem; border-width: .1rem; }
.motion .board-dots i.is-new { animation: stamp-slam .6s var(--ease-slam) both; }
.board-dots small { margin-left: .25rem; font: 600 .75rem/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.motion .board-crew.is-fresh-catch .board-crew-status { animation: paste-on .7s var(--ease-press) both; }
.board-impostor-points { font: 600 1rem/1 var(--f-serif); color: var(--c-muted); letter-spacing: .06em; text-transform: uppercase; }

.board-side { display: flex; flex-direction: column; min-height: 0; padding-left: 2.4rem; border-left: .12rem solid var(--c-line); }
.board-count { display: flex; align-items: center; gap: 1.2rem; padding-bottom: 1rem; border-bottom: .12rem solid var(--c-line); }
.board-count > b { font: 400 6rem/.9 var(--font-slab); color: var(--c-green); font-variant-numeric: tabular-nums; }
.board-count > span { font: 600 1.15rem/1.3 var(--f-serif); text-transform: uppercase; letter-spacing: .04em; }
.board-side-title { margin: 1rem 0 .8rem; font: 900 1.5rem/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.board-arrivals { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; gap: .9rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.board-arrival { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.motion .board-arrival.is-new { animation: paste-on .6s var(--ease-press) both; }
.board-face { position: relative; flex: none; display: block; width: 4.4rem; aspect-ratio: 1; padding: .25rem; background: #FCF9F0; box-shadow: 0 .15rem .5rem rgba(60, 40, 15, .35); }
.board-face img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.3) saturate(.8) contrast(1.06); }
.board-arrival:nth-child(odd) .board-face { rotate: -2deg; }
.board-arrival:nth-child(even) .board-face { rotate: 1.5deg; }
.board-arrival-text { display: grid; gap: .25rem; min-width: 0; }
.board-arrival-text b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font: 700 1.1rem/1.1 var(--f-serif); }
.board-arrival-text small { display: flex; align-items: center; gap: .4rem; font: 600 .8rem/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.board-arrival-text small::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--crew, var(--c-tan)); }
.board-side [hidden] { display: none; }
.board-mission-list { display: grid; gap: .55rem; margin: 0; padding-left: 2rem; font: 600 1.05rem/1.25 var(--f-serif); }
.board-mission-list li::marker { font: 700 .95rem var(--f-ui); color: var(--c-red); }
.board-empty { grid-column: 1 / -1; font: italic 400 1.1rem var(--f-serif); color: var(--c-muted); }

.board-results { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 1.3rem 0 1.2rem; text-align: center; }
.board-results .board-headline { margin-top: .6rem; font-size: 5.6rem; }
.board-score { margin: .6rem 0 0; font: italic 400 1.5rem/1.3 var(--f-serif); }
.board-unmasked { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; width: 100%; margin: auto 0; padding: 0; list-style: none; }
.board-impostor { display: grid; justify-items: center; gap: .7rem; padding-top: .8rem; border-top: .45rem solid var(--crew); }
.board-impostor-crew { font: 900 1.6rem/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.board-impostor .board-face { width: 15.5rem; padding: .5rem; rotate: -1.5deg; }
.board-impostor:nth-child(even) .board-face { rotate: 1.5deg; }
.board-stamp { position: absolute; right: .5rem; bottom: .5rem; width: 5.6rem; height: 5.6rem; rotate: -12deg; }
.board-impostor > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 1.6rem/1.1 var(--f-serif); }
.board-impostor > b.is-none { font-style: italic; color: var(--c-muted); }
.board-outcome { padding: .4rem .9rem; font: 700 .9rem/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.board-outcome.is-caught { background: var(--c-green); }
.board-outcome.is-free { background: var(--c-red); }
.motion .is-results .board-impostor { animation: paste-on .7s var(--ease-press) both; }
.motion .is-results .board-impostor:nth-child(2) { animation-delay: .5s; }
.motion .is-results .board-impostor:nth-child(3) { animation-delay: 1s; }
.motion .is-results .board-impostor:nth-child(4) { animation-delay: 1.5s; }
.motion .is-results .board-stamp { animation: stamp-slam .4s var(--ease-slam) 2.4s both; }
.board-foot {
  display: flex; justify-content: space-between; margin: 0 -2.4rem; padding: .7rem 2.4rem;
  background: var(--c-ink); color: #F4EBD8; font: 600 .95rem/1 var(--f-serif); letter-spacing: .12em; text-transform: uppercase;
}

/* ---------- Special edition ---------- */
.edition { min-height: 100vh; padding-bottom: 40px; }
.edition-end .cta { min-height: 48px; }
.edition-lead { margin: 16px 12px 0; }
.edition-breaking { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; background: var(--c-red); color: #fff; font: 700 11px/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; }
.edition-breaking i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.edition-lead h1 { margin: 10px 0 0; font: 900 58px/.9 var(--f-head); font-stretch: 62.5%; letter-spacing: -.015em; text-transform: uppercase; }
.edition-lede { margin: 10px 0 0; padding-bottom: 14px; border-bottom: 2px solid var(--c-line); font: 400 15px/1.45 var(--f-serif); }
.edition-crews { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; margin: 16px 12px 0; padding: 0; list-style: none; }
.edition-crew { display: grid; align-content: start; gap: 8px; padding-top: 8px; border-top: 5px solid var(--crew); }
.edition-crew-name { font: 900 17px/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.edition-crew-name small { display: block; margin-top: 3px; font: italic 400 11px var(--f-serif); text-transform: none; color: var(--c-muted); }
.edition-face { position: relative; aspect-ratio: 1; padding: 5px; background: #FCF9F0; box-shadow: 0 2px 8px rgba(60, 40, 15, .3); }
.edition-crew:nth-child(odd) .edition-face { rotate: -1.5deg; }
.edition-crew:nth-child(even) .edition-face { rotate: 1.2deg; }
.edition-face img { width: 100%; height: 100%; object-fit: cover; }
.edition-stamp { position: absolute; right: -10px; bottom: -10px; width: 56px; height: 56px; rotate: -12deg; }
.edition-crew h2 { font: 800 17px/1.05 var(--f-head); font-stretch: 75%; text-transform: uppercase; overflow-wrap: anywhere; }
.edition-outcome { width: fit-content; padding: 4px 8px; font: 700 10px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.edition-outcome.is-caught { background: var(--c-green); }
.edition-outcome.is-free { background: var(--c-red); }
.edition-gallery { margin: 26px 10px 0; padding-top: 14px; border-top: 2px solid var(--c-line); }
.edition-gallery h2 { margin: 0 0 0 4px; font: 900 24px/1 var(--f-head); font-stretch: 85%; text-transform: uppercase; }
.edition-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.edition-photos a { display: block; aspect-ratio: 1; overflow: hidden; background: #e6dcc6; }
.edition-photos a:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.edition-photos img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.85) contrast(1.05); }
.edition-end { display: grid; gap: 12px; margin: 26px 16px 0; text-align: center; font: 400 14px/1.45 var(--f-serif); }

/* ---------- Certificate (exported to PNG like the ID card; 1 --k = 1% of its width) ---------- */
.cert-section { display: grid; gap: 12px; margin: 26px 0 0; }
.cert-section h2 { font: 400 1.25rem var(--font-slab); color: var(--green); }
.cert-frame { --k: calc(min(100vw - 32px, 848px) / 100); }
@supports (width: 1cqw) { .cert-frame { container-type: inline-size; --k: 1cqw; } }
.cert {
  position: relative; display: grid; justify-items: center; aspect-ratio: 1.414; padding: calc(var(--k) * 4.2) calc(var(--k) * 6);
  text-align: center; color: var(--c-ink);
  background: url("../img/texture/newsprint.webp") 0 0 / calc(var(--k) * 40), #FBF6EA;
  box-shadow: inset 0 0 0 calc(var(--k) * 1.2) #FBF6EA, inset 0 0 0 calc(var(--k) * 1.45) var(--c-ink),
              inset 0 0 0 calc(var(--k) * 1.75) #FBF6EA, inset 0 0 0 calc(var(--k) * 1.85) var(--c-ink);
}
.cert-mast { font: 800 calc(var(--k) * 2.6)/1 var(--f-head); font-stretch: 62.5%; letter-spacing: .02em; text-transform: uppercase; }
.cert-mast span { font-weight: 600; }
.cert-kicker { margin-top: calc(var(--k) * 1.6); font: 700 calc(var(--k) * 1.5)/1 var(--f-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--c-red); }
.cert-title { margin-top: calc(var(--k) * .6); font: 900 calc(var(--k) * 8.2)/.95 var(--f-head); font-stretch: 62.5%; letter-spacing: -.01em; text-transform: uppercase; color: var(--c-green); }
.cert.is-impostor .cert-title { color: var(--c-red); }
.cert-given { margin-top: calc(var(--k) * .8); font: italic 400 calc(var(--k) * 1.9)/1 var(--f-serif); }
.cert-who { display: flex; align-items: center; gap: calc(var(--k) * 2); margin-top: calc(var(--k) * 1.6); text-align: left; }
.cert-who img { width: calc(var(--k) * 10); height: calc(var(--k) * 10); object-fit: cover; padding: calc(var(--k) * .5); background: #fff; box-shadow: 0 calc(var(--k) * .2) calc(var(--k) * .8) rgba(60, 40, 15, .35); filter: sepia(.28) saturate(.85); rotate: -2deg; }
.cert-who p { display: grid; gap: calc(var(--k) * .6); }
.cert-who b { font: 700 calc(var(--k) * 4.4)/1 var(--f-serif); }
.cert-who span { font: 400 calc(var(--k) * 1.7)/1 var(--f-ui); color: var(--c-muted); }
.cert-body { max-width: 78%; margin-top: calc(var(--k) * 2); font: 400 calc(var(--k) * 1.85)/1.45 var(--f-serif); }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; width: 100%; margin-top: auto; }
.cert-sign { display: grid; justify-items: start; gap: calc(var(--k) * .5); }
.cert-sign i { padding: 0 calc(var(--k) * 1) calc(var(--k) * .4); border-bottom: calc(var(--k) * .15) solid var(--c-ink); font: italic 700 calc(var(--k) * 2.1)/1 'Playfair Display', serif; }
.cert-sign span, .cert-no { font: 600 calc(var(--k) * 1.3)/1 var(--f-serif); letter-spacing: .14em; text-transform: uppercase; }
.cert-sign span { font: italic 500 calc(var(--k) * 1.45)/1.3 var(--f-serif); letter-spacing: .01em; text-transform: none; color: var(--c-green); }
.cert-no { justify-self: end; }
.cert-stamp { width: calc(var(--k) * 13); height: calc(var(--k) * 13); rotate: -10deg; }

/* ---------- Organiser screens ---------- */
.admin-nav { display: flex; gap: 18px; margin-left: auto; margin-right: 22px; }
.admin-nav a { color: var(--cream); font-weight: 700; text-decoration: none; }
.admin-nav a:hover { text-decoration: underline; }
.stat-present { font-size: .78rem; font-weight: 600; color: var(--green); }
.stat-total em { color: var(--yellow); }
.stat strong small { font: 600 .9rem var(--font-body); }
.stat-link { text-decoration: none; border-left-color: var(--yellow); }
.stat-link:hover { background: #fffbea; }
.stat-link strong { font-size: 1.35rem; }
.wa-actions { display: flex; gap: 6px; margin-top: 5px; }
.chip { padding: 2px 9px; border: 1.5px solid var(--green); border-radius: 999px; font: 700 .74rem/1.5 var(--font-body); color: var(--green); text-decoration: none; }
.chip:hover { background: var(--green); color: var(--cream); }
.chip-red { border-color: var(--red); color: var(--red); }
.chip-red:hover { background: var(--red); color: #fff; }
button.chip { background: none; cursor: pointer; }
.chip-on, button.chip-on { background: var(--green); color: var(--cream); }
.leader-form { margin-top: 6px; }
.invited-by { display: block; margin: 4px 0 0 50px; font-size: .78rem; color: var(--gray); }
.role-present { background: #e3eddf; border-color: #9fbb95; color: var(--green); }

.panel { display: grid; gap: 10px; padding: 16px 18px; background: #fff; border: 1px solid #ddd5c0; border-radius: 12px; }
.panel h2 { font: 400 1.15rem var(--font-slab); color: var(--green); }
.panel p { font-size: .92rem; line-height: 1.5; }
.panel form { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-form { display: grid !important; gap: 10px; }
.panel-row { display: flex !important; flex-wrap: wrap; align-items: center; }
.panel textarea, .panel input[type="text"], .panel input[type="number"] {
  min-height: 38px; padding: 7px 12px; border: 1.5px solid #bdb6a6; border-radius: 8px; font: 500 .95rem var(--font-body); background: #fff;
}
.panel textarea { width: 100%; resize: vertical; }
.panel input[type="text"] { flex: 1 1 240px; }
.panel input[type="number"] { width: 84px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel .btn-small:not(.btn-ghost) { background: var(--yellow); }
.pill { display: inline-block; margin-right: 6px; padding: 1px 9px; border-radius: 999px; background: #efe9d9; color: #5f5b54; font: 700 .72rem/1.6 var(--font-body); text-transform: uppercase; letter-spacing: .08em; }
.pill-on { background: var(--green); color: var(--cream); }
.outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.outcomes fieldset { display: grid; gap: 6px; margin: 0; padding: 10px 12px; border: 1px solid #ddd5c0; border-left: 5px solid var(--crew); border-radius: 8px; }
.outcomes legend { padding: 0 4px; font-weight: 700; }
.outcomes label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.gallery-pick { width: fit-content; }
.gallery-progress:empty { display: none; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.gallery-grid li { display: grid; gap: 4px; justify-items: center; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* Check-in: one-handed phone screen at the gate. */
.page-checkin { background: #1d1a16; color: #F4EBD8; }
.checkin-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.checkin-count b { font: 400 1.25rem var(--font-slab); color: var(--yellow); }
.checkin { display: grid; gap: 16px; max-width: 520px; margin: 0 auto; padding: 14px 14px 40px; }
.scanner { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame {
  position: absolute; inset: 16%; border-radius: 14px; pointer-events: none;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 0 / 34px 5px, linear-gradient(var(--yellow), var(--yellow)) 0 0 / 5px 34px,
    linear-gradient(var(--yellow), var(--yellow)) 100% 0 / 34px 5px, linear-gradient(var(--yellow), var(--yellow)) 100% 0 / 5px 34px,
    linear-gradient(var(--yellow), var(--yellow)) 0 100% / 34px 5px, linear-gradient(var(--yellow), var(--yellow)) 0 100% / 5px 34px,
    linear-gradient(var(--yellow), var(--yellow)) 100% 100% / 34px 5px, linear-gradient(var(--yellow), var(--yellow)) 100% 100% / 5px 34px;
  background-repeat: no-repeat; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
}
.scanner-status { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 999px; background: rgba(0, 0, 0, .65); text-align: center; font-weight: 600; font-size: .92rem; }
.scanner-start { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.scanner-start[hidden] { display: none; }
.checkin-result { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: #FBF6EA; color: var(--ink); border-top: 8px solid var(--green); }
.checkin-result[hidden] { display: none; }
.checkin-result.is-again { border-top-color: var(--yellow); }
.checkin-result.is-error { border-top-color: var(--red); }
.checkin-result.is-error .checkin-crew { background: #f6e1de; color: var(--red); }
.motion .checkin-result:not([hidden]) { animation: rise .25s var(--ease-press) both; }
.checkin-card { display: flex; align-items: center; gap: 14px; }
.checkin-card[hidden] { display: none; }
.checkin-card img { flex: none; width: 104px; height: 104px; border-radius: 12px; object-fit: cover; }
.checkin-state { font: 700 .78rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.is-again .checkin-state { color: #8a6200; }
.checkin-card h2 { margin-top: 4px; font: 400 1.6rem/1.1 var(--font-slab); overflow-wrap: anywhere; }
.checkin-name { margin-top: 4px; font-size: .92rem; color: #5f5b54; }
.checkin-crew { padding: 12px 14px; border-radius: 10px; background: var(--crew, #efe9d9); color: #fff; font: 400 1.3rem var(--font-slab); text-align: center; }
.checkin-crew:empty { display: none; }
.checkin-pick { display: grid; gap: 8px; }
.checkin-pick[hidden] { display: none; }
.checkin-pick div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkin-pick .btn { background: var(--crew); color: #fff; }
.checkin-next { width: 100%; }
.checkin-manual { display: grid; gap: 8px; }
.checkin-manual label { font-weight: 700; font-size: .92rem; }
.checkin-manual input { min-height: 46px; padding: 8px 14px; border: 0; border-radius: 999px; font: 500 1rem var(--font-body); }
.checkin-matches { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.checkin-matches button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: 12px;
  background: #2c2721; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.checkin-matches img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.checkin-matches span { display: grid; flex: 1; min-width: 0; }
.checkin-matches b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkin-matches small { color: #b9ae98; }
.checkin-matches em { font-style: normal; font-weight: 700; color: var(--yellow); }
.checkin-matches .is-present em { color: #9fbb95; }
.checkin-none { color: #b9ae98; }

/* ---------- Post guard page (same dark scanner screen as check-in) ---------- */
.post-brand { display: inline-flex; align-items: center; gap: 8px; }
.post-brand img { border-radius: 50%; background: var(--cream); }
.page-post .admin-brand span { display: inline; }
.post-price { font-weight: 600; white-space: nowrap; }
.post-price b { font: 400 1.25rem var(--font-slab); color: var(--yellow); }
.post-mission { display: grid; gap: 4px; padding: 12px 14px; border: 1px dashed #6b6252; border-radius: 12px; font-size: .95rem; line-height: 1.45; }
.post-mission span { font: 700 .72rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.post.has-result .scanner { display: none; }
.post-result { border-top-color: var(--crew, var(--green)); }
.post-result.is-error { border-top-color: var(--red); }
.post-result.is-error .post-message { color: var(--red); font-weight: 700; }
.post-crew { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-crew[hidden], .post-emblems[hidden] { display: none; }
.post-crew-name { display: grid; gap: 4px; min-width: 0; }
.post-crew-name b { font: 400 1.6rem/1.1 var(--font-slab); color: var(--crew); overflow-wrap: anywhere; }
.post-crew-name small { font-size: .88rem; color: #5f5b54; }
.post-coins { display: grid; justify-items: end; }
.post-coins b { font: 400 2.4rem/1 var(--font-slab); font-variant-numeric: tabular-nums; }
.post-coins small { font: 700 .72rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #5f5b54; }
.post-emblems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.post-emblems li { display: grid; justify-items: center; gap: 4px; font-size: .78rem; color: #5f5b54; }
.post-emblems img { width: 52px; height: 52px; border-radius: 50%; filter: grayscale(1); opacity: .28; }
.post-emblems .is-won img { filter: none; opacity: 1; }
.post-emblems .is-won small { color: var(--ink); font-weight: 700; }
.motion .post-emblems .is-new img { animation: stamp-slam .55s var(--ease-slam) both; }
.post-message { font: 400 1.15rem/1.35 var(--font-slab); text-align: center; white-space: pre-line; text-wrap: balance; }
.post-message:empty { display: none; }
.is-celebrating .post-message { color: var(--green); }
.post-actions { display: grid; gap: 8px; }
.post-actions [hidden] { display: none; }
.post-actions .btn { width: 100%; }
.post-actions .btn:disabled { opacity: .55; }
.post-verdict { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.post-won { background: var(--green) !important; color: var(--cream); }
.post-peek { display: grid; gap: 10px; padding: 12px; border: 2px dashed var(--crew, var(--ink)); border-radius: 12px; }
.post-peek[hidden], .post-peek-again[hidden], .post-events[hidden] { display: none; }
.post-peek-title { display: grid; gap: 2px; font: 400 1.2rem/1.2 var(--font-slab); }
.post-peek-title small { font: 400 .85rem/1.35 var(--font-body); color: #5f5b54; }
.post-suspects { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.post-suspect { display: grid; justify-items: center; gap: 6px; width: 100%; min-height: 104px; padding: 8px 4px; border: 1px solid #ddd5c0; border-radius: 10px; background: #fffdf6; color: var(--ink); font: 600 .82rem/1.2 var(--font-body); cursor: pointer; }
.post-suspect span { overflow-wrap: anywhere; text-align: center; }
.post-suspect img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.post-suspect:active, .post-suspect:focus-visible { border-color: var(--crew, var(--ink)); outline: none; }
.post-suspect:disabled { opacity: .5; }
.post-peek-again { width: 100%; }
.post-events { border-top: 1px dashed #c9bfa6; padding-top: 10px; font-size: .92rem; }
.post-events summary { cursor: pointer; font-weight: 700; }
.post-events summary small { font-weight: 400; color: #5f5b54; }
.post-events ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.post-event { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #ddd5c0; border-radius: 10px; background: #fffdf6; color: var(--ink); font: 500 .92rem/1.3 var(--font-body); text-align: left; cursor: pointer; }
.post-event::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid #8a8070; border-radius: 4px; }
.post-event[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }
.post-event[aria-pressed="true"]::before { content: "✓"; display: grid; place-items: center; border-color: var(--ink); background: var(--ink); color: var(--cream); font-size: .8rem; line-height: 1; }
.post-manual-label { font-weight: 700; font-size: .92rem; }
.post-manual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.post-manual .btn { background: var(--crew); color: #fff; }

/* ---------- Card page: gate pass, calendar and "send to my WhatsApp" ---------- */
.crew-standing {
  display: grid; gap: 12px; width: min(100%, 420px); margin: 14px auto 0; padding: 14px 16px 16px;
  border: 1.5px solid #34302B; border-top: 8px solid var(--crew); border-radius: 6px; background: #FBF6EA; color: var(--ink);
}
.crew-standing-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.crew-standing-head span { flex-basis: 100%; font: 700 .7rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #6b6458; }
.crew-standing-head b { font: 400 1.5rem/1.1 var(--font-slab); color: var(--crew); overflow-wrap: anywhere; }
.crew-standing-head em { padding: 2px 9px; border-radius: 999px; background: var(--crew); color: #fff; font: 700 .7rem/1.6 var(--font-body); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.crew-standing-emblems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.crew-standing-emblems li { display: grid; justify-items: center; gap: 3px; font-size: .74rem; color: #6b6458; }
.crew-standing-emblems img { width: 44px; height: 44px; border-radius: 50%; filter: grayscale(1); opacity: .28; }
.crew-standing-emblems .is-won img { filter: none; opacity: 1; }
.crew-standing-emblems .is-won small { color: var(--ink); font-weight: 700; }
.crew-standing-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .86rem; color: #4a453d; }
.crew-standing-stats b { font: 400 1.05rem var(--font-slab); color: var(--ink); }
.crew-standing-won { text-align: center; font: 400 1.05rem/1.3 var(--font-slab); color: var(--green); }
.crew-standing-note { text-align: center; font-size: .84rem; line-height: 1.45; color: #6b6458; }
.btn-qr {
  display: flex; width: 100%; max-width: 560px; margin: 22px auto 0; gap: 10px;
  background: var(--ink); color: var(--cream); box-shadow: 0 3px 0 #000;
}
.btn-qr svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.btn-qr + .card-actions { margin-top: 10px; }
.qr-pass {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: #fff; color: var(--ink);
}
.qr-pass::backdrop { background: #fff; }
.qr-pass-inner {
  display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 100%;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center;
  border-top: 12px solid var(--crew, var(--green));
}
.qr-pass-kicker { font: 700 .78rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gray); }
.qr-pass h2 { font: 400 1.9rem/1.1 var(--font-slab); overflow-wrap: anywhere; }
.qr-pass-meta { font-weight: 600; color: #5f5b54; }
.qr-pass-code { width: min(82vw, 56vh, 420px); height: auto; margin: 10px 0 6px; image-rendering: pixelated; }
.qr-pass-hint { font-size: .95rem; line-height: 1.45; color: #5f5b54; }
.qr-pass .btn { width: min(100%, 320px); margin-top: 8px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.notice-btn {
  padding: 7px 12px; border: 1.5px solid rgba(250, 246, 233, .7); border-radius: 999px;
  color: var(--cream); font: 700 .82rem var(--font-body); text-decoration: none;
}
.notice-btn:hover { background: rgba(250, 246, 233, .12); }
.dday-calendar { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--green); text-decoration: none; }

/* ---------- Participant dashboard on a phone: one card per participant ---------- */
@media (max-width: 720px) {
  .admin-bar { padding: 10px 14px; gap: 10px; }
  .admin-brand { font-size: 1.05rem; white-space: nowrap; }
  .admin-brand span { display: none; }
  .admin-nav { gap: 14px; margin-right: 4px; font-size: .88rem; white-space: nowrap; }
  .admin-bar .link-button { font-size: .88rem; }
  .admin { padding: 12px 10px 40px; gap: 12px; }
  .admin > *, .toolbar > * { min-width: 0; } /* the scrolling button row must not widen the page */
  .toolbar-actions { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat { padding: 8px 10px; border-left-width: 4px; }
  .stat span { font-size: .66rem; }
  .stat span small { display: none; }
  .stat strong { font-size: 1.35rem; }
  .stat em, .stat-present { font-size: .7rem; }
  .search { flex-basis: 100%; flex-wrap: wrap; }
  .search input { flex: 1 1 100%; }
  .toolbar-actions { flex-wrap: nowrap; overflow-x: auto; margin: 0 -10px; padding: 2px 10px 6px; scrollbar-width: none; }
  .toolbar-actions > * { flex: none; }
  .table-wrap { overflow: visible; background: none; border: 0; }
  .people, .people tbody { display: block; }
  .people thead { display: none; }
  .people tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 10px; padding: 12px;
    background: #fff; border: 1px solid #ddd5c0; border-radius: 12px;
  }
  .people tr:hover td { background: none; }
  .people td { display: grid; align-content: start; gap: 3px; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .people td[data-label]::before { content: attr(data-label); font: 700 .66rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--gray); }
  .people .cell-id { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; color: var(--gray); font-size: .85rem; }
  .people .cell-person { grid-column: 1 / -1; grid-row: 1; padding-right: 56px; }
  .alias-form { margin-left: 50px; }
  .alias-form input { width: 100%; }
  .people .cell-wa { grid-column: 1 / -1; }
  .people .cell-crew select, .people .role { width: 100%; }
  .people .cell-date { font-size: .82rem; }
  .people .cell-delete { grid-column: 2; justify-self: end; align-self: end; }
}

/* ---------- Crew roulette (card page) ---------- */
.roulette {
  display: grid; justify-items: center; gap: 10px; margin: 0 0 22px; padding: 18px 16px 16px;
  background: #FBF6EA; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
  text-align: center;
}
.roulette-kicker { font: 700 .72rem var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.roulette h2 { font: 400 1.5rem/1.1 var(--font-slab); color: var(--green); text-wrap: balance; }
.roulette-wheel-wrap { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin-top: 6px; }
.roulette-wheel { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(50, 30, 10, .35)); }
.roulette-name { font: 400 15px 'Alfa Slab One', Georgia, serif; fill: #FBF6EA; letter-spacing: .5px; }
.roulette-farm { font: 600 8.5px Inter, system-ui, sans-serif; fill: #FBF6EA; opacity: .9; letter-spacing: .6px; text-transform: uppercase; }
.roulette-pointer {
  position: absolute; z-index: 2; left: 50%; top: -12px; width: 30px; height: 36px; translate: -50% 0;
  background: var(--red); clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 0 var(--ink));
}
.roulette-spin { width: min(100%, 300px); margin-top: 4px; }
.roulette-spin[hidden] { display: none; }
.roulette-result { min-height: 1.4em; font: 400 1.2rem/1.3 var(--font-slab); color: var(--crew, var(--green)); }
.roulette.is-done { border-color: var(--crew); box-shadow: 0 4px 0 var(--crew); }
.motion .roulette.is-done .roulette-result { animation: ink-stamp .45s var(--ease-press) both; }
.roulette-result:empty { display: none; }

/* ---------- Torn card: a caught impostor's ID card, torn in two ---------- */
.torn { position: relative; padding: 3% 3% 5%; }
/* No drop-shadow here: html-to-image smears filters at clipped edges in the downloaded PNG. */
.torn-left { clip-path: polygon(0 0, 54% 0, 50% 9%, 55% 18%, 49% 27%, 53% 36%, 48% 45%, 54% 54%, 49% 63%, 53% 72%, 47% 81%, 52% 90%, 49% 100%, 0 100%); transform-origin: 0 100%; rotate: -2.5deg; translate: -2% 0; }
.torn-right { position: absolute; inset: 3% 3% 5%; clip-path: polygon(54% 0, 100% 0, 100% 100%, 49% 100%, 52% 90%, 47% 81%, 53% 72%, 49% 63%, 54% 54%, 48% 45%, 53% 36%, 49% 27%, 55% 18%, 50% 9%); transform-origin: 100% 100%; rotate: 1.5deg; translate: 2.5% 1.5%; }
.torn-stamp {
  position: absolute; left: 50%; top: 66%; z-index: 3; display: grid; justify-items: center; padding: .35em .8em .45em;
  translate: -50% -50%; rotate: -12deg; border: .18em solid #C8352B; border-radius: 6px; background: rgba(251, 246, 234, .55);
  color: #C8352B; font: 900 clamp(1.4rem, 7.5vw, 3rem)/1 var(--f-head); font-stretch: 70%; letter-spacing: .06em; text-transform: uppercase;
  mix-blend-mode: multiply;
}
.torn-stamp small { margin-top: .25em; font: 700 .26em/1 var(--font-body); letter-spacing: .2em; }
.motion .torn-stamp { animation: stamp-slam .45s var(--ease-slam) .3s both; }

/* ---------- Scratch card (secret role page) ---------- */
.scratch { cursor: grab; touch-action: none; }
.scratch .role-reveal { visibility: visible; }
.scratch-layer { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border-radius: inherit; touch-action: none; }
.scratch-layer[hidden] { display: none; }
.scratch-actions { display: grid; justify-items: center; gap: 8px; }
.scratch-actions .btn[hidden], .scratch-skip[hidden] { display: none; }
/* Buttons sit on the paper, so its folds do not cross them (printed text keeps the folds). */
.scratch-actions .btn, .mud-panel .btn { position: relative; z-index: 7; }
.scratch-skip { font-size: .82rem; color: var(--c-muted); }
.role-caught h1 { color: var(--c-red); }

/* ---------- Peek: a crew's scratch-check of a suspect ---------- */
.peek-suspect { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 16px 0; font: 400 13px/1.3 var(--f-ui); color: var(--c-muted); }
.peek-suspect > span:last-child { display: grid; gap: 2px; }
.peek-suspect b { font: 700 18px/1.2 var(--f-serif); color: var(--c-ink); }
.peek-face { display: block; width: 64px; height: 64px; overflow: hidden; border: 2px solid var(--c-ink); }
.peek-face img { width: 100%; height: 100%; object-fit: cover; }
.role-name.peek-clear { font-size: min(48px, 15cqi); text-align: center; }

/* ---------- Lumpur: the impostor's mud over a peek, and the panel that arms it ----------
   Wet mud: a grainy, mottled brown base, rough splats (SVG turbulence, see macros.mud_splat) with a wet shine,
   and drips running down from the top edge once the card is scratched open. */
:root {
  --mud-dark: #2B170A; --mud: #4A2D14; --mud-mid: #6B4423; --mud-light: #8C5D33;
  --mud-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .04 0 0 0 0 .01 0 0 0 .7 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --mud-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .36 0 0 0 0 .18 0 0 0 1.4 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}
.mud-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.mud-splat { position: absolute; display: block; height: auto; fill: var(--mud-fill, var(--mud-dark)); overflow: visible; }
.mud-splat .mud-shine { fill: rgba(255, 238, 205, .3); }
.mud-drips { position: absolute; inset: 0 0 auto; height: 0; }
.mud-drips i {
  position: absolute; top: -2px; left: var(--x); width: var(--w); height: var(--h); transform-origin: 50% 0;
  background: linear-gradient(90deg, var(--mud-dark), var(--mud) 45%, var(--mud-dark));
  border-radius: 0 0 999px 999px;
}
/* The fat bead at the end of each drip, with a glint. */
.mud-drips i::after {
  content: ""; position: absolute; left: 50%; bottom: -.45em; width: 150%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 238, 205, .35) 0 12%, transparent 22%), var(--mud);
}

/* The muddy peek card. */
.role-reveal.is-mud {
  overflow: hidden; color: #F6E7C8; border-top-color: var(--mud-dark);
  background: var(--mud-grain), var(--mud-mottle) 0 0 / 720px, radial-gradient(circle at 50% 45%, var(--mud-mid), var(--mud) 70%);
}
.role-reveal.is-mud > :not(.mud-layer) { position: relative; z-index: 1; }
.role-reveal.is-mud > .mud-over { z-index: 2; }
.role-reveal.is-mud .role-kicker { color: rgba(246, 231, 200, .8); }
.role-reveal.is-mud .role-mission { padding: 6px 10px; border-radius: 10px; background: rgba(43, 23, 10, .55); color: #F6E7C8; }
.role-name.mud-name {
  font-size: min(54px, 17cqi); line-height: .88; text-align: center; color: #F6E7C8; rotate: -3deg;
  text-shadow: 0 3px 0 var(--mud-dark), 0 0 18px rgba(43, 23, 10, .8);
}
.mud-a { --mud-fill: var(--mud-dark); width: 74%; left: -22%; top: -18%; rotate: 20deg; }
.mud-b { --mud-fill: var(--mud-light); width: 56%; right: -20%; top: 16%; rotate: -40deg; }
.mud-c { --mud-fill: #3A2210; width: 86%; left: -14%; bottom: -30%; rotate: 70deg; }
.mud-d { --mud-fill: var(--mud-mid); width: 34%; right: 2%; bottom: 8%; rotate: 140deg; }
/* Two small splats flung over the words themselves: messy, but the result stays readable. */
.mud-e { --mud-fill: var(--mud-dark); width: 17%; left: 9%; top: 34%; rotate: 15deg; opacity: .92; }
.mud-f { --mud-fill: var(--mud-mid); width: 12%; right: 4%; top: 13%; rotate: -60deg; opacity: .9; }

/* Scratched open: the splats slap on, then the mud runs down. */
.motion .scratch.is-revealed .is-mud .mud-splat { animation: mud-slap .5s cubic-bezier(.3, 1.45, .5, 1) both; }
.motion .scratch.is-revealed .is-mud .mud-b { animation-delay: .08s; }
.motion .scratch.is-revealed .is-mud .mud-c { animation-delay: .14s; }
.motion .scratch.is-revealed .is-mud .mud-d { animation-delay: .2s; }
.motion .scratch.is-revealed .is-mud .mud-e, .motion .scratch.is-revealed .is-mud .mud-f { animation-delay: .32s; }
.motion .scratch.is-revealed .is-mud .mud-drips i { animation: mud-drip 1.8s cubic-bezier(.35, .6, .25, 1) calc(.35s + var(--d)) both; }
.motion .scratch.is-revealed .is-mud .mud-name { animation: mud-sink .6s cubic-bezier(.3, 1.45, .5, 1) .25s both; }
@keyframes mud-slap { 0% { opacity: 0; scale: .15; } 55% { opacity: 1; scale: 1.12; } 100% { opacity: 1; scale: 1; } }
@keyframes mud-drip { from { scale: 1 0; } to { scale: 1 1; } }
@keyframes mud-sink { 0% { opacity: 0; translate: 0 -14px; scale: 1.2; } 100% { opacity: 1; translate: 0 0; scale: 1; } }

/* The impostor's panel: a slab of mud with its own drips. */
.mud-panel {
  position: relative; z-index: 7; /* above the paper folds, like the role card */
  overflow: hidden; display: grid; gap: 8px; width: min(100% - 32px, 330px); margin: 18px auto 0;
  padding: 30px 18px 18px; border-radius: 14px; text-align: center; color: #F6E7C8;
  background: var(--mud-grain), var(--mud-mottle) 0 0 / 720px, radial-gradient(circle at 50% 30%, var(--mud-mid), var(--mud) 75%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 14px 26px -14px rgba(43, 23, 10, .9);
}
.mud-panel > :not(.mud-layer) { position: relative; z-index: 1; }
.mud-panel[hidden], .mud-panel [hidden] { display: none; }
.mud-panel h2 { margin: 0; font: 900 44px/.9 var(--f-head); font-stretch: 70%; text-transform: uppercase; rotate: -2deg; color: #F6E7C8; text-shadow: 0 3px 0 var(--mud-dark); }
.mud-panel p { margin: 0; font: 400 14px/1.45 var(--f-serif); }
.mud-panel b { color: #FFE6B0; }
.mud-panel .notice-kicker { font-size: 10px; color: #E8C9A0; }
.mud-panel form { margin-top: 10px; }
.mud-panel .btn {
  width: 100%; min-height: 48px; border: 2px solid #1A0D04; color: #F6E7C8; font-weight: 800; letter-spacing: .02em;
  background: radial-gradient(ellipse 60% 40% at 35% 25%, rgba(255, 238, 205, .32), transparent 60%), var(--mud-dark);
  box-shadow: 0 4px 0 #1A0D04;
}
.mud-panel .btn:active { translate: 0 2px; box-shadow: 0 2px 0 #1A0D04; }
.mud-p1 { --mud-fill: var(--mud-dark); width: 46%; left: -16%; bottom: -26%; rotate: 40deg; opacity: .85; }
.mud-p2 { --mud-fill: var(--mud-light); width: 34%; right: -12%; top: -14%; rotate: -20deg; opacity: .8; }
.mud-panel .mud-drips i { --h: 18px; }
.motion .mud-panel:not([hidden]) .mud-drips i { animation: mud-drip 1.4s cubic-bezier(.35, .6, .25, 1) var(--d) both; }

/* Arming the mud throws it over the whole screen: slap, "Splat!", then it slides off. */
.mud-splash { position: fixed; inset: 0; z-index: 100; overflow: hidden; pointer-events: none; display: grid; place-items: center; }
.mud-splash .mud-splat { width: 90vmin; }
.mud-s1 { --mud-fill: var(--mud-dark); left: -20vmin; top: -14vmin; }
.mud-s2 { --mud-fill: var(--mud); right: -26vmin; top: 18vh; rotate: 120deg; }
.mud-s3 { --mud-fill: #3A2210; left: -12vmin; bottom: -24vmin; rotate: 200deg; }
.mud-s4 { --mud-fill: var(--mud-mid); width: 60vmin !important; right: 4vmin; bottom: 6vh; rotate: 300deg; }
.mud-splash .mud-drips i { --w: 22px; height: calc(var(--h) * 3.2); }
.mud-splash-word {
  position: relative; z-index: 1; font: 900 clamp(64px, 22vw, 120px)/.9 var(--f-head); font-stretch: 62.5%; text-transform: uppercase;
  color: #F6E7C8; rotate: -8deg; text-shadow: 0 5px 0 var(--mud-dark), 0 0 30px rgba(43, 23, 10, .9);
}
.mud-splash .mud-splat { animation: mud-slap .45s cubic-bezier(.3, 1.45, .5, 1) both; }
.mud-splash .mud-s2 { animation-delay: .06s; }
.mud-splash .mud-s3 { animation-delay: .12s; }
.mud-splash .mud-s4 { animation-delay: .18s; }
.mud-splash .mud-drips i { animation: mud-drip 1.2s cubic-bezier(.35, .6, .25, 1) calc(.2s + var(--d) * .5) both; }
.mud-splash .mud-splash-word { animation: mud-slap .5s cubic-bezier(.3, 1.45, .5, 1) .2s both; }
.mud-splash.is-leaving { animation: mud-slide-off .7s cubic-bezier(.5, 0, .75, 0) both; }
@keyframes mud-slide-off { to { translate: 0 60vh; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mud-splash *, .mud-splash.is-leaving { animation: none !important; }
  .mud-splash.is-leaving { opacity: 0; transition: opacity .3s ease; }
}

.mud-error { color: var(--c-red-dark); font-weight: 700; }
.mud-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; background: #5B3A1E; color: #F4EBD8;
  font: 700 .72rem/1.5 var(--font-body); font-style: normal; white-space: nowrap;
}
.mud-status { margin-top: 12px; font-size: .9rem; }
.mud-status summary { cursor: pointer; color: var(--gray); font-weight: 600; }
.mud-status ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.mud-status li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 12px; border: 1px solid #ddd5c0; border-left: 6px solid var(--crew); border-radius: 10px; }
.mud-status li b { min-width: 90px; }

/* ---------- Control page: crew coins, posts, peeks, names, caught impostors ---------- */
.coins, .caught-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.coins li, .caught-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px;
  border: 1px solid #ddd5c0; border-left: 6px solid var(--crew); border-radius: 10px;
}
.coins-crew { display: grid; min-width: 110px; font-weight: 700; }
.coins-crew small { font-weight: 500; font-size: .78rem; color: var(--gray); }
.coins-total { min-width: 64px; font: 400 2rem/1 var(--font-slab); font-variant-numeric: tabular-nums; }
.motion .coins-total.is-bumped { animation: ink-stamp .4s var(--ease-press) both; }
.coins-buttons { display: flex; gap: 6px; margin-left: auto; }
.coins-btn {
  min-width: 52px; min-height: 44px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow);
  font: 800 1rem var(--font-body); cursor: pointer; box-shadow: 0 2px 0 var(--ink);
}
.coins-btn.is-minus { background: #fff; }
.coins-btn:active { translate: 0 2px; box-shadow: none; }
.coins-btn:disabled { opacity: .5; }
.caught-list form { margin-left: auto; }
.pill-red { background: var(--red); color: #fff; }
.btn-red { background: var(--red) !important; color: #fff; }
@media (max-width: 560px) { .coins-buttons { margin-left: 0; width: 100%; } .coins-btn { flex: 1; } }
.coins-emblems { display: flex; gap: 4px; }
@media (max-width: 560px) { .coins-emblems { margin-left: auto; } .coins-total { flex-basis: 100%; } }
.coins-emblems img, .post-emblem { border-radius: 50%; filter: grayscale(1); opacity: .28; }
.coins-emblems img.is-won, .post-emblem.is-won { filter: none; opacity: 1; }
.post-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.post-links a, .post-settings legend { display: inline-flex; align-items: center; gap: 6px; }
.post-links img, .post-settings legend img { border-radius: 50%; }
.post-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.post-settings fieldset { display: grid; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid #ddd5c0; border-radius: 8px; }
.post-settings legend { padding: 0 4px; font-weight: 700; }
.post-settings label { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.panel select { min-height: 38px; max-width: 100%; padding: 7px 10px; border: 1.5px solid #bdb6a6; border-radius: 8px; font: 500 .95rem var(--font-body); background: #fff; }
.peek-log, .crew-names { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.peek-log li, .crew-names li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px;
  border: 1px solid #ddd5c0; border-left: 6px solid var(--crew); border-radius: 10px; font-size: .9rem;
}
.peek-log li > span { flex: 1 1 100%; }
.peek-form select { flex: 1 1 220px; }
.crew-names label { min-width: 100px; font-weight: 700; }
.crew-names input[type="text"] { flex: 1 1 180px; }
.crew-names .muted { flex-basis: 100%; font-size: .82rem; }

/* The impostor's three secret missions on the role page: a torn-out clipping. */
.mission-panel {
  position: relative; z-index: 7; display: grid; gap: 8px; width: min(100% - 32px, 330px); margin: 18px auto 0;
  padding: 16px 16px 14px; border: 1.5px solid #34302B; background: #F4ECD6; color: #1F1C18; text-align: left;
  box-shadow: 4px 4px 0 #34302B;
}
.mission-panel[hidden] { display: none; }
.mission-panel h2 { margin: 0; font: 900 32px/.95 var(--f-head); font-stretch: 70%; text-transform: uppercase; color: #B3261E; }
.mission-panel p { margin: 0; font: 400 13.5px/1.45 var(--f-serif); }
.mission-panel .notice-kicker { font-size: 10px; }
.mission-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.mission-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed #8a8070; font: 600 14px/1.3 var(--f-serif); }
.mission-tag { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid #1F1C18; border-radius: 50%; font: 700 12px var(--f-head); }
.mission-list b { font: 700 10px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #6b6252; }
.mission-list .is-done span:not(.mission-tag) { text-decoration: line-through; text-decoration-color: #B3261E; text-decoration-thickness: 2px; }
.mission-list .is-done b { color: #B3261E; }
.mission-list .is-done .mission-tag { background: #B3261E; border-color: #B3261E; color: #F4ECD6; }

/* Control panel: what decided each crew so far, and the impostors' missions. */
.crew-decided { flex-basis: 100%; font-size: .85rem; font-weight: 700; color: var(--crew); }
.mission-overview li { flex-direction: column; align-items: flex-start; }
.mission-overview span { font-size: .86rem; color: #5f5b54; }
.mission-overview .is-done { color: var(--ink); font-weight: 700; }
.mud-status ol { margin: 4px 0 8px; padding-left: 26px; }

/* Board: the two global bars (MOM 115 21). */
.board-bars { display: grid; gap: .5rem; margin-top: 1.2rem; }
.board-teambar { display: grid; grid-template-columns: 8rem 1fr 4.6rem; align-items: center; gap: .9rem; margin: 0; }
.board-teambar > span:first-child { font: 900 1.3rem/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
.board-teambar .board-bar { height: 1.5rem; }
.board-teambar b { justify-self: end; font: 400 2rem/1 var(--font-slab); font-variant-numeric: tabular-nums; }
.board-teambar.is-farmer .board-bar i { background: var(--c-green); }
.board-teambar.is-impostor .board-bar i { background: var(--c-red); }
.board-teambar.is-impostor > span:first-child, .board-teambar.is-impostor b { color: var(--c-red); }
.board-mission-list { list-style: disc; }
.post-rule { padding: 10px 12px; border-radius: 10px; background: #fbefc9; color: #6b4d00; font-size: .92rem; }
.mission-tick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mission-tick span { font-size: .86rem; color: #5f5b54; }
.mission-tick.is-done span { color: var(--ink); font-weight: 700; }
.board-status { display: flex; align-items: flex-end; gap: 2rem; }
.board-status .board-bars { flex: 1; margin: 0 0 .3rem; }

/* Check-in / check-out (rekaman 115 23). */
.post-since { text-align: center; font-weight: 700; font-size: .92rem; color: #5f5b54; }
.post-since[hidden], .post-checkout[hidden] { display: none; }
.post-checkout { width: 100%; background: var(--ink); color: var(--cream); }
.pos-time-table { width: 100%; margin-top: 10px; border-collapse: collapse; border-left: 6px solid var(--crew); font-size: .86rem; }
.pos-time-table caption { padding: 4px 8px; text-align: left; font-weight: 700; }
.pos-time-table th, .pos-time-table td { padding: 5px 8px; border-bottom: 1px solid #ddd5c0; text-align: left; white-space: nowrap; }
.pos-time-table th { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #5f5b54; }
.pos-times { overflow-x: auto; }
.pos-time-table { font-size: .8rem; } .pos-time-table th, .pos-time-table td { padding: 5px 5px; } .pos-time-table th { font-size: .66rem; letter-spacing: .03em; }
.mission-list .is-locked { color: #8a8070; font-style: italic; }
.mission-list .is-locked .mission-tag { border-style: dashed; border-color: #8a8070; }
.mission-list .is-active b { color: #1F1C18; }
/* Player portal: global farmer vs impostor bars on the card. */
.crew-bars { display: grid; gap: 6px; }
.crew-bars p { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.crew-bars b { justify-self: end; font: 400 .95rem var(--font-slab); letter-spacing: 0; }
.crew-bar { position: relative; display: block; height: 10px; border: 1.5px solid #1F1C18; background: #fffdf6; }
.crew-bar > i { position: absolute; inset: 0 auto 0 0; display: block; }
.crew-bar.is-farmer > i { background: #2E4A2E; }
.crew-bar.is-impostor > i { background: #B3261E; }
.crew-bars p:last-child span, .crew-bars p:last-child b { color: #B3261E; }

/* Peek card at the post: a peel-off sticker ("klentek"), pulled from the left edge. */
.peel { cursor: default; }
.peel-sticker { position: absolute; inset: 0; z-index: 3; touch-action: none; cursor: grab; }
.peel-sticker:active { cursor: grabbing; }
.peel-sticker[hidden] { display: none; }
.peel-front {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 22px;
  border-radius: inherit; text-align: center; color: #F8EBD0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 30% 20%, #C8382E, #8E1F18 70%);
  box-shadow: inset 0 0 0 10px rgba(0,0,0,.08), inset 0 0 0 12px rgba(248,235,208,.35);
}
.peel-kicker { font: 700 11px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.peel-title { font: 900 min(56px, 16cqi)/.92 var(--f-head); font-stretch: 62.5%; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.peel-hint { padding: 6px 12px; border: 1.5px dashed rgba(248,235,208,.7); border-radius: 999px; font: 700 12px/1 var(--f-ui); letter-spacing: .06em; }
.motion .peel-hint { animation: peel-nudge 1.6s ease-in-out infinite; }
/* The back of the peeled strip: white sticker paper, shaded towards the fold. */
.peel-back {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none;
  background: linear-gradient(90deg, #d9d2c3 0%, #fbf8f1 35%, #ffffff 70%, #e9e3d6 100%);
  box-shadow: 6px 0 10px -4px rgba(40, 20, 5, .45), inset 1px 0 0 rgba(0,0,0,.12);
  border-radius: 0 6px 6px 0;
}
@keyframes peel-nudge { 0%, 100% { translate: 0 0; } 50% { translate: 6px 0; } }
a.post-price { color: inherit; text-underline-offset: 3px; }

/* ---------- Projector board on a phone (portrait): one scrolling column instead of a shrunken 16:9 stage ---------- */
@media (max-width: 760px) and (orientation: portrait) {
  html:has(.page-board) { font-size: calc(100vw / 34); }
  .page-board { overflow: auto; background: var(--c-paper); }
  .board { position: static; translate: none; width: auto; height: auto; min-height: 100vh; padding: 1.2rem 1.4rem 0; overflow: visible; }
  .board-ear { display: none; }
  .board-mast { grid-template-columns: 1fr; }
  .board-title span { font-size: 1.4rem; }
  .board-title b { font-size: 3.6rem; }
  .board-dateline { flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; font-size: .9rem; }
  .board-dateline > span:nth-child(2) { order: 3; flex-basis: 100%; text-align: center; }

  .board-live-view { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding: 1.4rem 0; }
  .board-breaking { font-size: .9rem; }
  .board-headline { font-size: 2.7rem; -webkit-line-clamp: 4; }
  .board-headline.is-long { font-size: 2.2rem; -webkit-line-clamp: 5; }
  .board-status { flex-direction: column; align-items: stretch; gap: 1rem; margin-top: 1.2rem; }
  .board-round { justify-content: space-between; width: auto; margin-top: 0; }
  .board-round-time { font-size: 3.6rem; }
  .board-teambar { grid-template-columns: 7rem 1fr 4.2rem; }
  .board-teambar > span:first-child { font-size: 1.3rem; }
  .board-teambar b { font-size: 1.9rem; }

  .board-section { flex-wrap: wrap; gap: .3rem; margin-top: 1.6rem; font-size: 1.4rem; }
  .board-section small { flex-basis: 100%; font-size: 1rem; }
  .board-crew {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name meta" "emblems emblems" "progress progress";
    gap: .8rem 1rem; height: auto; padding: 1rem 1.1rem;
  }
  .board-crew-name { grid-area: name; }
  .board-crew-name b { font-size: 2.2rem; }
  .board-crew-name span { font-size: 1rem; }
  .board-emblems { grid-area: emblems; justify-content: space-between; }
  .board-emblem { width: 4.4rem; height: 4.4rem; }
  .board-progress { grid-area: progress; grid-template-columns: 1fr 5rem; }
  .board-progress > b { font-size: 2.2rem; }
  .board-crew-status { height: auto; font-size: 1rem; }
  .board-free, .board-caught-text { font-size: 1.1rem; }
  .board-meta { grid-area: meta; justify-items: end; }
  .board-meta { width: auto; }
  .board-dots i { width: 1rem; height: 1rem; }
  .board-mission-dots.is-many i { width: .7rem; height: .7rem; }
  .board-dots small { font-size: .85rem; }

  .board-side { padding: 1.4rem 0 0; border-left: 0; border-top: .14rem solid var(--c-line); }
  .board-count > b { font-size: 4.6rem; }
  .board-count > span { font-size: 1.2rem; }
  .board-side-title { font-size: 1.6rem; }
  .board-mission-list { font-size: 1.2rem; }
  .board-arrival-text b { font-size: 1.2rem; }
  .board-arrival-text small { font-size: .9rem; }

  .board-results .board-headline { font-size: 3.4rem; }
  .board-score { font-size: 1.3rem; }
  .board-unmasked { grid-template-columns: 1fr 1fr; gap: 1.6rem; margin: 1.6rem 0; }
  .board-impostor .board-face { width: 12rem; }
  .board-impostor-crew, .board-impostor > b { font-size: 1.4rem; }

  .board-foot { flex-direction: column; align-items: center; gap: .5rem; margin: 0 -1.4rem; padding: 1rem 1.4rem; font-size: .85rem; text-align: center; }
}

/* The mud page (/lumpur/<secret>): the whole screen is the slab, with one huge button. */
.page-mud { min-height: 100vh; margin: 0; background: #2B170A; }
.mud-page { min-height: 100vh; min-height: 100dvh; display: grid; padding: 16px; box-sizing: border-box; }
.mud-page .mud-panel { width: auto; margin: 0; align-content: center; gap: 22px; padding: 28px 20px; background-size: auto, cover, auto; }
.mud-page .mud-panel p { font-size: 17px; }
.mud-page .notice-kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.mud-page form { margin: 0 0 22px; }
.mud-big {
  display: grid; place-items: center; width: min(78vw, 360px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  border: 4px solid #1A0D04; color: #F6E7C8; cursor: pointer; touch-action: manipulation;
  font: 900 clamp(44px, 14vw, 68px)/.92 var(--f-head); font-stretch: 70%; text-transform: uppercase;
  text-shadow: 0 3px 0 #1A0D04;
  background: radial-gradient(ellipse 60% 40% at 35% 25%, rgba(255, 238, 205, .35), transparent 60%), var(--mud-dark);
  box-shadow: 0 10px 0 #1A0D04, 0 22px 40px -12px rgba(0, 0, 0, .7);
}
.mud-big:active { translate: 0 6px; box-shadow: 0 4px 0 #1A0D04, 0 12px 24px -12px rgba(0, 0, 0, .7); }
.mud-big:disabled { opacity: .6; }
.mud-page .mud-done { font-size: 22px; line-height: 1.35; }
.mud-page .mud-done b { display: block; margin-bottom: 12px; font: 900 40px/1 var(--f-head); font-stretch: 70%; text-transform: uppercase; }
