/* bubak.online: the game's three-ink linocut look on a page.
   Black ink ground, cream paper, pumpkin orange; misregistered offset shadows
   instead of glossy depth. Nothing perfectly straight, nothing glowing. */
:root {
  --ink: #14110f;
  --ink-2: #221c18;
  --ink-3: #3a302a;
  --paper: #efe3cc;
  --paper-hi: #f8f1e3;
  --paper-dim: #b8aa92;
  --pumpkin: #f26b1d;
  --pumpkin-deep: #b9460c;
  --display: "Rubik Dirt", "Rubik", "Arial Black", system-ui, sans-serif;
  --ui: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gut: max(18px, env(safe-area-inset-left, 0px));
  --sec: clamp(72px, 9vw, 112px);   /* vertical padding of every section */
  --stack: clamp(36px, 4.5vw, 52px); /* heading block to section content */
  --rad: 6px;                         /* one corner radius for cards, tickets, panels */
  --r-sm: 4px;                       /* buttons and small controls */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1.0625rem/1.55 var(--ui); overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--display); line-height: 1; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* paper grain over everything, faint on black */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .13; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- buttons: pressed into the paper on hover ---------- */
.btn {
  --sh: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: 2px solid var(--ink); border-radius: var(--r-sm);
  background: var(--pumpkin); color: var(--ink); text-decoration: none; text-align: center;
  font: 700 1.125rem/1.15 var(--ui); cursor: pointer;
  box-shadow: var(--sh) var(--sh) 0 var(--paper);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--paper); }
.btn:active { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--paper); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: var(--sh) var(--sh) 0 var(--pumpkin); }
.btn.ghost:hover { box-shadow: 3px 3px 0 var(--pumpkin); }
.btn.ghost:active { box-shadow: 0 0 0 var(--pumpkin); }
.paperbg .btn:not(.ghost) { box-shadow: var(--sh) var(--sh) 0 var(--ink); }
.paperbg .btn:not(.ghost):hover { box-shadow: 3px 3px 0 var(--ink); }
.btn:focus-visible, .link:focus-visible, button:focus-visible { outline: 3px solid var(--pumpkin); outline-offset: 3px; }
.link { color: var(--paper); text-decoration-color: var(--pumpkin); text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 700; }
.micro { font-size: .875rem; color: var(--paper-dim); letter-spacing: .01em; text-wrap: balance; }

/* ---------- 0. top strip ---------- */
.strip {
  position: relative; background: var(--ink-2); border-bottom: 1px solid var(--ink-3);
  text-align: center; font-size: .9rem; line-height: 1.4; padding: 9px 48px; color: var(--paper); text-wrap: balance;
}
.strip b { font-family: var(--display); font-weight: 400; color: var(--pumpkin); font-size: 1.15rem; line-height: 1; }
.strip button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: none; border: 0; cursor: pointer; color: var(--paper-dim); font-size: 1.2rem; line-height: 1; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; background: rgba(20,17,15,.92);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid rgba(58,48,42,.6);
}
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; height: 64px; }
.top .end { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.6rem/1 var(--display); justify-self: start; }
.logo img { width: 38px; height: 38px; border-radius: 9px; }
.nav { display: flex; gap: 28px; justify-content: center; font-weight: 700; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--paper-dim); padding: 6px 0; transition: color .15s; }
.nav a:hover { color: var(--paper); }
.lang { display: inline-grid; place-items: center; min-width: 38px; height: 34px; font-weight: 700; font-size: .85rem; color: var(--paper-dim); text-decoration: none; border: 1px solid var(--ink-3); border-radius: var(--r-sm); }
.lang:hover { color: var(--paper); border-color: var(--paper-dim); }
.langs { position: relative; }
.langs > summary { list-style: none; cursor: pointer; }
.langs > summary::-webkit-details-marker { display: none; }
.langs[open] > summary { color: var(--paper); border-color: var(--pumpkin); }
.langs-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 160px; padding: 6px;
  display: grid; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.langs-list a { padding: 9px 12px; border-radius: var(--r-sm); color: var(--paper-dim); text-decoration: none; font-weight: 700; font-size: .92rem; }
.langs-list a:hover { color: var(--paper); background: rgba(255, 255, 255, .05); }
.langs-list a[aria-current] { color: var(--pumpkin); }
.top .btn { min-height: 40px; padding: 0 16px; font-size: .95rem; --sh: 4px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .12s, box-shadow .12s; }
.top.past .btn { opacity: 1; pointer-events: auto; }
@media (max-width: 760px) { .nav, .top .btn { display: none; } .top .wrap { grid-template-columns: 1fr auto; height: 60px; } }

