/* ==========================================================================
   Community Bingo Night: the Rethink stylesheet.
   A two-colour village-hall poster: cream stock, tomato red, deep navy ink.
   Replaces the legacy /style on normal pages; manager/caller pages load both
   (see the html.manager section at the end).
   ========================================================================== */

@font-face {
  font-family: "League Gothic";
  src: url(/fonts/league-gothic-latin-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url(/fonts/libre-franklin-latin-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url(/fonts/libre-franklin-latin-700-normal.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f5ecd7;      /* poster stock */
  --paper-deep: #eaddbe; /* panels, inset areas */
  --paper-light: #fbf6ea;/* card cells, inputs */
  --red: #d93a27;        /* tomato: fills, big type (3.9:1 on paper: large text only) */
  --red-ink: #b02d19;    /* red for small text and links (5.4:1) */
  --navy: #1c2b4b;       /* ink */
  --navy-soft: #4e5a73;  /* secondary text (5.9:1) */
  --rule: #1c2b4b;
  --display-case: uppercase;
  --display: "League Gothic", "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gap: clamp(16px, 3vw, 32px);
  --page: 1180px;
  --r-sm: 3px;
  --r-md: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--navy);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; }
p { margin: 0 0 0.8em; }
ul, ol { padding-left: 1.3em; }

a { color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
main a, .modal a { color: var(--red-ink); font-weight: 700; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

h1, h2, h3, h4 { color: var(--navy); margin: 0 0 0.4em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.95; text-transform: var(--display-case); }
h1 { font-size: clamp(48px, 7vw, 92px); }
h2 { font-size: clamp(32px, 4vw, 46px); }
h3 { font-size: 20px; line-height: 1.25; }
h4 { font-size: 17px; }
em { font-style: normal; font-weight: 700; }
strong { font-weight: 700; }
hr { border: 0; border-top: 2px solid var(--rule); margin: 28px 0; }
hr.superfine { border-top-width: 1px; }

/* ---------- Buttons ------------------------------------------------------- */
button, .btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  min-height: 40px;
  padding: 10px 18px 9px;
  border: 2px solid var(--red);
  border-radius: var(--r-sm);
  background: var(--red);
  color: var(--paper-light);
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
/* A link styled as a button: centre its text in the min-height like a real <button> does (inline-block put the
   spare height under the text, so it sat high). Every a.btn holds plain text only. */
a.btn { display: inline-flex; align-items: center; justify-content: center; }
button:hover, .btn:hover { background: var(--navy); border-color: var(--navy); color: var(--paper-light); }
button.massive, .btn-big {
  min-height: 56px;
  padding: 13px 28px 12px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0;
  text-transform: none;
}
.btn-ghost, button.cancel { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover, button.cancel:hover { background: var(--navy); color: var(--paper-light); }
.drh { font-size: 1em; line-height: 0; }
button.voucher { background: var(--navy); border-color: var(--navy); }
button.voucher.nogreen { background: var(--red); border-color: var(--red); }
button.voucher del { color: #c9d2e3; }
button.modal-button { min-height: 40px; }

/* ---------- Form controls --------------------------------------------------- */
textarea, input, select { font: inherit; color: var(--navy); }
input[type=text], input[type=email], input[type=search], textarea, select {
  background: var(--paper-light);
  border: 2px solid var(--navy);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  max-width: 100%;
}
select {
  padding-right: 34px;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 11px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  min-height: 42px;
}
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); vertical-align: -4px; margin: 0 8px 0 0; }
::placeholder { color: #8a8573; }

/* small "help?" / "see all" links from the legacy markup */
.mini-text { font-size: 14px; line-height: 1; color: var(--navy-soft); font-weight: 400; }
.mini-link { text-decoration: underline; cursor: pointer; display: inline-block; padding: 4px 2px; }
.mini-link:hover { color: var(--red-ink); }
/* generator option help: a small circled "?" button (was a "help?" span) */
.help-btn { position: relative; display: inline-flex; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0 0 0 5px;
  border: 0; border-radius: 50%; background: transparent; color: var(--navy-soft); box-shadow: none; cursor: pointer; vertical-align: middle; }
.help-btn svg { display: block; width: 100%; height: 100%; }
.help-btn { top: -1px; } /* optical: centres the circle on the label's letters (measured by ink in Chrome + WebKit) */
.help-btn::after { content: ""; position: absolute; inset: -4px; } /* 26px tap target around the 18px circle */
.field-label .help-btn { align-self: center; } /* the label row aligns on baselines, which sat the circle ~2px low */
.help-btn:hover { color: var(--red-ink); background: transparent; box-shadow: none; }
.help-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.ext-icon { width: .72em; height: .72em; margin-left: 3px; vertical-align: -.02em; }
.nowrap { white-space: nowrap; }
.clearfix::after { content: ""; display: block; clear: both; }
.hide-me { display: none; }

/* ---------- Header ---------------------------------------------------------- */
.site-head {
  max-width: var(--page);
  margin: 0 auto;
  padding: 18px var(--gap) 0;
}
.site-head-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--rule);
  box-shadow: 0 4px 0 -2px var(--paper), 0 5px 0 -2px var(--rule); /* double rule, like a poster border */
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand:hover { color: var(--navy); }
.brand svg { width: 42px; height: 42px; flex: none; }
.brand-home { display: flex; flex: none; } /* manager header: the mark links to the main site */
.brand-name { font-family: var(--display); font-size: 32px; line-height: 1; letter-spacing: 0.03em; text-transform: var(--display-case); }
.top-nav.wide { display: flex; gap: 4px; }
.top-nav.wide a {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--r-sm);
}
.top-nav.wide a:hover { text-decoration: underline; }
.top-nav.wide a.selected { box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
#toggle_menu {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
  min-height: 40px;
  font-size: 15px;
}
@media (hover: hover) { #toggle_menu:hover { background: var(--navy); color: var(--paper-light); } } /* no sticky hover after a tap on phones */
#toggle_menu svg { width: 18px; height: 14px; }
.site-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 0; min-height: 30px; }
#breadcrumbs { font-size: 14px; color: var(--navy-soft); }
#breadcrumbs a { color: var(--navy-soft); font-weight: 400; }
#breadcrumbs a:hover { color: var(--red-ink); }
#choose-currency-holder { margin-left: auto; }
#choose-currency { font-size: 14px; min-height: 36px; padding: 4px 32px 4px 8px; border-width: 1px; }

/* side drawer (filled by /side-nav via the legacy JS; toggled by #toggle_menu) */
#side-bar {
  display: none;
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  height: 100%;
  width: min(340px, 88vw);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--paper);
  border-right: 3px solid var(--navy);
}
#side-nav { font-size: 17px; padding: 14px 0 40px; width: min(340px, 88vw); margin-left: calc(100% - min(340px, 88vw)); }
#side-nav ul { margin: 0; padding: 0; }
#side-nav li { list-style: none; }
#side-nav li.l1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 18px;
  font-family: var(--display);
  font-size: 26px;
  text-transform: var(--display-case);
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(28, 43, 75, .25);
  cursor: pointer;
}
#side-nav li.l1 a { color: inherit; text-decoration: none; }
#side-nav li.l1 span { width: 16px; height: 16px; border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); transition: transform .12s; flex: none; margin-left: 10px; }
#side-nav li.l1.down span { transform: rotate(45deg); }
#side-nav li.l2 { display: none; }
#side-nav li.l2 a { display: block; padding: 8px 18px 8px 30px; color: var(--navy); font-weight: 400; text-decoration: none; }
#side-nav li.l2 a:hover { background: var(--paper-deep); text-decoration: underline; }
.menu-blocker { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 19; background: rgba(28, 43, 75, .55); }
/* The legacy JS opens and closes the drawer with a 100 ms jQuery width animation, which re-wrapped the menu as it
   widened. The menu (#side-nav above) now has a fixed width and is pinned to the drawer's right edge, so the width
   animation reads as a slide: out on close. On open, a CSS slide-in also runs whenever the drawer appears (an
   animation starts when an element goes from display:none to shown), so opening is a little slower than closing. */
