:root {
  --green: #0a2c22;
  --green-deep: #061e17;
  --lime: #c5ff1d;
  --lime-hover: #b2ea1e;
  --lime-depth: #86b30c;
  --lime-faint: #ebffb1;
  --mint: #baded4;
  --gold: #ffd23f;
  --red: #ff4b4b;
  --pink: #ff9be4;
  --cyan: #38e8ff;
  --orange: #ffaa3b;
  --text-2: rgb(255 255 255 / .74);
  --text-3: rgb(255 255 255 / .52);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --hud-h: 48px;
  --p: 3px;
  --px-clip: polygon(
    0 calc(var(--p) * 2), var(--p) calc(var(--p) * 2), var(--p) var(--p), calc(var(--p) * 2) var(--p), calc(var(--p) * 2) 0,
    calc(100% - var(--p) * 2) 0, calc(100% - var(--p) * 2) var(--p), calc(100% - var(--p)) var(--p), calc(100% - var(--p)) calc(var(--p) * 2), 100% calc(var(--p) * 2),
    100% calc(100% - var(--p) * 2), calc(100% - var(--p)) calc(100% - var(--p) * 2), calc(100% - var(--p)) calc(100% - var(--p)), calc(100% - var(--p) * 2) calc(100% - var(--p)), calc(100% - var(--p) * 2) 100%,
    calc(var(--p) * 2) 100%, calc(var(--p) * 2) calc(100% - var(--p)), var(--p) calc(100% - var(--p)), var(--p) calc(100% - var(--p) * 2), 0 calc(100% - var(--p) * 2)
  );
  color-scheme: dark;
}

@media (max-width: 640px), (max-height: 500px) {
  :root { --hud-h: 40px; }
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg, var(--green));
}

body {
  color: #fff;
  font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

button, a { font: inherit; color: inherit; touch-action: manipulation; }
button { cursor: pointer; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.nowrap { white-space: nowrap; }

/* App shell */

#app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  isolation: isolate;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgb(0 0 0 / .28));
}

#app::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .024;
  background:
    url(../assets/cc-logo.svg) right -5vmax top -4vmax / auto 30vmax no-repeat,
    url(../assets/money.svg) left -5vmax bottom 12.1vmax / 90vmax auto no-repeat,
    url(../assets/maker.svg) left -5vmax bottom -3vmax / 87.28vmax auto no-repeat;
}

#stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

#canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  opacity: 0;
  transition: opacity .6s ease;
}
#canvas.is-on { opacity: 1; }

/* Pixel-cornered surfaces: fill lives on ::before so focus outlines are not clipped */

.px {
  position: relative;
  isolation: isolate;
  border: 0;
  background: none;
}
.px::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill, rgb(255 255 255 / .08));
  box-shadow: inset 0 calc(var(--depth, 0px) * -1) 0 var(--depth-c, transparent);
  clip-path: var(--px-clip);
  transition: background-color .15s;
}

/* HUD */

#hud {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: calc(var(--hud-h) + var(--safe-t));
  padding: var(--safe-t) 10px 0 16px;
}

.hud-stats { display: flex; gap: 22px; min-width: 0; }

.stat { display: grid; gap: 3px; }
.stat-k {
  font: 600 9px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
  opacity: .66;
}
.stat-v {
  --s: 3;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font: 600 12px/1 var(--sans);
}
.stat:first-child .stat-v { min-width: 150px; }
.stat-best .stat-v { color: var(--text-3); }
.stat-v small, #over-score small { font: inherit; opacity: .72; }

.hud-level {
  font: 500 13px/1 var(--sans);
  color: var(--text-3);
  white-space: nowrap;
}

.hud-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.lives { display: flex; gap: 4px; margin-right: 10px; }
.lives svg { width: calc(var(--w) * 2px); height: calc(var(--h) * 2px); display: block; }

.icon-btn {
  --p: 2px;
  --fill: rgb(255 255 255 / .07);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #fff;
}
.icon-btn::after { content: ''; position: absolute; inset: -3px; }
.icon-btn:hover { --fill: rgb(255 255 255 / .14); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn .i-off, .icon-btn.is-off .i-on { display: none; }
.icon-btn.is-off .i-off { display: block; }
.icon-btn.is-off { color: var(--text-3); }

@media (max-width: 640px), (max-height: 500px) {
  #hud { gap: 10px; padding-left: 12px; padding-right: 6px; }
  .stat-v { --s: 2; font-size: 11px; gap: 4px; }
  .stat:first-child .stat-v { min-width: 96px; }
  .hud-stats { gap: 16px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn::after { inset: -4px; }
  .lives { margin-right: 6px; }
}
@media (max-width: 720px) {
  .hud-level { display: none; }
  #hud { grid-template-columns: 1fr auto; }
}
@media (max-width: 360px) {
  .stat-best { display: none; }
}

/* Screens */

.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  isolation: isolate;
  padding: calc(var(--safe-t) + 24px) calc(var(--safe-r) + 20px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 20px);
  background: rgb(6 30 23 / .76);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility 0s linear .24s;
}
.screen.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .24s ease;
}
.screen > * { margin-block: auto; }