/* ---------- 1. hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: .98; }
.hero h1 .w { display: inline-block; position: relative; }
.hero .wrap > div:first-child { text-align: center; }
.hero .sub { margin: 24px auto 0; font-size: 1.25rem; max-width: 32ch; color: var(--paper); text-wrap: balance; }
.hero .cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; }
.hero .micro { margin-top: 20px; }
.stage { position: relative; aspect-ratio: 1 / 1; max-width: 460px; justify-self: center; width: 100%; }
.stage .card {
  position: absolute; width: 44%; aspect-ratio: 2 / 3; border-radius: var(--rad); overflow: hidden;
  border: 6px solid var(--paper); box-shadow: 7px 7px 0 var(--pumpkin); background: var(--paper);
}
.stage .card img { width: 100%; height: 100%; object-fit: cover; }
.stage .c1 { left: 2%; top: 12%; transform: rotate(-11deg); }
.stage .c2 { left: 28%; top: 2%; transform: rotate(-2deg); z-index: 2; }
.stage .c3 { right: 0; top: 14%; transform: rotate(9deg); }
/* Bubák reaches out of his icon and bites the slip; the word on it is plain text,
   so the same picture works in every language. The wide slip's middle is at about 44 % / 74 %;
   the paw may cover the end of the word, people read it anyway. */
.mascot { position: absolute; left: 50%; bottom: -8%; width: 74%; transform: translateX(-46%); z-index: 4; }
.mascot img { width: 100%; filter: drop-shadow(7px 7px 0 rgba(239,227,204,.9)); }
.nuda {
  position: absolute; left: 44.5%; top: 74.5%; transform: translate(-50%, -50%) rotate(-7deg);
  font: 400 clamp(1.8rem, 4.4vw, 3.3rem)/1 var(--display); color: var(--ink); letter-spacing: .04em; white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .stage .card { display: none; }
  .stage { order: -1; aspect-ratio: 1 / 1; max-width: 300px; }
  .mascot { width: 100%; left: 50%; bottom: auto; top: 0; transform: translateX(-50%); }
  .nuda { font-size: clamp(1.8rem, 10vw, 3rem); }
  .hero .sub { font-size: 1.15rem; }
}

/* ---------- sections ---------- */
section { padding: var(--sec) 0; position: relative; }
.h2 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); max-width: 19ch; margin-inline: auto; text-align: center; }
/* a short hand-cut stroke under every section heading */
main section .h2::after {
  content: ""; display: block; width: 72px; height: 10px; margin: 20px auto 0;
  background: var(--pumpkin);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'><path d='M2 6.5C10 2.5 16 8.5 24 5S38 2 46 5.5 60 8 70 3.5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'><path d='M2 6.5C10 2.5 16 8.5 24 5S38 2 46 5.5 60 8 70 3.5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round'/></svg>") center / contain no-repeat;
}
.lead { margin: 20px auto 0; font-size: 1.15rem; max-width: 50ch; color: var(--paper); text-align: center; text-wrap: pretty; }
.paperbg { background: var(--paper); color: var(--ink); }
.paperbg .lead, .paperbg p { color: var(--ink); }
.paperbg .micro { color: #6b5d48; }
.paperbg .link { color: var(--ink); }
.paperbg .btn.ghost { color: var(--ink); border-color: var(--ink); }

/* torn paper edges where a light section meets the black ones */
.paperbg::before, .paperbg::after, .levels::before, .levels::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px; z-index: 1; pointer-events: none;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 12' preserveAspectRatio='none'><path d='M0 12V7l4-3 5 2 4-4 6 3 3-2 5 4 4-3 6 2 4-4 5 3 4-1 6 3v5z'/></svg>") 0 0 / 60px 12px repeat-x;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 12' preserveAspectRatio='none'><path d='M0 12V7l4-3 5 2 4-4 6 3 3-2 5 4 4-3 6 2 4-4 5 3 4-1 6 3v5z'/></svg>") 0 0 / 60px 12px repeat-x;
}
.paperbg::before, .levels::before { top: -11px; }
.paperbg::after, .levels::after { bottom: -11px; transform: scaleY(-1); }