#side-bar { animation: drawer-in .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #side-bar { animation: none; } }

/* ---------- Page frame ------------------------------------------------------ */
#middle { max-width: var(--page); margin: 0 auto; padding: 0 var(--gap); }
main { display: block; padding: 24px 0 8px; }
main > h2:first-child, main > .clearfix > h2.bigger:first-child { margin-top: 6px; }
article { padding: 0; }
article.full { clear: both; }
.wide-only { }
.narrow-only { display: none; }
@media (max-width: 727px) { .wide-only { display: none; } .narrow-only { display: inline; } .gt728 { display: none; } }

/* footer: the poster's small print */
#terms-holder {
  width: calc(100% - 2 * var(--gap));
  max-width: calc(var(--page) - 2 * var(--gap));
  margin: 40px auto 0;
  padding: 18px 0 36px;
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
  border-top: 3px solid var(--rule);
}
#terms-holder a { color: var(--navy); font-weight: 400; padding: 6px 0; }
#terms-holder .foot-line { margin-left: auto; color: var(--navy-soft); }

/* ---------- Modals (jquery.modal + generic modal) -------------------------- */
.blocker { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 30; overflow: auto; padding: 20px; background: rgba(28, 43, 75, .7); text-align: center; }
.blocker::before { content: ""; display: inline-block; height: 100%; vertical-align: middle; margin-right: -0.05em; }
.blocker.behind { background: transparent; }
.modal {
  display: none;
  vertical-align: middle;
  position: relative;
  z-index: 31;
  max-width: 520px;
  width: 92%;
  background: var(--paper);
  color: var(--navy);
  padding: 22px 28px;
  border: 3px solid var(--navy);
  border-radius: var(--r-md);
  text-align: left;
  box-shadow: 8px 8px 0 rgba(28, 43, 75, .35);
}
.modal h3 { font-family: var(--display); font-weight: 400; font-size: 32px; text-transform: var(--display-case); line-height: 1; }
.modal a.close-modal {
  position: absolute; top: -16px; right: -16px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--paper-light); text-indent: -9999px; overflow: hidden;
}
.modal a.close-modal::after { content: "\00d7"; position: absolute; inset: 0; text-indent: 0; text-align: center; line-height: 32px; font-size: 26px; font-weight: 400; }
.modal-spinner { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 12px 16px; border-radius: 5px; background: var(--navy); height: 20px; z-index: 40; }
.modal-spinner > div { border-radius: 100px; background: var(--paper); height: 20px; width: 2px; margin: 0 1px; display: inline-block; animation: sk-stretchdelay 1.2s infinite ease-in-out; }
.modal-spinner .rect2 { animation-delay: -1.1s; } .modal-spinner .rect3 { animation-delay: -1.0s; } .modal-spinner .rect4 { animation-delay: -0.9s; }
@keyframes sk-stretchdelay { 0%, 40%, 100% { transform: scaleY(.5); } 20% { transform: scaleY(1); } }

/* ==========================================================================
   Homepage: the poster
   ========================================================================== */
.poster-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  grid-template-areas: "invite card" "ready ready";
  column-gap: clamp(24px, 5vw, 64px);
  row-gap: 30px;
  align-items: start;
  padding: 8px 0 20px;
}
.poster-invite { grid-area: invite; padding-top: 10px; }
.poster-hero > .big-card { align-self: center; }
.big-card a { display: block; border-radius: var(--r-md); }
.poster-invite h1 { font-size: clamp(64px, 9.2vw, 124px); line-height: 0.86; margin: 0 0 20px; }
.poster-lede { font-size: 20px; max-width: 30em; margin-bottom: 22px; }
.poster-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-bottom: 14px; }
.poster-terms { font-size: 16px; color: var(--navy-soft); margin: 0; max-width: 32em; }
.poster-terms strong { color: var(--navy); }

/* the hero: two real cards from one game (back one tilted, front one upright), rendered with their frames and shadows
   baked in on a transparent ground (tools/make-hero-card.mts, layout pair2). Desktop shows it at most 410 px wide
   (~420 px tall, level with the headline block), centred in its 520 px column. */
.big-card { grid-area: card; margin: 0; }
.big-card img {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 728px) {
  .big-card a { max-width: 410px; margin: 0 auto; }
}

/* ready-made games */
.ready-made { grid-area: ready; border-top: 3px solid var(--rule); padding-top: 18px; }
.ready-made h2 { font-size: 34px; margin-bottom: 14px; }
.ready-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.ready-list a { display: block; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 17px; line-height: 1.25; }
.ready-list img { display: block; width: 100%; height: auto; aspect-ratio: 240 / 287; border: 2px solid var(--navy); border-radius: var(--r-sm); margin-bottom: 10px; background: var(--paper-deep); }
.ready-list a:hover img { border-color: var(--red); }
.ready-list a:hover .rm-name { text-decoration: underline; color: var(--red-ink); }
.rm-note { display: block; font-weight: 400; font-size: 15px; line-height: 1.4; color: var(--navy-soft); margin-top: 4px; }
.ready-all { font-weight: 700; }

/* below the hero */
.poster-section { padding: 34px 0 10px; border-top: 3px solid var(--rule); margin-top: 26px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 4px; }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--red); color: var(--paper-light);
  font-family: var(--display); font-size: 34px; line-height: 1;
  margin-bottom: 12px;
}
.steps h3 { font-size: 22px; margin-bottom: 6px; }
.steps p { margin: 0; }

/* the heading sits in its own row so the notes start level with the table, not the heading */
.price-board { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "head ." "table notes"; column-gap: 36px; align-items: start; }
.price-board > div { display: contents; }
.price-board h2 { grid-area: head; }
.price-board .price-table { grid-area: table; }
.price-board .price-notes { grid-area: notes; }
.price-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.price-table th, .price-table td { text-align: left; padding: 10px 4px; border-bottom: 1px solid rgba(28, 43, 75, .3); }
.price-table td:last-child { text-align: right; font-family: var(--display); font-size: 30px; line-height: 1; }
.price-table tr:first-child td:last-child { color: var(--red-ink); }
.price-notes { margin: 0; padding: 10px 0 0 1.1em; } /* 10px = the table cells' top padding, so the first lines are level */
.price-notes li { margin-bottom: 6px; }

.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.uses h3 { font-family: var(--display); font-weight: 400; font-size: 30px; text-transform: var(--display-case); line-height: 1; margin-bottom: 8px; }
.uses p { margin-bottom: 0.6em; }

/* ==========================================================================
   Editor (bingo card generator)
   ========================================================================== */
.gen-head { padding: 0 0 18px; }
.gen-head h2.bigger { font-size: clamp(46px, 5.4vw, 70px); line-height: .9; margin-bottom: 10px; }
.gen-intro { max-width: 46em; }
.gen-intro h3 { font-family: var(--body); font-weight: 700; font-size: 18px; text-transform: none; letter-spacing: 0; line-height: 1.3; margin: 0 0 4px; }
.gen-intro p { margin: 0 0 6px; }
/* the live intro's second sentence (links to the other generators, also in the tabs below): kept for its text, quieter */
.gen-intro p.gen-also { font-size: 15px; color: var(--navy-soft); }
.gen-types { display: flex; flex-wrap: wrap; gap: 0; margin: 14px 0 0; border: 2px solid var(--navy); border-radius: var(--r-sm); width: 100%; } /* as wide as the form panel below */
.gen-types > a, .gen-types > span { flex: 1 1 auto; text-align: center; display: inline-block; line-height: 40px; min-height: 40px; padding: 0 16px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--navy); }
.gen-types > * + * { border-left: 2px solid var(--navy); }
.gen-types [aria-current] { background: var(--navy); color: var(--paper-light); }
.gen-types a:hover { background: var(--paper-deep); }

