/* Raffle Generator. Sister site of Random Wheel: same light, same glass, same type.
   Layout idea: the draw is the poster, cut like a ticket. The names, the rules and the odds sit in a quiet glass rail beside it. */
:root {
  --paper: #080A1C;
  --panel: #15173A;
  --ink: #F3F1FF;
  --ink-soft: #B3B0D0;
  --line: #2D2F5C;
  --signal-ink: #1A1033;
  --focus: #B5A8FF;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-line: rgba(255, 255, 255, 0.13);
  --field: rgba(6, 8, 24, 0.55);
  --lift: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --aurora: 0.55;
  --violet: #7B5CFF;
  --rose: #FF5C8A;
  --amber: #FFB627;
  --aqua: #2ED3C6;
  --go: #2EE6A6;
  --stop: #FF4D5E;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", Verdana, sans-serif;
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; font-weight: 500; line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The light behind everything */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 90vmax; height: 90vmax; border-radius: 50%; opacity: var(--aurora);
}
body::before {
  left: -30vmax; top: -38vmax;
  background: radial-gradient(closest-side, var(--violet), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  right: -34vmax; bottom: -44vmax;
  background: radial-gradient(closest-side, var(--rose), transparent 68%), radial-gradient(closest-side at 30% 30%, var(--amber), transparent 60%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(1.1); } }

.shell { max-width: 1220px; margin: 0 auto; padding: 0 24px 64px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 22px 0 14px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -0.02em;
  margin: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none;
}
.brand svg { flex: none; filter: drop-shadow(0 0 8px rgba(255, 92, 138, 0.55)); }
.modes { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.modes a {
  text-decoration: none; color: var(--ink); padding: 7px 13px; border-radius: 999px; font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}
.modes a:hover { background: var(--glass-line); }
.modes a[aria-current="page"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }
.top-tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.btn {
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink);
  border-radius: 12px; padding: 8px 14px; font-weight: 700; cursor: pointer; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.quiet { font-weight: 500; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--violet) 26%, transparent); border-color: var(--violet); }
.btn svg { flex: none; }
#markBtn svg { color: var(--amber); }
#siteShareBtn svg { color: var(--rose); }

/* Page title */
.head { padding: 6px 0 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; }
.head > div:first-child { max-width: 760px; min-width: 0; flex: 1 1 420px; }
.spread { display: flex; gap: 8px; flex: none; }
.head h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(32px, 5.2vw, 56px); line-height: 1.02; margin: 0; text-wrap: balance;
}
.head p { margin: 10px 0 0; color: var(--ink-soft); font-size: 18px; max-width: 58ch; }


/* Main grid: the pad takes the room, the run and the record sit in a quiet glass rail beside it */
.work { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: arrive 700ms cubic-bezier(.2, .9, .2, 1) both; }