/* two black sections in a row: a tighter gap and a small printer's ornament between them */
main section:not(.paperbg, .levels) + section:not(.paperbg, .levels) { padding-top: calc(var(--sec) * .75); }
main section:not(.paperbg, .levels) + section:not(.paperbg, .levels)::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 180px; height: 14px; transform: translate(-50%, -50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 14'><path d='M0 7h70M110 7h70' stroke='%233a302a' stroke-width='2'/><path d='M90 1l6 6-6 6-6-6z' fill='%23f26b1d'/><path d='M76 7l3-3 3 3-3 3zM98 7l3-3 3 3-3 3z' fill='%233a302a'/></svg>") center / contain no-repeat;
}

/* ---------- 2. photo prints on a string ---------- */
.prints { padding-bottom: calc(var(--sec) * .8); }
.reel {
  --pw: clamp(232px, 27vw, 320px);
  margin-top: calc(var(--stack) - 16px); display: flex; gap: clamp(24px, 3vw, 40px); overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain;
  /* room above for the tape and below for the polaroid strip, its shadow and the sway */
  padding: 40px calc(50vw - var(--pw) / 2) 72px;
}
.reel::-webkit-scrollbar { display: none; }
.reel.drag { cursor: grabbing; scroll-snap-type: none; }
.print {
  flex: 0 0 var(--pw); scroll-snap-align: center; position: relative;
  background: var(--paper-hi); color: var(--ink);
  /* a real instant print: thin even sides, the thick strip at the bottom left empty */
  padding: 5% 5% 22%; border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06) inset, 0 18px 28px -6px rgba(0,0,0,.6), 0 3px 6px rgba(0,0,0,.35);
  transform-origin: 50% -20px; transform: rotate(var(--r, 0deg)); transition: transform .5s ease;
  animation: sway var(--t, 6s) ease-in-out var(--d, 0s) infinite alternate;
}
.print::before { /* a strip of tape */
  content: ""; position: absolute; top: -15px; left: 50%; width: 82px; height: 28px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(239,227,204,.72); box-shadow: 0 1px 2px rgba(0,0,0,.25);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent 0);
}
.print::after { /* the faint paper texture of the strip */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(0,0,0,.04));
}
.print img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; box-shadow: 0 0 0 1px rgba(20,17,15,.12); }
.print.on { animation-play-state: paused; transform: rotate(0deg) scale(1.03); }
@keyframes sway { from { transform: rotate(calc(var(--r, 0deg) - 1.4deg)); } to { transform: rotate(calc(var(--r, 0deg) + 1.4deg)); } }
.reel-nav { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: -8px; }
.reel-nav button {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: var(--ink); color: var(--paper);
  border: 2px solid var(--paper); border-radius: var(--r-sm); cursor: pointer; box-shadow: 4px 4px 0 var(--pumpkin);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.reel-nav button svg { width: 22px; height: 22px; display: block; }
.reel-nav .prev svg { transform: scaleX(-1); }
.reel-nav button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--pumpkin); }
.reel-nav button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--pumpkin); }
.dots { display: flex; gap: 8px; align-items: center; padding: 0 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); transition: background .25s, transform .25s; }
.dots i.on { background: var(--pumpkin); transform: scale(1.35); }
.ai-note { text-align: center; margin-top: 22px; }

/* ---------- 3. steps dealt onto the table ---------- */
.steps { margin-top: var(--stack); display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step {
  background: var(--paper-hi); color: var(--ink); padding: 30px 26px 32px; border-radius: var(--rad);
  border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--pumpkin); transform: rotate(var(--r)); text-align: center;
}
.step .n { font: 400 3.4rem/1 var(--display); color: var(--pumpkin); -webkit-text-stroke: 1px var(--ink); }
.step h3 { font: 900 1.35rem/1.2 var(--ui); margin: 12px 0 8px; }
.step p { text-wrap: balance; }
.steps-cta { margin-top: var(--stack); display: flex; flex-direction: column; gap: 18px; align-items: center; text-align: center; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; gap: 26px; } }

