@font-face { font-family: "Griffy"; src: url("assets/fonts/Griffy.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("assets/fonts/PatrickHand.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #17111f; --bone: #e8dfc8; --night: #0d0814; --plum: #2b2238; --plum2: #3a2d4a;
  --pumpkin: #ff8a1e; --slime: #9dff6a; --blood: #b4232e; --gold: #e9b83a; --lilac: #b9a6ff; --mute: #a69db5;
  --title: "Griffy", "Luminari", "Papyrus", fantasy;
  --body: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;
  --wonk: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wonk2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--bone);
  font-family: var(--body); font-size: 18px; overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ------------------------------------------------------------ menus */
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui.ui-title, #ui.ui-hub, #ui.ui-results, #ui.ui-standings { background: radial-gradient(ellipse at 50% 30%, rgba(23,14,34,.62), rgba(8,4,14,.9)); pointer-events: auto; }
#ui.ui-ceremony { background: radial-gradient(ellipse at 50% 46%, rgba(8,4,14,0) 0 32%, rgba(8,4,14,.62) 100%); pointer-events: auto; } /* the procession is the show: leave the middle clear */
#screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  padding: calc(14px + var(--sat)) calc(16px + var(--sar)) calc(20px + var(--sab)) calc(16px + var(--sal)); }
.ui-none #screen { display: none; }
#modal { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px;
  background: rgba(8,4,14,.74); pointer-events: auto; overflow-y: auto; touch-action: pan-y; }
.has-modal #modal { display: flex; }