.pad {
  position: relative; overflow: hidden; cursor: pointer; min-height: clamp(320px, 54vh, 540px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 34px 22px 54px; border-radius: 30px; border: 1px solid var(--glass-line); box-shadow: var(--lift);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(90% 120% at 12% 0%, color-mix(in srgb, var(--violet) 62%, transparent), transparent 62%),
    radial-gradient(90% 120% at 92% 100%, color-mix(in srgb, var(--rose) 46%, transparent), transparent 60%),
    #12143A;
}
.pad:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pad p { margin: 0; position: relative; }
.pad-k { font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.82; min-height: 21px; }
.pad-big {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(46px, 9vw, 104px); text-wrap: balance; font-variant-numeric: tabular-nums;
}
.pad-sub { font-size: 19px; font-weight: 600; max-width: 34ch; opacity: 0.92; text-wrap: balance; min-height: 28px; }
.pad-big:empty, .pad-sub:empty, .pad-k:empty { display: none; }

/* waiting to start: a slow sheen and a ring that breathes, so the page feels alive before you press */
.pad.idle::before, .pad.done::before, .pad.shown::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  transform: translateX(-120%); animation: sheen 5s ease-in-out 1s infinite;
}
.pad.idle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(70%, 420px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%) scale(0.7); animation: breathe 2.6s ease-out infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
@keyframes breathe { from { opacity: 0.9; transform: translate(-50%, -50%) scale(0.55); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }

.hint { margin: 0; font-size: 14.5px; color: var(--ink-soft); text-align: center; }
.mark { margin: 2px 0 0; text-align: center; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; font-size: 15px; color: var(--ink-soft); opacity: 0.8; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.hot { background: linear-gradient(120deg, var(--amber), var(--rose)); color: var(--signal-ink); border-color: transparent; font-weight: 800; }
/* The result */
.sum {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--lift);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; animation: settle 500ms cubic-bezier(.2, .8, .2, 1) both;
}
.sum-head h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.05; margin: 0; }
.sum-head p { margin: 4px 0 0; color: var(--ink-soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--field); border: 1px solid var(--glass-line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.tile span { font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.tile b { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile:first-child b { background: linear-gradient(120deg, var(--amber), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.rail .btn { align-self: flex-start; }
.fs-exit {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 30; width: 46px; height: 46px; padding: 0;
  justify-content: center; border-radius: 50%; background: var(--panel);
}
/* The glass rail */
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius);
  box-shadow: var(--lift); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.rail > .card { animation: settle 600ms cubic-bezier(.2, .8, .2, 1) both; }
.rail > .card:nth-child(1) { animation-delay: 120ms; }
.rail > .card:nth-child(2) { animation-delay: 190ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes settle { from { opacity: 0; transform: translateY(16px); } }
.card h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; display: flex; align-items: center; gap: 10px; }
.pill {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #FFFFFF; border-radius: 999px; padding: 2px 11px;
  background: linear-gradient(120deg, var(--violet), var(--rose)); font-variant-numeric: tabular-nums;
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
textarea, .field input, .field select {
  background: var(--field); border: 1px solid var(--glass-line); border-radius: 12px; color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { width: 100%; min-height: 250px; resize: vertical; padding: 12px 14px; border-radius: 14px; line-height: 1.45; }
textarea.small { min-height: 84px; }
textarea:focus-visible, .field input:focus-visible, .field select:focus-visible {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 28%, transparent);
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.field input, .field select { padding: 8px 10px; font-size: 17px; }
.field select option { background: var(--panel); color: var(--ink); }
.note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.example-flag { font-size: 13px; color: var(--ink-soft); border: 1px dashed var(--glass-line); border-radius: 8px; padding: 5px 9px; margin: 0; }
.check { display: flex; gap: 9px; align-items: center; font-size: 15.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); }
.seg button {
  flex: 1 1 0; min-width: 0; border: 0; background: none; border-radius: 10px; padding: 8px 8px; font-weight: 700; cursor: pointer; line-height: 1.2;
  transition: background 160ms ease;
}
.seg button[aria-pressed="true"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }

.field input[type="text"] { width: 100%; }
.field > span { display: block; }
.btn.sure { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 22%, transparent); }
textarea:disabled, .seg button:disabled, .check input:disabled + span { opacity: 0.55; }
.seg button:disabled { cursor: default; }
.seg button { flex: 1 1 auto; white-space: nowrap; padding-inline: 6px; }
/* Text below the tool */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; margin-top: 44px; }
.about h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 19px; margin: 0 0 6px; text-wrap: balance; }
.about p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
.guide { margin-top: 40px; max-width: 820px; }
.guide h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 23px; margin: 30px 0 6px; text-wrap: balance; }
.guide h3 { font-size: 17px; margin: 18px 0 4px; }
.guide p, .guide li { color: var(--ink-soft); max-width: 70ch; }
.guide p { margin: 0 0 10px; }
.guide ol, .guide ul { margin: 0 0 10px; padding-left: 22px; }
.guide li { margin-bottom: 4px; }
.jobs { margin-top: 30px; }
.jobs h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.jobs p { margin: 0; line-height: 1.9; color: var(--ink-soft); }
.jobs a, .guide a, .foot a, .doc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--glass-line); color: var(--ink-soft); font-size: 14px; }

/* About, contact, privacy and terms */
.doc { max-width: 70ch; margin: 10px 0 0; }
.doc h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 10px 0 4px; }
.doc h2 { font-size: 20px; margin: 30px 0 6px; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }

.field.wide { width: 100%; }
.field.wide > span { color: var(--ink); font-weight: 700; }
.contact-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 560px; margin: 0 0 14px; }
.contact-form .field input, .contact-form textarea { font-size: 16px; color: var(--ink); }
.contact-form .field input { padding: 9px 12px; }
.contact-form textarea { min-height: 170px; }
.contact-form .cf-turnstile { min-height: 65px; max-width: 100%; }
.contact-form .btn { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; border-color: transparent; padding: 10px 20px; }
.contact-form .note { margin: 0; }
.contact-form .note.bad { color: var(--rose); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 20px; box-shadow: var(--lift);
  font-size: 15px; font-weight: 600; z-index: 40; max-width: calc(100% - 32px); opacity: 0; pointer-events: none;
  transition: opacity 160ms ease;
}
.toast.show { opacity: 1; }

.burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.pics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
ol.plain { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 15px; }
ol.plain li { margin-bottom: 5px; }
.print-area { display: none; }

/* ---------- Raffle Generator's own parts ---------- */

/* The pad is cut like a ticket: a notch on each side. */
.pad {
  -webkit-mask: radial-gradient(circle 20px at 0 50%, transparent 97%, #000 100%), radial-gradient(circle 20px at 100% 50%, transparent 97%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 20px at 0 50%, transparent 97%, #000 100%), radial-gradient(circle 20px at 100% 50%, transparent 97%, #000 100%);
  mask-composite: intersect;
  padding-inline: 44px;
}
.pad:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--focus), var(--lift); }
.pad-big { max-width: 100%; overflow-wrap: anywhere; }
.pad-big.long { font-size: clamp(34px, 6.2vw, 70px); }
.pad-big.xlong { font-size: clamp(26px, 4.4vw, 48px); }
.pad-sub { max-width: 44ch; }
.pad-mark {
  position: absolute !important; left: 0; right: 0; bottom: 16px; text-align: center; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.01em; opacity: 0.72;
}
/* a line of perforation down each side, like a ticket stub */
.pad .perf { position: absolute; top: 18px; bottom: 18px; width: 0; border-left: 2px dashed rgba(255, 255, 255, 0.16); pointer-events: none; }
.pad .perf.a { left: 30px; } .pad .perf.b { right: 30px; }

/* the names fly past while the draw runs */
.pad.rolling {
  cursor: progress;
  background: radial-gradient(80% 110% at 50% 50%, color-mix(in srgb, var(--violet) 62%, transparent), transparent 72%), #0C0E2C;
}
.pad.rolling .pad-big { opacity: 0.86; }
.pad.rolling .pad-big.flick { animation: flick 90ms ease-out; }
@keyframes flick { from { opacity: 0.25; transform: translateY(-14px); } }
.pad.done {
  background:
    radial-gradient(90% 120% at 12% 0%, color-mix(in srgb, var(--amber) 38%, transparent), transparent 62%),
    radial-gradient(90% 120% at 92% 100%, color-mix(in srgb, var(--rose) 50%, transparent), transparent 60%),
    #12143A;
}
.pad.done .pad-big { animation: pop 420ms cubic-bezier(.2, 1.4, .3, 1) both; background: linear-gradient(120deg, var(--amber), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.08em; }
.pad.empty { cursor: default; }
@keyframes pop { from { opacity: 0; transform: scale(0.72); } }

.draw-acts { justify-content: center; align-items: center; }
.btn.big { padding: 14px 28px; font-size: 19px; border-radius: 16px; }
.btn.hot:hover { border-color: transparent; filter: brightness(1.06); }

/* a raffle that arrived in a link */
.beat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--amber) 26%, transparent), color-mix(in srgb, var(--rose) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--amber) 60%, transparent); font-weight: 700;
}
.beat span { flex: 1 1 240px; min-width: 0; }

/* Ads: two fixed spots, labelled, and invisible until Google fills them */
.ad { margin: 34px 0 0; text-align: center; min-width: 0; }
.ad-label { display: none; margin: 0 0 6px; font-size: 12px; color: var(--ink-soft); }
.ad:has(ins[data-ad-status="filled"]) .ad-label { display: block; }
.ad ins[data-ad-status="unfilled"] { display: none !important; }