/* ---------- 4. game cards that flip ---------- */
.cards-head { display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; }
.deck {
  --cols: 5; --gx: 26px;
  margin-top: var(--stack); display: flex; flex-wrap: wrap; justify-content: center; gap: 34px var(--gx);
}
.gcard {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gx)) / var(--cols)); max-width: 196px;
  perspective: 1000px; background: none; border: 0; padding: 0; cursor: pointer; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.gcard .in { position: relative; display: block; aspect-ratio: 2 / 3; transition: transform .6s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.gcard.flip .in { transform: rotateY(180deg); }
.gcard .face, .gcard .back {
  position: absolute; inset: 0; border-radius: var(--rad); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 5px solid var(--paper); box-shadow: 6px 6px 0 var(--pumpkin); background: var(--paper);
}
.gcard .face img { width: 100%; height: 100%; object-fit: cover; }
.gcard .back {
  transform: rotateY(180deg); color: var(--ink); background: var(--paper-hi);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 22px 16px; gap: 0; overflow-wrap: break-word;
}
.gcard .back::before { /* a thin printed frame, like the reverse of a playing card */
  content: ""; position: absolute; inset: 7px; border: 1.5px solid var(--ink); border-radius: 3px; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--paper-hi), inset 0 0 0 4px rgba(242,107,29,.55);
}
.gcard .back b { font: 400 1.4rem/1.04 var(--display); text-wrap: balance; }
.gcard .back b::after { /* small diamond between title and line */
  content: ""; display: block; width: 8px; height: 8px; margin: 12px auto; background: var(--pumpkin); transform: rotate(45deg);
}
.gcard .back span { font-size: .92rem; line-height: 1.35; font-weight: 500; text-wrap: balance; max-width: 15ch; }
.gcard .nm { display: block; margin-top: 16px; font-weight: 700; font-size: .98rem; line-height: 1.25; text-align: center; text-wrap: balance; }
@media (hover: hover) {
  .gcard:hover .in { transform: translateY(-5px) rotate(-1deg); }
  .gcard.flip:hover .in { transform: rotateY(180deg) translateY(-5px) rotate(1deg); }
}
.deck .more { display: none; }
.deck.all .more { display: block; }
.deck-actions { margin-top: var(--stack); display: flex; flex-wrap: wrap; gap: 20px 26px; align-items: center; justify-content: center; }
@media (max-width: 1000px) { .deck { --cols: 3; } .gcard { max-width: 220px; } }