.sheet {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.sheet.narrow { width: min(100%, 380px); }

.screen.is-open .sheet { animation: sheet-in .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sheet-in { from { transform: translateY(10px) scale(.985); } }

.h-pixel { --s: 5; margin: 0; }

.eyebrow {
  font: 600 11px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
}

/* Buttons */

.btn {
  --fill: rgb(255 255 255 / .08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  font: 600 16px/1 var(--sans);
  letter-spacing: -.005em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .08s;
}
.btn:hover { --fill: rgb(255 255 255 / .14); }
.btn:active { transform: translateY(2px); }

.btn-primary {
  --s: 3;
  --fill: var(--lime);
  --depth: 5px;
  --depth-c: var(--lime-depth);
  padding: 0 18px 5px;
  color: var(--green);
}
.btn-primary:hover { --fill: var(--lime-hover); }
.btn-primary:active { --depth: 2px; transform: translateY(3px); }
.btn-lg { min-height: 60px; width: 100%; }
.btn-xl { --s: 5; --p: 4px; --depth: 6px; min-height: 76px; padding-bottom: 6px; }
.btn-primary[data-loading] {
  --fill: linear-gradient(90deg, var(--lime) calc(var(--load) * 100%), rgb(197 255 29 / .3) 0);
  pointer-events: none;
}

.btn-tonal { --fill: rgb(197 255 29 / .14); color: var(--lime); }
.btn-tonal:hover { --fill: rgb(197 255 29 / .22); }
.btn-quiet { --fill: rgb(255 255 255 / .08); }

.btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.link {
  padding: 15px 6px;
  border: 0;
  background: none;
  font: 500 14px/1 var(--sans);
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / .3);
  text-underline-offset: 4px;
}
.link:hover { color: #fff; }
.link-lime { color: var(--lime); text-decoration-color: rgb(197 255 29 / .4); }
.link-lime:hover { color: var(--lime-faint); }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 20px; }

/* Pixel sprites and bitmap text (scale --s is always an integer) */

.pt {
  display: block;
  flex: none;
  width: calc(var(--w) * var(--s, 2) * 1px);
  height: calc(var(--h) * var(--s, 2) * 1px);
  margin-top: calc(var(--top) * var(--s, 2) * -1px);
}

.ptxt:not(:has(.pt)) { color: transparent; }

.spr { display: grid; place-items: center; flex: none; }
.spr svg { display: block; width: calc(var(--w) * var(--s, 3) * 1px); height: calc(var(--h) * var(--s, 3) * 1px); }

/* Title */

#scr-title {
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(60% 50% at 50% 42%, rgb(197 255 29 / .07), transparent 70%),
    rgb(10 44 34 / .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
#scr-title > * { margin-block: 0; }
#app:has(#scr-title.is-open) #hud { visibility: hidden; }

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: -8px 0 0;
}

.cc-logo {
  display: block;
  height: 26px;
  aspect-ratio: 60.1 / 28.7;
  background: #fff;
  -webkit-mask: url(../assets/cc-logo.svg) center / contain no-repeat;
  mask: url(../assets/cc-logo.svg) center / contain no-repeat;
  opacity: .9;
}
.cc-logo:hover { opacity: 1; }

.title-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 5vh, 48px);
  width: 100%;
  padding-bottom: 4vh;
}

.lockup {
  --lw: min(620px, 84vw, 62vh);
  display: grid;
  gap: calc(var(--lw) * .024);
  width: var(--lw);
  margin: 0;
}

.mm-money, .mm-maker {
  display: block;
  background: #fff;
  -webkit-mask: var(--mask) left top / 100% 100% no-repeat;
  mask: var(--mask) left top / 100% 100% no-repeat;
}
.mm-money { --mask: url(../assets/money.svg); aspect-ratio: 800 / 119.703; }
.mm-maker { --mask: url(../assets/maker.svg); aspect-ratio: 775.832 / 113.737; width: 96.98%; }