/* a logo of the organizer's own */
.pad-logo { position: relative; max-height: 72px; max-width: 46%; object-fit: contain; margin-bottom: 4px; }
.stage:fullscreen .pad-logo, body.faux-full .pad-logo { max-height: 15vh; }
.tk-mid { flex: 1 1 0; min-height: 0; display: flex; align-items: center; gap: 1.4cqw; overflow: hidden; }
.tk-texts { flex: 1 1 0; min-width: 0; align-self: flex-start; display: flex; flex-direction: column; gap: 0.5cqw; }
.tk-logo { flex: 0 0 auto; max-width: 12cqw; max-height: 10.5cqw; object-fit: contain; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.per10 .tk-logo { max-height: 7.5cqw; }
.per5 .tk-logo { max-width: 24cqw; max-height: 9cqw; }

/* publishing a results page */
.pub { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pub-box { width: 100%; padding: 14px 16px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 10px; }
.pub-box p { margin: 0; }
.pub-box a { color: inherit; overflow-wrap: anywhere; }
.doc .winners { margin: 18px 0; }
.doc .fair { margin: 0 0 18px; }
.doc a.btn { text-decoration: none; }

/* The winners */
.winners { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.win { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); min-width: 0; }
.win-n {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--signal-ink);
  background: linear-gradient(140deg, var(--amber), var(--rose)); font-variant-numeric: tabular-nums;
}
.win div { min-width: 0; display: flex; flex-direction: column; }
.win strong { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.015em; line-height: 1.15; overflow-wrap: anywhere; }
.win span { font-size: 14px; color: var(--ink-soft); }
.win em { font-style: normal; font-weight: 800; color: var(--amber); }
.win.new { animation: settle 500ms cubic-bezier(.2, .8, .2, 1) both; border-color: color-mix(in srgb, var(--amber) 60%, transparent); }
.win.void { opacity: 0.6; }
.win.void strong { text-decoration: line-through; }
.win.void .win-n { background: var(--line); color: var(--ink-soft); }

/* The rail */
.card h2 .pill { margin-left: auto; white-space: nowrap; }
.rail textarea { min-height: 220px; font-size: 16px; }
.rail textarea.small { min-height: 84px; }
.rail .seg button { font-size: 15px; padding-inline: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field input[type="number"] { width: 100%; }
.odds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.odds li { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-radius: 10px; background: var(--field); font-size: 15px; }
.odds li i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--violet) 34%, transparent); border-radius: 10px; }
.odds li span, .odds li b { position: relative; min-width: 0; }
.odds li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds li b { flex: none; font-variant-numeric: tabular-nums; }
.fair { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 0; }
.fair svg { flex: none; color: var(--go); margin-top: 2px; }