/* random card */
.drawn {
  margin: 34px auto 0; max-width: 520px; background: var(--paper-hi); color: var(--ink); border-radius: var(--rad); padding: 24px 28px; text-align: center;
  border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--pumpkin); transform: rotate(-1.2deg);
}
.drawn .lv { font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--pumpkin-deep); }
.drawn q { display: block; font: 700 1.3rem/1.35 var(--ui); margin-top: 8px; quotes: "„" "“"; text-wrap: balance; }
.drawn .micro { margin-top: 14px; color: #6b5d48; }
.drawn.shake { animation: shake .45s ease-in-out 1; }
@keyframes shake { 0%,100% { transform: rotate(-1.2deg); } 25% { transform: rotate(1.8deg) translateX(-4px); } 60% { transform: rotate(-2.6deg) translateX(3px); } }

/* ---------- 5. levels ---------- */
.levels { transition: background-color .6s, color .6s; }
.levels[data-lv="mierne"] { background-color: var(--paper); color: var(--ink); }
.levels[data-lv="pikantne"] { background-color: #f1c49c; color: var(--ink); }
.levels[data-lv="peklo"] { background-color: var(--ink); color: var(--paper); }
.lv-grid { margin: var(--stack) auto 0; max-width: 880px; display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: center; }
.lv-bub { width: 100%; max-width: 260px; justify-self: center; transition: filter .5s, transform .5s; }
.lv-bub img { border-radius: 22%; box-shadow: 8px 8px 0 var(--ink); }
.levels[data-lv="peklo"] .lv-bub img { box-shadow: 8px 8px 0 var(--pumpkin); }
.levels[data-lv="mierne"] .lv-bub { transform: rotate(-3deg); filter: saturate(.75); }
.levels[data-lv="pikantne"] .lv-bub { transform: rotate(4deg) scale(1.03); filter: saturate(1.3); }
.levels[data-lv="peklo"] .lv-bub { transform: rotate(-6deg) scale(1.08); filter: saturate(1.8) contrast(1.15) hue-rotate(-12deg); }
.lv-bub.jolt { animation: jolt .4s ease-in-out 1; }
@keyframes jolt { 30% { translate: -6px 2px; } 60% { translate: 5px -2px; } }
.seg { display: inline-flex; border: 2px solid currentColor; border-radius: var(--r-sm); overflow: hidden; }
.seg button { background: none; border: 0; padding: 14px 24px; font-weight: 900; cursor: pointer; color: inherit; }
.seg button + button { border-left: 2px solid currentColor; }
.seg button[aria-pressed="true"] { background: var(--pumpkin); color: var(--ink); }
.lv-text { margin-top: 26px; min-height: 9.5em; }
.lv-text .what { font-size: 1.2rem; font-weight: 700; text-wrap: balance; }
.lv-text .ex { margin-top: 16px; font: 700 1.3rem/1.4 var(--ui); max-width: 38ch; text-wrap: balance; }
.lv-text .ex::before { content: attr(data-l); display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.levels .lv-micro { color: inherit; opacity: .75; }
@media (max-width: 820px) {
  .lv-grid { grid-template-columns: 1fr; gap: 34px; text-align: center; justify-items: center; }
  .lv-bub { max-width: 170px; }
  .lv-text .ex { margin-inline: auto; }
  .seg button { padding: 13px 18px; }
}

/* ---------- 6. house rules: a pinned sheet ---------- */
.rules-sheet {
  margin: var(--stack) auto 0; max-width: 640px; background: var(--paper); color: var(--ink); padding: 44px 40px 36px;
  border-radius: var(--rad); box-shadow: 9px 9px 0 var(--pumpkin); transform: rotate(-1deg); position: relative;
}
.rules-sheet::before { /* pin */
  content: ""; position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffa46b, var(--pumpkin) 45%, var(--pumpkin-deep)); box-shadow: 2px 3px 0 rgba(0,0,0,.35); transform: translateX(-50%);
}
.rules-sheet ol { margin: 0; padding-left: 1.5em; display: grid; gap: 18px; }
.rules-sheet li { padding-left: .2em; }
.rules-sheet li::marker { font: 400 1.4rem var(--display); color: var(--pumpkin-deep); }
.rules-sheet b { font-weight: 900; }
@media (max-width: 520px) { .rules-sheet { padding: 40px 24px 28px; } }

/* ---------- 8. install ---------- */
.tabs { margin: var(--stack) auto 0; display: flex; justify-content: center; gap: 14px; }
.tabs button { min-width: 128px; background: none; border: 2px solid var(--paper); border-radius: var(--r-sm); padding: 12px 22px; font-weight: 900; cursor: pointer; transition: box-shadow .15s; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--pumpkin); }
.how { margin: 30px auto 0; max-width: 780px; display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: stretch; }
.how > div:first-child { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--rad); padding: 28px 30px 30px; }
.how ol { margin: 0; padding-left: 1.4em; display: grid; gap: 12px; font-size: 1.1rem; }
.how ol li { padding-left: .2em; }
.how ol li::marker { font-weight: 900; color: var(--pumpkin); }
.how .micro { margin-top: 16px; }
.how-btn { margin-top: 26px; }
.share-ico { display: inline-block; width: 1.05em; height: 1.2em; vertical-align: -0.2em; margin: 0 2px; }
.qr { align-self: center; background: var(--paper); padding: 16px; border-radius: var(--rad); box-shadow: 6px 6px 0 var(--pumpkin); width: 200px; transform: rotate(1.5deg); }
.qr [data-qr] { aspect-ratio: 1; }
.qr p { color: var(--ink); font-size: .85rem; line-height: 1.35; margin-top: 10px; font-weight: 700; text-align: center; text-wrap: balance; }
@media (max-width: 760px) {
  .how { grid-template-columns: 1fr; }
  .how > div:first-child { padding: 24px 20px 26px; }
  .how-btn { text-align: center; }
  .qr { display: none; }
}