.gen-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.gen-body > .gen-head { grid-column: 1; grid-row: 1; }
.gen-body > .gen-controls { grid-column: 1; grid-row: 2; }
.gen-body > .gen-preview { grid-column: 2; grid-row: 1 / span 2; margin-top: 18px; }
.gen-controls { background: var(--paper-light); border: 2px solid var(--navy); border-radius: var(--r-md); padding: 20px 22px 12px; }
.gen-controls h2 { font-size: 30px; margin: 0 0 12px; }
.field { margin: 0 0 16px; }
.field > label, .field-label { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 16px; margin-bottom: 5px; }
.field-hint { font-weight: 400; font-size: 14px; color: var(--navy-soft); }
.field-help { font-size: 15px; color: inherit; margin: -2px 0 8px; line-height: 1.4; }
.field input[type=text], .field textarea, .field select { width: 100%; }
#bingo_title { resize: vertical; min-height: 44px; font-size: 18px; }
#bingo_words { display: block; width: 100%; height: 230px; resize: vertical; font-size: 17px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
/* Cards per page stays in the form (it is submitted, default 2) but isn't shown: the print page has its own choice */
.field:has(> #per-page-select) { display: none; }
.cols-holder { display: flex; gap: 8px; margin: 0; }
.cols-holder input.col_char { width: 52px; height: 52px; text-align: center; font-family: var(--display); font-size: 32px; padding: 0; text-transform: var(--display-case); }
.check-row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; margin: 0 0 10px; }
.check-row label { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; }
#free-space-text-holder { display: none; width: 100%; }
#free-space-text { width: 100%; max-width: 320px; margin: 2px 0 6px 28px; }
#extra-options-link { display: inline-flex; align-items: center; min-height: 36px; font-weight: 700; color: var(--navy); }
#extra-options-link::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); margin-left: 8px; }
#more-options { border-top: 1px solid rgba(28, 43, 75, .3); padding-top: 12px; margin-top: 4px; }

.gen-preview { position: sticky; top: 14px; text-align: center; }
.gen-preview { --preview-w: min(410px, calc((100vh - 250px) * 305 / 365 + 10px)); }
/* Clicking the preview card focuses the matching box and briefly tints its inside (generator.ts preview_img_click),
   so the cue sits exactly within the box's own focus outline. */