.lockup-row {
  --s: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--s) * 6px);
  margin-top: calc(var(--lw) * .03);
}
@media (min-width: 600px) and (min-height: 640px) {
  .lockup-row { --s: 3; }
}

.spr-hero { position: relative; }
.spr-hero svg + svg { position: absolute; inset: 0; margin: auto; animation: step .36s steps(1) infinite; }
@keyframes step { 50% { opacity: 0; } }

.spr-korunka svg { animation: spin 1.2s steps(6) infinite; }
@keyframes spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.15); } }

.title-actions {
  display: grid;
  gap: 12px;
  width: min(100%, 400px);
  text-align: center;
}

.pitch {
  margin-bottom: 10px;
  font: 500 clamp(16px, 1.6vw + 8px, 19px)/1.45 var(--sans);
  color: var(--text-2);
  text-wrap: balance;
}

.title-best {
  margin-top: 8px;
  font: 500 14px/1 var(--sans);
  color: var(--text-3);
}
.title-best b { margin-left: 4px; font-weight: 700; color: var(--lime-faint); }

.title-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 22px;
  font: 500 13px/1.4 var(--sans);
  color: var(--text-3);
  text-align: center;
}
.strip-date { font-weight: 700; color: var(--lime); }
.strip-venue { color: var(--text-2); }
.strip-made a {
  padding: 10px 0;
  font-weight: 700;
  color: var(--text-2);
  text-decoration-color: rgb(255 255 255 / .3);
  text-underline-offset: 3px;
}
.strip-made a:hover { color: #fff; }

#scr-title.is-open :is(.lockup, .title-actions, .title-strip) {
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
#scr-title.is-open .title-actions { animation-delay: .08s; }
#scr-title.is-open .title-strip { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 520px) {
  .strip-tag { display: none; }
  .btn-xl { --s: 4; min-height: 68px; }
}

@media (max-width: 420px) {
  .btn-lg { --s: 2; }
}

@media (orientation: landscape) and (max-height: 760px) {
  .title-main { gap: 28px; padding-bottom: 0; }
  .lockup { --lw: min(620px, 84vw, 54vh); }
  .btn-xl { --s: 4; min-height: 66px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  #scr-title { gap: 12px; padding-top: calc(var(--safe-t) + 16px); padding-bottom: calc(var(--safe-b) + 14px); }
  .title-main { flex-direction: row; justify-content: center; gap: clamp(28px, 6vw, 72px); }
  .lockup { --lw: min(42vw, 400px); }
  .title-actions { width: min(46vw, 340px); gap: 10px; }
  .pitch { margin-bottom: 4px; font-size: 15px; }
  .btn { min-height: 46px; }
  .btn-lg { min-height: 52px; }
  .btn-xl { --s: 3; --depth: 5px; min-height: 58px; font-size: 26px; }
  .strip-tag { display: none; }
}

/* How to play */

.how { gap: 24px; }

.how-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
  width: 100%;
  text-align: left;
}

.how-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; align-content: start; }
.how-list li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: center; }
.how-list .spr { --s: 3; height: 54px; }
.how-list p { font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.how-list b {
  --s: 2;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 7px;
  color: #fff;
}
.how-list b > span:not(.ptxt) { font: 600 13px/1 var(--sans); color: var(--lime); }

.c-inflace { color: var(--red) !important; }
.c-medved { color: var(--pink) !important; }
.c-fomo { color: var(--cyan) !important; }
.c-poplatky { color: var(--orange) !important; }

.how-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  padding-top: 20px;
  width: 100%;
  border-top: 1px solid rgb(255 255 255 / .1);
  font-size: 14px;
  color: var(--text-3);
}
.ctl-keys { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ctl-keys i { width: 10px; }

kbd {
  --p: 2px;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font: 600 12px/1 var(--sans);
  color: #fff;
  background: rgb(255 255 255 / .1);
  clip-path: var(--px-clip);
}

.how .btn-row { width: min(100%, 400px); }

@media (max-width: 760px), (max-height: 760px) {
  .how .btn-row {
    position: sticky;
    bottom: calc(var(--safe-b) * -1 - 24px);
    width: 100%;
    padding: 12px max(0px, 50% - 200px) calc(var(--safe-b) + 24px);
    background: linear-gradient(transparent, rgb(6 30 23 / .96) 30%);
  }
}

@media (hover: none) and (pointer: coarse) {
  .ctl-keys, .ctl-pad { display: none !important; }
}
@media (hover: hover), (pointer: fine) {
  .ctl-touch { display: none; }
}

@media (max-width: 760px) {
  .how-cols { grid-template-columns: 1fr; gap: 16px; }
  .how .h-pixel { --s: 4; }
}

/* Pause */

.switch {
  --p: 3px;
  --fill: rgb(255 255 255 / .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px 0 18px;
  font: 600 16px/1 var(--sans);
}
.switch:hover { --fill: rgb(255 255 255 / .14); }
.switch i {
  --p: 2px;
  position: relative;
  width: 34px;
  height: 18px;
  background: rgb(255 255 255 / .22);
  clip-path: var(--px-clip);
  transition: background-color .15s;
}
.switch i::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  background: #fff;
  transition: transform .15s;
}
.switch[aria-checked="true"] i { background: var(--lime); }
.switch[aria-checked="true"] i::after { background: var(--green); transform: translateX(16px); }

/* Game over */

.over, .over-col { gap: 18px; }
.over-col { display: flex; flex-direction: column; align-items: center; width: 100%; }

.h-over {
  --s: 7;
  margin: 0 0 10px;
  filter: drop-shadow(0 calc(var(--s) * 1px) 0 var(--red));
}

.over-score { display: grid; justify-items: center; gap: 8px; }
.over-score .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
#over-score {
  --s: 7;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0;
  font: 700 22px/1 var(--sans);
  color: var(--lime);
}
.over-ratio { font: 600 16px/1.3 var(--sans); }
.over-meta { font: 500 13px/1 var(--sans); color: var(--text-3); }