/* ---------- 9. price: two tickets ---------- */
.tickets { margin: var(--stack) auto 0; max-width: 940px; display: grid; grid-template-columns: 1fr 1.12fr; gap: 34px; align-items: center; }
.ticket {
  --notch: var(--paper); /* the section colour shows through the notches */
  position: relative; background: var(--paper-hi); color: var(--ink); padding: 32px var(--px, 30px) 30px; border-radius: var(--rad);
  border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--ink);
}
.ticket .tear { /* the perforation, with a notch bitten out of each edge */
  position: relative; margin: 26px calc(-1 * var(--px, 30px)) 26px; border-top: 2px dashed rgba(20,17,15,.32);
}
.ticket .tear::before, .ticket .tear::after {
  content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--notch); border: 2px solid var(--ink);
}
.ticket .tear::before { left: -14px; clip-path: inset(0 0 0 50%); }
.ticket .tear::after { right: -14px; clip-path: inset(0 50% 0 0); }
.ticket.big { box-shadow: 10px 10px 0 var(--pumpkin); transform: rotate(.8deg); padding-block: 40px 36px; }
.ticket .kind { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 900; color: #6b5d48; }
.ticket .price { font: 400 clamp(2.8rem, 6vw, 3.6rem)/1 var(--display); margin: 12px 0 0; white-space: nowrap; }
.ticket .price small { font: 700 1rem var(--ui); margin-left: 4px; }
.ticket ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 9px; }
.ticket li { padding-left: 24px; position: relative; }
.ticket li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; background: var(--pumpkin); transform: rotate(45deg); }
.ticket .btn { width: 100%; }
.ticket:not(.big) .btn { box-shadow: var(--sh) var(--sh) 0 var(--pumpkin); }
.ticket .tag { position: absolute; top: 18px; right: 20px; background: var(--ink); color: var(--paper); font-weight: 900; font-size: .8rem; padding: 6px 11px; border-radius: 2px; transform: rotate(4deg); }
.price-micro { margin-top: 34px; text-align: center; }
.calc { margin-top: 30px; display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 16px; font-size: 1.2rem; white-space: nowrap; }
.calc-row { display: flex; align-items: center; gap: 12px; }
.calc .n { font: 400 2.2rem/1 var(--display); min-width: 1.4em; text-align: center; }
.calc button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none; border: 2px solid var(--ink); background: var(--paper-hi); border-radius: var(--r-sm); font: 900 1.4rem/1 var(--ui); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.calc button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.calc-out { margin: 16px auto 0; font-size: 1.15rem; text-align: center; max-width: 76ch; text-wrap: pretty; }
.calc-out b { font: 400 1.6rem/1 var(--display); color: var(--pumpkin-deep); }
.reprint { animation: reprint .35s ease-out 1; }
@keyframes reprint { 0% { text-shadow: 4px 2px 0 var(--pumpkin); } 100% { text-shadow: 0 0 0 transparent; } }
@media (max-width: 760px) {
  .tickets { grid-template-columns: 1fr; max-width: 460px; gap: 40px; }
  .ticket { --px: 22px; padding-block: 28px 24px; }
  .ticket.big { padding-block: 34px 28px; transform: rotate(.5deg); }
  .calc { font-size: 1.05rem; gap: 12px; }
  .calc-row { gap: 8px; }
}

