/* Snakepit. Gothicvania art (the developer picked it 2026-10-02) on an island board at sea: dark stone panels with gold trim
   float over the water, crisp pixels.
   Venom green is your side and learning, gold is money and rewards, blood red is the enemy. Mono type only for code. */
:root {
  --ink: #0d0b16;          /* outlines and the night */
  --card: #221d31;         /* stone panels */
  --card2: #2c2640;
  --card3: #383052;
  --text: #efe6d2;         /* candlelit parchment text */
  --mute: #a99fbd;
  --gold: #d6a84a;         /* gold trim, rewards */
  --gold-hi: #f0c868;
  --gold2: #8c6a2c;
  --venom: #7bd389;        /* your side, learning, right answers */
  --venom2: #2f6b40;
  --blood: #d0443e;        /* the enemy, lost health */
  --blood2: #7a2420;
  --sky: #8fb8ff;          /* mana */
  --code-bg: #120f1d;
  --code-line: #2a2340;
  --c1: #8a8494; --c2: #4f9a5c; --c3: #3f78c0; --c4: #8a4fc4; --c5: #d6a84a;
  --shadow: 0 3px 0 var(--ink);
  --r: 10px;
  --display: "Grenze Gotisch", "Pirata One", Georgia, serif;
  --num: "Rubik", "Nunito", system-ui, sans-serif;
  --pixel: "Jersey 10", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--body); font-weight: 700; }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--gold-hi); text-underline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ink); }
.icon, .ti, .tic, .ico, .port, .pp { image-rendering: pixelated; }
* { scrollbar-color: var(--gold2) var(--card); scrollbar-width: thin; }

/* ---------- layout */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: 214px minmax(0, 1fr) 214px; grid-template-rows: auto minmax(0, 1fr) auto; user-select: none; -webkit-user-select: none; }
.arena { grid-area: 1 / 1 / -1 / -1; position: relative; min-height: 0; touch-action: none; }
body.ingame .arena { grid-area: 2 / 1 / 3 / -1; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.top { grid-area: 1 / 1 / 2 / -1; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--card); border-bottom: 2px solid var(--gold2); box-shadow: 0 2px 0 var(--ink); z-index: 4; }
.traits { grid-area: 2 / 1 / 3 / 2; padding: 10px 8px 10px 12px; overflow: auto; z-index: 3; background: linear-gradient(90deg, rgba(13, 11, 22, .72), rgba(13, 11, 22, 0)); }
.players { grid-area: 2 / 3 / 3 / 4; padding: 10px 12px 10px 8px; overflow: auto; z-index: 3; background: linear-gradient(270deg, rgba(13, 11, 22, .72), rgba(13, 11, 22, 0)); }
.shopbar { grid-area: 3 / 1 / 4 / -1; display: flex; align-items: stretch; gap: 10px; padding: 10px 12px 18px; background: var(--card); border-top: 2px solid var(--gold2); position: relative; z-index: 4; }

