/* Clanz: the village green by day. Deep green plates, clean white cards, gold and war stars,
   drawn chunky with a dark outline and a hard drop. Sister of Crownz.
   Fonts are self-hosted (SIL Open Font License): Lilita One, Nunito. */
@font-face { font-family: 'Lilita One'; src: url('/fonts/lilita-one.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  /* outline and text */
  --ink: #0c2613;
  --ink-soft: #40604a;
  --cream: #ffffff;
  --on-grass: #ecffe2;
  /* sky: only small accents now */
  --sky-200: #d3f1ff;
  --sky-400: #8fd6fa;
  --sky-600: #4fb6f0;
  --sky-ink: #0f2c44;
  /* the village green */
  --grass-200: #c9f58e;
  --grass-400: #6fd86a;
  --grass-500: #23a148;
  --grass-600: #1b8a3d;
  --grass-700: #157434;
  --grass-900: #0a3516;
  /* pale green for soft fills */
  --earth-200: #e6f6d6;
  --earth-300: #d6efc0;
  --earth-500: #79b96a;
  --earth-700: #2f7a3c;
  --earth-900: #0b3318;
  /* deep green plates (header, boards) */
  --timber-300: #63cf78;
  --timber-400: #36ad55;
  --timber-500: #258f45;
  --timber-600: #1b7638;
  --timber-700: #145e2c;
  --timber-900: #0b3d1b;
  /* stone */
  --stone-100: #eef1f4;
  --stone-300: #c3cad3;
  --stone-500: #8b95a3;
  --stone-700: #4d5663;
  /* cards */
  --parch-50: #ffffff;
  --parch-100: #f4faee;
  --parch-200: #e6f3da;
  --parch-400: #b6d6a2;
  --paper: #ffffff;
  /* gold and loot */
  --gold-200: #fff3a6;
  --gold-300: #ffe066;
  --gold-400: #ffcf3a;
  --gold-500: #ffb81c;
  --gold-600: #f08c00;
  --gold-800: #8f4a00;
  --elixir-500: #e85ad6;
  /* the two clans */
  --blue-100: #d6ecff;
  --blue-200: #a9d4ff;
  --blue-400: #5ab4ff;
  --blue-500: #3a8ff0;
  --blue-700: #1b55b0;
  --blue-900: #123a7a;
  --red-100: #ffe0d8;
  --red-200: #ffbcae;
  --red-400: #ff7a66;
  --red-500: #ea4a36;
  --red-700: #a31d14;
  --red-900: #6e120c;
  /* confirm */
  --green-200: #dff5b8;
  --green-400: #9be04a;
  --green-600: #5cb524;
  --green-800: #2c6a0e;

  --focus: var(--ink);
  --wrap: 1160px;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --frame: inset 0 3px 0 rgba(255, 255, 255, .9);
  --drop: 0 7px 0 var(--ink), 0 20px 28px rgba(4, 32, 14, .3);
  --plate: linear-gradient(180deg, #1f9243, #116a2d);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden;
  font: 800 16px/1.5 var(--body); color: var(--ink);
  background: #1f9a44 linear-gradient(180deg, #3cc463 0%, #23a148 42%, #137a33 100%) fixed;
}
/* the tiling of the village grid */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, .055) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .055) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .055) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .055) 75%);
  background-size: 64px 64px; background-position: 0 0, 32px 32px;
}
main { flex: 1; outline: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; }
a { color: var(--blue-700); text-underline-offset: 2px; }
.rays { position: absolute; left: 50%; top: 50%; width: 190%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .13) 0 7.5deg, transparent 7.5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 76%); mask: radial-gradient(closest-side, #000 18%, transparent 76%); }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; font-weight: 900; color: var(--ink); }
.skip:focus { top: 12px; }

.ico { width: 1.5em; height: 1.5em; flex: none; vertical-align: middle; overflow: visible; }
.ico.line { width: 1.2em; height: 1.2em; }
.ico.off { --star: #c3cad3; }


/* ---------- the cast: poses are sets of variables the drawings read ---------- */
.troop { width: 96px; height: 96px; flex: none; overflow: visible; }
.blue { --team: url(#g-blue); --shield: url(#g-blue); --tc: #3a8ff0; }
.red { --team: url(#g-red); --shield: url(#g-red); --tc: #ea4a36; }
.stone { --team: url(#g-stone); --shield: url(#g-stone); --tc: #8b95a3; }
.gold { --team: url(#g-gold); --tc: #ffb81c; }
.troop.flip { transform: scaleX(-1); }
.attack { --calm: 0; --fierce: 1; --lean: 7deg; --ar: -80deg; --al: 30deg; }
.cheer { --calm: 0; --joy: 1; --ar: -150deg; --al: 146deg; }
.sad { --calm: 0; --sad: 1; --lean: -4deg; --ar: -8deg; --al: 6deg; }
.t-warrior.sad { --ar: -30deg; }
.t-archer.attack { --ar: -90deg; --al: -30deg; }
.t-archer.cheer { --ar: -116deg; }
.t-sapper.cheer { --ar: -128deg; }
.t-archer.sad { --ar: -24deg; }
.t-wizard.attack { --ar: -84deg; --al: -3deg; }
.t-wizard.cheer { --al: -16deg; }
.t-wizard.sad { --al: -6deg; }
.t-giant.attack { --ar: -124deg; --al: 36deg; }
.t-sapper.attack { --ar: -72deg; }
.t-sapper.sad { --ar: -30deg; }
.avatar { position: relative; flex: none; width: 58px; height: 58px; display: block; overflow: hidden; border: 3px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, var(--blue-100), var(--blue-400)); box-shadow: 0 3px 0 rgba(6, 34, 16, .4); }
.avatar.red { background: linear-gradient(180deg, var(--red-100), var(--red-400)); }
.avatar.stone { background: linear-gradient(180deg, #f4f6f8, #b4bdc8); }
.avatar .troop { position: absolute; inset: 0; width: 100%; height: 100%; }

/* cartoon lettering: cream fill, thick dark outline, hard drop */
.stroke {
  color: var(--cream); letter-spacing: .015em;
  -webkit-text-stroke: var(--sw, 8px) var(--ink); paint-order: stroke fill;
  text-shadow: 0 var(--dropy, 4px) 0 var(--ink);
}
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }
.fine { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.well { padding: 10px 12px; background: rgba(16, 92, 44, .1); border: 2px solid rgba(6, 34, 16, .25); border-radius: 12px; }
.well > .ico { width: 34px; height: 34px; }
.linkish { background: none; border: 0; min-height: 40px; padding: 8px; font: 900 14.5px var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--red-700); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30; --focus: #fff;
  background: var(--plate);
  border-bottom: 4px solid var(--ink);
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .12);
}
.top-in { max-width: var(--wrap); margin: 0 auto; min-height: 62px; padding: 7px 14px 9px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 3px 0 rgba(6, 34, 16, .35)); }
.brand-name { font: 400 29px/1 var(--display); color: var(--cream); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; letter-spacing: .01em; }
.brand-name b { font-weight: 400; color: var(--gold-400); }
.hud { display: flex; align-items: center; gap: 8px; }
.navlinks { display: none; gap: 2px; margin-right: 8px; }
.navlinks a { padding: 8px 10px; border-radius: 10px; font: 400 17px var(--display); color: var(--cream); text-decoration: none; -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.navlinks a:hover { background: rgba(6, 34, 16, .28); }
.pill { padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--timber-900); color: var(--cream); font: 900 11px/1.5 var(--body); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.pill.mock { background: var(--gold-400); color: var(--ink); }

/* ---------- buttons: bevelled blocks ---------- */
.btn {
  --b1: #ffe880; --b2: #ffcb2e; --b3: #f6a50a; --bt: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 7px 18px 11px; border: 3px solid var(--ink); border-radius: 14px;
  background: linear-gradient(180deg, var(--b1) 0%, var(--b2) 50%, var(--b3) 50%, var(--b3) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .55), inset 0 -4px 0 rgba(0, 0, 0, .16), 0 4px 0 var(--ink);
  font: 400 19px/1.1 var(--display); color: var(--bt); letter-spacing: .01em; text-decoration: none; text-align: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .08s, box-shadow .08s, filter .12s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), inset 0 -2px 0 rgba(0, 0, 0, .16), 0 1px 0 var(--ink); }
.btn .ico { width: 1.45em; height: 1.45em; margin-block: -4px; }
.btn .ico.line { width: 1.1em; height: 1.1em; margin-block: 0; }
.btn.green { --b1: #c1f56e; --b2: #8fdc3a; --b3: #5cb524; --bt: var(--cream); }
.btn.red { --b1: #ff9a85; --b2: #f25a45; --b3: #cf3423; --bt: var(--cream); }
.btn.blue { --b1: #9ad6ff; --b2: #4a9df2; --b3: #2877d6; --bt: var(--cream); }
.btn.wood { --b1: #9ad6ff; --b2: #4a9df2; --b3: #2877d6; --bt: var(--cream); } /* the second button: blue, like the blue clan */
.btn.stone { --b1: #f4f6f8; --b2: #d5dbe2; --b3: #b4bdc8; }
.btn.green > span, .btn.red > span, .btn.blue > span, .btn.wood > span { -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.btn.small { min-height: 40px; padding: 4px 12px 8px; font-size: 16px; border-radius: 11px; gap: 6px; }
.btn.big { min-height: 60px; padding: 9px 26px 14px; font-size: 23px; border-radius: 17px; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .55), inset 0 -5px 0 rgba(0, 0, 0, .16), 0 6px 0 var(--ink); }
.btn.big:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 0, 0, .16), 0 2px 0 var(--ink); }
.btn.wide { width: 100%; }
.btn.icon-btn { padding-inline: 9px; min-width: 42px; }
.btn:disabled { filter: grayscale(.85) brightness(.96); opacity: .62; cursor: not-allowed; }
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border: 4px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.busy .btn { pointer-events: none; }
.wicon { width: 26px; height: 26px; border-radius: 6px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 3px solid var(--ink-soft); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- panels: white cards; .wood is a deep green board ---------- */
.panel {
  position: relative; padding: 24px 18px 20px; border: 4px solid var(--ink); border-radius: 22px;
  background: linear-gradient(180deg, var(--parch-50), var(--parch-100));
  box-shadow: var(--frame), var(--drop);
}
.panel:has(> .ribbon) { margin-top: 20px; }
.panel h2 { font-size: 24px; }
.panel.wood {
  --focus: #fff; color: var(--cream);
  background: var(--plate);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .22), var(--drop);
}
.ribbon { position: relative; display: table; margin: -44px auto 16px; max-width: calc(100% - 20px); }
.ribbon > span {
  position: relative; z-index: 1; display: block; padding: 6px 24px 9px; border: 3px solid var(--ink); border-radius: 999px;
  background: linear-gradient(180deg, #f6705c, #dc3d2a 55%, #bd2c1c);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .32), inset 0 -4px 0 rgba(0, 0, 0, .2), 0 3px 0 rgba(6, 34, 16, .35);
  font: 400 21px/1.15 var(--display); color: var(--cream); letter-spacing: .02em; text-align: center;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
}
.ribbon::before, .ribbon::after { content: none; }
.ribbon::before { left: -15px; transform: skewY(16deg); }
.ribbon::after { right: -15px; transform: skewY(-16deg); }
.ribbon.blue > span { background: linear-gradient(180deg, #6db6ff, #3a8ff0 55%, #2470d2); }
.ribbon.blue::before, .ribbon.blue::after { background: var(--blue-900); }
.ribbon.gold > span { background: linear-gradient(180deg, #ffe880, #ffc21a 55%, #f09a00); }
.ribbon.gold::before, .ribbon.gold::after { background: var(--gold-800); }
.ribbon.green > span { background: linear-gradient(180deg, #b6f05e, #7fd030 55%, #58ad1f); }
.ribbon.green::before, .ribbon.green::after { background: var(--green-800); }
.ribbon.stone > span { background: linear-gradient(180deg, #c5ccd6, #98a2b0 55%, #7b8696); }
.ribbon.stone::before, .ribbon.stone::after { background: var(--stone-700); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 2px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font: 900 13px/1.5 var(--body); color: var(--ink); white-space: nowrap; }
.chip .ico { width: 17px; height: 17px; }
.chip.gold { background: var(--gold-300); }
.chip.ok { background: #c9f08f; }
.chip.bad { background: var(--red-200); }
.chip.cap { background: #ffdcae; }
.chip.prep { background: var(--blue-100); }
.chip.battle { background: var(--red-200); }
.chip.wait { background: var(--stone-100); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red-500); border: 2px solid var(--ink); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: var(--blue-100); border: 3px solid var(--ink); border-radius: 14px; text-align: left; }
.notice > .ico { width: 36px; height: 36px; }
.notice b { display: block; font: 400 17.5px/1.2 var(--display); margin-bottom: 2px; }
.notice p { font-size: 14.5px; line-height: 1.45; }
.notice.warn { background: #ffe9a0; }

/* forms */
.field { display: block; margin-bottom: 6px; font: 400 17.5px/1.2 var(--display); color: var(--ink); }
.field b { font-weight: 400; color: var(--blue-700); }
.help { margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: var(--ink-soft); }
input, select {
  width: 100%; min-height: 50px; padding: 9px 14px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--paper); box-shadow: inset 0 4px 0 rgba(16, 92, 44, .14);
  font: 900 18px var(--body); color: var(--ink);
}
input::placeholder { color: #6f8a76; opacity: 1; }
input:focus-visible, select:focus-visible { outline-offset: 2px; border-radius: 12px; }
input[readonly] { background: var(--parch-100); }
.form-error { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; background: var(--red-100); border: 3px solid var(--red-700); border-radius: 12px; font-size: 14.5px; color: var(--red-900); }
.form-error .ico { width: 24px; height: 24px; }
.segs { display: flex; flex-wrap: wrap; gap: 7px; }
.seg {
  min-height: 44px; min-width: 50px; padding: 5px 12px 8px; border: 3px solid var(--ink); border-radius: 11px;
  background: linear-gradient(180deg, #fbfcfd, #d9dfe6); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 3px 0 var(--ink);
  font: 400 17px/1.1 var(--display); color: var(--ink); cursor: pointer; transition: transform .08s;
}
.seg:hover { filter: brightness(1.04); }
.seg.on { background: linear-gradient(180deg, #b6f05e, #6cc422); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .16), 0 1px 0 var(--ink); transform: translateY(2px); color: var(--cream); -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.divider { display: flex; align-items: center; gap: 12px; font: 900 13px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 3px dashed rgba(6, 34, 16, .3); }

/* ---------- main page ---------- */
.lp-hero { position: relative; overflow: hidden; padding: 30px 16px 96px; }
.lp-hero > .rays { left: 76%; top: 46%; width: 1500px; }
.lp-hero-in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; display: grid; gap: 14px; }
.lp-copy { display: grid; gap: 16px; justify-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px 5px 9px; border-radius: 999px; background: rgba(6, 40, 18, .5); color: var(--gold-400); font: 900 12.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: .13em; }
.eyebrow .ico { width: 24px; height: 24px; }
.lp-copy h1 { --sw: 10px; --dropy: 6px; font-size: clamp(50px, 14.5vw, 92px); line-height: .96; }
.lp-copy h1 .gold { display: block; color: var(--gold-400); }
.lede { max-width: 54ch; font-size: 18.5px; line-height: 1.5; color: #fff; text-shadow: 0 2px 0 rgba(6, 34, 16, .45); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; margin-top: 26px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; color: var(--on-grass); text-shadow: 0 1px 0 rgba(6, 34, 16, .4); }
.ticks li { display: inline-flex; align-items: center; gap: 5px; }
.ticks .ico { width: 20px; height: 20px; }

/* the war poster: two clans, the stars, the pot */
.wp-wrap { position: relative; display: grid; justify-items: center; padding: 6px 10px 14px; }
.wp-stars { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: 2px; margin-bottom: -12px; filter: drop-shadow(0 5px 0 rgba(6, 34, 16, .55)); }
.wp-stars .ico { width: 64px; height: 64px; rotate: -14deg; }
.wp-stars .ico:nth-child(2) { width: 92px; height: 92px; rotate: 0deg; margin-bottom: 14px; }
.wp-stars .ico:nth-child(3) { rotate: 14deg; }
.wp { position: relative; width: min(450px, 100%); overflow: hidden; border: 4px solid var(--ink); border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 0 var(--ink), 0 34px 44px rgba(4, 32, 14, .45); rotate: -2deg; }
.wp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 16px; background: linear-gradient(180deg, #17803a, #0d5a26); color: var(--gold-400); font: 900 11px/1.2 var(--body); text-transform: uppercase; letter-spacing: .12em; border-bottom: 3px solid var(--ink); }
.wp-top span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wp-top span:last-child { color: #fff; }
.wp-top .ico { width: 15px; height: 15px; }
.wp-fight { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.wp-side { min-width: 0; padding: 14px 12px 18px; text-align: center; background: linear-gradient(180deg, #7cc0ff, #3d8df5 50%, #1f5fd6); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35); }
.wp-side.red { background: linear-gradient(180deg, #ff9a9d, #f4455a 50%, #c91d38); border-left: 3px solid var(--ink); }
.wp-side .troop { width: 92px; height: 92px; margin: -6px auto -4px; display: block; }
.wp-side span { display: block; font: 900 11px/1.2 var(--body); text-transform: uppercase; letter-spacing: .14em; color: #fff; text-shadow: 0 2px 0 rgba(6, 34, 16, .5); }
.wp-side b { display: block; margin-top: 4px; font: 400 clamp(26px, 7vw, 36px)/1.1 var(--display); color: #fff; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; text-shadow: 0 .1em 0 var(--ink); white-space: nowrap; }
.wp-vs { position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -8deg; width: 66px; height: 66px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #ffe873, #ffc526 52%, #f39a08); font: 400 27px/1 var(--display); color: #fff; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--ink); }
.wp-prize { padding: 12px 12px 14px; text-align: center; background: linear-gradient(180deg, #ffe873, #ffc526 52%, #f39a08); border-top: 3px solid var(--ink); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5); }
.wp-prize span { display: block; font: 900 12px/1.2 var(--body); text-transform: uppercase; letter-spacing: .3em; color: #7a3d00; }
.wp-prize b { font: 400 clamp(64px, 18vw, 96px)/1 var(--display); color: #fff; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; text-shadow: 0 .1em 0 var(--ink); }
.wp-prize i { margin-left: 10px; font: 400 30px/1 var(--display); font-style: normal; color: #fff; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; text-shadow: 0 .1em 0 var(--ink); }
.wp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: 3px solid var(--ink); font: 900 10.5px/1.2 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.wp-foot span { white-space: nowrap; }

.scene { width: 100%; max-width: 660px; margin: 0 auto; }
.scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.scene text { font: 400 21px var(--display); letter-spacing: .05em; fill: var(--cream); stroke: var(--ink); stroke-width: 5px; paint-order: stroke fill; stroke-linejoin: round; }
.scene.compact { max-width: 520px; }

.hero-stats { position: relative; z-index: 2; max-width: var(--wrap); margin: -62px auto 0; padding: 0 16px; }
.plank {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 4px solid var(--ink); border-radius: 20px; --focus: #fff;
  background: var(--plate);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .22), var(--drop);
}
.stat { display: flex; align-items: center; gap: 10px; padding: 14px 12px 16px; min-width: 0; }
.stat:nth-child(odd) { border-right: 3px solid rgba(6, 34, 16, .35); }
.stat:nth-child(-n+2) { border-bottom: 3px solid rgba(6, 34, 16, .35); }
.stat .ico { width: 40px; height: 40px; }
.stat b { display: block; font: 400 30px/1 var(--display); color: var(--cream); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.stat span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.25; color: var(--cream); }

.sec { max-width: var(--wrap); margin: 0 auto; padding: 68px 16px 8px; }
.sec.band { max-width: none; margin-top: 64px; padding-bottom: 68px; border-block: 4px solid var(--ink);
  background: rgba(5, 44, 20, .34); }
.sec.band > * { max-width: calc(var(--wrap) - 32px); margin-inline: auto; }
.sec-head { text-align: center; margin-bottom: 30px; display: grid; justify-items: center; gap: 12px; }
.kicker { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(6, 40, 18, .5); color: var(--gold-400); font: 900 12.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: .14em; }
.sec-head h2, .sec-head h1 { font-size: clamp(34px, 8.6vw, 54px); max-width: 18ch; }
.sec-head .sub { max-width: 52ch; font-size: 17.5px; color: #fff; text-shadow: 0 2px 0 rgba(6, 34, 16, .45); }
.band .sec-head .sub { color: #fff; }

.steps4 { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step { position: relative; padding: 18px 18px 20px; border: 4px solid var(--ink); border-radius: 22px; background: linear-gradient(180deg, var(--parch-50), var(--parch-100)); box-shadow: var(--frame), var(--drop); }
.step-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.step-top .troop { width: 112px; height: 112px; margin: -40px -8px -6px 0; }
.step-art { position: relative; width: 86px; height: 86px; margin: 4px 0 0 6px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 24px; background: linear-gradient(180deg, var(--sky-200), var(--sky-400)); box-shadow: inset 0 -7px 0 rgba(15, 44, 68, .14), 0 4px 0 var(--ink); }
.step-art .ico { width: 58px; height: 58px; }
.step .n { position: absolute; top: -14px; left: -14px; width: 38px; height: 38px; display: grid; place-items: center; padding-bottom: 3px; border: 3px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #f6705c, #cf3423); box-shadow: 0 3px 0 var(--ink); font: 400 20px/1 var(--display); color: var(--cream); -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.step h3 { font-size: 23px; margin-bottom: 6px; }
.step p { font-size: 15.5px; color: var(--ink-soft); }

.proofs { display: grid; gap: 30px; margin-top: 8px; }
.panel.proof { padding-top: 56px; text-align: center; }
.proof-art { position: absolute; top: -36px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #f4f6f8, #b4bdc8); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .14), 0 4px 0 rgba(6, 34, 16, .35); }
.proof-art .ico { width: 52px; height: 52px; }
.proof h3 { font-size: 23px; margin-bottom: 8px; }
.proof p { font-size: 15.5px; color: var(--ink-soft); }
.ladder { margin-top: 34px; padding: 18px 16px 20px; border: 4px solid var(--ink); border-radius: 22px; color: var(--cream);
  background: var(--plate);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .22), var(--drop); }
.ladder h3 { text-align: center; font-size: 22px; margin-bottom: 14px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.ladder ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ladder li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, var(--parch-50), var(--parch-100)); border: 3px solid var(--ink); border-radius: 14px; color: var(--ink); }
.ladder li > .ico { width: 38px; height: 38px; }
.ladder .rank { flex: none; width: 30px; height: 30px; display: grid; place-items: center; padding-bottom: 2px; border: 3px solid var(--ink); border-radius: 50%; background: var(--gold-400); font: 400 16px/1 var(--display); }
.ladder b { display: block; font: 400 18px/1.2 var(--display); }
.ladder li span:not(.rank) { font-size: 14px; color: var(--ink-soft); }

.lobby-wide { max-width: 820px; margin: 0 auto; }
.fee-grid { display: grid; gap: 24px; }
.potsplit h3, .example h3 { font-size: 23px; margin-bottom: 14px; }
.potbar { display: flex; height: 58px; overflow: hidden; border: 3px solid var(--ink); border-radius: 15px; box-shadow: 0 4px 0 rgba(6, 34, 16, .3); }
.potbar i { display: flex; align-items: center; justify-content: center; gap: 8px; font: 400 18px/1 var(--display); font-style: normal; white-space: nowrap; }
.potbar .w { flex: 1; background: linear-gradient(180deg, #ffe880 0%, #ffcb2e 50%, #f6a50a 50%); color: var(--ink); }
.potbar .w .ico { width: 34px; height: 34px; }
.potbar .f { flex: none; width: 64px; border-left: 3px solid var(--ink); background: linear-gradient(180deg, #f6705c 0%, #dc3d2a 50%, #bd2c1c 50%); color: var(--cream); -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.split { margin: 16px 0 0; display: grid; gap: 10px; }
.split > div { padding: 10px 12px; background: rgba(16, 92, 44, .09); border: 2px solid rgba(6, 34, 16, .22); border-radius: 12px; }
.split dt { font: 400 30px/1.1 var(--display); }
.split dd { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.sum { list-style: none; margin: 0; padding: 0; }
.sum li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 2px dashed rgba(6, 34, 16, .22); font-size: 15.5px; }
.sum li span { color: var(--ink-soft); }
.sum li b { font-weight: 900; white-space: nowrap; }
.sum .total { margin-top: 8px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: linear-gradient(180deg, var(--gold-200), #ffd75a); align-items: center; }
.sum .total span { color: var(--ink); font-weight: 900; }
.sum .total b { font: 400 21px/1 var(--display); display: inline-flex; align-items: center; gap: 6px; }
.example .fine { margin-top: 12px; }
.example .fine a { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; }

.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(180deg, var(--parch-50), var(--parch-100)); box-shadow: 0 5px 0 rgba(6, 34, 16, .28); }
.faq summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font: 400 19px/1.25 var(--display); cursor: pointer; list-style: none; border-radius: 13px; }
.faq summary::-webkit-details-marker, .lineups > summary::-webkit-details-marker, .dev > summary::-webkit-details-marker { display: none; }
.faq summary span { flex: 1; }
.faq summary .ico, .lineups > summary > .ico.line, .dev > summary > .ico.line { transition: transform .2s; }
.faq details[open] summary .ico, .lineups[open] > summary > .ico.line, .dev[open] > summary > .ico.line { transform: rotate(45deg); }
.faq details p { padding: 0 16px 16px; font-size: 15.5px; color: var(--ink-soft); }

.final { padding-bottom: 64px; }
.final-card { position: relative; overflow: hidden; padding: 46px 20px 50px; text-align: center; display: grid; justify-items: center; gap: 12px; --focus: #fff;
  border: 4px solid var(--ink); border-radius: 28px; color: var(--cream);
  background: radial-gradient(circle at 50% -20%, rgba(255, 207, 58, .5), transparent 55%), var(--plate);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .22), var(--drop); }
.final-cast { display: flex; align-items: flex-end; justify-content: center; }
.final-cast .troop { width: 72px; height: 72px; margin: 0 -8px; }
.final-mark { width: 92px; height: 92px; margin: 0 6px 6px; z-index: 1; filter: drop-shadow(0 5px 0 rgba(6, 34, 16, .4)); }
.final-card h2 { font-size: clamp(34px, 8.6vw, 56px); }
.final-card p { font-size: 19px; margin-bottom: 8px; }

/* ---------- the lobby ---------- */
.lobby .stack { gap: 12px; }
.lobby-head { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 20px; color: var(--cream); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.lobby-head span { min-width: 28px; padding: 1px 8px 2px; border-radius: 999px; background: var(--ink); color: var(--gold-300); font: 900 14px/1.5 var(--body); text-align: center; -webkit-text-stroke: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.row-duel, .row-war, .row-done, .row-log {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
  border: 3px solid var(--ink); border-radius: 15px; background: linear-gradient(180deg, var(--parch-50), var(--parch-100)); color: var(--ink);
  box-shadow: 0 4px 0 rgba(6, 34, 16, .4);
}
.row-duel { flex-wrap: wrap; }
.who { flex: 1 1 120px; min-width: 0; display: grid; gap: 1px; }
.who b { font: 400 18px/1.2 var(--display); overflow-wrap: anywhere; }
.who b i { font: 800 13px var(--body); font-style: normal; color: var(--ink-soft); }
.by { font-size: 13px; color: var(--ink-soft); }
.meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.stake-col { flex: none; display: grid; justify-items: end; text-align: right; }
.stake-col b { display: inline-flex; align-items: center; gap: 4px; font: 400 19px/1.2 var(--display); }
.stake-col b .ico { width: 22px; height: 22px; }
.stake-col span { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.join-col { flex: 1 0 100%; display: grid; }
.join-col:empty { display: none; }
.join-col .chip { justify-self: start; }
.row-war { display: grid; grid-template-columns: 1fr auto; cursor: pointer; font: inherit; }
.row-war:hover, .row-log:hover { filter: brightness(1.03); transform: translateY(-1px); }
.row-war .sides { display: grid; gap: 4px; min-width: 0; }
.row-war .side { display: flex; align-items: center; gap: 7px; min-width: 0; }
.row-war .side .avatar { width: 34px; height: 34px; border-width: 2.5px; box-shadow: none; }
.row-war .side b { flex: 1; min-width: 0; font: 400 17.5px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-war .side em { display: inline-flex; align-items: center; gap: 3px; font: 400 18px/1 var(--display); font-style: normal; }
.row-war .side em .ico { width: 20px; height: 20px; }
.row-war .meta { grid-column: 1 / -1; }
.row-war .watch { grid-row: 1; grid-column: 2; align-self: center; width: 24px; height: 24px; color: var(--ink-soft); }
.row-done > .ico { width: 32px; height: 32px; }
.empty { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px dashed rgba(6, 34, 16, .35); border-radius: 12px; background: rgba(16, 92, 44, .08); font-size: 14.5px; color: var(--ink-soft); }
.empty .ico { width: 30px; height: 30px; }
.empty .troop { width: 72px; height: 72px; margin: -12px -4px -8px -6px; }
.panel.wood .empty { border-color: rgba(255, 246, 220, .55); background: rgba(6, 34, 16, .3); color: var(--cream); }

/* ---------- the game ---------- */
.gate { max-width: var(--wrap); margin: 0 auto; padding: 26px 16px 0; display: grid; gap: 18px; }
.gate-copy { display: grid; gap: 14px; }
.gate-copy h1, .link-head h1 { font-size: clamp(36px, 9.6vw, 58px); }
.gate-copy .lede, .link-head .lede { color: #fff; }
.gate-copy .panel { margin-top: 30px; }
.solo { max-width: 780px; margin: 34px auto 0; padding: 0 16px; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.progress li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 4px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--parch-100); font: 900 13px/1.4 var(--body); color: var(--ink-soft); }
.progress li span { width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--stone-300); font-size: 12px; color: var(--ink); }
.progress li span .ico { width: 15px; height: 15px; }
.progress li.now { background: var(--gold-400); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.progress li.now span { background: var(--paper); }
.progress li.done { color: var(--ink); }
.progress li.done span { background: var(--green-800); }

.challenge { position: relative; max-width: var(--wrap); width: calc(100% - 32px); margin: 20px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 58px 14px 14px; border: 4px solid var(--ink); border-radius: 20px; background: linear-gradient(180deg, var(--gold-200), #ffd75a); box-shadow: var(--drop); }
.challenge > .ico { width: 50px; height: 50px; }
.challenge > .avatar { width: 58px; height: 58px; }
.challenge > .troop { width: 70px; height: 70px; margin: -8px -6px; }
.challenge h3 { font-size: 22px; }
.challenge p { margin-top: 2px; font-size: 15px; }
.challenge .grow { flex: 1 1 220px; }
.challenge > .icon-btn { position: absolute; top: 10px; right: 10px; }
.challenge > .btn.green { flex: 1 1 100%; }
.challenge.gone { background: linear-gradient(180deg, #f4f6f8, #c9d0d9); }

.link-head { max-width: var(--wrap); margin: 0 auto; padding: 26px 16px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.link-copy { display: grid; gap: 12px; }
.head-cast { display: none; align-items: flex-end; flex: none; margin-bottom: -22px; }
.head-cast .troop { width: 120px; height: 120px; margin: 0 -12px; }
.link-grid { max-width: var(--wrap); margin: 0 auto; padding: 30px 16px 0; display: grid; gap: 44px; }
.tk { list-style: none; counter-reset: tk; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.tk li { counter-increment: tk; position: relative; display: grid; grid-template-columns: 118px 1fr; gap: 12px; align-items: center; padding: 10px; background: rgba(16, 92, 44, .08); border: 2px solid rgba(6, 34, 16, .25); border-radius: 15px; }
.tk li::before { content: counter(tk); position: absolute; top: -9px; left: -9px; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; padding-bottom: 2px; border: 3px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #f6705c, #cf3423); font: 400 15px/1 var(--display); color: var(--cream); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.tk-art { height: 78px; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--ink); border-radius: 12px; background: linear-gradient(180deg, var(--grass-400), var(--grass-600)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); }
.tk-gear { width: 50px; height: 50px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 13px; background: linear-gradient(180deg, #ffe880, #f6a50a); box-shadow: 0 3px 0 var(--ink); }
.tk-gear .ico { width: 36px; height: 36px; }
.tap { position: relative; }
.tap::after { content: ''; position: absolute; inset: -7px; border: 3px solid var(--cream); border-radius: 14px; box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--ink); pointer-events: none; }
.tk-win .tap::after { inset: -5px; border-radius: 9px; border-color: var(--gold-400); }
.tk-win { width: 94px; display: grid; justify-items: center; gap: 4px; padding: 4px 4px 7px; border: 2.5px solid var(--ink); border-radius: 9px; background: var(--parch-50); box-shadow: 0 3px 0 rgba(6, 34, 16, .45); }
.tk-win i { font: 400 11.5px/1.2 var(--display); font-style: normal; color: var(--ink); }
.tk-btn { padding: 2px 7px 3px; border: 2px solid var(--ink); border-radius: 6px; background: linear-gradient(180deg, #6db6ff, #2470d2); font: 400 10.5px/1.2 var(--display); color: #fff; white-space: nowrap; box-shadow: 0 2px 0 var(--ink); }
.tk-btn.green { background: linear-gradient(180deg, #b6f05e, #58ad1f); color: var(--ink); }
.tk-token { display: flex; align-items: center; gap: 4px; padding: 4px 7px; border: 2.5px solid var(--ink); border-radius: 9px; background: var(--parch-50); box-shadow: 0 3px 0 rgba(6, 34, 16, .45); }
.tk-token .ico { width: 22px; height: 22px; }
.tk-token code { font: 700 12px var(--mono); }
.tk-copy b { display: block; font: 400 17.5px/1.2 var(--display); }
.tk-copy p { margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }

.dash { max-width: var(--wrap); margin: 0 auto; padding: 22px 16px 8px; display: grid; gap: 34px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "captain" "main" "lobby" "log"; align-items: start; }
.a-captain { grid-area: captain; }
.a-main { grid-area: main; }
.a-lobby { grid-area: lobby; }
.a-log { grid-area: log; }
.dash > .panel { margin-top: 0; }
.dash > .panel:has(> .ribbon) { margin-top: 14px; }

.row-duel .avatar { width: 50px; height: 50px; }
.captain .avatar { width: 64px; height: 64px; }
.avatar.none { display: grid; place-items: center; }
.avatar.none .ico { width: 62%; height: 62%; }

.captain { padding: 16px 16px 14px; }
.cap-main { display: flex; align-items: center; gap: 12px; }
.captain h2 { font-size: 27px; overflow-wrap: anywhere; }
.captain .sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.cap-clan { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; background: rgba(16, 92, 44, .1); border: 2px solid rgba(6, 34, 16, .25); border-radius: 13px; }
.cap-clan > .ico { width: 34px; height: 34px; }
.cap-clan b { display: block; font: 400 18px/1.2 var(--display); overflow-wrap: anywhere; }
.cap-clan span:not(.chip) { font-size: 12.5px; color: var(--ink-soft); }
.cap-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cap-tools .icon-btn { margin-left: auto; }
.captain .fine { margin-top: 10px; font-size: 12.5px; }

.prize { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 17px; background: linear-gradient(180deg, var(--gold-200), #ffd75a); box-shadow: inset 0 -5px 0 rgba(143, 74, 0, .22); }
.prize > .ico { width: 60px; height: 60px; }
.prize p { font: 900 12.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: .07em; color: #6b3d00; }
.prize .amount { font: 400 34px/1.05 var(--display); }
.prize .amount small { font-size: .55em; }
.prize.big .amount { font-size: 46px; }
.stake-row { display: grid; gap: 10px; }
.stake-in { font: 400 26px/1 var(--display); text-align: center; min-height: 58px; }
.quick { justify-content: center; }
.quick .seg { flex: 1; }
.sizes .seg { flex: 1 0 58px; }
.cap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.stepper { display: inline-flex; align-items: center; gap: 7px; }
.stepper output { min-width: 104px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 10px 4px; border: 3px solid var(--ink); border-radius: 11px; background: var(--paper); }
.stepper output b { font: 400 19px/1 var(--display); }
.stepper output .ico { width: 26px; height: 26px; }
.join-row { display: flex; gap: 10px; }
.code-in { flex: 1; min-width: 0; font: 400 22px/1 var(--display); text-align: center; text-transform: uppercase; letter-spacing: .22em; }
.code-in::placeholder { letter-spacing: .22em; }

.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: stretch; text-align: center; }
.fighter { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 12px 6px 12px; border: 3px solid var(--ink); border-radius: 17px; min-width: 0; }
.fighter.blue { background: linear-gradient(180deg, var(--blue-100), var(--blue-200)); }
.fighter.red { background: linear-gradient(180deg, var(--red-100), var(--red-200)); }
.fighter .label { font: 900 11px/1.4 var(--body); text-transform: uppercase; letter-spacing: .09em; }
.fighter.blue .label { color: var(--blue-900); }
.fighter.red .label { color: var(--red-900); }
.fighter h3 { font-size: 19px; overflow-wrap: anywhere; }
.fighter .cap { font-size: 13px; line-height: 1.3; color: var(--ink-soft); overflow-wrap: anywhere; }
.fighter .note { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 0 9px 1px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 12.5px; }
.fighter .note .ico { width: 15px; height: 15px; }
.fighter .note.paid { background: #c9f08f; }
.fighter .avatar { width: 70px; height: 70px; margin-bottom: 2px; }
.vs { align-self: center; display: grid; justify-items: center; gap: 0; }
.vs .ico { width: 34px; height: 34px; }
.vs b { font: 400 21px/1 var(--display); color: var(--cream); -webkit-text-stroke: 4.5px var(--ink); paint-order: stroke fill; }
.duel-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.tiles-code { display: flex; justify-content: center; gap: 6px; }
.tiles-code span { width: 44px; height: 56px; display: grid; place-items: center; padding-bottom: 3px; border: 3px solid var(--ink); border-radius: 11px; background: linear-gradient(180deg, #2aa04c, #136e30); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 4px 0 var(--ink); font: 400 29px/1 var(--display); color: var(--cream); -webkit-text-stroke: 4.5px var(--ink); paint-order: stroke fill; }
.invite { display: flex; gap: 8px; align-items: center; }
.invite input { flex: 1; min-width: 0; min-height: 44px; padding: 6px 10px; font: 700 13px var(--mono); }

.timer { --focus: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 12px 9px; border: 3px solid var(--ink); border-radius: 15px; background: linear-gradient(180deg, #17803a, #0d5a26); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .16), 0 3px 0 rgba(6, 34, 16, .35); color: var(--cream); text-align: left; }
.timer > .ico { width: 36px; height: 36px; }
.timer-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.timer-label { font: 900 11.5px/1.3 var(--body); text-transform: uppercase; letter-spacing: .08em; color: #d9ffd0; }
.bar { height: 13px; overflow: hidden; border: 2px solid var(--ink); border-radius: 999px; background: rgba(0, 0, 0, .42); }
.bar i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(180deg, #c8f56e, #6cc422); transition: width 1s linear; }
.timer time { min-width: 3.3ch; font: 400 25px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.timer.big time { font-size: 34px; }
.timer.low .bar i { background: linear-gradient(180deg, #ff9a85, #e2412e); }
.timer.low time { color: #ffc4b8; }

.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.steps li { counter-increment: st; position: relative; padding: 11px 12px 12px 56px; border: 3px solid var(--ink); border-radius: 15px; background: var(--paper); }
.steps li::before { content: counter(st); position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; padding-bottom: 3px; border: 3px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #6db6ff, #2470d2); font: 400 18px/1 var(--display); color: var(--cream); -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; }
.steps h3 { font-size: 18.5px; margin-bottom: 2px; }
.steps p { font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.tagline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; padding: 6px 8px 6px 10px; border: 2px solid var(--ink); border-radius: 11px; background: var(--red-100); }
.tagline .ico { width: 24px; height: 24px; }
.tagline b { font: 400 16px/1.2 var(--display); }
.tagline code { margin-right: auto; font: 700 15px var(--mono); }
.capnote { display: flex; gap: 8px; align-items: flex-start; margin-top: 7px; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 11px; background: #ffdcae; color: var(--ink) !important; }
.capnote .ico { width: 26px; height: 26px; }
.capnote b { font-weight: 900; }

.refusal { text-align: center; }
.refusal h2 { font-size: 26px; }
.ref-art { display: flex; justify-content: center; align-items: flex-end; }
.ref-art .troop { width: 128px; height: 128px; margin: -8px 0 -6px; }
.ref-art .ico { width: 50px; height: 50px; margin: 0 0 6px -34px; }
.todo { list-style: none; counter-reset: td; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.todo li { counter-increment: td; position: relative; padding: 9px 12px 10px 48px; border: 2.5px solid var(--ink); border-radius: 13px; background: var(--paper); font-size: 15px; }
.todo li::before { content: counter(td); position: absolute; left: 10px; top: 8px; width: 28px; height: 28px; display: grid; place-items: center; padding-bottom: 2px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--gold-400); font: 400 15px/1 var(--display); }

/* the war */
.warboard { display: grid; gap: 12px; }
.warboard > * { min-width: 0; }
.wb-head { display: grid; gap: 10px; justify-items: center; }
.wb-head .timer, .wb-head .notice { width: 100%; }
.wb-head > .chip { font-size: 14px; padding: 2px 12px 3px; }
.wb-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: stretch; }
.wb-clan { display: grid; gap: 7px; align-content: start; justify-items: center; padding: 12px 8px; border: 3px solid var(--ink); border-radius: 17px; min-width: 0; text-align: center; }
.wb-clan.blue { background: linear-gradient(180deg, var(--blue-100), var(--blue-200)); }
.wb-clan.red { background: linear-gradient(180deg, var(--red-100), var(--red-200)); }
.wb-name { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.wb-name .avatar { width: 62px; height: 62px; margin-bottom: 2px; }
.wb-name b { display: block; font: 400 18px/1.15 var(--display); overflow-wrap: anywhere; }
.wb-name span { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.wb-stars b { display: block; font: 400 48px/1 var(--display); color: var(--cream); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }
.wb-stars span { display: block; margin-top: 2px; font-size: 12.5px; }
.stars3 { display: flex; justify-content: center; align-items: flex-end; }
.stars3 .s { --w: 32px; position: relative; width: var(--w); height: var(--w); }
.stars3 .s:nth-child(2) { --w: 44px; margin: 0 -3px 3px; z-index: 1; }
.stars3 .s:first-child { transform: rotate(-12deg); }
.stars3 .s:last-child { transform: rotate(12deg); }
.stars3 .ico { position: absolute; top: 0; left: 0; width: var(--w); height: var(--w); max-width: none; }
.stars3 .fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; transition: width .6s; }
.dbar { position: relative; width: 100%; height: 28px; overflow: hidden; border: 3px solid var(--ink); border-radius: 999px; background: #4a3320; }
.dbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffc44a, #f0641f); border-right: 2px solid var(--ink); transition: width .6s; }
.dbar span { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; font: 900 13.5px/1 var(--body); color: #fff; text-shadow: 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); }
.dbar span .ico { width: 17px; height: 17px; }
.wb-att { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; line-height: 1.3; }
.wb-att .ico { width: 18px; height: 18px; }
.wb-vs { align-self: center; font: 400 20px/1 var(--display); color: var(--cream); -webkit-text-stroke: 4.5px var(--ink); paint-order: stroke fill; }
.lineups { overflow: hidden; border: 3px solid var(--ink); border-radius: 15px; background: var(--paper); text-align: left; width: 100%; }
.lineups > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font: 400 17.5px/1.2 var(--display); cursor: pointer; list-style: none; }
.lineups > summary > span:first-child { flex: 1; }
.lu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 3px solid var(--ink); max-height: 430px; overflow: auto; overscroll-behavior: contain; }
.lu.red { border-left: 3px solid var(--ink); }
.lu h4 { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 2px solid var(--ink); font-size: 14.5px; overflow-wrap: anywhere; }
.lu h4 .ico { width: 20px; height: 20px; }
.lu.blue h4 { background: var(--blue-200); }
.lu.red h4 { background: var(--red-200); }
.lu ol { list-style: none; margin: 0; padding: 4px; }
.lu li { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 8px; font-size: 13.5px; min-width: 0; }
.lu li:nth-child(even) { background: rgba(16, 92, 44, .09); }
.lu .pos { flex: none; width: 19px; text-align: center; font: 400 13.5px var(--display); color: var(--ink-soft); }
.lu .th { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 0 6px 0 2px; border: 2px solid var(--ink); border-radius: 8px; background: var(--parch-100); font: 900 12.5px/1.5 var(--body); }
.lu .th .ico { width: 18px; height: 18px; }
.lu .nm { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.lu li.over { background: var(--red-200); box-shadow: inset 0 0 0 2px var(--red-700); }
.lu li.over .th { background: var(--red-500); color: #fff; }
.lineups .warboard { padding: 12px; border-top: 3px solid var(--ink); }

/* history */
.row-log { cursor: pointer; font: inherit; }
.row-log .res { flex: none; min-width: 84px; padding: 3px 8px 5px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--stone-100); font: 400 15.5px/1.2 var(--display); text-align: center; }
.row-log.win .res { background: var(--gold-400); }
.row-log.loss .res { background: var(--red-200); }
.row-log.draw .res { background: var(--blue-200); }
.row-log .who b { font-size: 17px; }
.row-log .who small { font-size: 13px; color: var(--ink-soft); }
.pay-col { flex: none; display: grid; justify-items: end; font: 400 16.5px/1.2 var(--display); white-space: nowrap; }
.pay-col small { font: 800 11.5px var(--body); color: var(--ink-soft); }
.up { color: #1f6208; }
.down { color: var(--red-700); }
.row-log .go { width: 18px; height: 18px; color: var(--ink-soft); }

/* ---------- dialog: results and watching ---------- */
dialog { color: var(--ink); }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: rgba(3, 22, 10, .78); overflow: hidden; overscroll-behavior: contain; }
.dlg {
  width: min(580px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); padding: 20px 16px 20px; overflow: auto;
  border: 4px solid var(--ink); border-radius: 24px;
  background: linear-gradient(180deg, var(--parch-50), var(--parch-100) 62%, var(--parch-200));
  box-shadow: var(--frame), 0 12px 0 rgba(0, 0, 0, .4);
}
.dlg-x { position: sticky; top: 0; z-index: 5; display: flex; margin: -4px -4px -44px auto; }
.result { display: grid; gap: 13px; justify-items: center; text-align: center; clear: none; }
.result > * { min-width: 0; max-width: 100%; }
.res-stars { display: flex; align-items: flex-end; justify-content: center; margin-top: 6px; filter: drop-shadow(0 5px 0 rgba(6, 34, 16, .3)); }
.res-stars .ico { width: 70px; height: 70px; }
.res-stars .ico:nth-child(2) { width: 96px; height: 96px; margin: 0 -10px 8px; z-index: 1; }
.res-stars .ico:first-child { transform: rotate(-14deg); }
.res-stars .ico:last-child { transform: rotate(14deg); }
.res-cast { display: flex; align-items: flex-end; justify-content: center; margin-top: -34px; }
.res-cast .troop { width: 84px; height: 84px; }
.res-cast .lead { width: 116px; height: 116px; margin: 0 -18px; z-index: 1; }
.res-cast.duo { margin-top: 34px; gap: 2px; }
.res-cast.duo .troop { width: 92px; height: 92px; }
.res-cast.duo .res-art { width: 84px; height: 84px; margin: 0 -4px 6px; z-index: 1; }
.res-cast.duo .res-art .ico { width: 54px; height: 54px; }
.res-art { width: 104px; height: 104px; margin-top: 6px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 50%; background: linear-gradient(180deg, #f4f6f8, #b4bdc8); box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .14), 0 5px 0 rgba(6, 34, 16, .3); }
.res-art .ico { width: 66px; height: 66px; }
.result h2 { --sw: 9px; --dropy: 5px; font-size: clamp(42px, 12.5vw, 62px); line-height: 1; }
.result.win h2 { color: var(--gold-400); }
.result.loss h2 { color: var(--red-400); }
.result.draw h2 { color: var(--blue-200); }
.result.void h2, .result.expired h2, .result.cancelled h2 { color: var(--stone-100); }
.result.decided h2 { font-size: clamp(30px, 8vw, 44px); }
.res-sub { font-size: 14.5px; color: var(--ink-soft); }
.res-score { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.res-score > div { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 8px 10px; border: 3px solid var(--ink); border-radius: 16px; min-width: 0; }
.res-score .blue { background: linear-gradient(180deg, var(--blue-100), var(--blue-200)); }
.res-score .red { background: linear-gradient(180deg, var(--red-100), var(--red-200)); }
.res-score .won { box-shadow: 0 0 0 4px var(--gold-400), 0 0 0 7px var(--ink); }
.res-score .won::before { content: 'Winner'; position: absolute; top: -13px; padding: 0 10px 1px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--gold-400); font: 400 13px/1.5 var(--display); }
.res-score .nm { display: inline-flex; align-items: center; gap: 5px; font: 400 16.5px/1.2 var(--display); overflow-wrap: anywhere; }
.res-score .avatar { width: 50px; height: 50px; margin-bottom: 2px; }
.res-score b { display: inline-flex; align-items: center; gap: 4px; font: 400 40px/1 var(--display); color: var(--cream); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.res-score b .ico { width: 32px; height: 32px; }
.res-score .ds { font-size: 13px; }
.reason { padding: 10px 14px; border: 2px dashed rgba(6, 34, 16, .4); border-radius: 13px; background: rgba(16, 92, 44, .08); font-size: 15px; }
.res-line { font-size: 15.5px; }
.reward { display: flex; align-items: center; gap: 12px; padding: 10px 18px 12px 12px; border: 3px solid var(--ink); border-radius: 17px; background: linear-gradient(180deg, var(--gold-200), #ffd75a); box-shadow: inset 0 -5px 0 rgba(143, 74, 0, .22); text-align: left; }
.reward .ico { width: 54px; height: 54px; }
.reward span { display: block; font: 900 12px/1.3 var(--body); text-transform: uppercase; letter-spacing: .07em; color: #6b3d00; }
.reward b { font: 400 31px/1.05 var(--display); }
.reward.refund { background: linear-gradient(180deg, var(--blue-100), var(--blue-200)); box-shadow: inset 0 -5px 0 rgba(18, 58, 122, .16); }
.reward.refund span { color: var(--blue-900); }
.payouts { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 7px; text-align: left; }
.payouts li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2.5px solid var(--ink); border-radius: 13px; background: var(--paper); }
.payouts li > .ico { width: 30px; height: 30px; }
.payouts .grow b { display: block; font: 400 16px/1.2 var(--display); }
.payouts .amt { display: grid; justify-items: end; font-size: 13.5px; }
.payouts .amt b { font-weight: 900; font-size: 15px; white-space: nowrap; }
.payouts .amt a { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; }
.payouts .pending { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.result .actions { width: 100%; margin-top: 4px; }
.watch { display: grid; gap: 14px; }
.watch > * { min-width: 0; }
.watch h2 { --sw: 7px; font-size: clamp(26px, 7vw, 36px); text-align: center; color: var(--cream); padding: 0 40px; }
.rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 20px; }
.rain .ico { position: absolute; top: -40px; width: 26px; height: 26px; opacity: 0; }
.result > :not(.rain) { position: relative; }

/* ---------- analytics ---------- */
body[data-page='analytics'] #app { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px 16px 20px; display: grid; gap: 26px; align-content: start; }
body[data-page='analytics'] #app > * { min-width: 0; }
.an-head { margin-bottom: 0; }
.an-cast { display: flex; align-items: flex-end; justify-content: center; margin-bottom: -4px; }
.an-cast .troop { width: 84px; height: 84px; }
.an-cast .ico { width: 68px; height: 68px; margin: 0 -6px 4px; z-index: 1; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: grid; justify-items: center; gap: 2px; padding: 14px 8px 14px; text-align: center; border: 3px solid var(--ink); border-radius: 18px; background: linear-gradient(180deg, var(--parch-50), var(--parch-100)); box-shadow: 0 6px 0 rgba(6, 34, 16, .28); min-width: 0; }
.tile .ico { width: 46px; height: 46px; }
.tile b { font: 400 28px/1.1 var(--display); overflow-wrap: anywhere; }
.tile span { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.stat-card h2 { font-size: 23px; }
.stat-card > .muted { margin-top: 4px; font-size: 14.5px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.facts div { padding: 10px 12px; background: rgba(16, 92, 44, .09); border: 2px solid rgba(6, 34, 16, .22); border-radius: 13px; min-width: 0; }
.facts b { display: block; font: 400 25px/1.1 var(--display); overflow-wrap: anywhere; }
.facts span { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14.5px; }
.links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; }
.an-grid { display: grid; gap: 26px; }
.an-grid > * { min-width: 0; }
.chart { position: relative; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: rgba(6, 34, 16, .2); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .axis { stroke: var(--ink); stroke-width: 2; }
.chart .tick { font: 800 20px var(--body); fill: var(--ink-soft); }
.chart .bar-seg { stroke: var(--ink); stroke-width: 1.5; }
.chart .hit { outline: none; }
.chart .hit:hover, .chart .hit:focus-visible { fill: rgba(6, 34, 16, .1); }
.tip { position: absolute; top: 0; z-index: 2; transform: translateX(-50%); display: grid; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--cream); font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.tip i, .legend i { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border: 1.5px solid var(--ink); border-radius: 3px; }
.tip i { border-color: var(--cream); }
.chart-empty { position: absolute; left: 60px; right: 8px; top: 36%; text-align: center; font-size: 14px; color: var(--ink-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: 13px; }
.as-table { margin-top: 6px; font-size: 13px; }
.as-table summary { cursor: pointer; color: var(--ink-soft); width: fit-content; padding: 9px 8px 9px 0; }
.as-table table { margin-top: 6px; border-collapse: collapse; }
.as-table th, .as-table td { padding: 3px 12px 3px 0; text-align: left; }
.hbars { display: grid; gap: 9px; margin-top: 14px; }
.hbars > div { display: grid; grid-template-columns: 92px 1fr 26px; gap: 8px; align-items: center; font-size: 13.5px; }
.hbars .track { height: 20px; overflow: hidden; border: 2.5px solid var(--ink); border-radius: 999px; background: rgba(6, 34, 16, .12); }
.hbars i { display: block; height: 100%; background: linear-gradient(180deg, #ffe066, #f09a00); border-right: 2px solid var(--ink); border-radius: 999px; }
.hbars i[style='width:0%'] { border: 0; }
.hbars b { font: 400 16px var(--display); text-align: right; }
.tbl-wrap { margin-top: 12px; overflow-x: auto; border: 3px solid var(--ink); border-radius: 13px; background: var(--paper); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 8px 10px; text-align: left; white-space: nowrap; background: var(--parch-200); border-bottom: 3px solid var(--ink); font: 400 14.5px var(--display); }
.tbl td { padding: 8px 10px; white-space: nowrap; border-top: 2px solid rgba(6, 34, 16, .12); }
.tbl .rank { display: inline-grid; place-items: center; width: 27px; height: 27px; padding-bottom: 1px; border: 2px solid var(--ink); border-radius: 50%; background: var(--stone-100); font: 400 13.5px/1 var(--display); }
.tbl .r1 { background: var(--gold-400); }
.tbl .r2 { background: var(--stone-300); }
.tbl .r3 { background: #e0a070; }
.tbl small { display: block; font-size: 12px; color: var(--ink-soft); }
.tbl a { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; }
.tbl .up, .tbl .down { font-weight: 900; }
.stat-card > .empty { margin-top: 12px; }

/* ---------- toasts, loading, errors ---------- */
#toasts { position: fixed; inset: auto 0 max(14px, env(safe-area-inset-bottom)) 0; z-index: 90; width: min(480px, calc(100vw - 20px)); height: auto; margin: 0 auto; padding: 0; border: 0; background: none; overflow: visible; gap: 8px; pointer-events: none; }
#toasts:not([popover]) { display: grid; }
#toasts:popover-open { display: grid; }
#toasts:empty { display: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 9px 8px 10px 12px; border: 3px solid var(--ink); border-radius: 15px; background: #ffe4dc; box-shadow: 0 5px 0 rgba(6, 34, 16, .45); color: var(--ink); font: 800 15px/1.4 var(--body); }
.toast.ok { background: var(--green-200); }
.toast > .ico { width: 28px; height: 28px; margin-top: 1px; }
.toast p { flex: 1; margin: 3px 0 0; }
.toast-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.toast-x:hover { background: rgba(6, 34, 16, .12); }

.boot { display: grid; justify-items: center; gap: 14px; padding: 22vh 16px; text-align: center; font: 400 23px var(--display); color: var(--cream); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.boot-mark { width: 92px; height: 92px; filter: drop-shadow(0 5px 0 rgba(6, 34, 16, .3)); }
.error-card { max-width: 480px; margin: 70px auto; width: calc(100% - 32px); text-align: center; }
.error-card .stack { justify-items: center; }
.error-card .troop { width: 120px; height: 120px; margin: -6px 0 -10px; }
.error-card .btn .ico { width: 1.1em; height: 1.1em; }

/* ---------- test tools ---------- */
.dev { width: calc(100% - 32px); max-width: calc(var(--wrap) - 32px); margin: 34px auto 8px; border: 4px dashed var(--ink); border-radius: 20px; background: linear-gradient(180deg, #eef1f4, #c3cad3); color: var(--ink); }
.dev > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 14px; font: 400 19px/1.2 var(--display); cursor: pointer; list-style: none; border-radius: 16px; }
.dev > summary > .ico:first-child { width: 30px; height: 30px; }
.dev > summary small { flex: 1; font: 800 12.5px/1.3 var(--body); color: #333b47; }
.dev-body { display: grid; gap: 10px; padding: 2px 12px 14px; }
.dev-group { padding: 10px 12px 12px; border: 2px solid rgba(6, 34, 16, .4); border-radius: 13px; background: rgba(255, 255, 255, .6); min-width: 0; }
.dev-group h4 { font-size: 16px; }
.dev-group p { margin: 2px 0 8px; font-size: 13px; color: #333b47; }
.dev-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 7px; }
.dev-row label { display: grid; gap: 2px; font-size: 12px; }
.dev-row input, .dev-row select { width: 78px; min-height: 40px; padding: 3px 8px; font-size: 15px; border-radius: 10px; }

/* ---------- footer ---------- */
.foot { margin-top: 40px; --focus: #fff; border-top: 4px solid var(--ink); background: linear-gradient(180deg, #0e4a22, #072c14); color: #dcf5d6; box-shadow: inset 0 5px 0 rgba(255, 255, 255, .08); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 30px 16px 34px; display: grid; gap: 22px; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand .ico { width: 52px; height: 52px; }
.foot-brand p { margin-top: 4px; font-size: 14.5px; color: #dcf5d6; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--gold-300); font-weight: 900; }
.foot-links a { font: 400 18px var(--display); text-decoration: none; padding: 6px 0; }
.foot-links a:hover { text-decoration: underline; }
.foot-legal { display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; color: #c4e6c0; }
.foot-legal a { display: inline-flex; align-items: center; gap: 3px; }
.foot-legal .disclaimer { color: #b3d9b0; overflow-wrap: anywhere; }
.foot-legal .disclaimer a { display: inline; }

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .join-col { flex: none; }
  .join-col .chip { justify-self: end; }
  .stake-row { grid-template-columns: 170px 1fr; align-items: center; }
  .split { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .panel { padding: 26px 24px 24px; }
  .fighter h3 { font-size: 22px; }
  .wb-name b { font-size: 21px; }
  .stars3 .s { --w: 40px; }
  .stars3 .s:nth-child(2) { --w: 56px; }
  .wb-stars b { font-size: 58px; }
  .tiles-code span { width: 54px; height: 66px; font-size: 35px; }
  .dlg { padding: 24px 24px 24px; }
  .res-cast.duo { margin-top: 6px; }
  .res-cast.duo .troop { width: 108px; height: 108px; }
  .challenge { padding-right: 14px; }
  .challenge > .icon-btn { position: static; }
  .chart .tick { font-size: 13px; }
  .wb-clan { padding: 14px 14px; }
  .lu li { font-size: 14.5px; padding: 5px 8px; gap: 8px; }
}
@media (min-width: 700px) {
  .steps4 { grid-template-columns: 1fr 1fr; gap: 26px; }
  .plank { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 16px 18px 18px; }
  .stat:nth-child(n) { border-bottom: 0; border-right: 3px solid rgba(6, 34, 16, .35); }
  .stat:last-child { border-right: 0; }
  .stat b { font-size: 34px; }
  .stat span { font-size: 13.5px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .ladder ol { grid-template-columns: repeat(3, 1fr); }
  .foot-in { grid-template-columns: 1fr auto; align-items: center; }
  .foot-legal { grid-column: 1 / -1; }
  .dev-body { grid-template-columns: 1fr 1fr; }
  .hud { gap: 10px; }
  .pill { font-size: 12px; padding: 2px 10px; }
}
@media (min-width: 960px) {
  .navlinks { display: flex; }
  .lp-hero { padding: 40px 24px 130px; }
  .lp-hero-in { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: 20px; }
  .lp-copy h1 { font-size: clamp(50px, 6vw, 92px); } /* two columns: size by the column, not the viewport */
  .lp-hero .scene { max-width: 720px; width: calc(100% + 44px); margin-right: -44px; }
  .challenge > .btn.green { flex: none; }
  .lede { font-size: 20px; }
  .hills { height: 120px; }
  .sec { padding-top: 92px; }
  .sec.band { margin-top: 92px; padding-bottom: 92px; }
  .sec-head { margin-bottom: 44px; }
  .steps4 { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .proofs { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .fee-grid { grid-template-columns: 1.25fr 1fr; align-items: start; }
  .gate { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-top: 44px; }
  .link-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; align-items: start; }
  .link-head { padding-top: 40px; }
  .head-cast { display: flex; }
  .tk li { grid-template-columns: 150px 1fr; }
  .tk-art { height: 92px; }
  .dash { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-areas: "main captain" "main lobby" "main log"; grid-template-rows: auto auto 1fr; gap: 34px 28px; padding-top: 34px; }
  .an-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .final-card { padding: 60px 24px 64px; }
  .final-cast .troop { width: 128px; height: 128px; margin: 0 -12px; }
  .final-mark { width: 124px; height: 124px; margin: 0 14px 10px; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 25px; }
  .brand-mark { width: 40px; height: 40px; }
  .hud-stats { display: none; }
  .top-in { gap: 6px; padding-inline: 10px; }
  .hud { gap: 6px; }
  .pill { font-size: 10px; padding: 1px 6px; letter-spacing: .02em; }
}
@media (max-width: 520px) {
  .pill.mock + .pill.net { display: none; }
}

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes pop { 0% { opacity: 0; transform: translateY(14px) scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes toast-in { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
@keyframes sheen { 0%, 62% { transform: translateX(-140%) skewX(-22deg); } 100% { transform: translateX(260%) skewX(-22deg); } }
@keyframes star-pop { 0% { opacity: 0; transform: scale(.2) rotate(-40deg); } 70% { opacity: 1; transform: scale(1.2) rotate(6deg); } 100% { opacity: 1; transform: none; } }
@keyframes rain { 0% { transform: translateY(0) rotate(0); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(640px) rotate(300deg); opacity: .9; } }
@keyframes hop { from { transform: translateY(0); } to { transform: translateY(-9px); } }
@keyframes hop-flip { from { transform: scaleX(-1) translateY(0); } to { transform: scaleX(-1) translateY(-9px); } }
@keyframes tap { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .55; } }
@keyframes pulse-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* the hero scene: one war in 12 seconds */
@keyframes sc-cloud { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
@keyframes sc-rays { to { transform: rotate(360deg); } }
@keyframes sc-flag { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-7deg) scaleX(.94); } }
@keyframes sc-ring { to { stroke-dashoffset: -42; } }
@keyframes sc-heap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes sc-shot-b { 0% { transform: translate(0, 0); opacity: 0; } .6% { opacity: 1; } 7.8% { transform: translate(356px, -98px); opacity: 1; } 8.2%, 100% { transform: translate(356px, -98px); opacity: 0; } }
@keyframes sc-shot-r { 0% { transform: translate(0, 0); opacity: 0; } .6% { opacity: 1; } 7.8% { transform: translate(-305px, -138px); opacity: 1; } 8.2%, 100% { transform: translate(-305px, -138px); opacity: 0; } }
@keyframes sc-arc { 0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .6, .5, 1); } 3.9% { transform: translateY(-64px); animation-timing-function: cubic-bezier(.5, 0, .8, .4); } 7.8%, 100% { transform: translateY(0); } }
@keyframes sc-boom { 0% { opacity: 0; transform: scale(.2) rotate(0); } .5% { opacity: 1; } 2.6% { opacity: 1; transform: scale(1.2) rotate(14deg); } 5%, 100% { opacity: 0; transform: scale(1.5) rotate(20deg); } }
@keyframes sc-hit { 0%, 4.5%, 100% { transform: none; } .8% { transform: translate(5px, 1px) rotate(1.2deg); } 1.8% { transform: translate(-4px, 0) rotate(-1deg); } 2.8% { transform: translate(3px, 0) rotate(.6deg); } 3.6% { transform: translate(-2px, 0); } }
@keyframes sc-star-b1 { 0%, 16% { opacity: 0; transform: scale(.2); } 18% { opacity: 1; transform: scale(1.45); } 20.500%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-star-r1 { 0%, 28.500% { opacity: 0; transform: scale(.2); } 30.500% { opacity: 1; transform: scale(1.45); } 33%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-star-b2 { 0%, 41% { opacity: 0; transform: scale(.2); } 43% { opacity: 1; transform: scale(1.45); } 45.500%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-star-r2 { 0%, 53.500% { opacity: 0; transform: scale(.2); } 55.500% { opacity: 1; transform: scale(1.45); } 58%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-star-b3 { 0%, 66% { opacity: 0; transform: scale(.2); } 68% { opacity: 1; transform: scale(1.6); } 71%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-halo { 0%, 66% { opacity: 0; transform: scale(.5); } 70% { opacity: 1; transform: scale(1.1); } 82% { opacity: .75; transform: scale(.96); } 94% { opacity: 1; transform: scale(1.06); } 99%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-plaque { 0%, 68% { opacity: 0; transform: translateY(16px) scale(.7); } 71% { opacity: 1; transform: translateY(-3px) scale(1.07); } 73.500%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
@keyframes sc-coin { 0% { transform: translateX(0); opacity: 0; } .8% { opacity: 1; } 9% { transform: translateX(-178px); opacity: 1; } 10%, 100% { transform: translateX(-178px); opacity: 0; } }
@keyframes sc-fight { 0%, 67.900% { opacity: 1; } 68%, 98.900% { opacity: 0; } 99%, 100% { opacity: 1; } }
@keyframes sc-end { 0%, 67.900% { opacity: 0; } 68%, 98.900% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes sc-bob { from { transform: translate(0, 0); } to { transform: translate(5px, -5px); } }
@keyframes sc-coin-arc { 0% { transform: translateY(0) scale(.6); animation-timing-function: cubic-bezier(.2, .6, .5, 1); } 4% { transform: translateY(-92px) scale(1); animation-timing-function: cubic-bezier(.5, 0, .8, .4); } 9%, 100% { transform: translateY(-34px) scale(.9); } }

/* frozen, the scene shows the end of the war: three stars to two, the plaque up */
.sc-shot, .sc-boom, .sc-coin, .sc-fight { opacity: 0; }
.sc-halo { opacity: .9; }
.sc-star, .sc-boom, .sc-halo, .sc-plaque, .sc-rays, .sc-flag { transform-box: fill-box; transform-origin: center; }
.sc-flag { transform-origin: left center; }
.sc-base { transform-box: fill-box; transform-origin: 50% 100%; }

.reveal { opacity: 1; }
.btn.shine { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1.2); }
  .reveal.in { opacity: 1; transform: none; }
  .enter .panel, .enter .challenge, .enter .gate-copy h1 { animation: pop .38s cubic-bezier(.2, .8, .3, 1.2) both; }
  .res-cast .cheer, .final-cast .cheer, .an-cast .cheer, .step-top .cheer { animation: hop .62s ease-in-out infinite alternate; }
  .res-cast .cheer.flip, .final-cast .cheer.flip { animation-name: hop-flip; animation-delay: -.3s; }
  .res-cast .lead.cheer { animation-delay: -.15s; }
  .toast { animation: toast-in .25s ease both; }
  .boot-mark { animation: bob 1.3s ease-in-out infinite; }
  .dlg[open] { animation: pop .3s cubic-bezier(.2, .8, .3, 1.2) both; }
  .btn.shine::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 34%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: sheen 3.6s ease-in-out infinite; pointer-events: none; }
  .chip.battle .dot { animation: pulse-dot 1.1s ease-in-out infinite; }
  .tap::after { animation: tap 1.3s ease-in-out infinite; }
  .res-stars:not(.off) .ico { animation: star-pop .5s cubic-bezier(.2, .8, .3, 1.4) both; }
  .res-stars:not(.off) .ico:first-child { animation-name: star-pop-l; animation-delay: .15s; }
  .res-stars:not(.off) .ico:nth-child(2) { animation-delay: .65s; }
  .res-stars:not(.off) .ico:last-child { animation-name: star-pop-r; animation-delay: .4s; }
  .rain .ico { animation: rain linear infinite; }

  .sc-troop { animation: sc-bob .42s ease-in-out infinite alternate; }
  g:nth-child(2) > .sc-troop { animation-delay: -.2s; animation-duration: .5s; }
  g:nth-child(3) > .sc-troop { animation-delay: -.33s; animation-duration: .46s; }
  .sc-fight { animation: sc-fight 12s linear infinite both; }
  .sc-end { animation: sc-end 12s linear infinite both; }
  .sc-cloud { animation: sc-cloud 16s ease-in-out infinite alternate; }
  .sc-cloud.c2 { animation-duration: 22s; animation-direction: alternate-reverse; }
  .sc-cloud.c3 { animation-duration: 28s; }
  .sc-rays { animation: sc-rays 50s linear infinite; }
  .sc-flag { animation: sc-flag 1.7s ease-in-out infinite; }
  .sc-flag.f2 { animation-delay: -.8s; }
  .sc-ring { animation: sc-ring 2.4s linear infinite; }
  .sc-heap { animation: sc-heap 2.2s ease-in-out infinite; }
  .sc-shot { animation: 12s linear infinite both; }
  .sc-shot.sb { animation-name: sc-shot-b; }
  .sc-shot.sr { animation-name: sc-shot-r; }
  .sc-shot .sc-arc { animation: sc-arc 12s infinite both; }
  .sc-shot.s1, .sc-shot.s1 .sc-arc { animation-delay: 1s; }
  .sc-shot.s2, .sc-shot.s2 .sc-arc { animation-delay: 2.5s; }
  .sc-shot.s3, .sc-shot.s3 .sc-arc { animation-delay: 4s; }
  .sc-shot.s4, .sc-shot.s4 .sc-arc { animation-delay: 5.5s; }
  .sc-shot.s5, .sc-shot.s5 .sc-arc { animation-delay: 7s; }
  .sc-boom { animation: sc-boom 12s linear infinite both; }
  .sc-boom.m1 { animation-delay: 1.92s; }
  .sc-boom.m2 { animation-delay: 3.42s; }
  .sc-boom.m3 { animation-delay: 4.92s; }
  .sc-boom.m4 { animation-delay: 6.42s; }
  .sc-boom.m5 { animation-delay: 7.92s; }
  .sc-star { animation: 12s linear infinite both; }
  .sc-star.b1 { animation-name: sc-star-b1; }
  .sc-star.r1 { animation-name: sc-star-r1; }
  .sc-star.b2 { animation-name: sc-star-b2; }
  .sc-star.r2 { animation-name: sc-star-r2; }
  .sc-star.b3 { animation-name: sc-star-b3; }
  .sc-halo { animation: sc-halo 12s linear infinite both; }
  .sc-plaque { animation: sc-plaque 12s linear infinite both; }
  .sc-coin { animation: sc-coin 12s linear infinite both; }
  .sc-coin .sc-arc { animation: sc-coin-arc 12s infinite both; }
  .sc-coin.c1, .sc-coin.c1 .sc-arc { animation-delay: 8.4s; }
  .sc-coin.c2, .sc-coin.c2 .sc-arc { animation-delay: 8.62s; }
  .sc-coin.c3, .sc-coin.c3 .sc-arc { animation-delay: 8.84s; }
  .sc-coin.c4, .sc-coin.c4 .sc-arc { animation-delay: 9.06s; }
  .sc-coin.c5, .sc-coin.c5 .sc-arc { animation-delay: 9.28s; }
}
@keyframes star-pop-l { 0% { opacity: 0; transform: scale(.2) rotate(-60deg); } 70% { opacity: 1; transform: scale(1.2) rotate(-8deg); } 100% { opacity: 1; transform: rotate(-14deg); } }
@keyframes star-pop-r { 0% { opacity: 0; transform: scale(.2) rotate(60deg); } 70% { opacity: 1; transform: scale(1.2) rotate(8deg); } 100% { opacity: 1; transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .btn.loading::after, .spinner { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
}