.pill-new {
  --p: 2px;
  padding: 4px 7px;
  font: 700 10px/1 var(--sans);
  letter-spacing: .14em;
  color: var(--green);
  background: var(--lime);
  clip-path: var(--px-clip);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 60% { opacity: .35; } }

.over-lead {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: balance;
}

@media (max-width: 420px) {
  .h-over, #over-score { --s: 6; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .sheet.over { flex-direction: row; align-items: center; width: min(100%, 760px); gap: 40px; }
  .over-col { flex: 1; gap: 14px; }
  .h-over, #over-score { --s: 5; }
}

/* Intermission: a Money Maker ticket */

.ticket {
  --notch: 13px;
  --stub: 84px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 420px);
  color: var(--green);
  background: var(--lime);
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 98%, #000),
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 98%, #000);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 98%, #000),
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 98%, #000);
  mask-composite: intersect;
}
.screen.is-open .ticket { animation: ticket-in .5s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes ticket-in { from { transform: translateY(24px) rotate(-2deg) scale(.96); opacity: 0; } }

.ticket-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 26px 28px 24px; }
.ticket-kicker {
  margin-bottom: 8px;
  font: 600 11px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .62;
}
.ticket-big { margin: 6px 0 4px; }
.ticket-main .pt { margin-top: 0; }
.ticket-text { margin-top: 6px; font: 500 15px/1.45 var(--sans); opacity: .78; text-wrap: pretty; }

.ticket-stub {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  height: var(--stub);
  padding: 0 28px 4px;
  border-top: 2px dashed rgb(10 44 34 / .28);
}
.ticket-mm { display: grid; gap: 2px; width: 62px; }
.ticket-mm i { background: var(--green); }
.ticket-when { font: 600 11px/1.35 var(--sans); opacity: .7; }
.ticket-cta {
  padding: 14px 0;
  margin: -14px 0;
  font: 700 14px/1.2 var(--sans);
  color: var(--green);
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.ticket-cta:focus-visible { outline-color: var(--green); }

.ticket-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(10 44 34 / .12); }
.ticket-bar i { display: block; height: 100%; background: var(--green); transform-origin: left; }
#scr-inter.is-timing .ticket-bar i { animation: bar 3.2s linear both; }
@keyframes bar { from { transform: scaleX(0); } }

@media (max-width: 400px) {
  .ticket-main { padding: 22px 22px 20px; }
  .ticket-stub { padding: 0 22px 4px; gap: 10px; }
  .ticket-when { display: none; }
  .ticket-stub { grid-template-columns: auto 1fr; }
}

/* Toast */

#toast {
  --p: 3px;
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-b) + 28px);
  z-index: 30;
  max-width: calc(100% - 40px);
  padding: 13px 20px 11px;
  font: 600 14px/1.3 var(--sans);
  color: var(--green);
  background: var(--lime-faint);
  clip-path: var(--px-clip);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}
#toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* Weekly contest: title card, entry form after a game, leaderboard screen */