/* Printable tickets: a sheet of paper on the screen, the same sheet on the printer */
.paper-wrap { display: flex; flex-direction: column; gap: 14px; }
.paper {
  background: #FFFFFF; color: #111111; border-radius: 10px; box-shadow: var(--lift); padding: 4.2%;
  aspect-ratio: 8.5 / 11; width: 100%; max-width: 720px; margin: 0 auto; overflow: hidden;
}
.tpage { container-type: inline-size; display: grid; grid-template-columns: 1fr 1fr; height: 100%; font-family: Arial, Helvetica, sans-serif; color: #111111; }
.tpage.per5 { grid-template-columns: 1fr; grid-template-rows: repeat(5, 1fr); }
.tpage.per8 { grid-template-rows: repeat(4, 1fr); }
.tpage.per10 { grid-template-rows: repeat(5, 1fr); }
.tk { display: flex; min-width: 0; min-height: 0; border: 1px dashed #8A8A8A; margin: 0 -1px -1px 0; overflow: hidden; }
.tk-stub { flex: 0 0 36%; min-width: 0; border-right: 2px dashed #111111; padding: 2.2cqw 2cqw; display: flex; flex-direction: column; justify-content: space-between; gap: 0.6cqw; }
.tk-main { flex: 1 1 0; min-width: 0; padding: 2.2cqw 2.4cqw; display: flex; flex-direction: column; gap: 0.5cqw; }
.per5 .tk-stub { flex-basis: 30%; }
.tk-no { font-weight: 700; font-size: 2.5cqw; letter-spacing: 0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-no small { font-size: 1.7cqw; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.6cqw; }
.tk-line { font-size: 1.55cqw; display: flex; align-items: flex-end; gap: 0.6cqw; white-space: nowrap; }
.tk-line::after { content: ""; flex: 1 1 0; border-bottom: 1px solid #111111; height: 2.2cqw; }
.tk-event { font-weight: 700; font-size: 2.9cqw; line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-text { font-size: 1.9cqw; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 1.4cqw; }
.tk-price { font-size: 2cqw; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.per5 .tk-event { font-size: 3.4cqw; } .per5 .tk-text { font-size: 2.1cqw; } .per5 .tk-no { font-size: 3cqw; }
.tk-stub { border-right-color: var(--tk, #111111); }
.tk-event, .tk-main .tk-no { color: var(--tk, #111111); }
.tpage.bold .tk-main { padding-top: 0; }
.tpage.bold .tk-event { background: var(--tk, #111111); color: #FFFFFF; margin: 0 -2.4cqw 0.9cqw; padding: 1.3cqw 2.4cqw; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--glass-line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--focus); outline-offset: 2px; }
.field select { width: 100%; }
.tk-count { margin: 0; text-align: center; color: var(--ink-soft); font-size: 15px; }
/* Full screen: the pad fills the screen and everything else steps aside */
.stage:fullscreen, body.faux-full .stage { background: var(--paper); padding: 70px 22px 18px; overflow: auto; }
body.faux-full .stage { position: fixed; inset: 0; z-index: 20; }
.stage:fullscreen .fs-exit, body.faux-full .fs-exit { display: inline-flex; }
.stage:fullscreen .pad, body.faux-full .pad { flex: 1 1 auto; min-height: 0; }
.stage:fullscreen .sum, body.faux-full .sum, .stage:fullscreen .hint, body.faux-full .hint, .stage:fullscreen .beat, body.faux-full .beat { display: none; }

.stage:fullscreen .mark, body.faux-full .mark { display: none; }
.stage:fullscreen .pad-big, body.faux-full .pad-big { font-size: clamp(56px, 11vw, 190px); }
.stage:fullscreen .pad-big.long, body.faux-full .pad-big.long { font-size: clamp(44px, 8vw, 130px); }
.stage:fullscreen .pad-big.xlong, body.faux-full .pad-big.xlong { font-size: clamp(32px, 5.4vw, 84px); }
.stage:fullscreen .pad-sub, body.faux-full .pad-sub { font-size: clamp(19px, 2.2vw, 34px); }
.stage:fullscreen .pad-k, body.faux-full .pad-k { font-size: clamp(14px, 1.6vw, 26px); }

@media (max-width: 1020px) {
  .work { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
}
@media (max-width: 880px) {
  .shell { padding: 0 16px 48px; }
  .work { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .head { padding-bottom: 12px; }
  .head p { font-size: 16px; }
  .pad { min-height: clamp(260px, 42vh, 420px); border-radius: 24px; padding-inline: 36px; }
  .pad-sub { font-size: 17px; }
  .rail textarea { min-height: 170px; }
}
@media (max-width: 600px) {
  .top { gap: 10px 12px; padding: 14px 0 10px; }
  .brand { font-size: 19px; }
  .modes { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .modes::-webkit-scrollbar { display: none; }
  .modes a { flex: 1 0 auto; text-align: center; padding: 7px 9px; font-size: 14.5px; white-space: nowrap; }
  .top-tools { gap: 6px; }
  .top-tools .btn { padding: 7px 10px; font-size: 14px; }
  .head h1 { font-size: 30px; }
  .spread .btn span { display: none; }
  .spread .btn { padding: 9px 11px; }
  .sum { padding: 16px; }
  .acts .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .draw-acts .btn.big { flex: 1 1 100%; }
  .win strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .pad::before, .pad::after, .stage, .rail > .card, .sum, .win.new, .pad .pad-big { animation: none !important; }
  .btn { transition: none; }
}
@page { margin: 0.4in; }
@media print {
  body { background: #FFFFFF; color: #000000; font-size: 12pt; }
  body::before, body::after, .toast, .burst { display: none !important; }
  body.printing .shell { display: none !important; }
  body.printing .print-area { display: block; }
  .sheet { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000; }
  .sheet h1 { font-size: 20pt; margin: 0 0 6pt; }
  .sheet p { margin: 0 0 10pt; }
  .sheet table { border-collapse: collapse; width: 100%; }
  .sheet th, .sheet td { border: 1px solid #000000; padding: 5pt 8pt; text-align: left; }
  .sheet tr.void td { color: #666666; text-decoration: line-through; }
  .sheet .foot-line { margin-top: 12pt; font-size: 9pt; color: #444444; }
  .print-area .tpage { height: 9.75in; break-after: page; page-break-after: always; break-inside: avoid; }
  .print-area .tpage:last-child { break-after: auto; page-break-after: auto; }
  .print-area .tk { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