/* ---------- shared pieces */
.card {
  background: var(--card); color: var(--text); border: 2px solid var(--gold2); outline: 2px solid var(--ink); border-radius: var(--r); box-shadow: 0 6px 0 var(--ink), 0 14px 40px rgba(0, 0, 0, .55);
  padding: 22px 26px; max-width: min(560px, 94vw); max-height: 92vh; overflow: auto; position: relative; user-select: text;
}
.card.wide { max-width: min(860px, 96vw); width: 100%; }
.card h1, .card h2, .card h3 { font-family: var(--display); font-weight: 700; margin: 0 0 10px; letter-spacing: .3px; color: var(--gold-hi); }
.card h2 { font-size: 34px; line-height: 1.05; }
.sub { margin: 0 0 12px; color: var(--mute); font-weight: 700; }
.small { font-size: 14px; margin: 12px 0 0; text-align: center; }
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 20; }
.screen.dim { background: rgba(8, 6, 14, .7); }
.btns { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.btns.col { flex-direction: column; align-items: stretch; }
.btn {
  font-family: var(--pixel); font-size: 24px; line-height: 1; letter-spacing: .5px; padding: 9px 20px 8px; border: 2px solid var(--ink); color: var(--text);
  border-radius: 8px; background: var(--card3); box-shadow: inset 0 0 0 1px rgba(214, 168, 74, .35), var(--shadow); transition: transform .06s, box-shadow .06s, background .12s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { background: #443a62; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(214, 168, 74, .35), 0 1px 0 var(--ink); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold2), var(--shadow); }
.btn.gold:hover { background: var(--gold-hi); }
.btn.small { font-size: 19px; padding: 6px 12px 5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:focus-visible, .sq:focus-visible, .ucard:focus-visible, .ans:focus-visible, .lessonchip:focus-visible, .trait:focus-visible, .setrow button:focus-visible { outline: 2px solid var(--venom); outline-offset: 2px; }
.coin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--gold-hi); flex: none;
  border: 2px solid var(--ink); vertical-align: -2px; box-shadow: inset -2px -2px 0 var(--gold2);
}
.coin.sm { width: 11px; height: 11px; border-width: 1.5px; margin-right: 3px; }
.icon, .ti, .tic { display: inline-block; flex: none; background-repeat: no-repeat; }

/* code boxes: real code, real colours */
.codewrap { background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 8px; overflow: hidden; margin: 10px 0; }
.codehead { display: flex; gap: 6px; align-items: center; padding: 5px 10px; background: var(--code-line); color: #9f95ba; font: 500 12px var(--mono); }
.code { margin: 0; padding: 10px 14px; font: 500 15px/1.5 var(--mono); color: #ece6f6; white-space: pre-wrap; word-break: break-word; tab-size: 4; background: var(--code-bg); }
pre.code { border-radius: 8px; }
.codewrap .code { border-radius: 0; }
.code.mini { font-size: 12.5px; padding: 6px 10px; margin: 6px 0; }
.c-kw { color: #f0c868; font-weight: 700; }
.c-str { color: #8fe0a0; }
.c-fx { color: #f0c868; }
.c-num { color: #ff9f7a; }
.c-com { color: #7d7398; font-style: italic; }
.c-bi { color: #8fc3ff; }
.c-fn { color: #a6d4ff; }
.c-self { color: #e79bff; }
.codeout { border-top: 1px dashed var(--code-line); padding: 6px 14px 10px; }
.codeout .ol { font: 700 11px var(--mono); color: #7d7398; letter-spacing: .08em; text-transform: uppercase; }
.codeout pre { margin: 4px 0 0; font: 500 15px/1.45 var(--mono); color: #fff; white-space: pre-wrap; }

/* ---------- top bar */
.roundbox { font-family: var(--num); font-weight: 700; font-size: 28px; line-height: 1; display: flex; align-items: baseline; gap: 6px; color: var(--gold-hi); }
.roundbox .lbl { font-size: 20px; color: var(--mute); }
.phase { font-family: var(--body); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--ink); background: var(--venom); border-radius: 4px; padding: 3px 8px; margin-left: 4px; align-self: center; }
.phase:empty { display: none; }
.lessonchip { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 12px 5px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card3); color: var(--text); box-shadow: inset 0 0 0 1px var(--venom2), var(--shadow); min-width: 0; max-width: 360px; text-align: left; }
.lessonchip .ln { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--venom); font-weight: 900; }
.lessonchip .lt { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lessonchip:hover { background: #443a62; }
.lessonchip:active { transform: translateY(2px); }
.spacer { flex: 1; }
.stat { display: flex; align-items: center; gap: 7px; font-family: var(--num); font-weight: 700; font-size: 26px; line-height: 1; padding: 4px 12px 3px; border: 2px solid var(--ink); border-radius: 8px; background: var(--code-bg); }
.stat .ico { width: 22px; height: 22px; background-size: 2000% 1000%; }
.stat.hp b { color: #ff8a80; }
.stat.gold b { color: var(--gold-hi); }
.stat .coin { width: 17px; height: 17px; }
.stat.lvl .lbl { font-size: 18px; color: var(--mute); }
.xpbar { width: 64px; height: 8px; border: 1px solid var(--ink); border-radius: 2px; background: #1a1528; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--sky); width: 0; transition: width .3s; }
.stat small { font-family: var(--body); font-size: 12px; color: var(--mute); }
.sq { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(214, 168, 74, .35), var(--shadow); font-family: var(--pixel); font-size: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.sq:active { transform: translateY(2px); }
.pausebars { display: inline-flex; gap: 4px; }
.pausebars i { width: 5px; height: 15px; background: var(--text); border-radius: 1px; }

/* ---------- side panels */
.trhead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.chartbtn { border: 1px solid var(--gold2); background: var(--card2); color: var(--gold-hi); border-radius: 6px; font-family: var(--pixel); font-size: 17px; line-height: 1; padding: 3px 8px 2px; box-shadow: var(--shadow); }
.chartbtn:hover { background: var(--card3); }
.trait { cursor: pointer; }
.traits h3, .players h3 { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--gold-hi); margin: 0 0 8px; text-shadow: 0 2px 0 var(--ink); }
.traits .empty { color: var(--mute); font-size: 13px; margin: 0; line-height: 1.4; }
.trait { display: grid; grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 8px; margin-bottom: 6px; background: rgba(34, 29, 49, .7); border: 1px solid #3c3354; border-radius: 8px; cursor: default; }
.trait .tic { width: 32px; height: 32px; grid-row: 1 / 3; filter: grayscale(1) brightness(.75); background-color: var(--code-bg); border: 1px solid var(--ink); border-radius: 6px; background-size: 2000% 1000%; }
.trait .tn { font-size: 14px; font-weight: 900; }
.trait .tc { font-family: var(--num); font-weight: 700; font-size: 18px; color: var(--mute); }
.trait .tsteps { grid-column: 2 / 4; display: flex; gap: 4px; }
.trait .tsteps i { font-style: normal; font-size: 11px; font-weight: 900; padding: 0 5px; border-radius: 4px; background: rgba(255, 255, 255, .06); color: var(--mute); }
.trait .tsteps i.on { background: var(--venom); color: var(--ink); }
.trait.on { background: var(--card2); border-color: var(--venom2); box-shadow: var(--shadow); }
.trait.on .tic { filter: none; }
.trait.on .tc { color: var(--text); }
.trait.on.lv2, .trait.on.lv3 { border-color: var(--gold); }
.trait.on.lv2 .tsteps i.on, .trait.on.lv3 .tsteps i.on { background: var(--gold-hi); }

.pl { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 5px 7px; margin-bottom: 5px; background: rgba(34, 29, 49, .82); border: 1px solid #3c3354; border-radius: 8px; }
.pl .pp { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--ink); background: var(--code-bg) center / cover no-repeat; }
.pl .pn { font-size: 13px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .pn em { font-style: normal; color: var(--blood); }
.pl .plv { font-size: 11px; color: var(--mute); text-align: right; }
.pl .ph { grid-column: 2 / 4; display: flex; gap: 6px; align-items: center; font-family: var(--num); font-weight: 700; font-size: 18px; line-height: 1; }
.pl .hb { flex: 1; height: 7px; border: 1px solid var(--ink); border-radius: 2px; background: #3a1f26; overflow: hidden; }
.pl .hb i { display: block; height: 100%; background: #b9a98f; transition: width .5s; }
.pl.me { background: var(--card2); border-color: var(--venom); }
.pl.me .hb i { background: var(--venom); }
.pl.vs { border-color: var(--blood); background: #2f1c26; }
.pl.hit .hb i { background: var(--blood); }
.pl.out { opacity: .45; filter: grayscale(1); }
.pl .pplace { color: var(--mute); }

/* ---------- shop */
.shopleft, .shopright { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.btn.buy { flex-direction: column; gap: 1px; padding: 6px 12px 5px; min-width: 104px; font-size: 22px; }
.btn.buy .price { display: inline-flex; align-items: center; font-family: var(--body); font-size: 13px; font-weight: 900; color: var(--gold-hi); }
.btn.lock { font-size: 20px; padding: 5px 12px 4px; }
.btn.lock.on { background: var(--gold); color: var(--ink); }
.padlock { width: 13px; height: 11px; border: 2.5px solid currentColor; border-radius: 2px; position: relative; margin-top: 5px; }
.padlock::before { content: ""; position: absolute; left: 1px; top: -9px; width: 6px; height: 8px; border: 2.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; }
.btn.lock.on .padlock { background: currentColor; }
.btn.fight { font-size: 32px; padding: 10px 22px 8px; min-width: 132px; }
.cards { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(94px, 1fr)); gap: 10px; min-width: 0; }
.ucard { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto auto; align-content: start; column-gap: 8px; align-items: center; text-align: left; padding: 8px 8px 7px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--cc, var(--c1)), var(--shadow); min-width: 0; overflow: hidden; }
.ucard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--cc, var(--c1)); }
.ucard.c1 { --cc: var(--c1); } .ucard.c2 { --cc: var(--c2); } .ucard.c3 { --cc: var(--c3); } .ucard.c4 { --cc: var(--c4); } .ucard.c5 { --cc: var(--c5); }

/* rarity tag in the card's top left corner (Common, Uncommon, Rare, Epic, Legendary) */
.ucard .utop { position: absolute; left: 0; top: 0; right: 40px; z-index: 1; display: flex; align-items: center; gap: 6px; pointer-events: none; overflow: hidden; }
.ucard .ujob { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.ucard .urar { flex: none; padding: 1px 7px 2px 6px; border-bottom-right-radius: 6px; background: var(--cc, var(--c1)); color: #12100c; font-family: var(--body); font-weight: 800; font-size: 10.5px; line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.ucard:not(.empty) { padding-top: 17px; }
.info .icost { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.info .irar { flex-basis: 100%; text-align: right; margin-top: 4px; font-style: normal; font-family: var(--body); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--cc, var(--c1)); filter: brightness(1.35); }
.info .irar.c1 { --cc: var(--c1); } .info .irar.c2 { --cc: var(--c2); } .info .irar.c3 { --cc: var(--c3); } .info .irar.c4 { --cc: var(--c4); } .info .irar.c5 { --cc: var(--c5); }
.ucard .port { grid-row: 1 / 4; width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--ink); background: var(--code-bg) center / cover no-repeat; }
.ucard .un { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1; padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard .ut { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; }
.ucard .ti { width: 14px; height: 14px; background-size: 2000% 1000%; }
.ucard .ucode { grid-column: 1 / 3; margin-top: 6px; padding: 3px 7px; border-radius: 4px; background: var(--code-bg); color: #ece6f6; font: 500 11.5px/1.35 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard .uc { position: absolute; right: 7px; top: 8px; display: inline-flex; align-items: center; font-family: var(--num); font-weight: 700; font-size: 22px; line-height: 1; color: var(--gold-hi); }
.ucard .own { position: absolute; right: 7px; top: 31px; display: flex; gap: 2px; }
.ucard .own i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid var(--ink); }
.ucard .own i.on { background: var(--venom); }
.ucard .own i.new { background: transparent; border: 1px dashed var(--gold-hi); }
.ucard.merge { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 14px rgba(240, 200, 104, .45), var(--shadow); animation: mergepulse 1.4s ease-in-out infinite; }
.ucard.merge .own i.new { background: var(--gold-hi); border-style: solid; }
.ucard .lvup { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 1px 0; background: var(--gold-hi); color: var(--ink); font-family: var(--pixel); font-size: 15px; line-height: 1.1; }
.ucard .lvup b { width: 10px; height: 10px; background: var(--ink); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.ucard.merge .ucode { margin-bottom: 14px; }
@keyframes mergepulse { 50% { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 22px rgba(240, 200, 104, .75), var(--shadow); } }
.ucard:hover:not(.no) { transform: translateY(-2px); background: var(--card3); }
.ucard:active:not(.no) { transform: translateY(1px); }
.ucard.no { opacity: .5; }
.ucard.empty { background: rgba(255, 255, 255, .02); border: 1px dashed rgba(214, 168, 74, .25); box-shadow: none; }
.sellzone { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(122, 36, 32, .92); color: var(--text); font-family: var(--pixel); font-size: 32px; border-top: 2px solid var(--blood); pointer-events: none; }
.sellzone.hot { background: var(--blood); }

/* ---------- unit card (hover / tap) */
.info { position: fixed; z-index: 30; width: 330px; max-width: 94vw; background: var(--card); color: var(--text); border: 2px solid var(--gold2); outline: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 6px 0 var(--ink), 0 12px 30px rgba(0, 0, 0, .5); padding: 12px 14px; pointer-events: auto; user-select: text; }
.info.sheet { left: 50% !important; transform: translateX(-50%); bottom: 12px; top: auto !important; width: min(440px, 96vw); max-height: 70vh; overflow: auto; }
.info .ih { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; }
.info .port { width: 54px; height: 54px; border-radius: 6px; border: 1px solid var(--ink); background: var(--code-bg) center / cover no-repeat; }
.info .in { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; display: block; color: var(--gold-hi); }
.info .bugname { font-family: var(--mono); font-weight: 700; font-size: 17px; color: #ff8a80; }
.info .istar { display: inline-flex; gap: 2px; vertical-align: 3px; margin-left: 6px; }
.info .istar i { width: 12px; height: 12px; background: var(--gold-hi); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.info .itr { display: flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--mute); margin-top: 3px; }
.info .itr .ti { width: 16px; height: 16px; background-size: 2000% 1000%; }
.info .icost { font-family: var(--pixel); font-size: 24px; line-height: 1; display: inline-flex; align-items: center; align-self: start; color: var(--gold-hi); }
.info .istats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; margin: 10px 0 6px; }
.info .istats div { display: flex; justify-content: space-between; font-size: 12.5px; border-bottom: 1px dashed rgba(169, 159, 189, .25); }
.info dt { color: var(--mute); } .info dd { margin: 0; font-variant-numeric: tabular-nums; }
.info .icopies { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin: 8px 0 0; font-size: 12.5px; color: var(--gold-hi); }
.info .icopies i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink); background: rgba(255, 255, 255, .12); }
.info .icopies i.on { background: var(--venom); }
.info .iab { font-family: var(--display); font-weight: 700; font-size: 20px; margin: 10px 0 4px; color: var(--venom); }
.info .code { font-size: 13.5px; padding: 8px 11px; }
.info .itext { font-size: 13.5px; line-height: 1.4; margin: 8px 0 0; }
.info .itext b { color: var(--gold-hi); }
.info .ilesson { font-size: 12.5px; margin: 8px 0 0; color: var(--mute); }
.info .iact { margin-top: 10px; display: flex; justify-content: flex-end; }
.info .ihint { margin: 8px 0 0; font-size: 12px; color: var(--mute); text-align: right; }

.tip { position: fixed; z-index: 31; width: 290px; background: var(--card); color: var(--text); border: 2px solid var(--gold2); outline: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 5px 0 var(--ink); padding: 10px 12px; pointer-events: none; font-size: 13px; }
.tip .tt { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--gold-hi); }
.tip .tt .tic { width: 26px; height: 26px; background-size: 2000% 1000%; background-color: var(--code-bg); border-radius: 4px; }
.tip .tk { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.tip ul { margin: 6px 0 0; padding: 0; list-style: none; }
.tip li { padding: 3px 0; color: var(--mute); line-height: 1.35; }
.tip li.on { color: var(--text); }
.tip li b { color: var(--venom); }
.tip .tu { margin: 6px 0 0; font-size: 12px; color: var(--mute); }

/* ---------- banner, toast */
.banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); z-index: 6; background: var(--card); border: 2px solid var(--gold); outline: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 6px 0 var(--ink); padding: 12px 28px 10px; font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--gold-hi); text-align: center; pointer-events: none; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); white-space: nowrap; }
.banner small { display: block; font-family: var(--body); font-weight: 800; font-size: 15px; color: var(--text); margin-top: 2px; white-space: normal; }
.banner.bad { border-color: var(--blood); color: #ff8a80; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 7; background: var(--code-bg); color: var(--text); border: 1px solid var(--gold2); border-radius: 8px; padding: 7px 14px; font-size: 14px; pointer-events: none; max-width: 92%; text-align: center; }

/* ---------- title */
.title-screen { background: linear-gradient(180deg, rgba(8, 6, 14, .05), rgba(8, 6, 14, .6)); }
.card.title { text-align: center; padding: 22px 30px 20px; }
.logo { font-family: var(--display); font-weight: 900; font-size: clamp(56px, 9vw, 88px); line-height: .9; margin: 0; letter-spacing: .5px; color: var(--gold-hi); text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(123, 211, 137, .25); }
.logo span:first-child { color: var(--venom); }
.tag { margin: 10px 0 0; color: var(--mute); }
.titlemenu, .pausesettings { --vm-accent: var(--gold); --vm-gap: 10px; --vm-muted: var(--mute); --vm-danger: #ff8a80; }
.titlemenu { --vm-width: 330px; margin-top: 14px; }
.titlemenu[data-vm-view="load"], .titlemenu[data-vm-view="replace"] { --vm-width: 440px; }
.titlemenu .btn { font-size: 24px; padding: 7px 16px 6px; }
.vm-menu .btn .vm-sub { font-family: var(--body); font-weight: 700; font-size: 12.5px; letter-spacing: 0; color: var(--mute); opacity: 1; }
.vm-menu a.btn { color: var(--text); }
.vm-menu .vm-list [data-vm="continue"]:not([disabled]),
.vm-menu .vm-list:has([data-vm="continue"][disabled]) [data-vm="new"] { background: var(--gold); color: var(--ink); }
.vm-menu .vm-list [data-vm="continue"]:not([disabled]) .vm-sub,
.vm-menu .vm-list:has([data-vm="continue"][disabled]) [data-vm="new"] .vm-sub { color: #3a2a10; }
.vm-menu .vm-h { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--gold-hi); }
.vm-menu .vm-note a { color: var(--gold-hi); }
.vm-menu .vm-slot-btn .vm-label { font-size: 22px; }
.vm-menu .vm-del { font-family: var(--pixel); border: 2px solid currentColor; border-radius: 8px; background: var(--card3); }
.vm-menu .vm-slider label, .vm-menu .vm-slider output { font-family: var(--pixel); font-size: 22px; }
.vm-menu .vm-credits .vm-maker { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--gold-hi); }
.vm-menu .vm-credits .vm-role { color: var(--mute); }
.pausesettings .vm-panel { max-width: 340px; margin: 0 auto; }

/* ---------- setup, course, how */
.setrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.setrow .lbl { width: 100px; font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--gold-hi); }
.setrow button { padding: 7px 14px 6px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card3); color: var(--text); box-shadow: var(--shadow); font-weight: 900; }
.setrow button[aria-checked="true"] { background: var(--venom); color: var(--ink); }
.sel select { font: inherit; font-weight: 800; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card3); color: var(--text); max-width: min(520px, 70vw); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.how { margin: 0; padding-left: 20px; line-height: 1.5; }
.how li { margin: 6px 0; }
.how b { color: var(--gold-hi); }
.coursehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.coursehead .sub { margin: 0; }
.courselist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 52vh; overflow: auto; }
.courselist a { display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 9px; border: 1px solid #3c3354; border-radius: 8px; text-decoration: none; color: var(--text); background: var(--card2); }
.courselist .cn { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .06); font-size: 13px; }
.courselist .ct { font-size: 14px; }
.courselist .cs { font-size: 12px; color: var(--mute); }
.courselist .cu { grid-column: 2 / 4; font-size: 11.5px; color: var(--venom); }
.courselist .done a { border-color: var(--venom2); }
.courselist .done .cn { background: var(--venom); color: var(--ink); }
.courselist .now a { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: #3a3020; }
.courselist a:hover { background: var(--card3); }

/* ---------- lesson card */
.card.lesson { max-width: min(620px, 96vw); width: 100%; }
.ls-n { margin: 0 0 4px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--venom); font-weight: 900; }
.ls-sum { margin: 0 0 6px; font-size: 16px; line-height: 1.55; font-weight: 600; }
.lsunits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.lsunits .lbl { font-size: 13px; color: var(--mute); }
.uchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border: 1px solid var(--venom2); border-radius: 999px; background: var(--card2); font-size: 13px; }
.uchip .port { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ink); background: var(--code-bg) center / cover no-repeat; }

/* ---------- quiz */
.card.quiz { max-width: min(640px, 96vw); width: 100%; }
.qzhead { display: flex; align-items: center; gap: 12px; }
.qzhead h2 { margin: 0; }
.qzcount { font-size: 14px; color: var(--mute); }
.qzgold { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--num); font-weight: 700; font-size: 30px; line-height: 1; color: var(--gold-hi); }
.qzfrom { margin: 10px 0 2px; font-size: 13px; color: var(--mute); }
.qzfrom b { color: var(--venom); }
.qzq { margin: 4px 0 6px; font-size: 19px; line-height: 1.35; font-weight: 900; }
.qzans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ans { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--card3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(214, 168, 74, .25), var(--shadow); font: 700 15px/1.3 var(--mono); }
.ans .key { flex: none; width: 24px; height: 24px; border-radius: 4px; background: var(--code-bg); color: var(--gold-hi); font: 400 18px/1 var(--pixel); display: inline-flex; align-items: center; justify-content: center; }
.ans:hover:not(:disabled) { background: #443a62; transform: translateY(-1px); }
.ans:disabled { cursor: default; opacity: .55; }
.ans.right { background: var(--venom2); opacity: 1; box-shadow: inset 0 0 0 2px var(--venom), var(--shadow); }
.ans.right .key { background: var(--venom); color: var(--ink); }
.ans.wrong { background: var(--blood2); opacity: 1; box-shadow: inset 0 0 0 2px var(--blood), var(--shadow); }
.ans.wrong .key { background: var(--blood); color: var(--ink); }
.qzwhy { margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--code-line); font-size: 14.5px; line-height: 1.45; background: var(--code-bg); }
.qzwhy.ok b { color: var(--venom); }
.qzwhy.no b { color: #ff8a80; }
.qzwhy a { white-space: nowrap; }

/* ---------- end */
.place { font-family: var(--num); font-weight: 700; font-size: 84px; line-height: .9; margin: 0; text-align: center; color: var(--gold-hi); text-shadow: 0 4px 0 var(--ink); }
#scrEnd h2 { text-align: center; }
#scrEnd .sub { text-align: center; }
.stats { list-style: none; padding: 0; margin: 10px 0 0; }
.stats li { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; border-bottom: 1px dashed rgba(169, 159, 189, .25); }
.stats b { font-variant-numeric: tabular-nums; color: var(--gold-hi); }

/* ---------- misc */
.loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--text); font-family: var(--display); font-weight: 700; font-size: 30px; z-index: 50; }
.portrait-hint { display: none; }
.legal { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; justify-content: center; font-size: 11px; padding: 2px; z-index: 5; pointer-events: none; }
.legal a { color: rgba(239, 230, 210, .6); pointer-events: auto; text-decoration: none; }
body.ingame .legal { justify-content: flex-end; padding-right: 12px; }
/* (2026-10-13: footer on the main menu only) */
body:has(#scrTitle[hidden]) .legal { display: none; }

/* ---------- weather chip and the chart button in the top bar */
.stat.wx { gap: 6px; font-size: 21px; color: var(--text); }
.stat.wx .wxi { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat.wx[data-wx="clear"] .wxi, .stat.wx[data-wx="sunset"] .wxi { color: #ffd75e; }
.stat.wx[data-wx="rain"] .wxi, .stat.wx[data-wx="storm"] .wxi { color: #9ec9ff; }
.stat.wx[data-wx="snow"] .wxi, .stat.wx[data-wx="fog"] .wxi { color: #e6eef5; }
.gridico { width: 18px; height: 18px; fill: none; stroke: var(--gold-hi); stroke-width: 2.2; }

/* ---------- synergy chart */
.card.synchart { max-width: min(1080px, 97vw); }
.synbody { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.syncol h3 { font-size: 26px; margin: 0; }
.syncol .sub { margin-bottom: 8px; font-size: 13px; }
.syn { padding: 8px 10px 9px; margin-bottom: 8px; background: var(--card2); border: 1px solid #3c3354; border-radius: 8px; }
.syn.on { border-color: var(--venom); box-shadow: inset 3px 0 0 var(--venom); }
.syn.focus { outline: 2px solid var(--gold-hi); }
.synhead { display: flex; align-items: center; gap: 8px; }
.synhead .tic { width: 30px; height: 30px; background-color: var(--code-bg); border: 1px solid var(--ink); border-radius: 6px; background-size: 2000% 1000%; flex: none; }
.synhead b { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--gold-hi); }
.syncount { font-family: var(--num); font-weight: 700; font-size: 20px; color: var(--text); background: var(--code-bg); border-radius: 4px; padding: 0 6px; }
.synsteps { margin-left: auto; display: flex; gap: 4px; }
.synsteps i { font-style: normal; font-family: var(--pixel); font-size: 18px; line-height: 1; padding: 2px 7px 1px; border-radius: 4px; background: rgba(255, 255, 255, .07); color: var(--mute); }
.synsteps i.on { background: var(--venom); color: var(--ink); }
.synblurb { margin: 4px 0 4px; font-size: 13px; color: var(--mute); }
.syntiers { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.35; }
.syntiers li { display: flex; gap: 7px; color: var(--mute); margin: 2px 0; }
.syntiers li b { flex: none; min-width: 22px; text-align: center; font-family: var(--num); font-weight: 700; font-size: 17px; line-height: 1.1; color: var(--text); background: rgba(255, 255, 255, .07); border-radius: 4px; }
.syntiers li.on { color: var(--text); }
.syntiers li.on b { background: var(--venom); color: var(--ink); }
.synunits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.sport { display: flex; flex-direction: column; align-items: center; width: 52px; font-style: normal; }
.sport .port { width: 42px; height: 42px; border-radius: 6px; border: 2px solid var(--cc, var(--c1)); background: var(--code-bg) center / cover no-repeat; opacity: .75; }
.sport em { font-style: normal; font-size: 10.5px; color: var(--mute); white-space: nowrap; }
.sport.c1 { --cc: var(--c1); } .sport.c2 { --cc: var(--c2); } .sport.c3 { --cc: var(--c3); } .sport.c4 { --cc: var(--c4); } .sport.c5 { --cc: var(--c5); }
.sport.own .port, .sport.field .port { opacity: 1; }
.sport.field .port { box-shadow: 0 0 0 2px var(--venom); }
.sport.field em, .sport.own em { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .ucard.merge { animation: none; }
  .banner { animation: none; }
  .ucard, .btn, .ans { transition: none; }
}

/* ---------- smaller screens */
@media (max-width: 1100px) {
  .app { grid-template-columns: 176px minmax(0, 1fr) 168px; }
  .ucard { grid-template-columns: 42px 1fr; }
  .ucard .port { width: 42px; height: 42px; }
  .ucard .un { font-size: 18px; }
  .lessonchip { max-width: 240px; }
}
@media (max-height: 560px), (max-width: 820px) {
  .app { grid-template-columns: 58px minmax(0, 1fr) 96px; }
  .top { padding: 4px 8px; gap: 6px; }
  .roundbox { font-size: 22px; } .roundbox .lbl { font-size: 15px; }
  .phase { display: none; }
  .lessonchip { padding: 2px 8px 3px; max-width: 200px; }
  .lessonchip .ln { font-size: 9px; } .lessonchip .lt { font-size: 15px; }
  .stat { font-size: 21px; padding: 2px 8px 1px; }
  .stat .ico { width: 16px; height: 16px; }
  .stat .coin { width: 13px; height: 13px; }
  .xpbar { width: 40px; }
  .stat small { display: none; }
  .sq { width: 32px; height: 32px; font-size: 18px; }
  .traits, .players { padding: 6px; }
  .traits h3, .stat.wx b { display: none; }
  .trhead { justify-content: center; margin-bottom: 4px; }
  .chartbtn { font-size: 13px; padding: 2px 5px 1px; }
  .synbody { grid-template-columns: 1fr; }
  .syntiers { font-size: 12px; }
  .sport { width: 44px; } .sport .port { width: 34px; height: 34px; }
  .ucard .lvup { font-size: 11px; }
  .ucard.merge .ucode { margin-bottom: 0; }
  .players h3 { font-size: 15px; margin-bottom: 4px; }
  .trait { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px 2px; margin-bottom: 4px; }
  .trait .tic { width: 26px; height: 26px; }
  .trait .tn, .trait .tsteps { display: none; }
  .trait .tc { font-size: 15px; line-height: 1; }
  .traits .empty { font-size: 10px; }
  .pl { grid-template-columns: 22px 1fr; grid-template-rows: auto; padding: 2px 4px; margin-bottom: 3px; column-gap: 5px; }
  .pl .pp { grid-row: auto; width: 22px; height: 22px; border-radius: 4px; }
  .pl .pn, .pl .plv { display: none; }
  .pl .ph { grid-column: 2; font-size: 15px; gap: 4px; }
  .pl .hb { height: 5px; }
  .shopbar { padding: 5px 8px 6px; gap: 6px; }
  .shopleft, .shopright { gap: 5px; }
  .btn.buy { min-width: 70px; font-size: 18px; padding: 4px 7px 3px; flex-direction: row; gap: 5px; }
  .btn.buy .price { font-size: 11px; }
  .btn.lock { font-size: 16px; padding: 3px 8px 2px; }
  .btn.fight { font-size: 24px; padding: 6px 10px 5px; min-width: 84px; }
  .cards { gap: 5px; }
  .ucard { grid-template-columns: 30px 1fr; grid-template-rows: auto auto; padding: 5px 5px 3px; column-gap: 5px; border-radius: 7px; }
  .ucard .port { display: block; grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 5px; }
  .ucard .un { font-size: 15px; padding-top: 3px; }
  .ucard .ut { font-size: 9.5px; }
  .ucard .ti { width: 11px; height: 11px; }
  .ucard .ut + .ut, .ucard .ucode, .ucard .own { display: none; }
  .ucard .uc { font-size: 17px; top: 5px; right: 5px; }
  .ucard:not(.empty) { padding-top: 13px; }
  .ucard .urar { font-size: 8.5px; padding: 0 5px 1px 4px; border-bottom-right-radius: 5px; }
  .ucard .uc { top: 3px; }
  .card { padding: 14px 16px; }
  .card h2 { font-size: 26px; }
  .code { font-size: 13px; }
  .qzq { font-size: 16px; }
  .ans { font-size: 13px; padding: 6px 9px; }
  .banner { font-size: 28px; }
  .titlemenu { --vm-width: 520px; --vm-gap: 7px; margin-top: 8px; }
  .titlemenu .vm-list { display: grid; grid-template-columns: 1fr 1fr; }
  .card.title { padding: 12px 18px 12px; }
  .logo { font-size: 44px; }
  .tag { font-size: 13px; margin-top: 4px; }
  .title-screen { align-items: flex-start; }
  .card { max-height: calc(100dvh - 24px); }
  body.ingame .legal { display: none; }
  .info.sheet { max-height: 90vh; bottom: 6px; padding: 9px 12px; }
  .info .istats { margin: 6px 0 2px; }
  .info .icopies { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin: 8px 0 0; font-size: 12.5px; color: var(--gold-hi); }
.info .icopies i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--ink); background: rgba(255, 255, 255, .12); }
.info .icopies i.on { background: var(--venom); }
.info .iab { margin: 6px 0 3px; font-size: 17px; }
  .info .code { font-size: 12px; padding: 6px 9px; }
  .info .itext { font-size: 12.5px; margin-top: 5px; }
}
body.upright.ingame .portrait-hint { display: flex; position: fixed; inset: 0; z-index: 70; background: rgba(8, 6, 14, .92); color: var(--text); align-items: center; justify-content: center; text-align: center; padding: 30px; font-family: var(--display); font-weight: 700; font-size: 26px; }

/* role line on the unit card: Tank, DPS, Archer, Mage, Healer, Assassin + melee or ranged */
.info .ijob { margin: 8px 0 2px; font-size: 14px; line-height: 1.35; color: var(--mute); }
.info .ijob b { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: var(--text); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.info .ijob .ireach { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .18); color: var(--text); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-height: 560px), (max-width: 820px) { .ucard .ujob { display: none; } }

/* the heart takes a hit after a lost fight */
.stat.hp { position: relative; }
.stat.hp.struck { animation: hpshake .5s cubic-bezier(.36, .07, .19, .97) .1s both, hpflash 1s ease-out .1s both; }
.stat.hp.struck > :first-child { animation: hppulse .6s ease-out .1s both; }
@keyframes hpshake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes hpflash { 0% { background: #c8322a; box-shadow: 0 0 22px rgba(255, 70, 50, .85); } 100% { box-shadow: 0 0 0 rgba(255, 70, 50, 0); } }
@keyframes hppulse { 0% { transform: scale(1); filter: brightness(3); } 30% { transform: scale(1.5); } 100% { transform: scale(1); filter: none; } }
.hpslash { position: absolute; left: 2px; top: -6px; width: 34px; height: 40px; pointer-events: none; z-index: 3; }
.hpslash i { position: absolute; left: -6px; width: 46px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 40%, #ffe7a8 70%, rgba(255, 255, 255, 0)); box-shadow: 0 0 8px #ffb08a; transform-origin: left center; transform: rotate(-38deg) scaleX(0); animation: hpcut .42s ease-out both; }
.hpslash i:nth-child(1) { top: 26px; }
.hpslash i:nth-child(2) { top: 33px; animation-delay: .06s; }
.hpslash i:nth-child(3) { top: 40px; animation-delay: .12s; }
@keyframes hpcut { 0% { transform: rotate(-38deg) scaleX(0); opacity: 1; } 55% { transform: rotate(-38deg) scaleX(1); opacity: 1; } 100% { transform: rotate(-38deg) scaleX(1); opacity: 0; } }
.hpdrop { position: absolute; right: 6px; top: 100%; pointer-events: none; z-index: 3; color: #ff5a4a; font-size: 26px; text-shadow: 0 2px 0 #12100c, 0 0 10px rgba(255, 60, 40, .7); animation: hpdrop 1.4s ease-out .15s both; }
@keyframes hpdrop { 0% { transform: translateY(-14px) scale(1.4); opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(22px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stat.hp.struck, .stat.hp.struck > :first-child { animation: hpflash 1s ease-out both; } .hpslash { display: none; } }

.info .igrow { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--c5); }

.info .ipool { margin: 6px 0 0; font-size: 13px; line-height: 1.35; color: var(--mute); }
.info .ipool b { color: var(--text); }

/* numbers use Rubik: easier to read than the pixel face (2026-10-03) */
.stat b, .roundbox b, .pl .ph b { font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* win streak flames next to a warlord */
.fire { display: inline-flex; align-items: flex-end; gap: 1px; height: 16px; }
.fire i { width: 8px; height: 13px; background: radial-gradient(ellipse at 50% 80%, #fff3b0 0 18%, #ffb238 35%, #ff5a1f 62%, rgba(255, 60, 20, 0) 72%); clip-path: path("M4 0 C6 3 8 5 8 8.5 C8 11 6.2 13 4 13 C1.8 13 0 11 0 8.5 C0 6.5 1.5 5 2.4 3.6 C2.6 5 3.2 5.8 4 6 C4.4 4 4.5 2 4 0 Z"); transform-origin: 50% 100%; animation: flick .5s ease-in-out infinite alternate; filter: drop-shadow(0 0 3px rgba(255, 120, 40, .8)); }
.fire i:nth-child(2) { animation-delay: .17s; height: 15px; }
.fire i:nth-child(3) { animation-delay: .33s; }
.fire b { margin-left: 3px; font-family: var(--num); font-size: 12px; font-weight: 800; color: #ffb238; line-height: 1; }
@keyframes flick { 0% { transform: scale(.9, .95) skewX(-4deg); } 100% { transform: scale(1.05, 1.08) skewX(5deg); } }
/* the warlord you fight next */
.pl.next { border-color: #ffb238; box-shadow: 0 0 0 1px #ffb238, 0 0 12px rgba(255, 178, 56, .45); animation: nextpulse 1.6s ease-in-out infinite; }
.pl .pn em.nx { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #12100c; background: #ffb238; border-radius: 3px; padding: 1px 5px; margin-left: 4px; }
@keyframes nextpulse { 50% { box-shadow: 0 0 0 1px #ffb238, 0 0 20px rgba(255, 178, 56, .7); } }
.nextmon { margin: 0 0 6px; padding: 4px 8px; border: 1px solid #ffb238; border-radius: 6px; font-size: 13px; color: var(--mute); }
.nextmon b { color: #ffb238; }
@media (prefers-reduced-motion: reduce) { .fire i, .pl.next { animation: none; } }

.pl .plv { white-space: nowrap; }

/* rivals are bots for now (multiplayer comes later) */
.pl .pn .bot { font-style: normal; font-weight: 600; font-size: .82em; color: #9aa3b5; opacity: .8; }

/* vm-mute room (2026-10-04): the site-wide mute button from /assets/menu.js sits in the top right corner. */
.top{padding-right:62px}

/* the first-game guide (coach.js, 2026-10-15): one card at a time, pointing at one thing */
.coach { position: fixed; z-index: 15; width: min(330px, calc(100vw - 28px)); padding: 11px 14px 12px; color: var(--text); background: var(--card2); border: 2px solid var(--brass, var(--gold)); border-radius: var(--r); box-shadow: 0 0 0 2px var(--ink), 0 6px 0 2px var(--ink), 0 14px 30px rgba(0, 0, 0, .5); font-family: var(--body); }
.coach[hidden] { display: none; }
.coach-k { margin: 0 0 2px; font: 700 11.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.coach-t { margin: 0 0 5px; font-family: var(--display); font-size: 19px; line-height: 1.15; color: var(--brass-hi, var(--gold-hi)); }
.coach-p { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; }
.coach-b { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.coach-b [hidden] { display: none; }
.coach-skip { margin-left: auto; padding: 4px 0; background: none; border: 0; color: var(--mute); font: 600 13px var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.coach-skip:hover, .coach-skip:focus-visible { color: var(--text); }
.coach-arrow { position: absolute; display: none; width: 14px; height: 14px; background: var(--card2); border: 2px solid var(--brass, var(--gold)); transform: rotate(45deg); }
.coach[data-dir="down"] .coach-arrow { display: block; bottom: -9px; border-top: 0; border-left: 0; }
.coach[data-dir="up"] .coach-arrow { display: block; top: -9px; border-bottom: 0; border-right: 0; }
.coach[data-dir="left"] .coach-arrow { display: block; left: -9px; border-top: 0; border-right: 0; }
.coach[data-dir="right"] .coach-arrow { display: block; right: -9px; border-bottom: 0; border-left: 0; }
.coach-hl { outline: 3px solid var(--brass-hi, var(--gold-hi)); outline-offset: 3px; animation: coachPulse 1.4s ease-in-out infinite; }
@keyframes coachPulse { 50% { outline-color: transparent; } }
.coach-board { position: fixed; inset: 0; z-index: 2; display: none; width: 100vw; height: 100vh; pointer-events: none; color: var(--you, var(--venom)); }
.coach-board.on { display: block; }
.coach-board polygon { fill: currentColor; fill-opacity: .16; stroke: none; }
.coach-board polyline { fill: none; stroke: var(--brass-hi, var(--gold-hi)); stroke-width: 3; stroke-dasharray: 10 7; animation: coachDash 1s linear infinite; }
@keyframes coachDash { to { stroke-dashoffset: -17; } }
@media (prefers-reduced-motion: reduce) { .coach-hl, .coach-board polyline { animation: none; } }

.cards { overflow-x: auto; padding-bottom: 6px; }