h1, h2, h3, h4 { font-family: var(--title); font-weight: 400; margin: 0; letter-spacing: .02em; }
h2 { font-size: clamp(34px, 6vw, 60px); text-align: center; text-shadow: 3px 4px 0 var(--ink); }
h2.gold { color: var(--gold); } h2.red { color: #ff5d5d; }
h3 { font-size: 28px; color: var(--bone); }
h4 { font-size: 22px; color: var(--pumpkin); }
p { margin: .35em 0; line-height: 1.25; }
small { color: var(--mute); display: block; font-size: 15px; line-height: 1.15; }
i { font-style: normal; color: var(--mute); }

.logo { display: inline-block; white-space: nowrap; }
.logo i { display: inline-block; color: var(--bone); font-style: normal;
  transform: translateY(calc(sin(var(--i) * 2.4) * .09em)) rotate(calc(sin(var(--i) * 1.7 + 1) * 7deg));
  text-shadow: .045em .06em 0 var(--ink), -.02em -.02em 0 var(--ink), .09em .12em 0 var(--blood); }
.logo i:nth-child(3n+1) { color: var(--pumpkin); }

.panel { background: linear-gradient(170deg, var(--plum2), var(--plum)); border: 3px solid var(--ink); border-radius: var(--wonk);
  box-shadow: 0 0 0 2px rgba(232,223,200,.22), 6px 8px 0 rgba(0,0,0,.45); }
.panel:nth-child(even) { border-radius: var(--wonk2); }

.btn { font: 400 20px var(--title); color: var(--ink); background: var(--bone); border: 3px solid var(--ink); border-radius: var(--wonk);
  padding: 7px 16px 6px; cursor: pointer; box-shadow: 3px 4px 0 var(--ink); transition: transform .08s; white-space: nowrap; touch-action: manipulation; }
.btn:nth-of-type(even) { border-radius: var(--wonk2); }
.btn:hover, .btn:focus-visible { background: var(--pumpkin); transform: translate(-1px, -2px) rotate(-1deg); outline: none; }
.btn:focus-visible, .tab:focus-visible, .swatch:focus-visible, .brand:focus-visible { outline: 3px dashed var(--slime); outline-offset: 3px; }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.big { font-size: 26px; padding: 10px 26px 8px; }
.btn.small { padding: 4px 12px; font-size: 20px; }
.btn.go { background: var(--slime); }
.btn.go:hover, .btn.go:focus-visible { background: #d7ff8a; }
.btn.danger { background: #d9737b; }
.btn.poor { background: #8d8794; color: #2b2238; }
.btn:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; transform: none; background: #8d8794; }
.cant { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
.cant small { color: #ff8f8f; white-space: nowrap; } .cant .money { color: inherit; font-size: 1em; }
.card > .cant { align-self: center; margin-top: 8px; } .card > .cant .btn { margin: 0; }
.sticker { font-size: 15px; color: var(--mute); text-align: center; margin: 4px 0 0; } .sticker .money { font-size: 1em; }
.btn.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px) rotate(-2deg); } 75% { transform: translateX(6px) rotate(2deg); } }
.btn .money { color: var(--ink); }
.money { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font-family: var(--title); white-space: nowrap; }
.tooth { width: .95em; height: .95em; flex: none; }

.menu { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 16px; }
.menu .btn { min-width: min(300px, 80vw); }

/* title */
.title { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.title h1 { font-size: clamp(54px, 15vw, 150px); line-height: .86; transform: rotate(-3deg); animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(-1.5deg) translateY(-6px); } }
.tagline { color: var(--mute); font-size: clamp(16px, 2.6vw, 22px); text-align: center; margin: 12px 0 0; }

/* hub */
.hub, .results { max-width: 1120px; margin: 0 auto; }
.bar { display: flex; align-items: center; gap: 12px; padding: 6px 14px; }
.brand { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--title); font-size: clamp(20px, 3.4vw, 34px); }
.who { margin-left: auto; display: flex; gap: clamp(8px, 2vw, 22px); align-items: baseline; font-size: clamp(18px, 2.6vw, 24px); }
.who .rank { font-family: var(--title); color: var(--c, var(--lilac)); display: inline-flex; align-items: baseline; gap: 6px; } .who .rank small { display: inline; } .who .rank .crest { align-self: center; }
.who .carname { color: var(--mute); }
.who .money { font-size: 1.2em; }
.tabs { display: flex; gap: 6px; margin: 14px 4px 0; flex-wrap: wrap; }
.tab { position: relative; font: 400 clamp(18px, 2.6vw, 24px) var(--title); color: var(--bone); background: var(--plum); border: 3px solid var(--ink); border-bottom: 0;
  border-radius: 18px 14px 0 0 / 22px 12px 0 0; padding: 6px clamp(10px, 2vw, 22px) 4px; cursor: pointer; flex: 1 1 auto; touch-action: manipulation; }
.tab:nth-child(odd) { transform: rotate(-1deg); } .tab:nth-child(even) { transform: rotate(1deg); }
.tab.on { background: repeating-linear-gradient(90deg, var(--bone) 0 12px, #cfc5ab 12px 24px); color: var(--ink); }
.tab em { position: absolute; top: -8px; right: 2px; font-style: normal; background: var(--blood); color: #fff; border: 2px solid var(--ink); border-radius: 50%; width: 22px; height: 22px; font-size: 15px; line-height: 18px; }
.tabbody { border-top: 6px solid var(--ink); padding-top: 14px;
  border-image: repeating-linear-gradient(90deg, var(--ink) 0 14px, var(--bone) 14px 28px) 6; }

.cards { display: grid; gap: 16px; align-items: start; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards.auto { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { padding: 14px 16px 16px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.cards > .card:nth-child(odd) { transform: rotate(-.5deg); } .cards > .card:nth-child(even) { transform: rotate(.5deg); }
.card .btn { align-self: center; margin-top: 8px; }
.blurb { color: #cfc7dc; font-size: 17px; min-height: 2.5em; }
.hint { color: var(--mute); font-size: 16px; }
.warn { color: #ffb03b; text-align: center; }
.meta { color: var(--mute); font-size: 16px; }
.wx { display: flex; align-items: center; gap: 7px; font-size: 16px; color: var(--mute); line-height: 1.15; min-height: 2.3em; }
.wx b { font-weight: 400; color: var(--bone); } .wx small { font-size: 15px; display: block; }
.wx.foul b { color: #bfe6ff; } .wx.foul .wxi { color: #bfe6ff; }
.wxi { width: 26px; height: 26px; flex: none; }
.haz { color: #bfe6ff; font-size: 15px; white-space: nowrap; }
.map { width: 100%; height: 124px; border: 3px solid var(--ink); border-radius: var(--wonk2); display: block; }
.prizes { font-size: 16px; color: var(--mute); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.marks { font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 1.2em; }
.marks .bounty { color: var(--gold); } .marks .revenge { color: #ff8f8f; } .marks .money { font-size: 1em; }
.carview { width: 100%; height: 118px; display: block; }
.carview.big { height: 210px; background: radial-gradient(ellipse at 50% 60%, rgba(232,223,200,.13), transparent 65%); }
.car.own { box-shadow: 0 0 0 3px var(--slime), 6px 8px 0 rgba(0,0,0,.45); }

.stats { display: grid; gap: 5px; margin: 6px 0; }
.stat { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 8px; font-size: 16px; color: var(--mute); }
.sbar { position: relative; height: 13px; background: var(--ink); border: 2px solid var(--ink); border-radius: 8px 3px 9px 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(232,223,200,.25); }
.sbar b { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(110deg, var(--pumpkin) 0 9px, #ffa64d 9px 18px); }
.sbar b.gain { background: rgba(232,223,200,.28); }
.sbar.hp b { background: repeating-linear-gradient(110deg, #8fd45a 0 9px, #a5e26f 9px 18px); }
.sbar.slim { height: 9px; margin-top: 5px; max-width: 220px; } .sbar.slim b { background: var(--blood); }
/* every bar is the same length, so that one gun's can be read against another's */
.wstats { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 5px; font-size: 14px; color: var(--mute); }
.wstats > div { display: grid; grid-template-columns: 52px 104px; align-items: center; gap: 6px; }
.wstats .sbar.slim { margin-top: 0; max-width: none; } .sbar.slim.rng b { background: var(--lilac); }
.uprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 2px dashed rgba(232,223,200,.2); }
.uprow > div { flex: 1; min-width: 0; }
.uprow b { font-family: var(--title); font-weight: 400; font-size: 22px; }
.uprow.eq b { color: var(--slime); }
.uprow .btn { margin: 0; flex: none; align-self: center; }
.pips { display: flex; gap: 5px; margin: 4px 0; }
.pips span { width: 22px; height: 11px; border: 2px solid var(--ink); background: #1d1626; border-radius: 6px 2px 7px 3px; box-shadow: 0 0 0 1px rgba(232,223,200,.25); }
.pips span.on { background: var(--slime); }
.maxed { font-family: var(--title); color: var(--slime); white-space: nowrap; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.about { margin-top: 8px; } .about span { color: var(--slime); } /* what the chosen trunk load does */
.btn.opt { font-size: 17px; padding: 3px 10px 2px; } .btn.opt.on { background: var(--slime); cursor: default; } span.btn.opt.on:hover { transform: none; } .btn.opt small { display: inline; color: inherit; opacity: .8; } .btn.opt .money { font-size: 1em; }
.marks .sup { color: var(--mute); margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } .marks .sup .btn { font-size: 15px; padding: 1px 9px; margin: 0; } .marks .sup i { color: #ff8f8f; }
.paints { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.swatch { width: 34px; height: 34px; border: 3px solid var(--ink); border-radius: 50% 44% 52% 46%; cursor: pointer; background: linear-gradient(135deg, var(--a) 0 58%, var(--b) 58%); box-shadow: 0 0 0 2px rgba(232,223,200,.25); }
.swatch.on { box-shadow: 0 0 0 3px var(--slime); transform: scale(1.12) rotate(-6deg); }
.swatch.locked { display: grid; place-items: center; cursor: not-allowed; opacity: .5; color: var(--ink); font-size: 17px; line-height: 1; } /* the champion's paint, until there is a champion */

table { width: 100%; border-collapse: collapse; font-size: 19px; }
td { padding: 4px 6px; border-bottom: 2px dashed rgba(232,223,200,.14); }
td.rk { width: 2em; font-family: var(--title); color: var(--mute); } td.pt { text-align: right; font-family: var(--title); } td.cr { color: var(--mute); font-size: 16px; }
tr.you td { color: var(--slime); background: rgba(157,255,106,.08); }
.chip { display: inline-block; width: 14px; height: 14px; border-radius: 50% 40% 50% 45%; background: var(--c); border: 2px solid var(--ink); margin-right: 8px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(232,223,200,.3); }
.take td:last-child { text-align: right; } .take .total td { font-family: var(--title); font-size: 26px; border-top: 4px double var(--bone); border-bottom: 0; }
td.gp { text-align: right; width: 2.4em; color: var(--gold); font-family: var(--title); }

/* leagues: crests, the season banner over the events, tables that re-sort themselves */
.crest { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.crest.big { width: 44px; height: 44px; }
.up { color: var(--slime); } .down { color: #ff8f8f; }
.league-bar { padding: 10px 14px; margin-bottom: 16px; box-shadow: 0 0 0 2px var(--c), 6px 8px 0 rgba(0,0,0,.45); }
.lb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-name { flex: 1 1 auto; min-width: 0; } .lb-name h3 { color: var(--c); line-height: 1.05; } .lb-name p { margin: 2px 0 0; }
.lb-aim { margin: 0; text-align: right; color: var(--mute); font-size: 16px; line-height: 1.2; }
.lb-aim b { font-family: var(--title); font-weight: 400; font-size: 24px; color: var(--bone); }
.pips.season { display: inline-flex; vertical-align: middle; margin: 0 0 0 6px; } .pips.season span { width: 16px; }
.pips.season span.on { background: var(--c, var(--slime)); } .pips.season span.next { background: rgba(232,223,200,.4); }
.strip { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.strip li { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; padding: 3px 7px; background: rgba(13,8,20,.45); border: 2px solid var(--ink); border-radius: 9px 5px 10px 6px; font-size: 15px; }
.strip li b { font-family: var(--title); font-weight: 400; color: var(--mute); } .strip li.in b { color: var(--gold); }
.strip .chip { margin-right: 2px; flex: none; } .strip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip em { font-style: normal; font-family: var(--title); font-size: 17px; }
.strip li.you { background: rgba(157,255,106,.16); color: var(--slime); border-color: var(--slime); }
.strip li.cut::after { content: ""; position: absolute; right: -6px; top: -4px; bottom: -4px; border-right: 3px dashed var(--gold); }
.league-bar .marks { min-height: 0; margin: 4px 0 0; }
.slum { margin-top: 14px; text-align: center; } .slum .btn { margin: 4px 2px; font-size: 17px; }

.lg { position: relative; height: calc(var(--n) * var(--rh)); --rh: 46px; margin: 6px 0; }
.lg-row { position: absolute; left: 0; right: 0; top: 0; height: var(--rh); transform: translateY(calc(var(--i) * var(--rh))); transition: transform .7s cubic-bezier(.3, 1.25, .5, 1);
  display: grid; grid-template-columns: 1.4em 2.1em auto 1fr 2.5em 2.3em; align-items: center; column-gap: 6px; padding: 0 8px; border-bottom: 2px dashed rgba(232,223,200,.14); font-size: 20px; }
.lg-row .chip { margin: 0; } .lg-row.you { background: rgba(157,255,106,.1); color: var(--slime); }
.lg-pos { font-family: var(--title); color: var(--mute); }
.lg-nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.05; } .lg-nm small { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.lg-pts { text-align: right; font-family: var(--title); font-size: 25px; }
.lg-gain { text-align: right; color: var(--gold); font-family: var(--title); opacity: 0; transform: scale(.3); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.lg-gain.on { opacity: 1; transform: none; }
.lg-mv { font-size: 15px; opacity: 0; transition: opacity .3s; white-space: nowrap; } .lg-mv.on { opacity: 1; } .lg-mv.up { color: var(--slime); } .lg-mv.down { color: #ff8f8f; }
.lg-row.bump .lg-pts { animation: bump .35s; } @keyframes bump { 40% { transform: scale(1.35); color: var(--gold); } }
.lg-cut { position: absolute; left: 0; right: 0; top: calc(var(--cut) * var(--rh) - 2px); border-top: 3px dashed var(--gold); pointer-events: none; }
.lg-cut span { position: absolute; right: 6px; top: -12px; background: var(--plum); color: var(--gold); font-size: 13px; line-height: 1; padding: 3px 6px; border-radius: 6px; }
.lg-title { display: flex; align-items: center; gap: 10px; color: var(--c); } h2.lg-title { justify-content: center; }

.standings { max-width: 640px; margin: 0 auto; padding-top: 1vh; text-align: center; }
.kicker { color: var(--mute); font-size: 18px; margin: 0; } .kicker b { font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--c); }
.standings .verdict, .standings .outlook { opacity: 0; transform: scale(.85); transition: opacity .35s, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.standings.told .verdict, .standings.told .outlook { opacity: 1; transform: none; }
.standings .verdict { margin: 0 0 6px; } .standings .menu { margin-top: 20px; }
.lg-card { text-align: left; padding: 4px 12px 6px; }
.outlook { font-size: 19px; margin: 10px 0 4px; } .outlook .money { font-size: 1.05em; }
.path { list-style: none; display: flex; justify-content: center; gap: 4px; margin: 8px 0 0; padding: 0; --w: 104px; }
.path li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: var(--w); font-size: 13px; line-height: 1.1; color: var(--mute); }
.path .crest { width: 30px; height: 30px; }
.path li.locked { opacity: .4; } .path li.locked .crest { stroke: var(--mute); }
.path li.now { color: var(--bone); } .path li.now .crest { transform: scale(1.3); filter: drop-shadow(0 0 5px var(--c)); }
.path li + li::before { content: ""; position: absolute; top: 14px; left: calc(18px - var(--w) / 2); width: calc(var(--w) - 40px); border-top: 3px dashed rgba(232,223,200,.25); }
.path li.done + li::before { border-color: var(--gold); }

.climb { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.climb li { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 10px 6px 11px 7px; background: rgba(13,8,20,.4); }
.climb .crest { width: 34px; height: 34px; } .climb li div { flex: 1; min-width: 0; } .climb b { font-family: var(--title); font-weight: 400; font-size: 21px; color: var(--c); }
.climb li.locked { opacity: .5; } .climb li.locked b { color: var(--mute); } .climb li.locked .crest { stroke: var(--mute); }
.climb li.now { box-shadow: 0 0 0 2px var(--c); background: rgba(13,8,20,.7); }
.climb .purse { display: flex; align-items: center; gap: 6px; } .climb .purse small { font-size: 13px; }
.lineup { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin: 10px 0; }
.lineup div { display: flex; flex-direction: column; align-items: center; } .lineup b { font-weight: 400; border-bottom: 3px solid var(--c); line-height: 1.15; } .lineup small { font-size: 13px; margin-top: 2px; }
.carview.mini { height: 64px; }
.crown { font-family: var(--title); font-size: 26px; color: var(--gold); text-align: center; animation: sway 2s ease-in-out infinite; }
.crown-line { font-family: var(--title); font-size: clamp(17px, 2.6vw, 22px); color: var(--gold); margin: 16px 0 0; text-shadow: 2px 2px 0 var(--ink); }
.def { font-family: var(--title); font-weight: 400; color: var(--gold); white-space: nowrap; }
em.new { font-style: normal; font-size: 13px; line-height: 1; color: var(--ink); background: var(--gold); border-radius: 6px 3px 7px 4px; padding: 1px 6px 2px; vertical-align: 1px; }
.bring { margin: 6px 0 2px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px 6px 11px 7px; background: rgba(13,8,20,.4); box-shadow: 0 0 0 2px rgba(233,184,58,.5); font-size: 16px; text-align: left; }
.bring p { margin: 0 0 4px; } .bring ul { margin: 0; padding-left: 20px; } .bring li { margin: 3px 0; line-height: 1.2; } .bring li b { font-weight: 400; color: var(--bone); }
.bring li::marker { content: "☠  "; color: var(--mute); } .tips.bring { box-shadow: none; padding: 4px 12px 4px 30px; }

/* cups: on the plaque at a lap of honour, and on the shelf in the League tab */
.cupart { display: block; overflow: visible; }
.cupart.mini { width: 30px; height: 42px; flex: none; margin: -6px 0 -4px; } .cupart.none { opacity: .35; }

/* the lap of honour: a title at the top, a plaque at the bottom, and the procession between them */
.ceremony { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 10px; text-align: center; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -22px; left: var(--x); width: 9px; height: 13px; background: var(--c); border: 1.5px solid var(--ink); border-radius: 2px; animation: fall var(--t) linear var(--d) infinite backwards; }
.confetti i:nth-child(3n) { width: 8px; height: 8px; border-radius: 50%; } .confetti i:nth-child(5n) { width: 14px; height: 6px; }
@keyframes fall { from { transform: translate3d(0, -4vh, 0) rotate(var(--r)); } to { transform: translate3d(var(--sx), 106vh, 0) rotate(calc(var(--r) + 560deg)); } }
.cer-head, .cer-foot { position: relative; z-index: 1; } .cer-foot { width: min(900px, 100%); }
.cer-head { padding: 0 12px; } .cer-head .kicker { text-shadow: 2px 2px 0 var(--ink); }
.cer-title { font-size: clamp(42px, 10vw, 112px); line-height: .95; margin: 2px 0 0; color: var(--gold); text-shadow: none; }
.cer-title span { display: inline-block; white-space: nowrap; }
.cer-title i { display: inline-block; font-style: normal; color: inherit; --r: calc(sin(var(--i) * 1.7 + 1) * 6deg);
  text-shadow: .045em .06em 0 var(--ink), -.02em -.02em 0 var(--ink), .09em .12em 0 var(--blood);
  transform: translateY(calc(sin(var(--i) * 2.4) * .06em)) rotate(var(--r)); animation: stamp .42s cubic-bezier(.3, 1.5, .5, 1) calc(var(--i) * 45ms + 120ms) backwards; }
@keyframes stamp { from { opacity: 0; transform: scale(3.4) rotate(calc(var(--r) - 18deg)); } }
.k-promoted .cer-title { color: #dfe6f0; }
.cer-sub { font-family: var(--title); font-size: clamp(20px, 3.6vw, 34px); color: var(--c); margin: 2px 0 0; text-shadow: 2px 3px 0 var(--ink); animation: rise .5s ease-out .9s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.plaque { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 18px; padding: 10px 18px 12px; text-align: left;
  box-shadow: 0 0 0 2px var(--c), 6px 8px 0 rgba(0,0,0,.45); animation: rise .55s cubic-bezier(.3, 1.3, .5, 1) 1s backwards; }
.plaque .btn { margin: 0; }
.cer-cup { position: relative; width: clamp(64px, 11vw, 104px); align-self: center; animation: drop .6s cubic-bezier(.3, 1.4, .5, 1) 1.15s backwards; }
@keyframes drop { from { opacity: 0; transform: translateY(-70vh) rotate(-24deg); } }
.cer-cup .cupart { position: relative; width: 100%; height: auto; filter: drop-shadow(3px 5px 0 rgba(0,0,0,.4)); }
.rays { position: absolute; left: 50%; top: 46%; width: 230%; aspect-ratio: 1; margin: -115% 0 0 -115%; border-radius: 50%; animation: spin 18s linear infinite;
  background: repeating-conic-gradient(rgba(242,194,48,.55) 0 9deg, rgba(242,194,48,0) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0 28%, transparent 68%); mask: radial-gradient(circle, #000 0 28%, transparent 68%); }
.k-promoted .rays { background: repeating-conic-gradient(rgba(223,230,240,.45) 0 9deg, rgba(223,230,240,0) 9deg 18deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.cer-body { min-width: 0; font-size: 17px; } .cer-body p { margin: 2px 0; line-height: 1.2; }
.cer-purse { font-family: var(--title); font-size: clamp(22px, 3.2vw, 30px); } .cer-purse .money { font-size: 1.25em; margin-left: 6px; } .cer-purse .count { font-weight: 400; display: inline-block; }
.cer-purse .count.landed { animation: bump .35s; }
.cer-line { color: var(--mute); } .cer-line b { font-weight: 400; color: var(--gold); }
.cer-next { color: #cfc7dc; } .cer-next b { font-weight: 400; color: var(--bone); } .cer-next .nx b { font-family: var(--title); font-size: 1.15em; color: var(--c); }
.roll { margin: 8px 0 0; overflow: hidden; white-space: nowrap; color: var(--mute); font-size: 15px; -webkit-mask: linear-gradient(90deg, transparent, #000 8% 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8% 92%, transparent); }
.roll span { display: inline-block; padding-left: 100%; animation: roll 46s linear 2.5s infinite backwards; }
@keyframes roll { to { transform: translateX(-100%); } }
.results { padding-top: 2vh; } .results .tagline { margin-bottom: 16px; }

/* modals */
.modal-box { width: min(680px, 100%); max-height: 100%; overflow-y: auto; padding: 18px 22px 22px; text-align: center; margin: auto; touch-action: pan-y; }
.settings { display: grid; gap: 12px; margin: 14px 0 18px; justify-items: center; }
.settings label { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; width: min(420px, 100%); text-align: left; }
.settings .btn { width: min(420px, 100%); white-space: normal; } a.btn { display: inline-block; text-align: center; text-decoration: none; }
.settings .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(420px, 100%); } .settings .pair .btn { width: auto; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 14px; background: var(--ink); border-radius: 9px 4px 10px 5px; border: 2px solid var(--ink); box-shadow: 0 0 0 1px rgba(232,223,200,.3); touch-action: pan-x; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50% 42% 52% 46%; background: var(--pumpkin); border: 3px solid var(--ink); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--pumpkin); border: 3px solid var(--ink); }
input[type=range]:focus-visible { outline: 3px dashed var(--slime); outline-offset: 4px; }
.help { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; text-align: left; margin: 12px 0; font-size: 16px; }
.help p { line-height: 1.55; } .help .wide { grid-column: 1 / -1; }
kbd { font: 14px var(--body); background: var(--bone); color: var(--ink); border: 2px solid var(--ink); border-radius: 5px 3px 6px 3px; padding: 0 5px; margin: 0 1px; box-shadow: 1px 2px 0 var(--ink); }
.tips { text-align: left; margin: 6px 0 16px; padding-left: 22px; font-size: 17px; } .tips li { margin: 3px 0; } .tips b, .modal-box p b { color: var(--pumpkin); font-weight: 400; }
.tips li::marker { content: "☠  "; color: var(--mute); }

/* the full game: the box that sells it, and the lines here and there that lead to it */
.gate { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: 8px 0 0; padding: 7px 12px; border: 2px solid var(--ink); border-radius: 10px 6px 11px 7px;
  background: rgba(13,8,20,.4); box-shadow: 0 0 0 2px rgba(157,255,106,.4); font-size: 16px; line-height: 1.2; color: #cfc7dc; text-align: left; }
.gate span { flex: 1 1 250px; } .gate .btn, .card .gate .btn { margin: 0 0 0 auto; flex: none; align-self: center; }
.owned { font-family: var(--title); color: var(--gold); font-size: 21px; margin: 0; }
.shopnote { color: #ffb03b; font-size: 16px; line-height: 1.2; margin: 0; min-height: 1.2em; } .shopnote .btn { margin-left: 6px; font-size: 16px; padding: 1px 10px; }
.settings .shopnote { width: min(420px, 100%); }
.fg { color: var(--mute); white-space: nowrap; } .cant small.fgnote { color: var(--mute); }
.modal-box.m-unlock { width: min(720px, 100%); }
.unlock { display: grid; gap: 12px; } .unlock h2 { font-size: clamp(32px, 5.4vw, 50px); }
.lead { font-size: 19px; margin: 4px 0 0; }
.rungs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.rungs li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 5px; text-align: center; border: 2px solid var(--ink); border-radius: 10px 6px 11px 7px; background: rgba(13,8,20,.45); box-shadow: 0 0 0 2px var(--c); }
.rungs .crest { width: 32px; height: 32px; } .rungs b { font-family: var(--title); font-weight: 400; font-size: 17px; line-height: 1.05; color: var(--c); }
.unlock .tips { margin: 10px 0 0; font-size: 16px; } .unlock .tips .money { font-size: 1em; }
.till { display: grid; gap: 9px; justify-items: center; } .till .btn.big { white-space: normal; }
.till .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(420px, 100%); } .till .pair .btn { white-space: normal; font-size: 18px; padding-left: 8px; padding-right: 8px; } .till .hint { margin: 0; font-size: 15px; }

/* ---------------------------------------------------- touch controls */
/* Everything here is anchored: nothing floats or follows the thumb. */
#touch { position: fixed; inset: 0; display: none; pointer-events: none; --u: clamp(54px, 17vmin, 92px);
  --px: calc(16px + var(--sar)); --py: calc(18px + var(--sab)); --gap: 14px; --sr: calc(var(--u) * 1.15); }
#touch.show { display: block; }
.t-left, .t-right { position: absolute; top: 22%; bottom: 0; pointer-events: auto; touch-action: none; }
.t-left { left: 0; width: 46%; } .t-right { right: 0; width: 52%; }

/* direction stick */
.t-stick { position: absolute; left: calc(20px + var(--sal)); bottom: calc(20px + var(--sab)); width: calc(var(--sr) * 2); height: calc(var(--sr) * 2);
  border-radius: 50%; border: 3px solid rgba(232,223,200,.45); background: radial-gradient(circle, rgba(23,17,31,.2) 0 22%, rgba(23,17,31,.55) 23% 100%); }
.t-stick.on { border-color: rgba(232,223,200,.9); }
.t-ring { position: absolute; inset: 17%; border-radius: 50%; border: 2px dashed rgba(232,223,200,.28); }
.t-stick::before, .t-stick::after { content: ""; position: absolute; background: rgba(232,223,200,.4); border-radius: 2px; }
.t-stick::before { left: 50%; top: 5%; width: 3px; height: 9%; margin-left: -1.5px; box-shadow: 0 calc(var(--sr) * 1.62) 0 rgba(232,223,200,.4); }
.t-stick::after { top: 50%; left: 5%; height: 3px; width: 9%; margin-top: -1.5px; box-shadow: calc(var(--sr) * 1.62) 0 0 rgba(232,223,200,.4); }
.t-knob { position: absolute; left: 50%; top: 50%; width: calc(var(--sr) * .8); height: calc(var(--sr) * .8); margin: calc(var(--sr) * -.4) 0 0 calc(var(--sr) * -.4);
  border-radius: 50%; background: rgba(232,223,200,.85); border: 3px solid var(--ink); box-shadow: 0 0 0 2px rgba(232,223,200,.3); }
/* left/right buttons (alternative) */
.t-pad { display: none; position: absolute; left: calc(18px + var(--sal)); bottom: calc(22px + var(--sab)); width: clamp(170px, 36vw, 320px); height: calc(var(--u) * 1.25);
  border-radius: 26px; border: 3px solid rgba(232,223,200,.45); background: rgba(23,17,31,.5); overflow: hidden; }
.t-tick { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: rgba(232,223,200,.45); }
.t-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: calc(var(--u) * .5); color: rgba(232,223,200,.8); }
.t-arrow.l { left: 19%; } .t-arrow.r { right: 19%; }
.t-pad[data-dir=l] { background: linear-gradient(90deg, rgba(255,138,30,.8) 50%, rgba(23,17,31,.5) 50%); }
.t-pad[data-dir=r] { background: linear-gradient(90deg, rgba(23,17,31,.5) 50%, rgba(255,138,30,.8) 50%); }
#touch[data-mode=buttons] .t-stick { display: none; } #touch[data-mode=buttons] .t-pad { display: block; }

/* action buttons */
.t-ctl { position: absolute; display: flex; align-items: center; justify-content: center; font: 400 calc(var(--u) * .25) var(--title); letter-spacing: .03em;
  color: var(--bone); background: rgba(23,17,31,.5); border: 3px solid rgba(232,223,200,.55); border-radius: 50%; pointer-events: none; }
.t-ctl.on { background: rgba(255,138,30,.82); color: var(--ink); transform: scale(.95); }
#touch.cold .t-fire, #touch.cold .t-item { opacity: .32; } /* guns and gadgets are locked off the line */
#touch.locked .t-fire { background: rgba(255,93,93,.45); box-shadow: 0 0 0 5px rgba(255,93,93,.4); } /* the guns have a lock */
.t-fire { right: var(--px); bottom: var(--py); width: calc(var(--u) * 1.5); height: calc(var(--u) * 1.5); font-size: calc(var(--u) * .34); border-color: rgba(255,93,93,.9); }
.t-brake { right: calc(var(--px) + var(--u) * 1.5 + var(--gap)); bottom: var(--py); width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); border-color: rgba(255,214,106,.85); }
.t-boost { right: calc(var(--px) + var(--u) * .2); bottom: calc(var(--py) + var(--u) * 1.5 + var(--gap)); width: calc(var(--u) * 1.05); height: calc(var(--u) * 1.05); border-color: rgba(157,255,106,.85); }
.t-item { right: calc(var(--px) + var(--u) * 1.4 + var(--gap)); bottom: calc(var(--py) + var(--u) * 1.3 + var(--gap)); width: calc(var(--u) * 1.05); height: calc(var(--u) * 1.05); border-color: rgba(185,166,255,.85); }
.t-item { flex-direction: column; gap: 0; line-height: 1; } .t-item.empty { opacity: .4; }
.t-item img { width: 58%; height: 58%; margin-top: -4%; pointer-events: none; } .t-item b { font-weight: 400; font-size: calc(var(--u) * .19); white-space: nowrap; margin-top: -6%; }
.t-swap { right: calc(var(--px) + var(--u) * 2.45 + var(--gap) * 2); bottom: calc(var(--py) + var(--u) * 1.5 + var(--gap)); width: calc(var(--u) * .72); height: calc(var(--u) * .72); border-color: rgba(185,166,255,.6); border-style: dashed; }
.t-swap img { width: 70%; height: 70%; pointer-events: none; } .t-ctl.hide { display: none; }
.t-pause { position: absolute; pointer-events: auto; touch-action: none; top: calc(8px + var(--sat)); left: 50%; margin-left: -22px; width: 44px; height: 44px; padding: 0;
  font: 400 16px var(--title); color: var(--bone); background: rgba(23,17,31,.5); border: 3px solid rgba(232,223,200,.55); border-radius: 50% 44% 52% 46%; }

@media (max-width: 700px) { .strip { grid-template-columns: repeat(3, 1fr); } .strip li.cut::after { display: none; } .lb-aim { text-align: left; } }
@media (max-width: 640px) { /* a phone held upright: the cup beside the words, the button under both */
  .plaque { grid-template-columns: auto 1fr; padding: 10px 14px 12px; } .plaque .btn.big { grid-column: 1 / -1; justify-self: center; margin-top: 4px; font-size: 21px; padding: 8px 16px 6px; }
  .cer-body { font-size: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .path { --w: 60px; } .path li span { display: none; } .path li.now span { display: block; white-space: nowrap; }
  .lg-row { font-size: 18px; } .lg { --rh: 42px; }
  .bar { flex-wrap: wrap; } .who { width: 100%; justify-content: space-between; order: 3; }
  .bar .btn.small { margin-left: auto; }
  .uprow { flex-wrap: wrap; } .btn { font-size: 18px; }
}
@media (max-height: 460px) {
  .title h1 { font-size: clamp(40px, 22vh, 110px); } .title .menu { flex-direction: row; flex-wrap: wrap; justify-content: center; } .title .menu .btn { min-width: 0; }
  .league-bar { padding: 6px 12px; margin-bottom: 12px; } .league-bar .crest.big { width: 34px; height: 34px; } .lb-name h3 { font-size: 24px; } .strip { margin-top: 5px; }
  /* a phone on its side: the table has to fit beside the verdict without scrolling */
  .standings { max-width: 880px; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto 1fr auto auto auto auto 1fr; column-gap: 18px; align-items: center; }
  .standings .kicker { grid-column: 1 / -1; grid-row: 1; } .standings .lg-card { grid-column: 1; grid-row: 2 / 8; }
  .standings .verdict { grid-column: 2; grid-row: 3; } .standings .outlook { grid-column: 2; grid-row: 4; } .standings .path { grid-column: 2; grid-row: 5; } .standings .menu { grid-column: 2; grid-row: 6; }
  .standings .lg { --rh: 38px; } .standings .verdict { font-size: clamp(28px, 5vw, 44px); }
  .standings .path { --w: 58px; } .standings .path li span { display: none; } .standings .menu { margin-top: 12px; }
  /* ...and the lap of honour has to leave room for the procession */
  .cer-title { font-size: clamp(32px, 15vh, 60px); } .cer-sub { font-size: clamp(17px, 6vh, 24px); margin: 0; } .cer-head .kicker { font-size: 15px; } .cer-head .kicker b { font-size: 18px; }
  .plaque { padding: 6px 14px 8px; gap: 2px 14px; } .cer-cup { width: 58px; } .cer-body { font-size: 15px; } .cer-purse { font-size: 20px; } .plaque .btn.big { font-size: 21px; padding: 7px 16px 6px; }
  .cer-line.opt, .roll { display: none; } .crown-line { margin-top: 8px; }
}
@media (min-width: 700px) and (max-height: 520px) { /* a phone on its side: what the full game is on the left, the till on the right */
  .modal-box.m-unlock { width: min(900px, 100%); padding: 10px 18px 12px; }
  .unlock { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 4px 22px; } .pitch { text-align: left; }
  .unlock h2 { text-align: left; font-size: 34px; } .lead { font-size: 17px; margin-top: 2px; } .rungs { margin-top: 7px; gap: 6px; } .rungs .crest { width: 26px; height: 26px; } .rungs b { font-size: 15px; }
  .unlock .tips { font-size: 15px; margin-top: 7px; } .unlock .tips li { margin: 2px 0; line-height: 1.15; }
}
@media (prefers-reduced-motion: reduce) {
  .title h1, .crown { animation: none; } .lg-row, .lg-gain, .standings .verdict, .standings .outlook { transition: none; }
  .confetti { display: none; } .cer-title i, .cer-sub, .plaque, .cer-cup, .rays, .roll span { animation: none; } .roll span { padding-left: 0; white-space: normal; }
}