#bingo_title.flash, #bingo_words.flash { animation: box-flash 2.4s ease-out; }
@keyframes box-flash { 0%, 25% { background-color: #d6f5ff; } 100% { background-color: #fff; } }
@media (prefers-reduced-motion: reduce) { #bingo_title.flash, #bingo_words.flash { animation: none; } }
.preview-frame { position: relative; width: 100%; max-width: var(--preview-w); margin: 0 auto; }
/* The legacy JS puts example text in the empty title/words boxes as real text, greyed inline (rgb(200,200,200)), and
   tests that computed colour on focus to clear it; typed text gets an inline #333. Leave `color` alone and paint over
   it: the example light, like a placeholder (Peter: placeholder-light, a clear step to real text), real text near-black. */
#bingo_title[style*="200, 200, 200"], #bingo_words[style*="200, 200, 200"] { -webkit-text-fill-color: #a8a8a8; }
#bingo_title:not([style*="200, 200, 200"]), #bingo_words:not([style*="200, 200, 200"]) { -webkit-text-fill-color: #111; }
#bingo_title::placeholder { -webkit-text-fill-color: #a8a8a8; color: #a8a8a8; opacity: 1; }
#bingo-preview { display: block; width: 100%; height: auto; aspect-ratio: auto 305 / 365; margin: 0; cursor: pointer; padding: 2.5%; background: #fff; border-radius: 2.5% / 2.1%; box-shadow: 1px 1px 4px rgba(0, 0, 0, .4); }
/* the loading spinner sits over the middle of the card, not on a line of its own inside the frame */
/* Loading state over the preview card. The legacy JS shows/hides #loader_gif with inline opacity 1/0 and reads that
   opacity back, so the gif keeps its opacity but is never painted; a ring spinner and a light veil follow its state.
   They fade in after a short delay, so a quick redraw doesn't flash. */
.preview-loader { position: absolute; inset: 0; margin: 0; pointer-events: none; display: grid; place-items: center; border-radius: 2.5% / 2.1%; }
#loader_gif { opacity: 0; visibility: hidden; position: absolute; width: 1px; height: 1px; }
.preview-loader::before, .preview-loader::after { content: ""; grid-area: 1 / 1; opacity: 0; transition: opacity .15s; }
.preview-loader::before { width: 100%; height: 100%; border-radius: inherit; background: rgba(255, 255, 255, .5); }
.preview-loader::after { width: 64px; height: 64px; border-radius: 50%; border: 6px solid rgba(0, 0, 0, .12); border-top-color: var(--navy); animation: preview-spin .8s linear infinite; }
.preview-loader:has(#loader_gif[style*="opacity: 1"])::before, .preview-loader:has(#loader_gif[style*="opacity: 1"])::after { opacity: 1; transition: opacity .2s .15s; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .preview-loader::after { animation-duration: 2.4s; } }
.gen-actions { padding-top: 14px; max-width: var(--preview-w); margin: 0 auto; } /* no wider than the card above */
.gen-actions button.massive { width: 100%; }
.gen-offer { font-size: 15px; color: var(--navy-soft); margin: 10px 0 0; }
.gen-offer strong { color: var(--navy); }

/* ==========================================================================
   Preview + buy, built-in card pages
   ========================================================================== */
.card-page-head h2.bigger { font-size: clamp(44px, 6vw, 76px); line-height: .9; margin: 6px 0 14px; }
.card-page { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 520px); /* buy buttons ~470 px, not the rest of the page */ gap: clamp(24px, 4vw, 56px); align-items: start; }
.top-double { max-width: 60em; margin-bottom: 18px; } /* one line for the short intro on a made card; ~2 for the long ones */
.top-double p { margin: 0 0 8px; }
#preview_img_holder { position: relative; }
#preview_img_holder a { display: block; }
#preview-img { display: block; width: 100%; height: auto; aspect-ratio: auto 556 / 665; padding: 2.5%; background: #fff; border-radius: 2.5% / 2.1%; box-shadow: 1px 1px 4px rgba(0, 0, 0, .4); }
#edit-bingo-overlay { display: none; position: absolute; inset: 0; text-align: center; background: rgba(28, 43, 75, .3); border-radius: 2.5% / 2.1%; }
#edit-bingo-overlay img { padding-top: 55%; width: 12%; }
#preview_img_holder:hover #edit-bingo-overlay { display: block; }
/* 1-90 previews (img.housie, set by the server): /p/<slug>/s crops the strip through its third ticket, so the bottom
   fades out instead of a closed frame. no-clip + repeat-x keep the side shadow (the mask would clip it). */
img.housie {
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%); mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; mask-clip: no-clip;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
#preview_img_holder:has(img.housie) #edit-bingo-overlay {
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%); mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.under-preview-image { font-size: 15px; color: var(--navy-soft); margin-top: 10px; }
.make-it-yours { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 16px 0 0; }
.make-it-yours .btn { min-height: 48px; }

.buy-panel { background: var(--paper-light); border: 3px solid var(--navy); border-radius: var(--r-md); padding: 22px 24px 18px; }
.buy-panel h3.big-game { font-family: var(--display); font-weight: 400; font-size: 38px; text-transform: var(--display-case); line-height: 1; margin: 0 0 14px; }
.buy-panel h3.big-game { margin-bottom: 6px; }
.buy-panel p.pack-intro { font-size: 16px; margin: 0 0 16px; }
.pack-free { margin: 0; }
.pack-paid { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid rgba(28, 43, 75, .3); }
.buy-panel p.pack-terms { font-weight: 400; font-size: 14px; color: var(--navy-soft); margin: -4px 0 0; text-align: center; }
/* small print under the price buttons: the terms line, then the 500+ link right under it */
.buy-panel p:has(> .more-than-500-link) { margin: 2px 0 0; text-align: center; }
.more-than-500-link { display: inline-block; padding: 4px 0; font-weight: 700; font-size: 14px; }
.voucher-box { margin: 10px 0 0; border-top: 1px solid rgba(28, 43, 75, .3); padding-top: 8px; }
.voucher-box summary { cursor: pointer; font-weight: 700; color: var(--navy); min-height: 32px; display: list-item; padding: 4px 0; }
.voucher-box .voucher-currency-container { border-top: 0; padding-top: 4px; margin-top: 0; }
.voucher-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.voucher-row label { flex-basis: 100%; }
.buy-panel p { margin: 0; }
.free-btn-a { display: block; padding: 0 0 10px; text-decoration: none; }
.buy-panel button.massive, .buy-buttons-container button.massive { width: 100%; max-width: 360px; display: block; margin-left: auto; margin-right: auto; } /* narrower than the panel on desktop, centred */
#free-btn-30 { background: var(--paper-light); color: var(--navy); border-color: var(--navy); border-width: 3px; }
#free-btn-30:hover { background: var(--navy); color: var(--paper-light); }
.buy-buttons-container { display: grid; gap: 10px; margin: 0 0 14px; }
.buy-buttons-container p { margin: 0; }
.buy-buttons-container button.long-text { font-size: 19px; }
#apply-voucher-form label { font-weight: 700; font-size: 15px; }
#voucher-voucher { width: 190px; min-height: 40px; } /* fits a 15-character edit code (E-XXXXX-SLUG) */
em.error { color: var(--red-ink); animation: error-in .45s ease-out; } /* voucher errors: red, as live (/style had em.error{color:red}); fades in on every try */
#voucher-voucher.invalid { border-color: var(--red-ink); box-shadow: 0 0 0 1px var(--red-ink); }
@keyframes error-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { em.error { animation: none; } }
#apply-voucher-form input[type=submit] { min-height: 40px; padding: 0 14px; background: var(--paper); border: 2px solid var(--navy); border-radius: var(--r-sm); font-weight: 700; color: var(--navy); cursor: pointer; }
#apply-voucher-form input[type=submit]:hover { background: var(--navy); color: var(--paper-light); }
.payment-methods { width: 256px; max-width: 100%; margin-top: 10px; }
.voucher-message { background: var(--paper-deep); padding: 10px; border-radius: var(--r-sm); }
.warning-box { border: 3px solid var(--red); background: var(--paper-light); color: var(--navy); padding: 12px 16px; border-radius: var(--r-md); margin: 0 0 12px; }
.warning-box strong:first-child { color: var(--red-ink); }

/* ==========================================================================
   Listings, static pages
   ========================================================================== */
main > h2:first-child { font-size: clamp(44px, 6vw, 76px); line-height: .9; margin: 6px 0 14px; }
main > article.full > p:first-child { max-width: 46em; font-size: 18px; }
img.card-small { display: block; width: 100%; height: auto; aspect-ratio: 556 / 665; border: 2px solid var(--navy); border-radius: var(--r-sm); background: var(--paper-deep); margin: 0; }
img.card-small.lefty, img.card-small.righty { float: none; padding: 0; }
main article.full:has(a.paginate-link) { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; align-items: start; }
main article.full:has(a.paginate-link) > :not(a) { grid-column: 1 / -1; }
/* the intro paragraphs sit in the thumbnail grid, so its row gap added to their margins (36px between lines of
   intro on desktop): pull them back to normal paragraph spacing (~14px), ~24px before the thumbnails */
main article.full:has(a.paginate-link) > p { margin: 0 0 -8px; }
main article.full:has(a.paginate-link) > p:has(+ a) { margin-bottom: 2px; }
@media (max-width: 727px) {
  main article.full:has(a.paginate-link) > p { margin-bottom: 0; }
  main article.full:has(a.paginate-link) > p:has(+ a) { margin-bottom: 10px; }
}
a.paginate-link { display: block; text-decoration: none; }
.card-caption { display: block; margin-top: 6px; font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--navy); }
a.paginate-link:hover .card-caption { text-decoration: underline; }
a.paginate-link:hover img { border-color: var(--red); }

div.terms { max-width: 46em; }
div.terms h3 { font-size: 21px; margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid rgba(28, 43, 75, .3); }
div.terms h3:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
div.terms li { padding: 2px 0 6px; }
article.splash, article.full { font-size: inherit; }
.embed-container-holder { max-width: 560px; margin: 0 auto; }
.embed-container { position: relative; padding-bottom: 75%; height: 0; overflow: hidden; max-width: 100%; border: 3px solid var(--navy); border-radius: var(--r-md); }
.embed-container iframe, .embed-container object, .embed-container embed { position: absolute; inset: 0; width: 100%; height: 100%; }
img.framed:not([src$='1x1.png']) { border: 2px solid var(--navy); border-radius: var(--r-sm); }
/* legacy static-page two-column blocks */
.holder { clear: both; padding-top: 18px; display: flow-root; }
.lside { float: left; width: 42%; padding-right: 24px; text-align: center; }
.rside { overflow: hidden; }
/* live's two-column `article.half` pages (/numbers, /bingo-card-generator/tips): two columns again on desktop, stacked on
   phones. The image + H2 block is one link: H2 in link colour, underlined on hover (it was black with a red underline). */
@media (min-width: 728px) {
  main :is(.holder, .clearfix):has(> article.half) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  main :is(.holder, .clearfix):has(> article.half) > :not(article.half) { grid-column: 1 / -1; }
}
article.half { padding: 0; }
main a.block-me { display: block; text-align: center; text-decoration: none; margin-bottom: 6px; }
/* /numbers' two card images (320x383 files, HTML height=250 only): a fixed box so nothing below jumps when they load */
main a.block-me img { width: auto; max-width: 100%; height: 250px; aspect-ratio: 320 / 383; object-fit: contain; }
main a.block-me h2 { color: inherit; font-size: clamp(22px, 2.2vw, 27px); line-height: 1.2; margin: 10px 0 4px; }
main a.block-me:hover h2 { text-decoration: underline; }
.mfbc-seg-holder { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0 35px; align-items: center; justify-content: space-evenly; background: var(--paper-deep); padding: 16px; border-radius: var(--r-md); }
.mfbc-seg-holder a.bl { display: block; text-align: center; }
.mfbc-seg-holder a.il { flex: 0 0 195px; }
/* the text column takes the rest of the row (it wrapped under the image when its text was long: 1-90, Custom) */
.mfbc-seg-holder > div { flex: 1 1 260px; min-width: 0; }
.mfbc-seg-holder > div > div { max-width: 34em; }
.mfbc-seg-holder img { width: 100%; padding: 0 25px 0 0; }
.compact-p-holder p { margin-block-end: .5em; }

/* ==========================================================================
   Narrow screens
   ========================================================================== */
@media (max-width: 1060px) {
  .ready-list { gap: 16px; }
  .top-nav.wide a { padding: 8px 6px; font-size: 14px; }
}
@media (max-width: 899px) {
  .top-nav.wide { display: none; }
  .poster-hero { grid-template-columns: 1fr; grid-template-areas: "invite" "card" "ready"; }
  .big-card { max-width: 560px; width: 100%; justify-self: center; }
  .steps, .uses { grid-template-columns: 1fr; gap: 20px; }
  .price-board { grid-template-columns: 1fr; grid-template-areas: "head" "table" "notes"; }
  .price-board .price-notes { padding-top: 0; margin-top: 16px; }
  .gen-body, .card-page { grid-template-columns: 1fr; }
  .gen-body > .gen-head, .gen-body > .gen-controls, .gen-body > .gen-preview { grid-column: 1; grid-row: auto; }
  .gen-preview { position: static; max-width: 460px; width: 100%; margin: 24px auto 0; }
  /* One column: bring the preview card up to the first screen. The header is unwrapped so its parts can be reordered
     (visual order only; the HTML order is unchanged): title, tabs, card, form, then the intro text. */
  .gen-head { display: contents; }
  .gen-head > h2 { order: 1; }
  .gen-types { order: 2; }
  .gen-body > .gen-preview { order: 3; margin: 18px auto 0; }
  .gen-body > .gen-controls { order: 4; margin-top: 18px; }
  .gen-intro { order: 6; margin-top: 22px; }
  /* the preview column is unwrapped so Next Step sits in the page right after the form (2026-12-01: a bar fixed to the
     bottom of the screen read like a banner ad and hid part of the form; live has it in the page too) */
  .gen-body > .gen-preview { display: contents; }
  .gen-preview > .preview-frame { order: 3; margin-top: 18px; }
  .gen-preview > .gen-actions { order: 5; width: 100%; margin-top: 16px; }
  .gen-preview { --preview-w: 340px; }
  .card-page > :first-child { max-width: 460px; width: 100%; margin: 0 auto; }
  /* one column: headline, text, button, then the hero cards, then the free/price line under them (a colleague's
     idea, 2026-12-01: the cards come straight after the button instead of after the small print). The invite block is
     unwrapped so its parts can be ordered around the figure; spacing comes from margins (row-gap 0). */
  .poster-hero { grid-template-areas: "h1" "lede" "cta" "card" "terms" "ready"; row-gap: 0; }
  .poster-invite { display: contents; }
  .poster-invite h1 { grid-area: h1; margin-top: 10px; }
  .poster-lede { grid-area: lede; }
  .poster-cta { grid-area: cta; margin-bottom: 18px; }
  .poster-hero > .big-card { grid-area: card; margin-bottom: 14px; }
  .poster-terms { grid-area: terms; margin-bottom: 30px; }
  .poster-hero > .ready-made { grid-area: ready; }
}
@media (max-width: 727px) {
  body { font-size: 16px; }
  .site-head { padding-top: 10px; }
  .site-head-row { gap: 10px; padding-bottom: 10px; }
  .brand svg { width: 34px; height: 34px; }
  .brand-name { font-size: 25px; }
  #breadcrumbs { font-size: 13px; line-height: 1.35; }
  main { padding-top: 14px; }
  /* preview / card pages: the card beside its caption + Edit button, so the card packs start near the first screen
     (a full-width card pushed "Get 30 cards free" ~1.5 screens down) */
  .card-page > :first-child { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); column-gap: 14px; align-content: center; align-items: center; max-width: none; }
  .card-page > :first-child > #preview_img_holder { grid-column: 1; grid-row: 1 / span 3; }
  .card-page > :first-child > .under-preview-image { grid-column: 2; margin: 0; font-size: 14px; }
  .card-page > :first-child > .make-it-yours { grid-column: 2; margin: 10px 0 0; }
  .card-page > :first-child > .make-it-yours .btn { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .poster-invite h1 { font-size: clamp(54px, 17vw, 80px); }
  .poster-lede { font-size: 18px; }
  /* phones: a smaller hero (2026-12-01) - still shows the product, less height, and phones fetch the 840w file */
  .big-card { max-width: 260px; }
  .poster-cta .btn-big { width: 100%; }
  .ready-made h2 { font-size: 30px; }
  /* two across on phones (bigger images, room for the sentence); four of the five */
  .ready-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .ready-list li:nth-child(n+5) { display: none; }
  .uses h3 { font-size: 26px; }
  .lside { float: none; width: auto; padding: 0 0 10px; }
  .gen-controls { padding: 14px 14px 6px; border-width: 2px; }
  .gen-preview { --preview-w: 260px; }
  .gen-types { width: 100%; }
  .gen-types { flex-wrap: nowrap; }
  .gen-types > * { flex: 1 1 0; line-height: 1.2 !important; padding-top: 11px !important; justify-content: center; padding: 0 6px; font-size: 14px; text-align: center; }
  .tab-extra { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #bingo_words { height: 170px; }
  .field-row { grid-template-columns: 1fr; }
  .field { margin-bottom: 12px; }
  .gen-actions { max-width: none; }
  .gen-actions button.massive { min-height: 50px; font-size: 20px; }
  .buy-panel { padding: 16px 14px 14px; }
  .buy-panel h3.big-game { font-size: 32px; }
  .modal { padding: 18px 18px; }
  main article.full:has(a.paginate-link) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  #terms-holder .foot-line { margin-left: 0; width: 100%; }
}
.gen-offer-inline { display: none; }
@media (max-width: 380px) {
  .brand-name { font-size: 21px; }
  #toggle_menu { padding: 0 10px; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* free-game modal + head actions on card pages */
.modal-actions { text-align: center; margin: 16px 0 4px; }
.modal-actions .free-btn-a { display: inline-flex; padding: 0 28px; color: var(--paper-light); }
.modal-actions .free-btn-a:hover { color: var(--paper-light); text-decoration: none; }
/* built-in card pages: customize first, use-as-shown second (jumps to the packs) */
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 26px; }
.card-actions .btn { text-decoration: none; }
.card-actions .btn:not(.btn-ghost) { color: var(--paper-light); }
.card-actions .btn-ghost { color: var(--navy); border-width: 3px; background: var(--paper-light); }
.card-actions .btn-ghost:hover { color: var(--paper-light); background: var(--navy); }
@media (max-width: 600px) { .card-actions { flex-direction: column; } .card-actions .btn { width: 100%; text-align: center; } }
.make-it-yours .btn-ghost { color: var(--navy); text-decoration: none; }
#toggle_menu { display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; height: 40px; }
#toggle_menu svg { flex: none; margin-right: 7px; }


/* ==========================================================================
   Payment window (stripe-modal.html; logic untouched, look only)
   ========================================================================== */
#stripe-modal { max-width: 380px; padding: 0; background: var(--paper); border: 3px solid var(--navy); border-radius: var(--r-md); overflow: visible; }
#stripe-modal #bingo-sticker { display: none; }
#stripe-modal #modal-header { background: var(--paper); border-bottom: 2px solid var(--navy); padding: 22px 20px 0; border-radius: var(--r-md) var(--r-md) 0 0; text-align: left; }
#stripe-modal h2, #stripe-modal.on-mobile h2 { font-family: var(--body); font-weight: 700; font-size: 24px; line-height: 1.15; text-transform: none; text-align: left; margin: 0 40px 4px 0; color: var(--navy); }
#stripe-modal h3, #stripe-modal.on-mobile h3 { font-family: var(--body); font-size: 15px; text-transform: none; text-align: left; color: var(--navy-soft); margin: 0; }
#stripe-modal #tab-link-container, #stripe-modal.on-mobile #tab-link-container { justify-content: flex-start; gap: 4px; margin-top: 14px; font-size: 15px; line-height: 1.2; }
#stripe-modal .stripe-tab-link, #stripe-modal .paypal-tab-link, #stripe-modal.on-mobile .stripe-tab-link, #stripe-modal.on-mobile .paypal-tab-link {
  width: auto; padding: 10px 14px 9px; color: var(--navy); border: 0; border-bottom: 4px solid transparent; font-weight: 700;
}
#stripe-modal.stripe-tab .stripe-tab-link, #stripe-modal.paypal-tab .paypal-tab-link { border-bottom-color: var(--red); color: var(--navy); }
#stripe-modal #modal-body { background: var(--paper-light); border-top: 0; padding: 16px 20px 12px; }
#stripe-modal label, #stripe-modal.on-mobile label { font-size: 15px; font-weight: 700; color: var(--navy); padding: 0 0 4px; display: block; }
#stripe-modal .fieldset { background: #fff; border: 2px solid var(--navy); border-radius: var(--r-sm); }
/* one labelled box per card field (feedback round 1): number on its own row, expiry + code side by side */
#stripe-modal #card-number, #stripe-modal #card-expiry { border: 0; }
#stripe-modal .field { margin: 0; } /* the Stripe mounts carry class 'field': not the editor's field spacing */
#stripe-modal .pay-example { margin: 8px 0 0; font-weight: 700; color: var(--red-ink); } /* untouched demo card: says so, buying still works */
#stripe-modal #card-number, #stripe-modal #card-expiry, #stripe-modal #card-cvc { border-radius: var(--r-sm); }
#stripe-modal .card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#stripe-modal .card-row .fieldset { margin-bottom: 15px; }
#stripe-modal #modal-header p.pay-terms { font-size: 15px; font-weight: 700; color: var(--navy); margin: 2px 0 0; }
#stripe-modal #cardholder-email { border: 0; border-radius: 0; padding: 9px 14px 8px 30px; width: 100%; background-color: transparent; font-family: Arial, sans-serif; }
#stripe-modal.on-mobile #cardholder-email { padding: 12px 14px 11px 34px; }
#stripe-modal .StripeElement.focus, #stripe-modal #cardholder-email-holder:focus-within { outline: 3px solid var(--navy); outline-offset: 1px; }
#card-button, #stripe-modal.on-mobile #card-button { font-family: var(--body); font-weight: 700; font-size: 21px; text-transform: none; letter-spacing: 0; height: auto; min-height: 56px; border-radius: var(--r-sm); width: 100%; }
#stripe-modal #modal-footer { background: var(--paper-light); border-radius: 0 0 var(--r-md) var(--r-md); color: var(--navy-soft); font-size: 13px; padding: 0 20px 10px; height: auto; }
#stripe-modal #modal-footer a { color: var(--navy); }
#stripe-modal .modal-error-holder { color: var(--red-ink); font-size: 15px; }
#stripe-modal #stripe-payment-request-text { font-family: var(--body); color: var(--navy-soft); }
/* the close button sits inside the window */
#stripe-modal a.close-modal { top: 12px; right: 12px; opacity: 1; width: 34px; height: 34px; }

/* phones: a bottom sheet that fits the screen, with the pay button in reach */
@media (max-width: 600px) {
  .blocker:has(#stripe-modal) { padding: 0; }
  #stripe-modal, #stripe-modal.on-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; max-width: none; max-height: 94vh; max-height: 94dvh; overflow-y: auto;
    border-width: 3px 0 0; border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 0 rgba(28, 43, 75, .25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #stripe-modal #modal-header { border-radius: 14px 14px 0 0; padding-top: 18px; }
  #stripe-modal::before { content: ""; position: absolute; top: 7px; left: calc(50% - 22px); width: 44px; height: 5px; border-radius: 3px; background: rgba(28, 43, 75, .3); }
  #stripe-modal.on-mobile #modal-body { min-height: 0; }
  #stripe-modal.on-mobile .field { padding: 12px 14px 11px 34px; }
}

/* ==========================================================================
   Game manager + callers (html.manager). Desktop-first: hosts run games from a laptop.
   manager-head.html still carries its own legacy inline rules; these win by order/specificity.
   ========================================================================== */
html.manager body { max-width: none; }
html.manager #middle { max-width: 1040px; }
html.manager .site-head { max-width: 1040px; }
#manager-top { display: block; height: auto; background: none; color: var(--navy); border: 0; font-size: inherit; font-weight: 400; }
#manager-top .brand { margin-right: auto; }
#manager-mid {
  display: flex; gap: 6px 22px; flex-wrap: wrap; justify-content: flex-end;
  background: none; color: var(--navy); padding: 0;
  font-family: var(--body); font-size: 15px; font-weight: 700; line-height: 1.35;
}
#manager-mid div { min-width: 0; }
#manager-mid > div:only-child { margin: 0; }
#manager-mid a { color: var(--red-ink); }
html.manager main { padding-top: 18px; }

.run-page nav, main .run-page nav {
  display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0;
  margin: 0 0 24px; font-size: 16px;
  border: 2px solid var(--navy); border-radius: var(--r-sm); width: fit-content; max-width: 100%;
}
.run-page nav a, .run-page nav a.selected {
  background-image: none !important; padding: 0 18px !important; line-height: 44px;
  color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.run-page nav a + a { border-left: 2px solid var(--navy); }
.run-page nav a:hover { background-color: var(--paper-deep); text-decoration: underline; }
.run-page nav a.selected, .run-page nav a.selected:hover { background-color: var(--navy); color: var(--paper-light); text-decoration: none; }
/* the manager tabs float the card preview (img.run-preview): the panel must contain it */
article.full.run-page { display: flow-root; }
article.full.run-page hr.top-hr { display: none; }
article.full.run-page hr { border: 0; border-top: 1px solid rgba(28, 43, 75, .3); margin: 24px 0; }
article.full.run-page p { padding: 0; }
/* the live white card frame at 2.5% of the card width (280 px wide → 7 px; the caller tips' ~210 px → 5 px) */
img.run-preview { width: 30%; max-width: 280px; height: auto; aspect-ratio: auto 556 / 665; float: left; padding: 0; margin: 0 32px 16px 0; border: 7px solid #fff; border-radius: 7px; box-shadow: 1px 1px 4px rgba(0, 0, 0, .4); box-sizing: border-box; }
article.full.run-page .run-setup { width: auto; float: none; overflow: hidden; }
/* Free game manager: welcome panel on arrival from "Get 30 cards free" (manager.ts FREE_WELCOME_PANEL). */
.welcome-panel { background: var(--paper-deep); border-left: 5px solid var(--navy); border-radius: var(--r-sm); padding: 14px 18px 12px; margin: 0 0 22px; }
.welcome-panel p { margin: 0 0 8px; max-width: 46em; } /* full-width box, readable lines */
.welcome-panel .welcome-title { font-family: var(--display); font-size: 24px; line-height: 1.15; color: var(--navy); }
.welcome-panel .welcome-actions { margin: 4px 0 0; }
.welcome-panel .welcome-actions button { width: auto; height: auto; min-height: 40px; padding: 8px 18px; } /* was 48×21 on phones */
/* Free print tab: what to do next, under the Download PDF button. */
.print-next { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(28, 43, 75, .2); }
.print-next h3 { margin-top: 0; }
.print-next ul { margin: 0; padding-left: 1.2em; }
.print-next li { margin: 0 0 8px; }
.run-page h3, .run-page h3.h3-top { font-size: 22px; color: var(--navy); margin: 26px 0 6px; }
.run-page h3.h3-top, .run-setup > h3:first-child { margin-top: 0; }
.run-header-h2, .run-title-h2 { font-family: var(--display); font-weight: 400; font-size: 40px; text-transform: var(--display-case); margin: 0 0 14px; }
span.run-subtitle, span.run-subtitle-paid { font-family: var(--body); text-transform: none; font-size: 16px; color: var(--navy-soft); }
button.medium { width: auto; min-width: 220px; height: auto; min-height: 48px; font-family: var(--body); font-weight: 700; font-size: 19px; text-transform: none; }
#download-button, .download-button { font-family: var(--body); font-weight: 700; font-size: 19px; text-transform: none; min-height: 52px; }
.download-log { font-family: var(--body); color: var(--navy); font-weight: 700; }
/* free manager invite: the printable PDF first, then the two kinds of player link side by side */
.link-choices { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link-choices li { border: 2px solid var(--navy); border-radius: var(--r-md); background: var(--paper-light); padding: 12px 14px; line-height: 1.45; }
.link-choices strong { display: block; margin-bottom: 6px; }
.link-choices .virtual-link { display: block; font-weight: 700; font-size: 17px; margin-bottom: 4px; word-break: break-all; }
@media (max-width: 727px) { .link-choices { grid-template-columns: 1fr; } }
.email-list td, .single-link-list td { border-color: rgba(28, 43, 75, .45); padding: 6px 8px; }
#email-list { background: var(--paper-light); border: 2px solid var(--navy); }

/* caller */
/* tips: laid out like the other tabs (card preview left, text beside it), no box (they no longer slide away) */
#caller-tips { display: flow-root; margin-bottom: 22px; padding-bottom: 6px; border-bottom: 1px solid rgba(28, 43, 75, .3); } /* the other tabs' section rule, between the tips and the caller */
#call-game-tips li { margin-bottom: 6px; }
#call-game-tips { padding-left: 20px; margin: 0; }
/* the row under the tips: Tie-breaker left, Full screen right (always shown; manager-head.html hid it) */
#show-caller-tips { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; text-align: left; color: var(--navy); }
#show-caller-tips a { color: var(--navy); font-weight: 700; padding: 6px 0; }
#show-caller-tips button { margin: 0; width: auto; height: auto; min-height: 40px; padding: 6px 16px; font-family: var(--body); font-weight: 700; font-size: 16px; text-transform: none; letter-spacing: 0; background: transparent; color: var(--navy); border: 2px solid var(--navy); }
#show-caller-tips button:hover { background: var(--navy); color: var(--paper-light); }
#caller-exit-btn { display: none; }
.caller-links { display: flex; gap: 18px; }
/* changing the call sequence reloads to …?game=N#caller (the form's action keeps the fragment): land on the caller */
#caller { display: block; scroll-margin-top: 12px; }
#caller-tips-toggle { display: none; }
/* phones: the tips fold away behind "Calling tips" (tap to open; never moves by itself), Verify a card goes under the
   board (Next Call sits right above the board) */
@media (max-width: 727px) {
  #caller-tips { display: none; }
  html.caller-tips-open #caller-tips { display: flow-root; }
  #caller-tips-toggle { display: inline-block; }
  article.full.run-page:has(#call-buttons) { display: flex; flex-direction: column; }
  article.full.run-page:has(#call-buttons) > * { min-width: 0; }
  article.full.run-page #call-buttons { display: contents; }
  /* Verify on one line under Next Call (above the calls, so a growing word list never pushes it away); shorter labels */
  article.full.run-page #winner-check { margin: 12px 0 0; align-self: stretch; grid-template-columns: repeat(4, max-content) auto; justify-content: start; gap: 6px; padding: 8px 10px; }
  article.full.run-page #winner-check strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  article.full.run-page #winner-check input { width: 56px; }
  article.full.run-page #winner-check #check-card-button { grid-column: auto; justify-self: end; padding: 8px 14px; }
  .wide-only { display: none; }
  /* one column, every row full width: chooser; a wide Next Call with Restart beside it */
  #call-seq-form #game { width: 100%; }
  article.full.run-page .call-controls { flex-wrap: nowrap; }
  #next-call-button { flex: 1 1 auto; padding-left: 16px; padding-right: 16px; }
  #show-caller-tips { gap: 8px; }
  .caller-links { gap: 14px; }
  #show-caller-tips a, #show-caller-tips button { white-space: nowrap; }
  #show-caller-tips button { padding: 6px 12px; font-size: 15px; }
  html.caller-full main article.full.run-page { padding: 8px 0; } /* beats the 12px 20px below */
  /* earlier calls start on their own line under the big call (they used to break mid-call) */
  #cur-call-manual span.big-call-num + span.small-call::before { content: ''; display: block; height: 4px; }
  html.caller-full main #cur-call-manual { min-height: 80px; }
}
/* full screen: only the caller */
html.caller-full #manager-top, html.caller-full .run-page > nav, html.caller-full #caller-tips, html.caller-full .welcome-panel,
html.caller-full #terms-holder, html.caller-full #caller-full-btn { display: none !important; }
html.caller-full #caller-exit-btn { display: inline-block; }
html.caller-full #caller-tips-toggle { display: none; }
/* full screen zoom: the caller keeps its layout and caller_fit() (caller-script.html) sets CSS zoom on #middle
   so it fills the screen. The current call's space is reserved so the first call doesn't grow the page. */
html.caller-full, html.caller-full body { background: var(--paper-light) none; }
html.caller-full body { margin: 0; padding: 0; }
html.caller-full #middle { margin: 0 auto; }
html.caller-full main { margin: 0; padding: 10px 0 0; }
html.caller-full article.full.run-page { padding: 12px 20px; }
/* word sequence: caller_fit() sets the list's max-height to the space left on screen */
html.caller-full #call-list { overflow-y: auto; margin-bottom: 0; }
/* manual word caller: caller_fit() picks --cols (3-8); the rows flow into that many columns */
html.caller-full table.call-grid-manual.custom-manual[style*="--cols"] { display: block; }
html.caller-full table.call-grid-manual.custom-manual[style*="--cols"] tbody { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px; }
html.caller-full table.call-grid-manual.custom-manual[style*="--cols"] tr { display: contents; }
html.caller-full table.call-grid-manual.custom-manual[style*="--cols"] td { width: auto; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; box-sizing: border-box; }
/* compact controls so the board gets the height: chooser (label hidden, the select names itself) + Tie-breaker/Exit on
   one row, then Next Call/Restart with Verify on one line */
html.caller-full #call-seq-form strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.caller-full #call-seq-form p { margin: 0; }
html.caller-full #call-seq-form { margin-bottom: 10px; }
html.caller-full #show-caller-tips { margin: 0 0 10px; }
html.caller-full #call-buttons { gap: 10px 20px; }
html.caller-full #winner-check { padding: 8px 12px; gap: 6px 8px; }
html.caller-full #winner-check strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.caller-full #cur-call-manual { margin: 12px 0 8px; }
@media (min-width: 728px) {
  /* laptops/tablets, normal page and full screen alike: the chooser on the left with Tie-breaker + Full screen on the
     right of the same row; then Next Call/Restart with the Verify box (title, then one line). `dense` lets the chooser
     back into the row the toolbar (earlier in the HTML) opened. */
  article.full.run-page:has(#call-buttons) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; grid-auto-flow: row dense; }
  article.full.run-page:has(#call-buttons) > * { grid-column: 1 / -1; }
  article.full.run-page:has(#call-buttons) > #call-seq-form { grid-column: 1; }
  article.full.run-page:has(#call-buttons) > #show-caller-tips { grid-column: 2; align-self: end; justify-content: flex-end; gap: 24px; margin: 0 0 12px; }
  article.full.run-page #winner-check { grid-template-columns: repeat(5, max-content); }
  article.full.run-page #winner-check #check-card-button { grid-column: auto; }
}
html.caller-full #cur-call-manual { min-height: 76px; } /* a number call is 72 px tall: reserve just that, so the first call doesn't move the board */
html.caller-full #cur-call-manual.custom-manual { min-height: 128px; } /* manual words: earlier calls stack */
#call-seq-form p { margin: 0 0 12px; }
#call-seq-form strong { display: block; margin-bottom: 4px; }
#game { padding: 7px 34px 7px 10px; margin-top: 0; }
/* two groups (feedback round 1): calling on the left, card verification in its own box on the right */
#call-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; background: transparent; padding: 0; border-radius: 0; }
#call-buttons::after { display: none; }
.call-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#next-call-button {
  margin: 0; height: auto; min-height: 64px; padding: 12px 40px 11px;
  font-family: var(--body); font-weight: 700; font-size: 24px; text-transform: none; letter-spacing: 0;
  border-color: var(--red);
}
#next-call-button:hover { background: var(--red); color: var(--paper-light); }
@media (hover: hover) { #next-call-button:hover { background: var(--navy); color: var(--paper-light); border-color: var(--navy); } }
#call-seq-form br { display: none; }
html.manager #terms-holder { max-width: calc(1040px - 2 * var(--gap)); }
#restart-game { margin: 0; height: auto; min-height: 48px; background: transparent; color: var(--navy); border: 2px solid var(--navy); }
#restart-game:hover { background: var(--navy); color: var(--paper-light); }
#undo-call-button, #undo-call-button:hover { background: transparent; border-color: var(--navy); margin: 0; }
#winner-check {
  float: none; margin-left: auto; display: grid; grid-template-columns: max-content max-content max-content max-content; gap: 6px 10px; align-items: center;
  background: var(--paper-light); border: 2px solid var(--navy); border-radius: var(--r-md); padding: 12px 16px;
}
#winner-check strong { grid-column: 1 / -1; }
#winner-check br { display: none; }
#winner-check label { font-weight: 400; }
#winner-check input { width: 70px; min-height: 40px; }
#winner-check #check-card-button { grid-column: 1 / -1; justify-self: end; margin: 0; background: var(--navy); color: var(--paper-light); border-color: var(--navy); }
#winner-check #check-card-button:hover { background: var(--red); color: var(--paper-light); border-color: var(--red); }
#cur-call-manual {
  font-family: var(--display); font-weight: 400; font-size: 34px; text-transform: var(--display-case);
  margin: 22px 0 10px; min-height: 60px; color: var(--navy);
}
#cur-call-manual span.big-call-num { font-weight: 400; font-size: 76px; line-height: .9; color: var(--red); }
#cur-call-manual.custom-manual span.big-call-num { font-size: 52px; }
#cur-call-manual span.small-call { font-size: 24px; color: var(--navy-soft); }
#cur-call-manual span.small-call-num { font-weight: 400; font-size: 28px; color: var(--navy); }
#call-history-link { font-family: var(--body); font-size: 15px; text-transform: none; color: var(--red-ink); }
table.call-grid-manual { width: 100%; border-collapse: separate; border-spacing: 4px; }
table.call-grid-manual td, table.call-grid-manual tr:nth-child(odd) td {
  background: var(--paper-light); border: 1px solid rgba(28, 43, 75, .3); border-radius: 50%;
  font-family: var(--display); font-size: 28px; color: var(--navy); padding: 0; height: 52px; text-align: center;
}
table.call-grid-manual.custom-manual td { border-radius: var(--r-sm); font-family: var(--body); font-size: 16px; padding: 6px; height: auto; }
table.call-grid-manual tr td.col, table.call-grid-manual tr:nth-child(odd) td.col { background: var(--navy) !important; color: var(--paper-light); border-radius: var(--r-sm); font-family: var(--display); font-size: 36px; }
table.call-grid-manual td.called { background: #f0b3a8 !important; color: var(--navy); font-weight: 400; border-color: var(--red); }
table.call-grid-manual td.cur_call { background: var(--red) !important; color: var(--paper-light); border-color: var(--red); }
table.call-grid-manual td.clickable:hover { border-color: var(--navy); text-decoration: none; background: var(--paper-deep); }
#call-list li { font-family: var(--display); font-size: 30px; }
#call-list li.current-call { font-size: 44px; color: var(--red); font-weight: 400; }
#winner-check-modal { width: auto; padding: 16px; }
#modal-img-last .call-val { display: inline-block; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
#modal-img-id { font-family: var(--body); color: var(--navy-soft); }
#tiebreaker-modal { max-width: 280px !important; }

@media (max-width: 727px) {
  html.manager .site-head-row { flex-wrap: wrap; }
  #manager-mid { justify-content: flex-start; font-size: 14px; width: 100%; }
  .run-page nav, main .run-page nav { width: 100%; flex-wrap: nowrap; font-size: 14px; }
  .run-page nav a, .run-page nav a.selected { flex: 1 1 auto; text-align: center; padding: 0 6px !important; }
  img.run-preview { display: none; }
  #winner-check { margin-left: 0; grid-template-columns: max-content max-content; }
  table.call-grid-manual { border-spacing: 2px; }
  table.call-grid-manual td, table.call-grid-manual tr:nth-child(odd) td { font-size: 17px; height: 30px; border-radius: var(--r-sm); }
  table.call-grid-manual td.col { font-size: 20px; }
  #cur-call-manual span.big-call-num { font-size: 56px; }
  #cur-call-manual.custom-manual span.big-call-num { font-size: 34px; }
  #call-list li { font-size: 22px; }
  #call-list li.current-call { font-size: 32px; }
}

/* long-text pages: keep lines readable */
main > article.full:not(:has(a.paginate-link)):not(.run-page) { max-width: 50em; }

/* tap targets (shots audit): 24px minimum for small links and gaps between controls */
#breadcrumbs a { display: inline-block; padding: 5px 0; }
@media (max-width: 727px) { #breadcrumbs a { display: inline; padding: 0; } } /* phones: the crumbs wrap as one sentence (inline-block links wrapped inside their own boxes, with big gaps) */
.mini-link { padding: 5px 3px; }
#stripe-modal #modal-footer a { display: inline-block; padding: 4px 0; }
.run-setup a { display: inline-block; padding: 2px 0; }

#get-link-button { margin: 0 0 0 8px; }
.field-label { margin-bottom: 8px; }
input[type=checkbox] { width: 24px; height: 24px; }
.cols-holder input.col_char { flex: 1 1 0; min-width: 0; max-width: 52px; }
#free-space-text { width: calc(100% - 28px); }
.gen-body > * { min-width: 0; }
#side-nav li.l1 a { flex: 1; align-self: stretch; display: flex; align-items: center; }

/* paid Virtual tab: the sign-up-link and email-invite rows are loose inline text; centre the dropdowns and buttons on
   each other (baseline alignment + the legacy 15px margin under Send Invites put them a few px apart) */
#games-per-link, #name-or-email, #get-link-button, #games-per-email, button#invite-button { vertical-align: middle; }
button#invite-button { margin: 0 0 0 8px; }
button#invite-button ~ .remote-italic { margin-top: 14px; }
@media (max-width: 727px) { #get-link-button, button#invite-button { display: block; margin: 10px 0 0; } } /* phones: own line under the dropdown */
