/* Spell: a letterpress print shop. The duel picture is the imposing stone: a steel chase in which the pot is locked up
   in wood type, maple furniture and steel quoins around it, your brayer inked ultramarine on the left, your rival's
   vermilion on the right; the results are proof sheets pinned to a line. The header is a steel composing stick with its
   scale, the hero the pressroom wall with a row of maple furniture at its foot, the page proof paper. Headings are
   printed in ink, buttons are maple wood type. Cartoon system of the game kept light: ink outlines, 3-stop gradients,
   a hard drop under everything that can be pressed. Fonts are self-hosted (SIL Open Font License): Holtwood One SC
   (display, a wood type face), Karla (text). No Supercell artwork. */
@font-face { font-family: 'Holtwood One SC'; src: url('/fonts/holtwood-one-sc-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Karla'; src: url('/fonts/karla.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #17161a;
  --page: #f1ede4;
  --felt: #30343b;
  --felt-deep: #202328;
  --on-felt: #17161a;
  --on-felt-muted: #6a655c;
  --on-dark: #f7f3ea;
  --on-dark-muted: #c9ccd1;
  --panel: #fbf9f4;
  --panel-2: #efe9dc;
  --line: #ddd5c4;
  --text: #17161a;
  --muted: #625d55;
  --tang: #a8722f;
  --tang-soft: #f6e7c8;
  --link: #2443c9;
  --lime: #e2b26a;
  --red: #d83a22;
  --plus: #2f7d32;
  --beech: #30343b;
  --beech-deep: #202328;
  --teal: #2b4bd6;
  --teal-deep: #17298a;
  --gold: #efb73a;
  --gold-deep: #8a5508;
  --pink: #d83a22;
  /* buttons are maple wood type */
  --g-act: linear-gradient(180deg, #fbe9c4 0%, #e8bd78 50%, #b98140 100%);
  --g-tang: linear-gradient(180deg, #fbe9c4 0%, #e8bd78 50%, #b98140 100%);
  --g-you: linear-gradient(180deg, #b4c2ff 0%, #2b4bd6 52%, #17298a 100%);
  --g-gold: linear-gradient(180deg, #fff1b8 0%, #efb73a 52%, #a87510 100%);
  --g-beech: linear-gradient(180deg, #5a6069 0%, #3a3f47 55%, #23262b 100%);
  --g-iron: linear-gradient(180deg, #ffffff 0%, #f3f4f6 50%, #c9ced5 100%);
  --g-rival: linear-gradient(180deg, #ffbfa8 0%, #e8452a 52%, #9f240f 100%);
  --g-elixir: linear-gradient(180deg, #fff1b8 0%, #efb73a 52%, #a87510 100%);
  --g-purple: linear-gradient(180deg, #5a6069 0%, #3a3f47 55%, #23262b 100%);
  --g-board: linear-gradient(180deg, #5a6069 0%, #3a3f47 55%, #23262b 100%);
  /* the imposing stone */
  --sky: radial-gradient(120% 90% at 25% 8%, #4d535c 0%, #30343b 55%, #1f2227 100%);
  --g-wall: var(--sky);
  /* maple furniture */
  --meadow: linear-gradient(180deg, #fbe9c4 0%, #e2b26a 50%, #a8722f 100%);
  --sand: #2b2f35;
  --floor: repeating-linear-gradient(90deg, transparent 0 138px, rgba(23, 22, 26, .55) 138px 140px), repeating-linear-gradient(180deg, transparent 0 7px, rgba(122, 76, 30, .12) 7px 8px), linear-gradient(180deg, #fbe9c4 0%, #e2b26a 55%, #a8722f 100%);
  --mat: var(--floor);
  --grain: linear-gradient(transparent, transparent);
  /* the scale along the composing stick */
  --stitch: repeating-linear-gradient(90deg, rgba(23, 22, 26, .6) 0 1px, transparent 1px 12px), linear-gradient(180deg, #f4f6f8 0%, #bcc3cb 55%, #7c848e 100%);
  --rope: var(--stitch);
  --posts: linear-gradient(transparent, transparent);
  --blocks: linear-gradient(180deg, rgba(255, 255, 255, .16) 0 42%, transparent 42%);
  --velvet: linear-gradient(transparent, transparent);
  /* the steel edge of the chase */
  --ashlar: repeating-linear-gradient(90deg, transparent 0 11px, rgba(23, 22, 26, .4) 11px 12px), linear-gradient(180deg, #f4f6f8 0%, #bcc3cb 55%, #6f7781 100%);
  /* proof paper grain */
  --nap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  --table: var(--sky);
  --display: 'Holtwood One SC', Georgia, serif;
  --body: 'Karla', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --edge: 3px solid var(--ink);
  --lift: inset 0 3px 0 #fff, 0 6px 0 var(--ink);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip;
  background: var(--nap), radial-gradient(1400px 900px at 70% -10%, #fdfcf8 0%, rgba(253, 252, 248, 0) 70%), linear-gradient(180deg, #f8f5ee 0%, var(--page) 55%, #e9e3d6 100%); background-color: var(--page); color: var(--text); font: 500 17px/1.5 var(--body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
::selection { background: #2f6fe0; color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }

.ico { width: 1.3em; height: 1.3em; flex: none; }
.ico.line { width: 1.1em; height: 1.1em; }
/* white lettering with a dark outline and a hard drop, the look of every title in the game */
h1, h2, .plate, .btn, .brand-name, .vs, .p-vs, .p-side b, .callout h3, .badge, .step-no, .splitbar i, .steps li::before {
  font-family: var(--display); font-weight: 400; color: #fff;
  -webkit-text-stroke: .06em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); letter-spacing: .02em;
}
h1, h2 { line-height: 1.08; letter-spacing: .03em; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; justify-content: center; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.tight { gap: 6px; justify-content: flex-end; }
.fine { font-size: 14px; font-weight: 700; color: var(--muted); }
.lede { font-size: 20px; line-height: 1.45; font-weight: 500; max-width: 33em; color: var(--on-felt); }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--link); text-underline-offset: 4px; }
.card .more { color: var(--link); }
.linkish { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; color: var(--link); }

/* short labels, set in capitals */
.prize-box i, .reward i, .res-tag, .form-strip i, .code-in, .tiles span { text-transform: uppercase; }

/* ---------- top bar: laurel-green velvet with a gold rail along its foot ---------- */
.top { position: sticky; top: 0; z-index: 30; padding-bottom: 12px; background: var(--velvet), linear-gradient(180deg, #3d8048, #2f6a3a 55%, #24552e); box-shadow: 0 5px 0 rgba(23, 22, 26, .2); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: linear-gradient(180deg, #fff2a0, #ffc531 45%, #c2860f); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 3px 0 rgba(20, 12, 4, .45)); }
.brand-name { font-size: 31px; line-height: 1; padding-bottom: 3px; }
.brand-name b { font-weight: 400; color: var(--lime); }
.hud { display: flex; align-items: center; gap: 10px; }
.navlinks { display: none; gap: 24px; margin-right: 8px; }
.navlinks a { font: 600 16px/1 var(--body); text-decoration: none; color: var(--on-dark); padding: 8px 0; border-bottom: 3px solid transparent; }
.navlinks a:hover { border-color: var(--lime); }
.net-note { font: 600 13px/1.2 var(--body); color: var(--on-dark-muted); white-space: nowrap; text-transform: capitalize; }
@media (min-width: 960px) { .navlinks { display: flex; } }
@media (max-width: 560px) {
  .top .stats-btn, .net-note + .net-note { display: none; }
  .brand-name { font-size: 25px; } .brand-mark { width: 40px; height: 40px; }
  .top-in { padding: 0 14px; gap: 8px; min-height: 66px; } .hud { gap: 8px; }
}
@media (max-width: 370px) { .net-note { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; position: relative;
  min-height: 52px; padding: 0 22px 2px; border: var(--edge); border-radius: 14px; background: var(--g-act);
  font-size: 19px; line-height: 1; letter-spacing: .02em; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -5px 0 rgba(0, 0, 0, .14), 0 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .12s;
}
.btn .ico { -webkit-text-stroke: 0; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), inset 0 -5px 0 rgba(0, 0, 0, .14), 0 1px 0 var(--ink); }
.btn.ink { background: var(--g-beech); color: #fff; }
.btn.ghost { background: var(--g-iron); color: var(--ink); -webkit-text-stroke: 0 transparent; text-shadow: 0 2px 0 #fff; }
.top .btn.ghost { background: linear-gradient(180deg, #ffffff 0%, #eef0f2 52%, #c3c9d0 100%); }
.btn.sm { min-height: 42px; padding: 0 15px 2px; border-radius: 11px; font-size: 16px; }
.btn.lg { min-height: 68px; padding: 0 30px 3px; border-radius: 18px; font-size: 26px; }
.btn.wide { width: 100%; }
.btn.wide, .btn.lg { white-space: normal; text-align: center; padding-block: 8px 9px; }
@media (max-width: 520px) { .btn.lg { font-size: 21px; padding-inline: 18px; min-height: 62px; } }
.btn.icon-btn { width: 46px; min-height: 46px; padding: 0; border-radius: 12px; }
.btn.icon-btn .ico { margin: 0; }
.top .icon-btn { width: 42px; min-height: 42px; }
.btn .wicon { width: 28px; height: 28px; border-radius: 6px; }
.btn.loading { color: transparent !important; -webkit-text-stroke: 0 transparent; text-shadow: none; pointer-events: none; }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ""; position: absolute; width: 24px; height: 24px; border: 4px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.ghost.loading::after { border-color: var(--ink); border-right-color: transparent; }
body.busy .btn:not(.loading) { opacity: .65; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 6px; font: 700 14px/1.2 var(--body); color: var(--muted); }
input {
  width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: var(--edge); border-radius: 12px; background: #fff; color: var(--text);
  font: 700 17px/1 var(--body); appearance: none; box-shadow: inset 0 4px 0 rgba(25, 26, 44, .07);
}
input::placeholder { color: #9a9a9e; }
input:focus-visible { outline: 3px solid var(--tang); outline-offset: 2px; }
.row > input.grow { width: auto; }
.big-in { height: 72px; font: 400 32px/1 var(--display); letter-spacing: .02em; }
.code-in { font: 400 22px/1 var(--display); text-transform: uppercase; letter-spacing: .14em; }
.code-in::placeholder { letter-spacing: .02em; text-transform: none; }
.segs { display: inline-flex; border: var(--edge); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.segs.wide { display: flex; }
.seg { flex: 1; min-height: 46px; padding: 0 12px; border: 0; border-left: var(--edge); background: none; color: var(--text); cursor: pointer; font: 700 15px/1.1 var(--body); }
.seg:first-child { border-left: 0; }
.seg:hover { background: #e6e0d3; }
.seg.on { background: var(--g-you); color: #fff; text-shadow: 0 2px 0 rgba(23, 22, 26, .6); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35); }
.divider { display: flex; align-items: center; gap: 12px; font: 700 14px/1 var(--body); color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: var(--line); }

/* ---------- cards ---------- */
.card { position: relative; min-width: 0; padding: 20px; background: var(--panel); color: var(--text); border: var(--edge); border-radius: 20px; box-shadow: var(--lift); }
.card a:not(.btn) { color: var(--link); }
.plate {
  margin: -20px -20px 18px; padding: 10px 20px 12px; border-bottom: var(--edge); border-radius: 17px 17px 0 0;
  position: relative; background: var(--velvet), var(--g-beech); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25); font-size: 23px; line-height: 1.15; text-align: center;
}
.plate.hot { background: var(--g-tang); }
.well { padding: 11px 14px; border-radius: 12px; background: var(--panel-2); color: var(--text); }
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: var(--edge); border-radius: 14px; background: #fff3c9; color: var(--text); }
.note > .ico { width: 30px; height: 30px; }
.note.bad { background: var(--tang-soft); align-items: flex-start; }
/* small facts set in text, never as pills */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 14px/1.4 var(--body); color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 700; }
.chip.yours { color: var(--teal-deep); }
.chip.prize { color: var(--gold-deep); }
.chip.prize b { color: var(--gold-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 2px; }
.mode-tag { font: 700 13px/1.4 var(--body); color: var(--beech-deep); white-space: nowrap; }
.mode-tag.m-team { color: var(--teal-deep); }
.badge {
  display: inline-grid; place-items: center; width: 50px; height: 50px; flex: none; padding-bottom: 3px; border: var(--edge); border-radius: 13px;
  background: var(--g-you); font-size: 24px; line-height: 1; text-transform: uppercase; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--ink);
}
.badge.red { background: var(--g-rival); }
.badge.none { background: var(--panel-2); border-style: dashed; color: var(--muted); -webkit-text-stroke: 0 transparent; text-shadow: none; box-shadow: none; }
.corner-label { display: block; font: 700 13px/1.3 var(--body); color: var(--teal-deep); }

/* ---------- timer: the gold runs out of the stopwatch bar ---------- */
.clock { display: flex; align-items: center; gap: 10px; }
.clock > .ico { width: 32px; height: 32px; }
.clock .bar { flex: 1; height: 20px; border: var(--edge); border-radius: 999px; background: #e6e0d3; overflow: hidden; }
.clock .bar i { display: block; height: 100%; background: var(--g-elixir); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); transition: width 1s linear; }
.clock time { font: 400 22px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; min-width: 3.1ch; text-align: right; }
.clock.low .bar i { background: var(--g-rival); }
.clock.low time { color: var(--red); }

/* ---------- main page ---------- */
#app { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; flex: 1; }
body[data-page="home"] #app { max-width: none; padding: 0; }
.boot { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 16px; font-weight: 600; color: var(--muted); }
.boot .brand-mark { width: 84px; height: 84px; animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* the hero is a champagne sky over the stands; the arena wall, the sand floor and the purple carpet run along its foot */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, transparent calc(100% - 118px), #eadfd1 calc(100% - 118px), #d9cab8 calc(100% - 82px), transparent calc(100% - 82px)), linear-gradient(180deg, #ffdca0 0%, #ffecd0 45%, #fff6e8 80%, #f4f1ea 100%); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 56px; height: 26px; background: var(--velvet), linear-gradient(180deg, #ffd34d 0 4px, #3d8048 4px, #2f6a3a 60%, #24552e); border-top: 3px solid var(--ink); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; border-top: 3px solid var(--ink); background: var(--floor); }
.hero-in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 34px 20px 92px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { margin: 0 0 22px; font-size: clamp(38px, 10vw, 84px); line-height: 1.06; }
.hero h1 em, .final h2 em { display: block; font-style: normal; color: var(--gold); }
.hero .cta { margin-top: 30px; }
.hero .fine { margin-top: 24px; color: var(--muted); }
@media (max-width: 520px) { .lede { font-size: 18px; } .hero-in { padding-top: 26px; } .split { gap: 10px; } .split div { padding-left: 9px; border-left-width: 6px; } }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.cta.center { margin-top: 30px; }
@media (min-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); padding: 60px 20px 100px; }
  .hero h1 { font-size: clamp(50px, 4.4vw, 64px); }
}

/* the duel card: the podium, your block and your rival's either side of the title stand with the pot on its plaque */
.poster-wrap { display: grid; justify-items: center; }
.poster { position: relative; width: min(510px, 100%); overflow: hidden; background: var(--panel); color: var(--text); border: 4px solid var(--ink); border-radius: 30px; box-shadow: inset 0 3px 0 #fff, 0 10px 0 var(--ink), 0 26px 40px rgba(23, 22, 26, .26); rotate: -1.5deg; }
.stage { background: var(--g-wall); border-bottom: var(--edge); }
.stage-art { width: 100%; height: auto; overflow: visible; }
.prize-cur { font: 400 11px var(--display); letter-spacing: .16em; fill: var(--ink); }
/* the pot is written on the gold plaque of the title stand */
.pot-label { font-family: var(--display); fill: var(--ink); letter-spacing: .01em; }
/* the medals sway a little on their ribbons, the title rises and settles on its stand */
.sway { transform-box: fill-box; transform-origin: 50% 0%; animation: sway 3.6s ease-in-out infinite; }
.sway.rival { animation-delay: -1.8s; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.title-bob { animation: bob 3.2s ease-in-out infinite; }
.p-fight { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.p-side { min-width: 0; padding: 14px 14px 12px; text-align: center; background: var(--blocks), var(--g-you); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35); }
.p-side.rival { background: var(--blocks), var(--g-rival); border-left: var(--edge); }
.p-side span { display: block; font: 600 14px/1.2 var(--body); color: #fff; text-shadow: 0 2px 0 rgba(23, 22, 26, .55); }
.p-side b { display: block; margin-top: 4px; font-size: clamp(28px, 8vw, 38px); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px 4px; }
.p-side b.long { font-size: clamp(19px, 5vw, 24px); line-height: 1.9; }
.p-vs { position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -8deg; width: 62px; height: 62px; display: grid; place-items: center; padding-bottom: 4px; border: 4px solid var(--ink); border-radius: 50%; background: var(--g-gold); font-size: 22px; line-height: 1; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--ink); }
.p-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: var(--edge); font: 600 13px/1.2 var(--body); color: var(--muted); }
.p-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .poster { rotate: -1deg; } .p-foot { font-size: 12px; padding: 9px 12px; } }
.poster-btn { position: relative; margin-top: 30px; }
.gate .poster-wrap { display: none; }
@media (min-width: 960px) { .gate .poster-wrap { display: grid; } }

.sec { max-width: var(--wrap); margin: 0 auto; padding: 80px 20px 0; scroll-margin-top: 70px; }
.sec-head { margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(34px, 7vw, 54px); }
.sec-head .sub { margin-top: 10px; font-size: 19px; color: var(--muted); max-width: 40em; }
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s, transform .5s; }

/* the three steps, each with its own picture */
.rounds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.rounds li { overflow: hidden; background: var(--panel); color: var(--text); border: var(--edge); border-radius: 26px; box-shadow: var(--lift); }
.step-art { position: relative; height: 184px; display: grid; place-items: center; padding: 14px 14px 4px; background: var(--g-wall); border-bottom: var(--edge); }
.step-art svg { width: 100%; height: 160px; overflow: visible; }
.step-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--meadow); border-top: 3px solid var(--ink); z-index: 0; }
.step-art::before { content: ""; position: absolute; left: 0; right: 0; bottom: 22px; height: 12px; background: var(--g-beech); border-top: 3px solid var(--ink); z-index: 0; }
.step-art svg { position: relative; z-index: 1; }
/* the step number sits on a small gold medal hanging from an azure ribbon */
.step-no { position: absolute; left: 16px; top: 0; z-index: 2; width: 48px; height: 74px; display: grid; place-items: end center; padding-bottom: 9px; font-size: 25px; line-height: 1; color: #fff; }
.step-no::before { content: ""; position: absolute; left: 13px; top: 0; width: 22px; height: 34px; z-index: -2; background: var(--g-you); border: 3px solid var(--ink); border-top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.step-no::after { content: ""; position: absolute; left: 3px; bottom: 0; width: 42px; height: 42px; z-index: -1; border: 3px solid var(--ink); border-radius: 50%; background: var(--g-gold); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--ink); }
.rounds h3 { margin: 18px 22px 6px; font: 400 26px/1.1 var(--display); }
.rounds p { margin: 0 22px 22px; }
@media (min-width: 820px) { .rounds { grid-template-columns: repeat(3, 1fr); } }

.modes2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.mode-card { overflow: hidden; background: var(--panel); color: var(--text); border: var(--edge); border-radius: 22px; box-shadow: var(--lift); }
/* the cards float in the sky above the arena sand */
.mode-card { border-radius: 26px; }
.mode-art { min-height: 156px; padding: 26px 14px; display: flex; align-items: center; justify-content: center; gap: 12px; border-bottom: var(--edge); background: linear-gradient(180deg, transparent calc(100% - 14px), var(--sand) calc(100% - 14px)), var(--sky); }
.deck { display: flex; gap: 5px; }
.pc { width: 38px; height: 50px; display: grid; place-items: center; border: var(--edge); border-radius: 9px; background: #fdfcf8; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--ink); }
.pc .ico { width: 25px; height: 25px; }
.deck.you .pc, .pick-a { background: var(--blocks), var(--g-you); }
.deck.rival .pc, .pick-b { background: var(--blocks), var(--g-rival); }
.eq { font: 400 36px/1 var(--display); color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.deck.offer { gap: 10px; }
.deck.offer .pc { width: 56px; height: 74px; border-radius: 10px; }
.deck.offer .pc .ico { width: 36px; height: 36px; }
.pick-a { translate: 0 -9px; }
.pick-b { translate: 0 9px; }
.mode-copy { padding: 18px 22px 22px; }
.mode-copy h3 { margin-bottom: 6px; font: 400 28px/1.1 var(--display); }
.points { display: grid; gap: 22px; margin-top: 36px; }
.points li { display: flex; gap: 14px; }
.points .ico { width: 54px; height: 54px; filter: drop-shadow(0 4px 0 rgba(23, 22, 26, .2)); }
.points h3 { font: 400 20px/1.25 var(--display); }
.points h3 { color: var(--text); }
.points p { color: var(--muted); }
@media (min-width: 820px) { .modes2 { grid-template-columns: 1fr 1fr; } .points { grid-template-columns: repeat(3, 1fr); } .pc { width: 44px; height: 58px; } .pc .ico { width: 29px; height: 29px; } }

.money-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.money-grid h3 { margin-bottom: 14px; font: 400 23px/1.15 var(--display); display: flex; align-items: center; gap: 10px; }
.money-grid h3 .ico { width: 38px; height: 38px; }
.money-grid .card p + p, .money-grid .card p + a, .money-grid .card a + a { margin-top: 12px; }
.money-grid .card .more { display: flex; }
.splitbar { display: flex; height: 70px; border: var(--edge); border-radius: 16px; overflow: hidden; }
.splitbar i { display: grid; place-items: center; padding-bottom: 4px; font-style: normal; font-size: 24px; line-height: 1; }
.splitbar .w { flex: 1; background: var(--g-gold); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5); }
.splitbar .s { width: 30px; background: var(--g-beech); border-left: var(--edge); }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.split div { padding-left: 12px; border-left: 8px solid var(--gold); border-radius: 4px; }
.split .s { border-color: var(--beech); }
.split .r { border-color: var(--teal); }
.split b { display: block; font: 400 clamp(24px, 6vw, 38px)/1.1 var(--display); }
.split span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.3; color: var(--muted); }
@media (min-width: 820px) { .money-grid { grid-template-columns: 1fr 1fr; } .split-card { grid-column: 1 / -1; } }

.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.faq details { overflow: hidden; background: var(--panel); color: var(--text); border: var(--edge); border-radius: 20px; box-shadow: inset 0 3px 0 #fff, 0 5px 0 var(--ink); }
.faq summary { position: relative; padding: 15px 56px 13px 18px; font: 600 18px/1.3 var(--body); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; display: grid; place-items: center; padding-bottom: 3px; border: 3px solid var(--ink); border-radius: 50%; background: var(--g-gold); font: 400 22px/1 var(--display); }
.faq summary:hover { background: var(--panel-2); }
.faq details[open] summary { background: var(--panel-2); border-bottom: 2px solid var(--line); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 14px 18px 18px; max-width: 62em; }

/* the end of the page: the sand and carpet along its top, then the laurel-green velvet of the ceremony */
.final { position: relative; margin-top: 96px; overflow: hidden; background: radial-gradient(50% 70% at 50% 0%, rgba(255, 214, 120, .2) 0%, transparent 70%), var(--velvet), linear-gradient(180deg, #34733f 0%, #275c31 55%, #1b4223 100%); border-top: 4px solid var(--ink); }
.final::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--floor); border-bottom: 3px solid var(--ink); }
.final-in { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px 80px; display: grid; justify-items: center; gap: 18px; text-align: center; }
.final-art { width: min(380px, 86vw); padding: 22px 0 6px; border-radius: 30px; background: linear-gradient(180deg, transparent calc(100% - 22px), var(--sand) calc(100% - 22px)), var(--sky); border: var(--edge); box-shadow: 0 6px 0 var(--ink); }
.final-art svg { width: 100%; height: auto; overflow: visible; }
.final h2 { font-size: clamp(36px, 8vw, 72px); max-width: 12em; }
.final p { font-size: 21px; font-weight: 600; color: var(--on-dark); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); margin-bottom: 8px; }

/* ---------- footer ---------- */
.foot { margin-top: 72px; background: var(--ink); color: #e4e2dc; border-top: 4px solid var(--gold); }
body[data-page="home"] .foot { margin-top: 0; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 36px 20px 44px; display: grid; gap: 26px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand .brand-name { -webkit-text-stroke: 0 transparent; text-shadow: none; font-size: 28px; }
.foot-brand p { margin-top: 2px; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { font: 700 16px/1 var(--body); color: #fff; text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.foot-links a:hover { border-color: var(--lime); }
.foot-legal { display: grid; gap: 8px; font-size: 14px; max-width: 70em; }
.disclaimer { color: #a9a49a; }
.disclaimer b { color: #fff; }
@media (min-width: 820px) { .foot-in { grid-template-columns: 1fr auto; align-items: center; } .foot-legal { grid-column: 1 / -1; } }

/* ---------- the game ---------- */
.callout { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 14px 18px; background: var(--g-gold); color: var(--text); border: var(--edge); border-radius: 18px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 6px 0 var(--ink); }
.callout > .ico { width: 48px; height: 48px; }
.callout h3 { font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.callout p { margin-top: 4px; font-size: 16px; font-weight: 700; }
.callout.gone { background: var(--panel); }
.callout.gone h3 { color: var(--text); -webkit-text-stroke: 0 transparent; text-shadow: none; }
@media (max-width: 560px) { .callout { flex-wrap: wrap; } .callout > .btn { width: 100%; } }

.gate { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 36px; }
.gate-copy h1 { margin: 0 0 14px; font-size: clamp(40px, 10vw, 72px); }
.gate-copy .lede { margin-bottom: 26px; }
.gate-copy .card { max-width: 520px; }
.gate-copy h1 + .card { margin-top: 24px; }
.gate + .fightcard { margin-top: 44px; }
@media (min-width: 960px) { .gate { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); padding-top: 52px; } }

.who-row { display: flex; align-items: center; gap: 14px; }
.who-row h2 { font-size: 26px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .who-row { gap: 10px; } .who-row h2 { font-size: 21px; } .who-row .icon-btn { width: 40px; min-height: 40px; } }

.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 30px; align-items: start; }
.dash.in-fight { max-width: 720px; margin: 0 auto; }
@media (min-width: 980px) {
  .dash:not(.in-fight) { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: "player lobby" "ring lobby" "ring log"; grid-template-rows: auto auto 1fr; }
  .dash:not(.in-fight) .a-player { grid-area: player; }
  .dash:not(.in-fight) .a-ring { grid-area: ring; }
  .dash:not(.in-fight) .a-lobby { grid-area: lobby; }
  .dash:not(.in-fight) .a-log { grid-area: log; }
}
.form-strip { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.form-strip span { margin-right: 6px; font: 700 14px/1 var(--body); color: var(--muted); }
.form-strip i { width: 28px; height: 28px; display: grid; place-items: center; padding-bottom: 2px; border: 2px solid var(--ink); border-radius: 8px; font: 400 13px/1 var(--display); font-style: normal; color: #fff; background: #8f8a80; }
.form-strip .f-W { background: var(--g-you); }
.form-strip .f-L { background: var(--g-rival); }
.settings { margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--line); }

.list-head { display: flex; align-items: baseline; gap: 10px; font: 400 20px/1.1 var(--display); }
.list-head span { font: 700 16px/1 var(--body); color: var(--muted); }
.bouts { display: grid; }
.bout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 2px solid var(--line); }
.bout:first-child { border-top: 0; padding-top: 2px; }
.bout:last-child { padding-bottom: 2px; }
.who { min-width: 0; }
.who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b i { font-style: normal; font-weight: 600; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 1px; font-size: 14px; color: var(--muted); }
.meta i { font-style: normal; }
.prize-col { text-align: right; }
.prize-col b { display: block; font: 400 22px/1.1 var(--display); color: var(--gold-deep); }
.prize-col span { font: 700 12px/1.3 var(--body); color: var(--muted); white-space: nowrap; }
.live-mark { width: 50px; display: grid; place-items: center; }
.live-mark .ico { width: 34px; height: 34px; }
.res-tag { width: 36px; height: 36px; display: grid; place-items: center; padding-bottom: 2px; border: 2px solid var(--ink); border-radius: 10px; background: #8f8a80; color: #fff; font: 400 16px/1 var(--display); }
.res-tag.win { background: var(--g-you); }
.res-tag.loss { background: var(--g-rival); }
.res-tag.void { background: var(--panel-2); color: var(--muted); }
.bout.done .prize-col b, .pay.plus { color: var(--plus); }
.pay { display: inline-flex; align-items: center; gap: 6px; font: 400 19px/1.1 var(--display); color: var(--text); text-decoration: none; white-space: nowrap; }
a.pay:hover { text-decoration: underline; }
.pay .ico { width: 14px; height: 14px; }
.pay.minus { color: var(--red); }
.score { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--teal-deep); --crown: url(#g-you); --crown-band: #1b3f9c; }
.score.red { color: #c2351f; --crown: url(#g-rival); --crown-band: #9f240f; }
.score .ico { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .bout { grid-template-columns: auto minmax(0, 1fr) auto; }
  .bout > .btn, .bout > .row, .bout > .chip { grid-column: 1 / -1; justify-self: end; }
}

.stake-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick .btn { flex: 1; padding: 3px 6px 0; }
.prize-box { display: grid; align-content: center; justify-items: center; padding: 12px 14px 10px; border: var(--edge); border-radius: 16px; background: var(--g-gold); text-align: center; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .55); }
.prize-box span { font: 700 14px/1.2 var(--body); color: #7a4a08; }
.prize-box b { padding: 4px 0 6px; font: 400 clamp(44px, 11vw, 62px)/1 var(--display); color: #fff; -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }
.prize-box i { font: 400 16px/1 var(--display); font-style: normal; color: var(--ink); }
@media (min-width: 560px) { .stake-row { grid-template-columns: 1fr 1fr; } }

.tape { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
.corner { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 0 10px 14px; overflow: hidden; border: var(--edge); border-radius: 18px; background: linear-gradient(180deg, #e3e8ff, var(--panel) 70%); text-align: center; min-width: 0; }
.corner.red { background: linear-gradient(180deg, #ffe6dc, var(--panel) 70%); }
.corner .corner-label { justify-self: stretch; margin: 0 -10px 6px; padding: 7px 4px 5px; background: var(--g-you); border-bottom: var(--edge); color: #fff; text-shadow: 0 2px 0 rgba(23, 22, 26, .55); }
.corner.red .corner-label { background: var(--g-rival); }
.corner-name { max-width: 100%; font: 400 clamp(18px, 4.6vw, 26px)/1.15 var(--display); overflow-wrap: anywhere; }
.corner-sub { font-size: 14px; color: var(--muted); }
.corner.empty { border-style: dashed; background: var(--panel-2); }
.corner.empty .corner-label { background: #8f8a80; }
.corner.empty .corner-name { color: var(--muted); }
.vs { align-self: center; z-index: 1; width: 58px; height: 58px; margin: 0 -13px; display: grid; place-items: center; padding-bottom: 3px; border: var(--edge); border-radius: 50%; background: var(--g-gold); font-size: 20px; line-height: 1; rotate: -8deg; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--ink); }
.fight-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.tiles { display: flex; justify-content: center; gap: 7px; }
.tiles span { width: 48px; height: 60px; display: grid; place-items: center; padding-bottom: 3px; border: var(--edge); border-radius: 12px; background: var(--g-gold); color: var(--text); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--ink); font: 400 27px/1 var(--display); }
@media (max-width: 400px) { .tiles span { width: 40px; height: 52px; font-size: 23px; } }
.watching { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel-2); font-size: 15px; font-weight: 700; }
.watching .ico { width: 30px; height: 30px; transform-origin: 50% 100%; animation: hop 1.6s ease-in-out infinite; }
@keyframes hop { 0%, 60%, 100% { transform: none; } 25% { transform: translateY(-6px) rotate(-6deg); } 45% { transform: scaleY(.92); } }
.teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; }
.team-col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.team-col:last-child .corner-label { color: #c2351f; text-align: right; }
.seat { display: flex; align-items: center; gap: 10px; padding: 8px; border: var(--edge); border-radius: 14px; background: #fff; min-width: 0; }
.seat.free { border-style: dashed; background: var(--panel-2); }
.seat .badge { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; }
@media (max-width: 480px) { .seat .badge { display: none; } }

.steps { counter-reset: step; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 54px; min-height: 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; padding-bottom: 3px; border: var(--edge); border-radius: 50%; background: var(--g-you); font-size: 18px; line-height: 1; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); }
.steps h3 { font: 700 18px/1.3 var(--body); padding-top: 7px; }
.steps p, .steps .row, .steps form, .steps .modes { margin-top: 8px; }
.modes { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mode { display: inline-flex; align-items: center; gap: 4px; font: 700 15px/1.4 var(--body); }
.mode .ico { width: 20px; height: 20px; }
.mode.no { color: var(--muted); text-decoration: line-through; }
.ok-line { display: flex; align-items: center; gap: 4px; }
.ok-line .ico { width: 20px; height: 20px; }
.buy-sol { margin-top: -4px; }
.dev { margin-top: 36px; padding: 14px; border: 3px dashed rgba(23, 22, 26, .25); border-radius: 16px; }
.dev h3 { margin-bottom: 12px; font: 600 14px/1.2 var(--body); color: var(--muted); }
.error-card { max-width: 480px; margin: 60px auto 0; }

/* ---------- stats ---------- */
.page-head { padding: 44px 0 26px; }
.page-head h1 { margin-bottom: 10px; font-size: clamp(40px, 9vw, 72px); }
.page-head p { color: var(--muted); max-width: 44em; }
/* one card that reads like a score sheet: the title next to the volume, then a list of lines */
.ledger { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px; }
.ledger-pot { display: flex; align-items: center; gap: 18px; }
.ledger-knight { width: 104px; flex: none; overflow: visible; }
.ledger-pot span { display: block; font: 700 15px/1.2 var(--body); color: var(--muted); }
.ledger-pot b { display: block; padding-top: 6px; font: 400 clamp(40px, 9vw, 62px)/1.05 var(--display); color: var(--gold-deep); }
.ledger-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 30px; }
.ledger-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 0 8px; border-bottom: 2px dashed var(--line); }
.ledger-list dt { color: var(--muted); font-weight: 700; }
.ledger-list dd { font: 400 20px/1.1 var(--display); white-space: nowrap; }
@media (min-width: 680px) { .ledger-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .ledger { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; } }
.stat-card h2 { margin-bottom: 6px; font-size: 23px; color: var(--text); -webkit-text-stroke: 0 transparent; text-shadow: none; }
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; margin-top: 30px; }
@media (min-width: 900px) { .an-grid { grid-template-columns: 1fr 1fr; } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin: 18px 0 6px; }
.facts div { padding-top: 8px; border-top: 4px solid var(--line); }
.facts b { display: block; padding-top: 2px; font: 400 25px/1.15 var(--display); }
.facts span { font-size: 14px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 4px; }
.links a, .tbl a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-underline-offset: 3px; }
.links .ico, .tbl .ico { width: 14px; height: 14px; }
.tbl-wrap { overflow-x: auto; margin-top: 14px; }
.tbl, .as-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .as-table th { padding: 8px 10px 8px 0; text-align: left; font: 700 13px/1.2 var(--body); color: var(--muted); border-bottom: 3px solid var(--line); white-space: nowrap; }
.tbl td, .as-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: var(--panel-2); font-size: 15px; color: var(--muted); }
.chart { position: relative; margin-top: 14px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { stroke: var(--ink); stroke-width: 2; }
.chart .tick { font: 700 12px var(--body); fill: var(--muted); }
.chart .hit { outline: none; }
.chart .hit:hover, .chart .hit:focus-visible { fill: rgba(47, 111, 224, .1); }
.tip { position: absolute; top: 0; translate: -50% 0; display: grid; gap: 2px; padding: 7px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; z-index: 2; }
.tip i, .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; }
.chart-empty { position: absolute; inset: 30% 0 auto; text-align: center; font-size: 15px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; }
.as-table { margin-top: 10px; font-size: 14px; }
.as-table summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hbars { display: grid; gap: 10px; margin-top: 18px; }
.hbars > div { display: grid; grid-template-columns: 92px 1fr 30px; align-items: center; gap: 10px; font-size: 15px; }
.hbars .track { height: 20px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.hbars .track i { display: block; height: 100%; background: var(--g-tang); }
.hbars b { font: 400 17px/1 var(--display); text-align: right; }

/* ---------- result ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; overflow: auto; background: rgba(23, 22, 26, .76); }
#overlay.win { background: rgba(26, 28, 32, .95); }
.result { position: relative; width: min(470px, 100%); padding: 0 22px 24px; overflow: hidden; background: var(--panel); color: var(--text); border: 4px solid var(--ink); border-radius: 30px; box-shadow: inset 0 4px 0 #fff, 0 10px 0 var(--ink); text-align: center; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { scale: .8; opacity: 0; } }
.result-art { margin: 0 -22px 6px; padding: 18px 30px 0; background: linear-gradient(180deg, transparent calc(100% - 16px), var(--sand) calc(100% - 16px)), var(--sky); border-bottom: var(--edge); }
.result-art svg { width: min(280px, 100%); height: auto; margin: 0 auto; overflow: visible; }
#overlay.win .result-art svg use { animation: burst .5s cubic-bezier(.2, 1.3, .4, 1) both; transform-origin: 50% 60%; transform-box: fill-box; }
@keyframes burst { from { scale: .6; opacity: 0; } }
#overlay:not(.win) .result-art svg { width: min(250px, 100%); padding-bottom: 6px; }
.result h1 { margin: 14px 0 16px; font-size: clamp(44px, 13vw, 66px); color: var(--lime); }
#overlay.loss .result h1 { color: #ff9b7a; }
#overlay.draw .result h1 { color: #fff; }
.scoreline { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.scoreline .vs { all: unset; font: 400 30px/1 var(--display); color: var(--muted); }
.side { min-width: 0; padding: 8px 8px 10px; border: var(--edge); border-radius: 18px; background: linear-gradient(180deg, #e3e8ff, var(--panel)); }
.side.red { background: linear-gradient(180deg, #ffe6dc, var(--panel)); }
.side span { display: block; font: 700 14px/1.3 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side b { display: block; padding-top: 4px; font: 400 46px/1.1 var(--display); color: var(--teal-deep); }
.side.red b { color: #c2351f; }
.crown-row { display: flex; justify-content: center; gap: 2px; --crown: url(#g-you); --crown-band: #1b3f9c; }
.crown-row.red { --crown: url(#g-rival); --crown-band: #9f240f; }
.crown-row .ico { width: 26px; height: 26px; }
.crown-row .ico.off { opacity: .2; filter: grayscale(1); }
.reward { margin-top: 14px; padding: 10px 12px 8px; border: var(--edge); border-radius: 16px; background: var(--g-gold); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .55); }
.reward span { display: block; font: 700 14px/1.2 var(--body); color: #7a4a08; }
.reward b { padding-top: 4px; font: 400 48px/1.15 var(--display); color: #fff; -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }
.reward i { margin-left: 8px; font: 400 18px/1 var(--display); font-style: normal; }
.status { margin: 16px 0; font-size: 16px; }
.status a { color: var(--red); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60; width: max-content; max-width: min(92vw, 520px); padding: 12px 18px;
  background: var(--ink); color: #fff; border: 3px solid var(--tang); border-radius: 18px; box-shadow: 0 6px 0 rgba(23, 22, 26, .3); font: 700 16px/1.4 var(--body);
  translate: -50% 0; transform: translateY(24px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .2s, opacity .2s, visibility 0s .2s;
}
#toast.ok { border-color: var(--lime); }
#toast.show { transform: none; opacity: 1; visibility: visible; transition: transform .2s, opacity .2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* the $CHAMP strip above the header, shown once the coin is switched on */
.launch { background: #17161a; color: var(--on-dark); font: 700 14px/1.25 var(--body); border-bottom: 3px solid var(--gold); }
.launch[hidden] { display: none; }
.launch-in { max-width: var(--wrap); margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
.launch-text b { font: 400 15px/1 var(--display); letter-spacing: .02em; color: var(--gold); }
.launch-ca { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 2px solid rgba(238, 240, 244, .28); border-radius: 8px; background: rgba(238, 240, 244, .06); color: var(--on-dark); font: 700 13px/1.25 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; cursor: pointer; transition: border-color .15s, color .15s; }
.launch-ca:hover { border-color: var(--gold); color: #fff; }
.launch-ca .ico, .launch-go .ico { width: 15px; height: 15px; }
.ca-short { display: none; }
.launch-go { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.launch-go:hover { color: #fff; }
.fee-card .ca { margin: 4px 0 10px; }
.fee-card .ca span { display: block; margin-bottom: 4px; font: 700 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.fee-card .ca .linkish { display: inline-flex; align-items: center; gap: 8px; text-align: left; word-break: break-all; font: 700 13px/1.35 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.fee-card .ca .ico { width: 15px; height: 15px; flex: none; }
@media (max-width: 880px) { .ca-full { display: none; } .ca-short { display: inline; } }
@media (max-width: 520px) { .launch { font-size: 13px; } .launch-in { padding: 7px 14px; gap: 6px 10px; } }

/* narrow phones: the two mirror decks must fit side by side */
@media (max-width: 440px) { .mode-art { gap: 6px; padding-inline: 8px; } .deck { gap: 3px; } .pc { width: 29px; height: 39px; border-width: 2.500px; } .pc .ico { width: 20px; height: 20px; } .eq { font-size: 30px; } .deck.offer .pc { width: 52px; height: 68px; } }

/* the podium while the battle is played: both medals wait on their blocks */
.siege { overflow: hidden; border: var(--edge); border-radius: 18px; background: var(--sky); }
.siege .stage-art { display: block; width: 100%; height: 230px; }
@media (max-width: 520px) { .siege .stage-art { height: 190px; } }


/* ================= Spell skin: the print shop (overrides the shared layout above) ================= */
body { background: var(--nap), var(--page); }

/* type is printed, not outlined: solid ink on paper, paper white on the stone */
h1, h2, .plate, .btn, .brand-name, .vs, .p-vs, .p-side b, .callout h3, .badge {
  color: var(--ink); -webkit-text-stroke: 0 transparent; text-shadow: none; letter-spacing: .01em; }
h1, h2 { line-height: 1.12; letter-spacing: 0; }
.hero h1 { font-size: clamp(30px, 8.4vw, 54px); line-height: 1.1; }
@media (min-width: 900px) { .hero h1 { font-size: clamp(40px, 3.7vw, 54px); } }
.hero h1 em, .final h2 em { color: #2443c9; }
.sec-head h2 { font-size: clamp(26px, 5.6vw, 40px); }
.final h2 { font-size: clamp(28px, 6.4vw, 52px); max-width: 13em; color: var(--on-dark); }
.final h2 em { color: #f0c37a; }
.page-head h1, .gate-copy h1 { font-size: clamp(30px, 7vw, 52px); color: var(--ink); }
.brand-name { font-size: 24px; letter-spacing: .02em; }
.foot-brand .brand-name { color: #f7f3ea; font-size: 24px; }

/* the header: a steel composing stick with its pica scale along the foot */
.top { background: linear-gradient(180deg, #fbfcfd 0%, #dfe3e8 46%, #b7bec7 100%); box-shadow: 0 5px 0 rgba(23, 22, 26, .16); }
.top::after { background: var(--stitch); border-top: 2px solid var(--ink); }
.navlinks a { color: var(--ink); font-weight: 700; }
.navlinks a:hover { border-color: #2443c9; }
.brand-mark { filter: drop-shadow(0 2px 0 rgba(23, 22, 26, .35)); }
.top .btn.ghost { background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 52%, #c9ced5 100%); }

/* the hero: the pressroom wall, the steel rule and a row of maple furniture at its foot */
.hero { background: radial-gradient(80% 90% at 20% 0%, rgba(255, 255, 255, .45), transparent 60%), var(--nap), linear-gradient(180deg, #e4e7de 0%, #d5dacd 100%); }
.hero::before { bottom: 56px; height: 14px; background: var(--ashlar); border-top: 3px solid var(--ink); }
.hero::after { background: var(--floor); }
.hero .lede { color: #2d2b28; font-weight: 500; }
.hero .fine { color: #4f4b44; }
.hero .more { color: #2443c9; font-weight: 700; }

/* buttons: maple wood type, ink letters; joining is ultramarine */
.btn { color: var(--ink); font-size: 16px; letter-spacing: .02em; }
.btn.lg { font-size: 20px; }
.btn.sm { font-size: 14px; }
.btn.ink { background: var(--g-you); color: #fff; text-shadow: 0 2px 0 rgba(23, 22, 26, .45); }
.btn.ghost { color: var(--ink); text-shadow: none; }
.btn.loading::after { border-color: var(--ink); border-right-color: transparent; }

/* the duel card */
.poster { box-shadow: inset 0 3px 0 #fff, 0 10px 0 var(--ink), 0 26px 44px rgba(23, 22, 26, .32); rotate: 0deg; border-radius: 22px; }
.stage { background: #2b2f35; }
.sort-face { font-family: var(--display); }
.pot-label { font-family: var(--display); fill: var(--ink); }
.prize-cur { fill: #c9ccd1; font: 700 8px var(--body); letter-spacing: .16em; }
.p-side b { color: #fff; text-shadow: 0 2px 0 rgba(23, 22, 26, .6); font-size: clamp(22px, 6vw, 28px); }
.p-side b.long { font-size: clamp(15px, 4vw, 19px); }
.p-vs { rotate: 0deg; border-radius: 10px; background: var(--g-act); color: var(--ink); font-size: 18px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--ink); }

/* step pictures: the stone with the steel rule and the furniture underneath */
.step-art { background: var(--sky); }
.step-art::before { background: var(--ashlar); }
.step-art::after { background: var(--floor); }
/* the step number: one wood type sort */
.step-no { left: 16px; top: 12px; width: 44px; height: 50px; place-items: center; padding: 0 0 2px; color: var(--ink); font-size: 24px; isolation: isolate; }
.step-no::after { left: 3px; top: 4px; bottom: auto; width: 44px; height: 50px; z-index: -2; border: 0; border-radius: 4px; background: rgba(0, 0, 0, .4); box-shadow: none; }
.step-no::before { left: 0; top: 0; width: 44px; height: 50px; z-index: -1; border: 2.5px solid var(--ink); border-radius: 4px; clip-path: none;
  background: radial-gradient(90% 80% at 35% 25%, #fdf0d2 0%, #ecc583 60%, #c8904a 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); }

/* card heads: a strip of type metal */
.plate { background: var(--g-beech); color: var(--on-dark); letter-spacing: .03em; }
.plate.hot { background: var(--g-rival); color: #fff; }
.faq summary::after { background: var(--g-act); color: var(--ink); }
.splitbar .w { color: var(--ink); }
/* percentages in the text face: the wood type % reads as 0/0 */
.split b { font-family: var(--body); font-weight: 800; letter-spacing: -.01em; }
.split div { border-left-color: var(--lime); }
.mode-art { background: var(--sky); }

/* the deck cards of the mode pictures are sorts on the stone */
.pc { background: radial-gradient(90% 80% at 35% 25%, #fdf0d2 0%, #ecc583 60%, #c8904a 100%); }

/* the end of the page: the stone, the furniture along its top */
.final { background: var(--sky); background-color: #30343b; }
.final::before { background: var(--floor); }
.final-art { background: linear-gradient(180deg, transparent calc(100% - 22px), #2b2f35 calc(100% - 22px)), linear-gradient(180deg, #dfe3d8, #b6bdaf); }
.final p { color: var(--on-dark); }

/* result screen */
#overlay.win, #overlay { background: rgba(26, 28, 32, .95); }
.result-art { background: linear-gradient(180deg, transparent calc(100% - 16px), #2b2f35 calc(100% - 16px)), linear-gradient(180deg, #dfe3d8, #b6bdaf); }
.result h1 { color: #2443c9; }
#overlay.loss .result h1 { color: #c2351f; }
#overlay.draw .result h1 { color: var(--ink); }
.siege { background: #2b2f35; }

/* footer and coin strip */
.foot { background: var(--ink); border-top-color: var(--lime); }
.launch { background: var(--ink); border-bottom-color: var(--lime); }
.launch-ca:hover { border-color: var(--lime); }