/* ---------- 10. FAQ ---------- */
.faq { margin: var(--stack) auto 0; max-width: 760px; display: grid; gap: 12px; }
.faq-micro { margin-top: 30px; text-align: center; }
.faq details { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--rad); transition: border-color .2s; }
.faq details[open] { border-color: #5a4a3f; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.1rem; line-height: 1.3; display: flex; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff8ea; }
.faq summary .eye { flex: none; width: 22px; height: 12px; border-radius: 50%; background: var(--paper); position: relative; transform: scaleY(.16); transition: transform .25s; }
.faq summary .eye::after { content: ""; position: absolute; left: 7px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity .2s; }
.faq details[open] summary .eye { transform: scaleY(1); }
.faq details[open] summary .eye::after { opacity: 1; }
.faq details p { padding: 0 22px 20px 58px; color: var(--paper-dim); text-wrap: pretty; }
@media (max-width: 520px) { .faq summary { padding: 16px 18px; font-size: 1.02rem; } .faq details p { padding: 0 18px 18px 54px; } }

/* ---------- 11. last call ---------- */
.last { background: var(--ink); overflow: hidden; padding-bottom: 0; text-align: center; }
.last .wrap { display: flex; flex-direction: column; align-items: center; }
.last .h2 { max-width: 14ch; }
.last .cta { margin: 34px 0 56px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.peek { width: clamp(170px, 20vw, 240px); transform: translateY(46%); transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.peek.in { transform: translateY(14%); }
.peek img { border-radius: 22% 22% 0 0; box-shadow: 8px 0 0 var(--pumpkin); }

/* ---------- 12. footer ---------- */
footer { position: relative; z-index: 2; background: #0d0b0a; border-top: 2px solid var(--pumpkin); padding: 48px 0 56px; font-size: .95rem; color: var(--paper-dim); text-align: center; }
footer .wrap { display: flex; flex-direction: column; align-items: center; }
footer .tagline { margin-top: 10px; }
footer .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 22px; }
footer a { color: var(--paper); text-decoration-color: var(--pumpkin); text-underline-offset: 4px; }
footer .logo { justify-self: auto; }
footer .co { margin-top: 24px; font-size: .85rem; line-height: 1.6; max-width: 70ch; text-wrap: balance; }
footer .joke { margin-top: 14px; font-size: .8rem; opacity: .7; }
@media (max-width: 760px) { footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } footer .row { flex-direction: column; gap: 12px; } }

/* ---------- sticky thumb CTA (mobile) ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; align-items: center; gap: 12px;
  padding: 10px calc(var(--gut) + 6px) max(12px, env(safe-area-inset-bottom, 0px)) var(--gut);
  background: rgba(20,17,15,.96); border-top: 1px solid var(--ink-3);
  transform: translateY(110%); transition: transform .3s ease;
}
.sticky img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.sticky .btn { flex: 1; min-height: 48px; --sh: 4px; }
.sticky.show { transform: none; }
@media (max-width: 760px) { .sticky { display: flex; } }

/* ---------- reveals: dealt cards, ghosts, printed words ---------- */
.js .ghost { opacity: 0; filter: blur(8px); transition: opacity .9s ease, filter .9s ease; }
.js .ghost.seen { opacity: 1; filter: none; }
.js .deal { opacity: 0; transform: translate(-70px, 24px) rotate(-14deg); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.25,1); }
.js .deal.seen { opacity: 1; transform: rotate(var(--r, 0deg)); }
.js .drop { opacity: 0; transform: translateY(-30px) rotate(var(--r, 0deg)); transition: opacity .4s, transform .5s cubic-bezier(.3,1.4,.5,1); }
.js .drop.seen { opacity: 1; transform: rotate(var(--r, 0deg)); }
.js .hero h1 .w { opacity: 0; transform: translateY(-14px); text-shadow: 6px 3px 0 var(--pumpkin); transition: opacity .25s, transform .3s, text-shadow .45s .25s; }
.js .hero h1 .w.seen { opacity: 1; transform: none; text-shadow: 3px 2px 0 var(--pumpkin); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .ghost, .js .deal, .js .drop, .js .hero h1 .w { opacity: 1 !important; filter: none !important; }
  .js .hero h1 .w { transform: none !important; }
}

/* ---------- legal pages and 404 ---------- */
.doc { padding: 48px 0 100px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 8px; }
.doc h2 { font: 900 1.3rem/1.3 var(--ui); margin: 34px 0 10px; color: var(--pumpkin); }
.doc h3 { font: 700 1.1rem/1.3 var(--ui); margin: 22px 0 8px; }
.doc p, .doc li { color: var(--paper); }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
.doc td, .doc th { border: 1px solid var(--ink-3); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc hr { border: 0; border-top: 1px solid var(--ink-3); margin: 26px 0; }
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost img { width: 180px; margin: 0 auto 26px; border-radius: 22%; box-shadow: 7px 7px 0 var(--pumpkin); transform: scale(1.12, .94); }

/* Phones: the game cards run sideways, about three at a time, instead of a long grid. */
@media (max-width: 760px) {
  .deck {
    display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 14px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
    margin-inline: calc(-1 * var(--gut)); padding: 8px var(--gut) 20px; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .deck::-webkit-scrollbar { display: none; }
  .deck .gcard, .deck .more { display: block; flex: 0 0 calc((100vw - 2 * var(--gut) - 28px) / 3.2); max-width: none; scroll-snap-align: start; }
  .deck::after { content: ""; flex: 0 0 1px; } /* keeps the right gutter when scrolled to the end */
  .gcard .face, .gcard .back { border-width: 3px; box-shadow: 4px 4px 0 var(--pumpkin); border-radius: var(--r-sm); }
  .gcard .back { padding: 10px 7px; }
  .gcard .back::before { inset: 4px; border-width: 1px; box-shadow: none; border-radius: 2px; }
  .gcard .back b { font-size: .9rem; line-height: 1.05; }
  .gcard .back b::after { width: 5px; height: 5px; margin: 7px auto; }
  .gcard .back span { font-size: .72rem; line-height: 1.28; max-width: none; }
  .gcard .nm { font-size: .8rem; margin-top: 10px; }
  [data-all] { display: none; }
}