.contest-card {
  --fill: rgb(197 255 29 / .1);
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.contest-card:hover { --fill: rgb(197 255 29 / .18); }
.contest-card .spr { --s: 2; }
.contest-card b { display: block; font: 700 16px/1.25 var(--sans); color: var(--lime); }
.contest-card small { display: block; margin-top: 2px; font: 500 13px/1.35 var(--sans); color: var(--text-2); }

.entry { display: grid; gap: 10px; width: 100%; text-align: left; }
.entry-h { margin: 0 0 2px; font: 500 14px/1.4 var(--sans); color: var(--text-2); text-align: center; }
.entry-h b { display: block; font: 700 17px/1.3 var(--sans); color: #fff; }
.field {
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: rgb(255 255 255 / .08);
  color: #fff;
  font: 500 16px/1 var(--sans);
  clip-path: var(--px-clip);
}
.field::placeholder { color: var(--text-3); }
.field:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 500 14px/1.35 var(--sans); color: var(--text-2); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--lime); }
.link-inline { padding: 0; border: 0; background: none; font: inherit; color: var(--lime); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.entry-msg { margin: 0; font: 500 13.5px/1.4 var(--sans); color: var(--text-2); text-align: center; }
.entry-msg:empty { display: none; }
.entered { display: grid; gap: 12px; width: 100%; font: 600 16px/1.45 var(--sans); }
.entered p { margin: 0; }

.contest { gap: 16px; text-align: left; }
.prizes { display: grid; gap: 2px; width: 100%; margin: 0; padding: 0; list-style: none; clip-path: var(--px-clip); }
.prizes li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgb(197 255 29 / .1); }
.prizes .spr { --s: 3; flex: none; width: 48px; }
.prizes p { margin: 0; font: 500 14px/1.4 var(--sans); color: var(--text-2); }
.prizes b { display: block; font: 700 16px/1.3 var(--sans); color: var(--lime); }
.sale {
  --p: 2px;
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 30px;
  background: var(--lime);
  color: var(--green);
  font: 800 13px/1 var(--sans);
  white-space: nowrap;
  clip-path: var(--px-clip);
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  padding: 4px;
  background: rgb(255 255 255 / .06);
  clip-path: var(--px-clip);
}
.tabs button { height: 40px; border: 0; background: none; color: var(--text-2); font: 600 14px/1 var(--sans); }
.tabs button:hover { color: #fff; }
.tabs [aria-selected="true"] { --p: 2px; background: var(--lime); color: var(--green); clip-path: var(--px-clip); }
.tabs [aria-selected="true"]:hover { color: var(--green); }
.voucher {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: rgb(255 210 63 / .1);
  clip-path: var(--px-clip);
  text-align: center;
}
.voucher .eyebrow { color: var(--gold); }
.voucher-code {
  --fill: rgb(255 255 255 / .1);
  padding: 12px 18px;
  color: #fff;
  font: 700 22px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .06em;
  -webkit-user-select: all;
  user-select: all;
}
.voucher small { font: 500 12.5px/1.4 var(--sans); color: var(--text-2); }
.voucher-out { margin: 0; font: 500 14px/1.45 var(--sans); color: var(--gold); text-align: center; }
.round, .contest-how { width: 100%; margin: 0; font: 500 13.5px/1.45 var(--sans); color: var(--text-2); }
.contest-how { color: var(--text-3); }
.board { display: grid; gap: 2px; width: 100%; margin: 0; padding: 0; list-style: none; }
.board li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  background: rgb(255 255 255 / .05);
  font: 500 15px/1.2 var(--sans);
  font-variant-numeric: tabular-nums;
}
.board li:first-child:not(.board-note) { background: rgb(197 255 29 / .12); }
.board li > :first-child { color: var(--text-3); }
.board li b { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.board li > :last-child { color: var(--lime-faint); }
.board li.is-me { outline: 2px solid var(--lime); outline-offset: -2px; }
.board .board-note { grid-template-columns: 1fr; padding: 14px 0; background: none; text-align: center; }
.board .board-note > span { color: var(--text-2); }
.board-me { width: 100%; margin: 0; font: 600 14px/1.4 var(--sans); color: var(--lime); text-align: center; }
.winners { display: grid; gap: 8px; width: 100%; }
.winners h3 { margin: 0; }
.winners ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.winners li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; font: 500 14px/1.4 var(--sans); color: var(--text-2); font-variant-numeric: tabular-nums; }
.winners li b { color: #fff; }
.rules { width: 100%; font: 400 13px/1.5 var(--sans); color: var(--text-2); }
.rules summary { padding: 12px 0; font: 600 14px/1 var(--sans); color: #fff; cursor: pointer; }
.rules ol { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.rules a { color: var(--lime); }
