/* Images and galleries start on the left. */
.mw-parser-output ul.gallery.mw-gallery-packed { text-align: left; }
.mw-parser-output > h2 { clear: left; }
.mw-parser-output > ul, .mw-parser-output > ol { display: flow-root; }
.mw-parser-output figure.mw-halign-left { margin-left: 0; }
@media (max-width: 640px) {
  .mw-parser-output figure.mw-halign-left { float: none; margin: 0 0 12px 0; }
  .mw-parser-output figure.mw-halign-left img { width: 120px; height: auto; }
  .mw-parser-output figure.mw-halign-left.tf-mobile-hide, .mw-parser-output figure.mw-halign-left:has(.tf-mobile-hide) { display: none; }
}

/* Calculators and research tree. Uses the Citizen skin's own colors. */
.tf-calc { clear: both; margin: 1em 0 1.5em; padding: 16px; border: 1px solid var(--border-color-base); border-radius: var(--border-radius-medium); background: var(--color-surface-1); }
.tf-calc h3 { margin-top: 1.2em; }
.tf-calc .wikitable { margin: 0.75em 0; }
.tfc-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 12px; }
.tfc-f { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1 1 160px; max-width: 280px; }
.tfc-l { font-size: var(--font-size-small); font-weight: var(--font-weight-semi-bold); color: var(--color-emphasized); }
.tfc-f small { color: var(--color-subtle); font-size: var(--font-size-x-small); }
.tfc-in { box-sizing: border-box; width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; color: var(--color-base); background: var(--color-surface-0); border: 1px solid var(--border-color-interactive); border-radius: var(--border-radius-base); }
.tfc-in:focus { outline: 2px solid var(--color-progressive); outline-offset: -1px; border-color: var(--color-progressive); }
.tfc-row { padding-bottom: 12px; border-bottom: 1px solid var(--border-color-subtle); position: relative; }
.tfc-x, .tfrt-close { min-width: 36px; min-height: 36px; font-size: 20px; line-height: 1; color: var(--color-subtle); background: transparent; border: 1px solid var(--border-color-base); border-radius: var(--border-radius-base); cursor: pointer; }
.tfc-btn { min-height: 36px; padding: 6px 14px; font: inherit; font-weight: var(--font-weight-semi-bold); color: var(--color-progressive); background: var(--color-surface-0); border: 1px solid var(--border-color-interactive); border-radius: var(--border-radius-base); cursor: pointer; }
.tfc-btn:hover, .tfc-x:hover { background: var(--color-surface-2); }
.tfc-note { color: var(--color-subtle); font-size: var(--font-size-small); }
.tfc-big { font-size: var(--font-size-medium); }
.tfc-chk { display: flex; gap: 8px; align-items: center; flex: 1 1 100%; }
.tfc-table td { white-space: nowrap; }
.tfc-wide td { white-space: normal; }
.tfc-total td { background: var(--color-surface-2); }
.tfc-past td { color: var(--color-subtle); }
.tfc-up td, .tfc-got td { background: var(--background-color-progressive-subtle); }
.tfc-done td { color: var(--color-subtle); }
.tfc-pill { display: inline-block; padding: 1px 8px; border-radius: var(--border-radius-pill); font-size: var(--font-size-x-small); font-weight: var(--font-weight-semi-bold); white-space: nowrap; border: 1px solid var(--border-color-base); }
.tfc-pill.tfc-now { color: var(--color-inverted); background: var(--color-progressive); border-color: var(--color-progressive); }
.tfc-pill.tfc-soon { color: var(--color-progressive); }
.tfc-pill.tfc-past { color: var(--color-subtle); }
.tfc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tfc-tabs button { min-height: 34px; padding: 4px 12px; font: inherit; font-size: var(--font-size-small); color: var(--color-base); background: var(--color-surface-0); border: 1px solid var(--border-color-base); border-radius: var(--border-radius-pill); cursor: pointer; }
.tfc-tabs button[aria-pressed="true"] { color: var(--color-inverted); background: var(--color-progressive); border-color: var(--color-progressive); }
.tfc-hero { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 8px; text-decoration: none; }
.tfc-hero img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--border-radius-medium); border: 1px solid var(--border-color-base); }
.tfc-hero small { display: block; color: var(--color-subtle); }
.tfc-grid8 .tfc-f { flex: 1 1 90px; min-width: 80px; }
.tf-calc details { margin: 8px 0; }
.tf-calc summary { cursor: pointer; font-weight: var(--font-weight-semi-bold); color: var(--color-progressive); }
.tf-calc-ready .tf-calc-nojs { display: none; }

/* research tree */
.tf-calc[data-calc="research"] { padding: 12px; }
.tfrt-plan { margin: 0 0 12px; padding: 12px; background: var(--color-surface-0); border: 1px solid var(--border-color-base); border-radius: var(--border-radius-medium); }
.tfrt-plan .wikitable { margin: 8px 0; }
.tfrt-plan-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.tfrt-bonus { display: flex; align-items: center; gap: 8px; font-size: var(--font-size-small); }
.tfrt-bonus .tfc-in { width: 90px; }
.tfrt-list { columns: 2 220px; margin: 6px 0 0 1.2em; }
.tfrt { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.tfrt-head { font-size: var(--font-size-small); color: var(--color-subtle); margin: 0 0 8px; }
.tfrt-head b { color: var(--color-emphasized); font-size: var(--font-size-medium); }
.tfrt-find { margin: 0 0 10px; }
.tfrt-wrap { position: relative; padding: 20px 8px; background: var(--color-surface-0); border: 1px solid var(--border-color-base); border-radius: var(--border-radius-medium); }
.tfrt-links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.tfrt-links path { fill: none; stroke: var(--border-color-base); stroke-width: 2; }
.tfrt-links path.is-plan { stroke: var(--color-progressive); stroke-dasharray: 5 4; opacity: .7; }
.tfrt-links path.is-on { stroke: var(--color-progressive); stroke-width: 2.5; }
.tfrt-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 10px; }
.tfrt-node { justify-self: center; width: 100%; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px 9px; font: inherit; color: var(--color-base); text-align: center; background: var(--color-surface-1); border: 1px solid var(--border-color-base); border-radius: var(--border-radius-medium); cursor: pointer; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.tfrt-node:hover { border-color: var(--color-progressive); }
.tfrt-node.is-sel { border-color: var(--color-progressive); box-shadow: 0 0 0 2px var(--color-progressive); }
.tfrt-node.is-plan { border-color: var(--color-progressive); border-style: dashed; }
.tfrt-node.is-dim { opacity: .3; }
.tfrt-ic { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; color: var(--color-progressive); background: var(--background-color-progressive-subtle); border: 1px solid var(--border-color-subtle); }
.tfrt-node.is-max .tfrt-ic { color: var(--color-inverted); background: var(--color-progressive); border-color: var(--color-progressive); }
.tfrt-name { font-size: var(--font-size-small); font-weight: var(--font-weight-semi-bold); line-height: 1.25; color: var(--color-emphasized); }
.tfrt-lv { font-size: var(--font-size-x-small); color: var(--color-subtle); font-variant-numeric: tabular-nums; }
.tfrt-bar { position: relative; display: block; width: 80%; height: 4px; border-radius: 2px; background: var(--color-surface-3); overflow: hidden; }
.tfrt-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-progressive); }
.tfrt-bar i.tfrt-bar-plan { opacity: .35; }
.tfrt-side { position: sticky; top: calc(var(--height-sticky-header, 0px) + 16px); max-height: calc(100vh - 32px); overflow: auto; padding: 14px; background: var(--color-surface-0); border: 1px solid var(--border-color-base); border-radius: var(--border-radius-medium); }
.tfrt-side .tfc-f { min-width: 100px; flex: 1 1 110px; }
.tfrt-side .tfc-form { flex-wrap: nowrap; }
.tfrt-side .wikitable { font-size: var(--font-size-small); width: 100%; }
.tfrt-dhead { display: flex; gap: 12px; align-items: center; }
.tfrt-dhead b { font-size: var(--font-size-large); color: var(--color-emphasized); }
.tfrt-dhead small { display: block; color: var(--color-subtle); }
.tfrt-ic-big { width: 52px; height: 52px; }
.tfrt-close { display: none; float: right; }
.tfrt-levels td, .tfrt-levels th { padding: 4px 6px; }
@media (max-width: 1000px) {
  .tfrt { grid-template-columns: minmax(0, 1fr); }
  .tfrt-side { display: none; position: fixed; left: 0; right: 0; bottom: var(--header-size-block-end, 0px); top: auto; z-index: 100; max-height: calc(80vh - var(--header-size-block-end, 0px)); border-radius: var(--border-radius-large) var(--border-radius-large) 0 0; box-shadow: var(--box-shadow-drop-xx-large); }
  .tfrt-open .tfrt-side { display: block; }
  .tfrt-close { display: block; }
}
@media (max-width: 560px) {
  .tf-calc { padding: 12px; }
  .tfrt-wrap { padding: 14px 4px; }
  .tfrt-grid { gap: 28px 6px; }
  .tfrt-node { padding: 8px 4px; }
  .tfrt-ic { width: 36px; height: 36px; }
  .tfrt-name { font-size: var(--font-size-x-small); }
  .tfc-f { max-width: none; flex: 1 1 130px; min-width: 120px; }
  .tf-mobile-hide, figure:has(.tf-mobile-hide), .mw-default-size:has(.tf-mobile-hide) { display: none; }
}
/* Top Force Guide: game-style interface. Colors follow the game's own base screen. */
:root {
  --grass: #8fc46a;
  --grass-dark: #6fa64f;
  --ink: #1d2733;
  --ink-soft: #4a5666;
  --paper: #f7f3ea;
  --paper-2: #efe8d8;
  --paper-line: #e2dac6;
  --pill: rgba(22, 32, 46, .84);
  --green: #4cb648;
  --green-top: #6fd062;
  --green-dark: #23692a;
  --gold: #f4c13d;
  --gold-dark: #a8761a;
  --blue: #2f7fd0;
  --blue-dark: #1f5f9e;
  --slate: #2c3c52;
  --focus: #ffd34d;
  --ur: #e8901f;
  --ssr: #9b5de5;
  --sr: #3b8ed8;
  --s: .5;
  --ts: 1;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--grass); color: var(--ink); }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.game { font-family: "Lilita One", "Russo One", Nunito, system-ui, sans-serif; letter-spacing: .02em; font-weight: 400; }

/* ---------- map ---------- */
#viewport { position: fixed; inset: 0; overflow: auto; cursor: grab; scrollbar-width: none; background: radial-gradient(circle at 50% 40%, #a3d27c, var(--grass) 60%, var(--grass-dark)); }
#viewport::-webkit-scrollbar { display: none; }
#viewport.drag { cursor: grabbing; }
#stage { position: relative; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--s)); }
#ground { position: absolute; left: 0; top: 0; overflow: visible; }
.bld { position: absolute; display: block; padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none; }
.spr { display: block; width: 100%; aspect-ratio: 1; background-image: url(base-sprite.webp); background-repeat: no-repeat; background-position: var(--x) var(--y); }
.bld .spr, .bld svg { filter: drop-shadow(0 10px 6px rgba(40, 50, 30, .25)); transition: transform .15s ease, filter .15s ease; pointer-events: none; }
.bld:hover .spr, .bld:focus-visible .spr, .bld:hover svg, .bld:focus-visible svg { transform: translateY(-8px); filter: drop-shadow(0 18px 10px rgba(40, 50, 30, .3)) brightness(1.06); }
.bld:focus-visible { outline: none; }
.bld.locked .spr { filter: grayscale(1) brightness(.92) drop-shadow(0 10px 6px rgba(40, 50, 30, .2)); opacity: .75; }
/* buildings you have more than once: one picture per copy, in the same spot */
.bld.multi > .spr { visibility: hidden; }
.cps { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.cps .spr { position: absolute; }
.cps.n2 .spr { width: 76%; }
.cps.n2 .spr:nth-child(1) { left: -6%; top: 0; }
.cps.n2 .spr:nth-child(2) { left: 30%; top: 20%; }
.cps.n3 .spr { width: 64%; }
.cps.n3 .spr:nth-child(1) { left: 18%; top: -6%; }
.cps.n3 .spr:nth-child(2) { left: -8%; top: 16%; }
.cps.n3 .spr:nth-child(3) { left: 44%; top: 16%; }
.cps.n4 .spr { width: 58%; }
.cps.n4 .spr:nth-child(1) { left: 21%; top: -10%; }
.cps.n4 .spr:nth-child(2) { left: -6%; top: 9%; }
.cps.n4 .spr:nth-child(3) { left: 48%; top: 9%; }
.cps.n4 .spr:nth-child(4) { left: 21%; top: 28%; }
.cps.n5 .spr { width: 52%; }
.cps.n5 .spr:nth-child(1) { left: 4%; top: -8%; }
.cps.n5 .spr:nth-child(2) { left: 44%; top: -8%; }
.cps.n5 .spr:nth-child(3) { left: -16%; top: 13%; }
.cps.n5 .spr:nth-child(4) { left: 64%; top: 13%; }
.cps.n5 .spr:nth-child(5) { left: 24%; top: 30%; }
.bld.unseen .spr { filter: grayscale(.7) drop-shadow(0 10px 6px rgba(40, 50, 30, .2)); opacity: .55; }
#labels { position: absolute; left: 0; top: 0; z-index: 100000; pointer-events: none; }
.tag { position: absolute; transform: translate(-50%, 0) scale(calc(var(--ts) / var(--s))); transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.badge { display: none; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #fff; border: 2px solid #fff; font: 400 13px/1 "Lilita One", "Russo One", sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.tag.has-lv .badge { display: grid; }
.tag.big .badge { background: var(--gold); color: var(--ink); font-size: 15px; height: 26px; min-width: 32px; }
.tag.locked .badge { display: grid; background: #6b7682; }
.name { display: none; padding: 3px 10px; border-radius: 999px; background: var(--pill); color: #fff; font: 800 12.5px/1.2 Nunito, sans-serif; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.tag.hot .name, .names-on .tag .name { display: block; }
.tag.big .name { display: block; font-size: 14px; }
.zone { position: absolute; transform: translate(-50%, -100%) scale(calc(var(--ts) / var(--s))); transform-origin: 50% 100%; padding: 3px 10px; border-radius: 6px; background: #fff; color: var(--ink-soft); font: 400 12px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 2px 0 #cfc6ad; white-space: nowrap; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 10; pointer-events: none; }
.hud > * { pointer-events: auto; }
.top { top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 16px; background: var(--pill); color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.me img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #2f3d52; border: 2px solid #fff; }
.me h1 { margin: 0; font-weight: 400; }
.me .t { font-size: 19px; line-height: 1.05; display: block; }
.me small { display: block; font: 700 12px/1.3 Nunito, sans-serif; opacity: .85; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--pill); color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; border: 0; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.pill .ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--ink); flex: none; }
.pill .ic.g { background: var(--green); color: #fff; }
.pill .ic.b { background: var(--blue); color: #fff; }
.pill em { font-style: normal; color: var(--gold); }
.spacer { flex: 1; }
html.i18n-wait body { visibility: hidden; }
.pill.lang { padding-right: 11px; }
.pill.lang[hidden], .langmenu[hidden] { display: none; }
.langmenu { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 48px); right: 12px; z-index: 30; display: grid; min-width: 170px; padding: 6px; border-radius: 14px; background: var(--pill); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.langmenu button { font: 800 15px/1.2 Nunito, sans-serif; color: #fff; background: none; border: 0; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.langmenu button:hover, .langmenu button:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }
.langmenu button[aria-current] { background: var(--green); }
.side { right: 10px; top: 92px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.rb { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; text-decoration: none; border: 0; background: none; padding: 0; cursor: pointer; }
.rb .ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #ffe58a, var(--gold) 55%, #d99a1e); border: 3px solid #fff; color: #5a3a06; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.rb span { padding: 1px 7px; border-radius: 8px; background: var(--pill); color: #fff; font: 400 12.5px/1.3 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; text-align: center; white-space: nowrap; }
.bottom { left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 0 10px max(10px, env(safe-area-inset-bottom)); }
.nb { flex: 0 1 140px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px 7px; border-radius: 16px; text-decoration: none; color: #fff; background: linear-gradient(var(--green-top), var(--green) 55%, #3d9a3a); border: 3px solid var(--green-dark); box-shadow: 0 4px 0 var(--green-dark), inset 0 2px 0 rgba(255, 255, 255, .35); font-size: 18px; text-shadow: 0 2px 0 var(--green-dark); cursor: pointer; }
.nb svg { filter: drop-shadow(0 2px 0 var(--green-dark)); }
.nb span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb:active, .rb:active .ic, .pill:active, .gbtn:active { transform: translateY(2px); }
.tools { right: 12px; bottom: 110px; display: flex; flex-direction: column; gap: 8px; }
.sq { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: #1f2b3b; color: #fff; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); text-decoration: none; }
.sq[aria-pressed="true"] { background: var(--blue); }
.hint { left: 12px; bottom: 112px; max-width: 320px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .94); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.mobile-pills { display: none; left: 12px; top: 72px; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---------- windows ---------- */
.veil { position: fixed; inset: 0; z-index: 20; background: rgba(15, 25, 20, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.veil.on { opacity: 1; pointer-events: auto; }
.win { position: fixed; z-index: 30; left: 50%; top: 50%; width: min(1120px, calc(100vw - 32px)); height: min(900px, calc(100vh - 32px)); transform: translate(-50%, -48%); opacity: 0; pointer-events: none; display: flex; flex-direction: column; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--slate), 0 20px 60px rgba(0, 0, 0, .45); transition: opacity .18s ease, transform .18s ease; overflow: hidden; }
.win.on { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.win.small { width: min(460px, calc(100vw - 32px)); height: auto; max-height: min(720px, calc(100vh - 32px)); }
.wh { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(#3a4e68, var(--slate)); color: #fff; flex: none; }
.wh h2 { margin: 0; flex: 1; min-width: 0; font: 400 25px/1.1 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh h2 small { display: block; font: 700 13px/1.3 Nunito, sans-serif; opacity: .8; text-shadow: none; }
.wb { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.wb:hover { background: rgba(255, 255, 255, .24); }
.wb[hidden] { display: none; }
.wbody { flex: 1; overflow: auto; padding: 18px 22px 28px; font-size: 15.5px; line-height: 1.55; overscroll-behavior: contain; }

/* ---------- shared blocks ---------- */
h3.sec, .content h2 { margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--paper-line); font: 400 21px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); }
h4.sub, .content h3 { margin: 18px 0 8px; font: 400 17px/1.25 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--ink-soft); }
.content h4 { margin: 14px 0 6px; font-size: 16px; color: var(--ink); }
.content p { margin: 0 0 10px; }
.content ul, .content ol { margin: 0 0 12px; padding-left: 1.3em; }
.content > ul, .content > ol { display: flow-root; }
.content li { margin: 3px 0; }
.content a, .lnk { color: var(--blue-dark); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(47, 127, 208, .35); }
.content a:hover, .lnk:hover { border-bottom-color: var(--blue); }
.content figure { margin: 0 0 10px; }
.content figure[typeof~="mw:File/Thumb"] figcaption, .content figure figcaption { font-size: 13px; color: var(--ink-soft); }
.content .mw-halign-right { float: right; margin: 0 0 12px 16px; }
.content .mw-halign-left { float: left; margin: 0 16px 12px 0; }
.content figure.mw-halign-left img, .content figure.mw-halign-right img { width: 130px; height: auto; }
.content h2 { clear: both; }
.content img { max-width: 100%; height: auto; vertical-align: middle; }
.content ul.gallery { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.content ul.gallery li.gallerybox { width: auto !important; margin: 0; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--paper-line); text-align: center; }
.content ul.gallery .thumb { width: auto !important; }
.content ul.gallery .gallerytext { font-weight: 800; font-size: 14px; }
.content blockquote { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff; border-left: 4px solid var(--gold); }
.tscroll, .content .tscroll { overflow-x: auto; margin: 0 0 14px; border-radius: 14px; }
table.wikitable, table.gt { border-collapse: separate; border-spacing: 0; min-width: 100%; margin: 0 0 14px; background: #fff; border: 1px solid var(--paper-line); border-radius: 14px; overflow: hidden; font-size: 14.5px; }
.tscroll > table.wikitable { margin: 0; }
table.wikitable th, table.gt th { padding: 8px 10px; background: var(--slate); color: #fff; font: 400 14px/1.25 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; text-align: left; white-space: nowrap; }
table.wikitable td, table.gt td { padding: 7px 10px; border-top: 1px solid #efe8d8; vertical-align: top; }
table.wikitable tr:nth-child(even) td, table.gt tr:nth-child(even) td { background: #fbf8f1; }
table.gt tr.mine td { background: #fff3c4 !important; font-weight: 800; }
table.gt tr.done td { color: #8a95a3; }
table.gt td.num, table.gt th.num { text-align: right; font-variant-numeric: tabular-nums; }
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 14px; text-decoration: none; font: 400 17px/1 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: #fff; background: linear-gradient(var(--green-top), var(--green) 55%, #3d9a3a); border: 2px solid var(--green-dark); box-shadow: 0 3px 0 var(--green-dark); text-shadow: 0 1px 0 var(--green-dark); cursor: pointer; }
.gbtn.blue { background: linear-gradient(#5aa7ec, var(--blue)); border-color: var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark); text-shadow: 0 1px 0 var(--blue-dark); }
.gbtn.plain { color: var(--ink); background: #fff; border-color: var(--paper-line); box-shadow: 0 3px 0 var(--paper-line); text-shadow: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 2px 0 var(--paper-line); }
.card h4 { margin: 0 0 8px; font: 400 16px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: var(--ink-soft); text-transform: uppercase; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.fact { padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--paper-line); }
.fact span { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.fact b { font: 400 20px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.res { display: flex; flex-wrap: wrap; gap: 8px; }
.res > div { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--paper-line); font-weight: 800; }
.res i { display: grid; place-items: center; width: 24px; height: 24px; font-style: normal; }
.note { font-size: 13.5px; color: var(--ink-soft); }
.ok { color: #23692a; font-weight: 800; }
.bad { color: #b3261e; font-weight: 800; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; font-weight: 800; }
.status.lock { background: #ece6d8; color: #5b4a2a; }
.status.max { background: #fff3c4; color: #7a5600; }
.status.go { background: #dff3dc; color: #23692a; }
.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 14px; background: #fff; border: 2px solid var(--paper-line); }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--slate); color: #fff; font: 400 22px/1 "Lilita One", "Russo One", sans-serif; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper select { min-width: 96px; height: 40px; border: 0; background: transparent; font: 400 20px/1 "Lilita One", "Russo One", sans-serif; text-align: center; color: var(--ink); }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.split .pic { position: sticky; top: 0; }
.pic .spr { width: 220px; filter: drop-shadow(0 12px 8px rgba(0, 0, 0, .18)); }
.lead { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
details.more { margin-top: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); }
details.more > summary { padding: 12px 16px; cursor: pointer; font: 400 18px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); list-style: none; }
details.more > summary::before { content: "+ "; color: var(--blue); }
details.more[open] > summary::before { content: "− "; }
details.more > .content { padding: 0 16px 14px; }

/* tiles (calculators, guides, lists) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 3px 0 var(--paper-line); text-decoration: none; color: var(--ink); cursor: pointer; text-align: left; }
.tile:hover { border-color: var(--blue); }
.tile .ti { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; background: radial-gradient(circle at 40% 30%, #ffe58a, var(--gold) 60%, #d99a1e); color: #5a3a06; }
.tile .spr { width: 56px; flex: none; }
.tile b { display: block; font: 400 17px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.tile small { display: block; color: var(--ink-soft); font-weight: 700; font-size: 13px; line-height: 1.35; }

/* my base */
.blist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.brow { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--paper-line); }
.brow .spr { width: 48px; flex: none; }
.brow .bn { flex: 1; min-width: 0; font-weight: 800; }
.brow .bn small { display: block; font-weight: 700; color: var(--ink-soft); font-size: 12.5px; }
.brow select { height: 38px; min-width: 84px; border-radius: 10px; border: 2px solid var(--paper-line); background: var(--paper); font: 400 16px "Lilita One", "Russo One", sans-serif; color: var(--ink); text-align: center; }
.brow.locked { opacity: .6; }

/* heroes */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--paper-line); background: #fff; font-weight: 800; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--slate); color: #fff; border-color: var(--slate); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hc { position: relative; display: block; border-radius: 16px; overflow: hidden; text-decoration: none; color: #fff; background: #26364b; border: 3px solid var(--rc, #888); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.hc .ph { display: block; aspect-ratio: 3 / 4; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(var(--rc), #26364b 85%); }
.hc .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.hc .rar { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 8px; background: var(--rc); font: 400 14px/1.2 "Lilita One", "Russo One", sans-serif; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.hc .my { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); font: 800 12px/1.3 Nunito, sans-serif; }
.hc .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 10px 8px; background: linear-gradient(transparent, rgba(10, 18, 28, .92) 45%); }
.hc .nm b { display: block; font: 400 19px/1.1 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.hc .nm small { font-weight: 800; font-size: 12px; opacity: .9; }
.hc:hover { transform: translateY(-2px); }
.r-UR { --rc: var(--ur); } .r-SSR { --rc: var(--ssr); } .r-SR { --rc: var(--sr); }
.hhead { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.hhead .hp { border-radius: 20px; overflow: hidden; border: 4px solid var(--rc); background: linear-gradient(var(--rc), #26364b); aspect-ratio: 3 / 4; }
.hhead .hp img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.motto { margin: 0 0 10px; font: 400 22px/1.2 "Lilita One", "Russo One", sans-serif; color: var(--ink-soft); letter-spacing: .02em; }
.kv { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.kv span { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--paper-line); font-weight: 800; font-size: 14px; }
.kv span.rb2 { background: var(--rc); color: #fff; border-color: var(--rc); }
.mine-box { padding: 12px 14px; border-radius: 16px; background: #fff; border: 2px solid var(--paper-line); }
.mine-box .row label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.mine-box select { height: 40px; min-width: 110px; border-radius: 10px; border: 2px solid var(--paper-line); background: var(--paper); font: 400 17px "Lilita One", "Russo One", sans-serif; color: var(--ink); }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.stats4 div { padding: 8px; border-radius: 12px; background: var(--paper); text-align: center; }
.stats4 span { display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.stats4 b { font: 400 19px/1.2 "Lilita One", "Russo One", sans-serif; }

/* search */
.sbox input { width: 100%; min-height: 50px; padding: 8px 16px; border-radius: 14px; border: 2px solid var(--paper-line); background: #fff; font: 700 17px Nunito, sans-serif; color: var(--ink); }
.sbox input:focus { outline: none; border-color: var(--blue); }
.hits { margin-top: 12px; display: grid; gap: 8px; }
.hits a { display: block; padding: 10px 14px; border-radius: 14px; text-decoration: none; background: #fff; border: 1px solid var(--paper-line); }
.hits a b { display: block; font: 400 17px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.hits a > span { font-size: 13.5px; color: var(--ink-soft); }
.code { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.code b { flex: 1; padding: 12px 14px; border-radius: 12px; background: #fff; border: 2px dashed var(--gold-dark); font: 400 26px/1 "Lilita One", "Russo One", sans-serif; letter-spacing: .12em; text-align: center; }

/* calculators inside windows: give them the game look through the variables they use */
.win {
  --color-surface-0: #fff; --color-surface-1: var(--paper); --color-surface-2: #efe8d8; --color-surface-3: #e2dac6;
  --border-color-base: #d8cfb9; --border-color-subtle: #e6dfcd; --border-color-interactive: #c9bfa6;
  --color-base: var(--ink); --color-subtle: var(--ink-soft); --color-emphasized: #101820; --color-progressive: var(--blue); --color-inverted: #fff;
  --background-color-progressive-subtle: #e3effa; --border-radius-base: 10px; --border-radius-medium: 14px; --border-radius-large: 20px; --border-radius-pill: 999px;
  --font-size-x-small: 12.5px; --font-size-small: 14px; --font-size-medium: 16px; --font-size-large: 19px; --font-weight-semi-bold: 800;
  --height-sticky-header: 0px; --header-size-block-end: 0px; --box-shadow-drop-xx-large: 0 10px 40px rgba(0, 0, 0, .35);
}
.win .tf-calc { background: var(--paper-2); border-color: var(--paper-line); }
.win .tfc-btn { font-family: "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: #fff; background: linear-gradient(#5aa7ec, var(--blue)); border: 2px solid var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark); }
.win .tfc-tabs button[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); }
.win .tfrt-links path { stroke: #a3adb9; stroke-width: 3; stroke-linejoin: miter; stroke-linecap: square; }
.win .tfrt-links path.is-on { stroke: var(--green); stroke-width: 3.5; }
.win .tfrt-links path.is-plan { stroke: var(--blue); stroke-width: 3; opacity: 1; }
.win .tfrt-wrap { background: #fff; }
.win .tfrt-node { background: var(--paper); }
.win .tfrt-ic, .win .tfrt-node.is-max .tfrt-ic { position: relative; width: 62px; height: 62px; border: 0; border-radius: 0; background: none; }
.rti { display: inline-block; flex: none; vertical-align: middle; background-repeat: no-repeat; }
.win .tfrt-ic .rti { filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.win .tfrt-ic-big, .win .tfrt-node.is-max .tfrt-ic-big { width: 78px; height: 78px; }
/* research states: done, ready, needs Tech Center, locked */
.win .tfrt-node { position: relative; padding-top: 16px; border-width: 2px; }
.win .tfrt-st { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; color: #fff; background: #6f685c; font: 400 12.5px/1.4 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.win .tfrt-node.st-max { background: #e7f6e2; border-color: #7cc576; }
.win .tfrt-node.st-max .tfrt-st { background: var(--green); }
.win .tfrt-node.st-ready, .win .tfrt-node.st-some { background: #fff6d2; border-color: #e8b021; box-shadow: 0 0 0 3px rgba(232, 176, 33, .22); }
.win .tfrt-node.st-ready .tfrt-st, .win .tfrt-node.st-some .tfrt-st { background: #9a5a00; }
.win .tfrt-node.st-tc { background: #fdeee2; border-color: #e08a4a; border-style: dashed; }
.win .tfrt-node.st-tc .tfrt-st { background: #d2691e; }
.win .tfrt-node.st-tc .rti { filter: grayscale(.45); }
.win .tfrt-node.st-lock { background: #ece9e2; border-color: #d6d0c3; }
.win .tfrt-node.st-lock .rti { filter: grayscale(1); opacity: .5; }
.win .tfrt-node.st-lock .tfrt-name, .win .tfrt-node.st-lock .tfrt-lv { color: #8a8378; }
.win .tfrt-node.is-plan { border-color: var(--blue); border-style: dashed; }
.win .tfrt-node.is-sel { border-color: var(--blue); border-style: solid; box-shadow: 0 0 0 3px rgba(47, 128, 237, .35); }
.win .tfrt-links path.is-open { stroke: #e39a0c; stroke-width: 3.5; }
.tfrt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.tfrt-legend .lg::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 2px solid; border-radius: 4px; }
.tfrt-legend .st-max::before { background: #e7f6e2; border-color: #7cc576; }
.tfrt-legend .st-ready::before { background: #fff6d2; border-color: #e8b021; }
.tfrt-legend .st-tc::before { background: #fdeee2; border-color: #e08a4a; border-style: dashed; }
.tfrt-legend .st-lock::before { background: #ece9e2; border-color: #c9c2b3; }
.tfrt-tlock { display: none; }
.win .tfrt-tabs button.is-locked { color: #8a8378; background: #ece9e2; }
.win .tfrt-tabs button.is-locked .rti { filter: grayscale(1); opacity: .6; }
.win .tfrt-tabs button.is-locked .tfrt-tlock { display: inline-flex; }
.tfrt-status { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0; padding: 8px 11px; border-radius: 10px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.tfrt-status svg { flex: none; margin-top: 3px; }
.tfrt-status.st-max { background: #e2f3dd; color: #23692a; }
.tfrt-status.st-ready { background: #fff1bf; color: #6e4d00; }
.tfrt-status.st-tc { background: #fde2cd; color: #84390a; }
.tfrt-status.st-lock { background: #ebe7de; color: #4f483c; }
.tfrt-tops { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.win .tfc-tabs.tfrt-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 5px; }
.win .tfrt-head .rti { margin-right: 8px; }
.tile .ti.ti-img { background: none; }
.tile .ti.ti-img .rti { filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.content .rt-pic { margin: -6px 10px -4px 0; }
.content figure .rt-cat { display: block; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .18)); }
.win .tfrt-side { top: 0; max-height: none; }
.win .tf-calc .wikitable th { font-size: 13px; }

@media (min-width: 761px) and (max-height: 800px) { .tools { flex-direction: row; } }
@media (max-width: 1000px) {
  .win .tfrt-side { position: fixed; top: auto; bottom: 0; max-height: 75vh; overflow-y: auto; }
}
@media (max-width: 760px) {
  :root { --ts: .86; }
  .me .t { font-size: 16px; }
  .me img { width: 38px; height: 38px; }
  .me small { display: none; }
  .pills { display: none; }
  .mobile-pills { display: flex; }
  .side { top: 76px; right: 6px; gap: 8px; }
  .rb { width: 58px; }
  .rb .ic { width: 42px; height: 42px; border-width: 2px; }
  .rb .ic svg { width: 20px; height: 20px; }
  .rb span { font-size: 10.5px; padding: 1px 5px; }
  .nb { font-size: 13px; padding: 6px 2px; border-radius: 14px; min-width: 0; }
  .bottom { gap: 5px; padding-left: 6px; padding-right: 6px; }
  .nb svg { width: 24px; height: 24px; }
  .tools { bottom: 92px; right: 8px; }
  .hint { display: none; }
  .win { left: 0; top: 0; width: 100vw; height: 100%; border-radius: 0; box-shadow: none; transform: translateY(16px); }
  .win.on { transform: none; }
  .win.small { width: 100vw; height: auto; max-height: 92vh; top: auto; bottom: 0; border-radius: 22px 22px 0 0; }
  .wbody { padding: 14px 14px 30px; font-size: 15px; }
  .wh h2 { font-size: 21px; }
  .split, .hhead { grid-template-columns: minmax(0, 1fr); }
  .split .pic { position: static; display: flex; justify-content: center; }
  .pic .spr { width: 140px; }
  .hhead .hp { max-width: 200px; }
  .hhead .hp { max-width: 240px; margin: 0 auto; }
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content .mw-halign-right, .content .mw-halign-left { float: none; margin: 0 0 12px; }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hc .nm b { font-size: 15px; }
  .blist { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 430px) { .nb { font-size: 11px; letter-spacing: 0; } .nb svg { width: 22px; height: 22px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* units */
.ustat { margin-bottom: 14px; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.unit { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 3px 0 var(--paper-line); text-align: center; }
.unit .upic { position: relative; display: grid; place-items: center; width: 108px; height: 104px; margin-bottom: 6px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #fff7dc, #f0dca8 75%); }
.unit .ulv { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 1px 10px; border-radius: 10px; background: var(--slate); color: #fff; font: 400 14px/1.4 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; white-space: nowrap; }
.unit .uok, .unit .ulock { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; color: #fff; }
.unit .uok { background: var(--green); }
.unit .ulock { background: #8a8170; }
.unit .uok svg, .unit .ulock svg { width: 14px; height: 14px; }
.unit b { margin-top: 8px; font: 400 15px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.unit small { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.unit .up { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; }
.unit .up svg { width: 13px; height: 13px; }
.unit.shut .upic .rti { filter: grayscale(.75); opacity: .7; }
.unit.top { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 3px 0 var(--green-dark); }
.uxc .rti { filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.steps { margin: 0; padding-left: 1.2em; }
.steps li { margin: 5px 0; }
@media (max-width: 430px) { .units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.win .tfrt { grid-template-columns: minmax(0, 1fr) 360px; }
.win .tfrt-levels td, .win .tfrt-levels th { padding: 5px 4px; font-size: 12.5px; white-space: nowrap; }
#w-title:focus { outline: none; }
@media (max-width: 1000px) { .win .tfrt { grid-template-columns: minmax(0, 1fr); } }
/* base levels on the map */
.tag .need { display: inline-flex; align-items: center; gap: 1px; padding: 1px 7px 1px 4px; border-radius: 999px; background: #e0701f; color: #fff; border: 2px solid #fff; font: 400 12.5px/1.2 "Lilita One", "Russo One", sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.tag .need svg { width: 13px; height: 13px; stroke-width: 3; }
.tag .need.go { background: var(--green); }
/* my base */
.nextb { margin: 12px 0 4px; border-color: #f0b97e; background: #fff8ef; }
.nextb.ready { border-color: #8fd18a; background: #f1faee; }
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.needs li { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.needs li > svg { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: #fff; }
.needs li.ok > svg { background: var(--green); }
.needs li.bad > svg { background: #e0701f; }
.needs small { color: var(--ink-soft); font-weight: 700; }
.bchip { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.bchip svg { width: 13px; height: 13px; }
.bchip.up { background: #fde2cd; color: #84390a; }
.bchip.bad { background: #fbd9d6; color: #9b1c14; }
.brow.upnow { border-color: #f0b97e; box-shadow: 0 0 0 2px rgba(224, 112, 31, .25); }
.mstep { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.mstep button { width: 34px; height: 38px; border: 0; border-radius: 10px; background: var(--slate); color: #fff; font: 400 20px/1 "Lilita One", "Russo One", sans-serif; cursor: pointer; }
.mstep select { min-width: 84px; }
.mstep select.unset { color: var(--ink-soft); }
.status.min { background: #eef6ea; color: #2d5e28; border: 2px dashed #8fd18a; }
/* every level: current and next */
.gt tr.next td { background: #fff3c4; }
.gt tr.next td:first-child { box-shadow: inset 4px 0 0 #e39a0c; }
.gt tr.mine td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.rtag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; color: #fff; font: 400 11.5px/1.4 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; vertical-align: 1px; }
.rtag.cur { background: #2e7d32; }
.rtag.nxt { background: #9a5a00; }
/* units: tap for the path */
button.unit { font: inherit; color: inherit; cursor: pointer; }
.unit:hover { border-color: #e8b021; }
.unit.sel { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 127, 208, .35), 0 3px 0 var(--paper-line); }
.unit .utap { margin-top: 3px; color: var(--blue-dark); }
.unit.open .utap { color: var(--green-dark); }
.upath h4.sub, .card h4.sub { margin: 14px 0 6px; font: 400 15px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: var(--ink-soft); text-transform: uppercase; }
.gt tr.tot td { font-weight: 800; background: #f3eee2; }
h3.sec .rti { vertical-align: -10px; margin-right: 4px; }
.upath .gt td:nth-child(2) { white-space: nowrap; }
.upath .gt td:first-child { min-width: 130px; }
/* copies of the same building */
.badge small { margin-left: 3px; font-size: 11px; opacity: .9; }
.brow.multi { flex-wrap: wrap; }
.brow .pn { display: inline; margin-left: 4px; color: var(--ink-soft); }
.plots { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 0 2px 58px; border-top: 1px solid var(--paper-line); }
.prow { display: inline-flex; align-items: center; gap: 6px; }
.prow b { font: 400 15px/1 "Lilita One", "Russo One", sans-serif; color: var(--ink-soft); }
.prow .mstep button { width: 30px; height: 32px; font-size: 18px; }
.prow .mstep select { height: 32px; min-width: 74px; font-size: 14px; }
.prow.shut small { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); font-weight: 700; font-size: 12.5px; }
.prow.shut svg { width: 14px; height: 14px; }
.mini { padding: 5px 10px; border-radius: 10px; border: 2px solid var(--paper-line); background: #fff; font: 800 12.5px/1.2 Nunito, sans-serif; color: var(--ink); cursor: pointer; }
.copies { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.copy { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--paper-line); }
.copy b { font: 400 18px/1.1 "Lilita One", "Russo One", sans-serif; }
.copy span { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.copy span svg { width: 14px; height: 14px; }
.copy small { color: var(--ink-soft); font-weight: 700; }
.copy.shut { background: #f1eee7; color: var(--ink-soft); }
.copy.open { gap: 6px; border-color: #b9dcb4; }
.copy b em { font: 800 13px/1 Nunito, sans-serif; font-style: normal; color: var(--green-dark); margin-left: 4px; }
.copy .mstep select { min-width: 0; flex: 1; width: 100%; }
.copy .mstep { display: flex; width: 100%; }
.cpl { font: 400 18px/1 "Lilita One", "Russo One", sans-serif; color: var(--ink-soft); margin-right: -2px; }
@media (max-width: 430px) { .plots { padding-left: 0; } }
/* game pictures on the Guides and Calculators tiles, and the Events picture menu */
.tile .ti.ti-pic { width: 62px; height: 62px; border-radius: 14px; background: radial-gradient(circle at 50% 38%, #f4f8fd, #d7e4f1 72%); box-shadow: inset 0 0 0 1px rgba(44, 60, 82, .12); }
.tile .ti.ti-pic .rti { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .22)); }
.content .evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.content a.evc { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 10px 6px 10px; border-radius: 14px;
  background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 3px 0 var(--paper-line); color: var(--ink); text-align: center; }
.content a.evc:hover { border-color: var(--blue); }
.content a.evc .rti { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .22)); }
.content a.evc b { font: 400 15px/1.15 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); }
.content h2 .ev-pic { margin: -10px 10px -6px 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
/* game pictures placed in page text (span.tf-pic in the wiki) */
.content .tf-pic { margin: -6px 8px -4px 0; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.content h2 .tf-pic { margin: -10px 10px -6px 0; }
.content td .tf-pic { margin: 2px 8px 2px 0; }
.content .tf-pic + .tf-pic { margin-left: -2px; }
.content .tf-cell { display: flex; align-items: center; gap: 10px; }
.content .tf-cell .tf-pic { margin: 0; }
.content .tf-cell .tf-pic + .tf-pic { margin-left: -6px; }
.content tr:has(.tf-pic) > td { vertical-align: middle; }
@media (max-width: 640px) {
  .content table.tf-cards, .content table.tf-cards tbody, .content table.tf-cards tr, .content table.tf-cards td { display: block; }
  .content table.tf-cards tr:first-child { display: none; }
  .content table.tf-cards tr { padding: 10px 12px; border-top: 1px solid #efe8d8; }
  .content table.tf-cards tr:nth-child(2) { border-top: 0; }
  .content table.tf-cards tr:nth-child(even) { background: #fbf8f1; }
  .content table.tf-cards td, .content table.tf-cards tr:nth-child(even) td { padding: 3px 0; border: 0; background: none; }
  .content table.tf-cards td:first-child { font-weight: 800; }
  .content table.tf-cards td.tf-empty { display: none; }
  .content table.tf-cards td[data-label]:not(:first-child):not(:has(.tf-cell))::before { content: attr(data-label) ": "; font-weight: 800; color: #6f685c; }
}
.content .tf-item { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.content .tf-item .tf-pic { margin: 0; }
.content .tf-item b { display: block; font: 400 20px/1.15 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); }
.content .tf-item small { color: #5a5348; font-weight: 700; }
@media (max-width: 560px) {
  .content .evgrid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .content a.evc b { font-size: 13px; }
}

/* ---------- audit fixes and polish (Nov 9) ---------- */
/* highlighted rows keep their colour on even rows too */
.win table.wikitable tr.tfc-up td, .win table.wikitable tr.tfc-got td { background: #e3effa; }
.win table.gt tr.next td, .win table.wikitable tr.next td { background: #fff3c4; }
/* map badge: the copy count sits on the same line */
.tag.has-lv .badge, .tag.locked .badge { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.badge small { margin-left: 1px; }
/* focus ring that shows on the cream window */
.win :focus-visible { outline-color: var(--blue-dark); }
/* bigger tap targets */
.win .tfc-in { min-height: 44px; }
.win .tfc-tabs button { min-height: 44px; }
.win .tf-calc summary { padding: 10px 2px; cursor: pointer; }
.mstep button { width: 40px; height: 40px; }
.mstep select, .brow select { height: 40px; }
.prow .mstep button { width: 38px; height: 38px; }
.prow .mstep select { height: 38px; }
@media (max-width: 760px) { .pill { min-height: 42px; } }
/* hero filters as two labelled groups */
.filters { gap: 10px 18px; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.segl { font: 400 14px/1 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: var(--ink-soft); text-transform: uppercase; margin-right: 2px; }
.seg .chip { min-height: 40px; font-size: 14px; }
/* window: a quick pop when it opens, titles may wrap on phones */
@keyframes winpop { from { transform: scale(.965); opacity: .6; } to { transform: none; opacity: 1; } }
.win.pop { animation: winpop .16s ease-out; }
@media (prefers-reduced-motion: reduce) { .win.pop { animation: none; } }
@media (max-width: 560px) { .wh h2 { white-space: normal; font-size: 19px; line-height: 1.12; } .wh h2 small { font-size: 12px; } }
/* profile card opens My base and shows your Base level */
a.me { text-decoration: none; color: #fff; }
.me .av { position: relative; flex: none; display: block; line-height: 0; }
.avlv { position: absolute; right: -6px; bottom: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); border: 2px solid #fff; font: 400 13px/1 "Lilita One", "Russo One", sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.avlv[hidden] { display: none; }
.credit { margin: 18px 0 0; text-align: center; color: var(--ink-soft); font-weight: 700; font-size: 13px; }
/* research tabs: one strip you can swipe on phones */
@media (max-width: 760px) {
  .win .tfc-tabs.tfrt-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: thin; }
  .win .tfc-tabs.tfrt-tabs button { flex: none; }
}
/* events: back to the picture menu */
.content h2 a.evtop { float: right; margin-top: 6px; font: 700 13px/1.4 Nunito, sans-serif; letter-spacing: 0; color: var(--blue-dark); border-bottom: 1px solid rgba(47, 127, 208, .35); }
/* search: quick picks when the box is empty */
.qchips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--paper-line); background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; }
.qchip:hover { border-color: var(--blue); }
/* gift code copied */
#gcopy.done { background: linear-gradient(#6fd06a, var(--green)); }
/* Base upgrade order */
.bo-plan { margin: 0 0 6px; }
.bo-plan select { min-height: 44px; padding: 4px 10px; border-radius: 10px; border: 2px solid var(--paper-line); background: #fff; font: 400 16px "Lilita One", "Russo One", sans-serif; color: var(--ink); }
.bo-list { display: grid; gap: 8px; }
.bo-row { display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; background: #fff; border: 1px solid var(--paper-line); box-shadow: 0 3px 0 var(--paper-line); }
.bo-lv { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; border-radius: 12px; background: linear-gradient(#ffd75e, var(--gold)); color: var(--ink); text-align: center; }
.bo-lv small { font: 800 11px/1 Nunito, sans-serif; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.bo-lv b { font: 400 28px/1 "Lilita One", "Russo One", sans-serif; }
.bo-lv .rtag { margin: 3px 0 0; }
.bo-needs { display: flex; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
a.bo-need { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; background: var(--paper); border: 2px solid transparent; color: var(--ink); text-decoration: none; }
a.bo-need .spr { width: 44px; flex: none; }
a.bo-need b { display: block; font: 400 15px/1.1 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
a.bo-need small { display: block; font-weight: 800; font-size: 12.5px; color: var(--ink-soft); }
a.bo-need.ok { border-color: #bfe3b8; }
a.bo-need.bad { border-color: #f0b97e; background: #fff8ef; }
a.bo-need:hover { border-color: var(--blue); }
.bo-cost { display: grid; grid-template-columns: auto auto; gap: 3px 12px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.bo-cost span { display: inline-flex; align-items: center; gap: 4px; }
.bo-cost svg { width: 16px; height: 16px; }
.bo-row.done { background: #f4f1ea; box-shadow: none; }
.bo-row.done .bo-lv { background: #d9e8d3; }
.bo-row.next { border: 2px solid #e39a0c; box-shadow: 0 0 0 3px rgba(227, 154, 12, .18), 0 3px 0 var(--paper-line); }
.bo-row.goal { border: 2px solid var(--blue); }
@media (max-width: 640px) {
  .bo-row { grid-template-columns: 62px 1fr; }
  .bo-cost { grid-column: 1 / -1; grid-template-columns: repeat(4, auto); justify-content: start; padding-left: 4px; }
  .bo-lv b { font-size: 24px; }
}
/* F2P daily checklist */
.daily { display: grid; gap: 8px; margin: 8px 0 16px; }
.dchk { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--paper-line); cursor: pointer; }
.dchk input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.dchk b { display: block; font-weight: 800; }
.dchk small { display: block; color: var(--ink-soft); font-weight: 700; }
.dchk:has(input:checked) { background: #f1faee; border-color: #8fd18a; }
.dchk:has(input:checked) b { text-decoration: line-through; text-decoration-color: rgba(35, 105, 42, .5); }
.bo-done > summary { padding: 10px 14px; border-radius: 12px; background: #f4f1ea; border: 1px solid var(--paper-line); font-weight: 800; color: var(--ink-soft); cursor: pointer; }
.bo-done[open] > summary { margin-bottom: 8px; }
.content h2 a.evtop { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; margin-top: 0; }
.prow .mstep button { width: 40px; height: 40px; }
.prow .mstep select { height: 40px; }
/* Specialists */
.r-R { --rc: #3f9a4c; } .r-N { --rc: #7b8794; }
.sp-tools { gap: 10px; margin: 0 0 12px; align-items: center; }
.sp-sel { display: inline-flex; align-items: center; gap: 8px; }
.sp-sel select, #sp-q { min-height: 44px; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--paper-line); background: #fff; font: 700 15px Nunito, sans-serif; color: var(--ink); max-width: 100%; }
#sp-q { flex: 1 1 200px; }
.spgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spc { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0 0 10px; border-radius: 16px; overflow: hidden; text-align: left; cursor: pointer;
  background: #fff; border: 3px solid var(--rc, #888); box-shadow: 0 4px 0 rgba(0, 0, 0, .14); font: inherit; color: var(--ink); }
.spc:hover { transform: translateY(-2px); }
.spc.sel { box-shadow: 0 0 0 3px rgba(47, 127, 208, .45), 0 4px 0 rgba(0, 0, 0, .14); }
.spp { display: grid; place-items: end center; height: 112px; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .55), transparent 62%), linear-gradient(var(--rc), #e9e3d6 95%); }
.spp .rti { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); }
.spl { align-self: center; font: 400 52px/1 "Lilita One", "Russo One", sans-serif; color: rgba(255, 255, 255, .92); text-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.spc .rar { position: absolute; left: 7px; top: 7px; padding: 1px 7px; border-radius: 8px; background: var(--rc); color: #fff; font: 400 13px/1.3 "Lilita One", "Russo One", sans-serif; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.spn { padding: 8px 10px 0; }
.spn b { display: block; font: 400 18px/1.1 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.spn small { font-weight: 800; color: var(--ink-soft); font-size: 12.5px; }
.spw { margin: 4px 10px 0; padding: 1px 8px; align-self: flex-start; border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 12px; }
.spb { margin: 5px 10px 0; font-weight: 700; font-size: 12.5px; color: var(--ink-soft); line-height: 1.3; }
.spd { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; margin: 0 0 12px; border: 3px solid var(--rc); }
.spdp { display: grid; place-items: end center; min-height: 170px; border-radius: 14px; background: linear-gradient(var(--rc), #e9e3d6 95%); }
.spdp .spl { font-size: 80px; }
.spd .rb2 { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--rc); color: #fff; font: 400 14px/1.3 "Lilita One", "Russo One", sans-serif; }
@media (max-width: 560px) {
  .spgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .spd { grid-template-columns: 1fr; }
  .spdp { min-height: 150px; }
}
.sp-sel { flex: 1 1 260px; min-width: 0; }
.sp-sel select { flex: 1; min-width: 0; width: 100%; }
.spc.noart .spp { place-items: center; align-content: center; gap: 2px; }
.spc.noart .spl { font-size: 40px; color: rgba(255, 255, 255, .85); }
.spna { font: 800 10.5px/1.2 Nunito, sans-serif; color: rgba(40, 40, 40, .55); }
.spdp .spna { display: none; }
@media (max-width: 560px) { .sp-sel { flex-basis: 100%; } }

/* ---------- Lv. 10 units calculator ---------- */
.l10-top { display: grid; gap: 12px; }
.l10-vb { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: linear-gradient(#fff8dc, #ffefb0); border: 2px solid #e8b021; }
.l10-vb .l10-ico { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #ffe58a, var(--gold) 55%, #d99a1e); border: 3px solid #fff; color: #5a3a06; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.l10-vb .l10-ico svg { width: 28px; height: 28px; }
.l10-vb b { display: block; font: 400 34px/1.05 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); }
.l10-vb .l10-lbl { display: block; font-weight: 800; color: var(--ink); }
.l10-vb small { display: block; margin-top: 2px; font-weight: 700; color: var(--ink-soft); }
.l10-done { display: flex; gap: 8px; align-items: center; margin: 0; padding: 10px 14px; border-radius: 14px; background: #dff3dc; color: #23692a; font-weight: 800; }
.l10-line { margin: 0; font-size: 15.5px; }
.l10-top .facts { margin: 0; }
.l10-top .fact small { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.l10-top .tfc-form { margin: 0; }
.l10-top .l10-hint { margin: -4px 0 0; }
.l10-top .tfc-form .tfc-f:nth-child(2) { flex: 2 1 230px; max-width: 320px; }
.l10-how { margin: 18px 0 8px; }
.l10-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: l10; }
.l10-step { counter-increment: l10; position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--paper-line); }
.l10-step::before { content: counter(l10); position: absolute; left: -7px; top: -7px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--slate); color: #fff; font: 400 12px/20px "Lilita One", "Russo One", sans-serif; text-align: center; }
.l10-step.is-next { border: 2px solid #e8b021; box-shadow: 0 0 0 3px rgba(232, 176, 33, .2); }
.l10-step.is-done { background: #f1f8ef; border-color: #cfe6c9; }
.l10-step.is-done::before { background: var(--green); }
.l10-tick { display: grid; place-items: center; width: 40px; height: 40px; margin-top: 2px; border-radius: 50%; border: 3px solid #c9bfa6; background: #fff; color: transparent; cursor: pointer; }
.l10-tick:hover { border-color: var(--green); color: #b9dcb4; }
.l10-tick[aria-pressed="true"] { background: var(--green); border-color: var(--green-dark); color: #fff; }
.l10-head { display: flex; gap: 10px; align-items: flex-start; }
.l10-pics { display: inline-flex; flex: none; gap: 2px; }
.l10-pics .rti { border-radius: 8px; }
.l10-title { display: block; font-weight: 800; line-height: 1.3; }
.l10-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.l10-st { padding: 0 8px; border-radius: 8px; color: #fff; font: 400 12.5px/1.6 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; }
.l10-st.st-done { background: var(--green); }
.l10-st.st-next { background: #9a5a00; }
.l10-st.st-tc { background: #d2691e; }
.l10-cost { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: 14px; font-weight: 700; }
.l10-cost span { display: inline-flex; align-items: center; gap: 4px; }
.l10-cost svg { width: 18px; height: 18px; flex: none; }
.l10-cost .l10-v { color: #7a5600; font-weight: 800; }
.l10-run { min-width: 76px; text-align: right; }
.l10-run span { display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.l10-run b { font: 400 18px/1.2 "Lilita One", "Russo One", sans-serif; color: var(--slate); }
.l10-run.is-ok b { color: var(--green-dark); }
.tf-calc .l10-lv { margin: 6px 0 0; }
.l10-lv summary { font-size: 13.5px; }
.l10-sel { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.l10-sel .tfc-f { min-width: 150px; flex: 1 1 160px; max-width: 240px; }
.l10-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.l10-chip { padding: 2px 9px; border-radius: 10px; background: #eef4fb; border: 1px solid #c8daf0; font-size: 13px; font-weight: 700; }
@media (max-width: 560px) {
  .l10-step { grid-template-columns: 40px minmax(0, 1fr); padding: 10px; }
  .l10-run { grid-column: 2; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .l10-pics { display: none; }
  .l10-vb b { font-size: 28px; }
  .l10-sel .tfc-f { max-width: none; min-width: 120px; flex: 1 1 120px; }
}

/* ---------- hero planner (tf-plan.js) ---------- */
.tf-calc[data-calc="hero-planner"] { padding: 14px; }
.tfp h3.sec { margin-top: 22px; font: 400 21px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; color: var(--slate); }
.tfp h3.sec:first-of-type { margin-top: 14px; }
.tfp .note { margin: 0 0 10px; }
.tfp-mode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.tfp-mode p { margin: 0; font-weight: 800; }
.tfp-squads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tfp-sq { display: flex; flex-direction: column; gap: 10px; }
.tfp-sqh { display: flex; align-items: center; gap: 8px; }
.tfp-sqh b { font-size: 20px; color: var(--slate); }
.tfp-prio { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--paper-line); font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.tfp-prio.first { background: var(--gold); border-color: var(--gold-dark); color: var(--ink); }
.tfp-up { min-height: 34px; min-width: 38px; padding: 2px 10px; font-size: 16px; }
.tfp-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tfp-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; cursor: pointer; }
.tfp-av { display: block; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .35), transparent 60%), linear-gradient(var(--rc, #8b96a5), #26364b 90%); border: 3px solid var(--rc, var(--paper-line)); flex: none; }
.tfp-empty { display: grid; place-items: center; background: var(--paper); border: 2px dashed var(--paper-line); color: var(--ink-soft); font: 400 26px/1 "Lilita One", "Russo One", sans-serif; }
.tfp-slot select { width: 100%; height: 30px; padding: 0 2px; border: 2px solid var(--paper-line); border-radius: 10px; background: var(--paper); color: var(--ink); font: 800 13px Nunito, sans-serif; text-align: center; text-align-last: center; cursor: pointer; text-overflow: ellipsis; }
.tfp-basef { margin-top: 12px; }
.tfp-thu { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--slate); color: #fff; font-weight: 800; font-size: 14px; }
.tfp-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tfp-lane { display: flex; flex-direction: column; gap: 10px; }
.tfp-lane .note { margin: 0; }
.tfp-lh { display: flex; align-items: center; gap: 10px; }
.tfp-lh b.game { font-size: 19px; color: var(--slate); }
.tfp-have { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--paper-line); font-weight: 800; font-size: 13px; }
.tfp-ico { width: 34px; height: 34px; flex: none; object-fit: contain; }
.tfp-exp { display: grid; place-items: center; border-radius: 10px; background: radial-gradient(circle at 40% 30%, #8fd0ff, var(--blue) 70%); color: #fff; }
.tfp-exp svg { width: 22px; height: 22px; }
.tfp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tfp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 2px solid var(--paper-line); background: var(--paper); color: var(--ink); font: 800 13.5px/1.15 Nunito, sans-serif; text-align: left; cursor: pointer; }
.tfp-chip .tfp-av, .tfp-chip .tfp-sk { width: 32px; height: 32px; border-width: 2px; }
.tfp-chip > span { display: flex; flex-direction: column; }
.tfp-chip small { color: var(--ink-soft); font-size: 12px; }
.tfp-chip.ok { background: #e2f4dc; border-color: #9fd690; }
.tfp-chip.ok small { color: var(--green-dark); }
.tfp-chip.part { background: #fff4cf; border-color: var(--gold); }
.tfp-chip.part small { color: var(--gold-dark); }
.tfp-chip.later { opacity: .55; }
.tfp-more { align-self: center; font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.tfp-pts { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--paper-line); }
.tfp-pts .tfc-big { margin: 0; }
.tfp-pts .tfc-big b { font: 400 24px/1 "Lilita One", "Russo One", sans-serif; color: var(--green-dark); }
.tfp-sh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.tfp-sh .note { flex: 1 1 320px; }
.tfp-left { display: flex; flex-direction: column; line-height: 1.1; }
.tfp-left small { font-weight: 800; font-size: 12px; color: var(--ink-soft); }
.tfp-left b { font: 400 22px/1.1 "Lilita One", "Russo One", sans-serif; color: var(--slate); }
.tfp-edit { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.tfp-edit[aria-pressed="true"] { color: #fff; background: var(--slate); border-color: var(--slate); box-shadow: 0 3px 0 #16202e; }
.tfp-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 12px; font-weight: 800; }
.tfp-next b { color: var(--gold-dark); }
.tfp-nl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex-basis: 100%; }
.tfp-tag { padding: 2px 10px; border-radius: 8px; background: var(--gold); color: var(--ink); font: 400 14px/1.4 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; }
.tfp-tag.done { background: #e2f4dc; color: var(--green-dark); }
.tfp-g { --n: 6; display: grid; grid-template-columns: minmax(64px, 170px) repeat(var(--n), minmax(0, 1fr)); gap: 5px; align-items: stretch; }
#grid-star { --n: 6; } #grid-med { --n: 3; } #grid-gear { --n: 4; }
.tfp-r, .tfp-gh { display: contents; }
.tfp-gh span { align-self: end; text-align: center; font-weight: 800; font-size: 12.5px; color: var(--ink-soft); }
.tfp-sql { grid-column: 1 / -1; margin-top: 10px; font: 400 15px/1.2 "Lilita One", "Russo One", sans-serif; letter-spacing: .03em; color: var(--slate); }
.tfp-gh + .tfp-sql, .tfp-g > .tfp-sql:first-child { margin-top: 2px; }
.tfp-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tfp-who .tfp-av { width: 44px; height: 44px; border-width: 2px; }
.tfp-who > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tfp-who b { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfp-who em { font-style: normal; font-weight: 800; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.tfp-c { min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: 12px; border: 2px solid var(--paper-line); background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.tfp-c b { font: 400 17px/1 "Lilita One", "Russo One", sans-serif; letter-spacing: .02em; white-space: nowrap; }
.tfp-c small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 11.5px; color: var(--ink-soft); }
.tfp-c:hover { border-color: #cfc5ad; }
.tfp-c.done { background: #e2f4dc; border-color: #9fd690; }
.tfp-c.done b, .tfp-c.done small { color: var(--green-dark); }
.tfp-c.next { background: #fff4cf; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.tfp-c.next small { color: var(--gold-dark); }
.tfp-c.lock { opacity: .4; cursor: default; }
.tfp-c.cap { background: var(--paper); cursor: default; }
.tfp-c.off { background: transparent; border-style: dashed; cursor: default; }
.tfp-c.off .tfp-sk { opacity: .45; filter: grayscale(1); }
.tfp-sk { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; flex: none; }
.tfp-gi { width: 32px; height: 32px; object-fit: contain; filter: grayscale(1); opacity: .45; }
.tfp-c.done .tfp-gi { filter: none; opacity: 1; }
.tfp-ed { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 4px 0; }
.tfp-ed label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink-soft); }
.tfp-in { width: 78px; min-height: 38px; text-align: center; }
.tfp-pv { font-size: 13px; }
.tfp-pv input { width: 18px; height: 18px; accent-color: var(--green); }
.tfp-toast { position: fixed; left: 50%; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--slate); color: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
.tfp-toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform .2s; }
.tfp-toast .gbtn { min-height: 36px; padding: 4px 14px; font-size: 15px; }
.tfp-toast .gbtn[hidden] { display: none; }
.tile.tfp-link { margin: 0 0 14px; max-width: 640px; }
@media (max-width: 760px) {
  .tfp-squads, .tfp-lanes { grid-template-columns: 1fr; }
  .tfp-av { width: 50px; height: 50px; }
  .tfp-slot select { font-size: 12px; }
  .tfp-g { grid-template-columns: 50px repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
  .tfp-who { flex-direction: column; gap: 1px; }
  .tfp-who .tfp-av { width: 36px; height: 36px; }
  .tfp-who b { font-size: 10.5px; max-width: 50px; text-align: center; }
  .tfp-who em { display: none; }
  .tfp-c { min-height: 50px; border-radius: 10px; padding: 3px 1px; }
  .tfp-c b { font-size: 14px; }
  .tfp-c small { font-size: 10px; }
  .tfp-sk { width: 22px; height: 22px; }
  .tfp-gi { width: 26px; height: 26px; }
  .tfp-gh span { font-size: 10.5px; }
  .tfp-in { width: 64px; }
  #grid-exp { grid-template-columns: 44px repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
  #grid-exp .tfp-c { border-width: 1.5px; padding: 3px 0; border-radius: 9px; }
  #grid-exp .tfp-c b { font-size: 13px; }
  #grid-exp .tfp-c small { font-size: 9.5px; letter-spacing: -.2px; }
  #grid-exp .tfp-who .tfp-av { width: 34px; height: 34px; }
  #grid-exp .tfp-who b { max-width: 44px; }
}
.tfp-lk { display: inline-flex; vertical-align: -2px; margin-right: 2px; }
.tfp-lk svg { width: 12px; height: 12px; }
/* Lilita One has no ş, Ş or İ: a small add-on built from its own s, S, I, cedilla and dot */
@font-face { font-family: "Lilita One"; src: url(fonts/lilita-one-tr.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0130, U+015E-015F; }
/* gear by colour */
.tfp-c { position: relative; }
.tfp-c.gear .tfp-gi { filter: none; opacity: 1; }
.tfp-c.gear.g-x { background: transparent; border-style: dashed; }
.tfp-c.gear.g-x .tfp-gi { filter: grayscale(1); opacity: .35; }
.tfp-c.g-g, .tfp-ge.g-g { background: #e7f5e2; border-color: #8fcf7f; }
.tfp-c.g-b, .tfp-ge.g-b { background: #e4effc; border-color: #8db8ea; }
.tfp-c.g-p, .tfp-ge.g-p { background: #f0e7fc; border-color: #bf9bef; }
.tfp-c.g-o, .tfp-ge.g-o { background: #fdeedb; border-color: #f0b46a; }
.tfp-c.g-r, .tfp-ge.g-r { background: #fbe3e0; border-color: #e98b81; }
.tfp-c.g-b small { color: #2463a8; } .tfp-c.g-p small { color: #6b3bb0; } .tfp-c.g-o small { color: #a45f0c; } .tfp-c.g-r small { color: #a3302a; }
.tfp-c.gear.next { background: #fff4cf; border-color: var(--gold); }
.tfp-ge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 12px; border: 2px solid var(--paper-line); background: #fff; min-width: 0; }
.tfp-ge.g-x { border-style: dashed; background: transparent; }
.tfp-ge.g-x .tfp-gi { filter: grayscale(1); opacity: .35; }
.tfp-ge .tfp-gi { filter: none; opacity: 1; }
.tfp-ge select, .tfp-ge input { width: 100%; min-height: 34px; padding: 0 4px; font-size: 13px; text-align: center; text-align-last: center; }
.tfp-ge input:disabled { opacity: .4; }
/* order numbers and the EXP order list */
.tfp-ord { position: absolute; top: 2px; left: 4px; font: 800 10px/1 Nunito, sans-serif; font-style: normal; color: var(--ink-soft); }
.tfp-c.next .tfp-ord { color: var(--gold-dark); }
.tfp-heads { display: inline-flex; align-items: center; padding-left: 8px; }
.tfp-heads .tfp-av { width: 30px; height: 30px; border-width: 2px; margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.tfp-heads em { margin-left: 4px; font-style: normal; font-weight: 800; font-size: 12px; color: var(--ink-soft); }
.tfp-gnext { display: inline-flex; align-items: center; gap: 6px; }
.tfp-gnext > .tfp-av { width: 36px; height: 36px; border-width: 2px; }
.tfp-gp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--paper-line); background: #fff; }
.tfp-gp img { width: 28px; height: 28px; object-fit: contain; }
.tfp-gp small { font-weight: 800; font-size: 10px; line-height: 1; }
.tfp-gp.g-x { border-style: dashed; } .tfp-gp.g-x img { filter: grayscale(1); opacity: .35; }
.tfp-gp.g-p { background: #f0e7fc; border-color: #bf9bef; } .tfp-gp.g-b { background: #e4effc; border-color: #8db8ea; } .tfp-gp.g-g { background: #e7f5e2; border-color: #8fcf7f; }
.tfp-gp.g-o { background: #fdeedb; border-color: #f0b46a; } .tfp-gp.g-r { background: #fbe3e0; border-color: #e98b81; }
.tfp-arr { font-weight: 800; color: var(--ink-soft); }
.tfp-ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tfp-step { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 14px; border: 2px solid var(--paper-line); background: #fff; color: var(--ink); font: 800 13px/1.15 Nunito, sans-serif; text-align: left; cursor: pointer; }
.tfp-step:hover { border-color: #cfc5ad; }
.tfp-step.first { background: #fff4cf; border-color: var(--gold); }
.tfp-step > span:last-child { display: flex; flex-direction: column; white-space: nowrap; }
.tfp-step small { color: var(--ink-soft); font-size: 12px; }
.tfp-step.first small { color: var(--gold-dark); }
.tfp-no { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; background: var(--slate); color: #fff; font: 400 14px/1 "Lilita One", "Russo One", sans-serif; font-style: normal; }
.tfp-step.first .tfp-no { background: var(--gold); color: var(--ink); }
.tfp-ol .tfp-more { align-self: center; }
@media (max-width: 760px) {
  .tfp-ol { flex-direction: column; }
  .tfp-ol li { display: block; }
  .tfp-step { width: 100%; }
  .tfp-ord { font-size: 8.5px; top: 1px; left: 2px; }
  .tfp-ge { padding: 4px 2px; }
  .tfp-ge select, .tfp-ge input { font-size: 11px; min-height: 30px; padding: 0 1px; }
  .tfp-heads .tfp-av { width: 26px; height: 26px; }
}

/* EXP order: one step per row, every hero named with its from → to level */
.tfp-ol { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 6px; }
.tfp-ol li { display: block; }
.tfp-step { display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; }
.tfp-sb { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.tfp-sq { font: 400 13px/1 "Lilita One", "Russo One", sans-serif; color: var(--ink-soft); }
.tfp-ohs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tfp-oh { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tfp-oh .tfp-av { width: 30px; height: 30px; border-width: 2px; }
.tfp-oh > span { display: flex; flex-direction: column; line-height: 1.1; }
.tfp-oh b { font-size: 13px; }
.tfp-oh small { font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.tfp-sc { flex: none; margin-left: auto; font: 400 18px/1 "Lilita One", "Russo One", sans-serif; color: var(--ink); }
.tfp-step.first .tfp-sc { color: var(--gold-dark); }
.tfp-all { margin: 0 0 12px; }

/* gear stars: five hexagons under an orange Lv 40 piece */
.tfp-hx { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
.tfp-hx i { width: 10px; height: 11px; background: #5a3418; opacity: .55; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.tfp-hx i.on { background: linear-gradient(#fff3d6, #ffb35c 55%, #f08a2a); opacity: 1; }
.tfp-gp .tfp-hx i { width: 7px; height: 8px; }
.tfp-ss { width: 100%; }

@media (max-width: 600px) {
  .tfp-step { gap: 8px; padding: 8px 10px 8px 8px; }
  .tfp-ohs { gap: 4px 10px; }
  .tfp-oh .tfp-av { width: 26px; height: 26px; }
  .tfp-sc { font-size: 15px; }
  .tfp-hx i { width: 8px; height: 9px; }
}

/* EXP grid: every 5-level step from the lowest hero up to the cap; scrolls sideways when it is wider than the page, names stay put */
#grid-exp { overflow-x: auto; grid-template-columns: minmax(64px, 170px) repeat(var(--n), minmax(58px, 1fr)); padding-bottom: 6px; }
#grid-exp .tfp-who { position: sticky; left: 0; z-index: 2; background: rgb(239, 232, 216); box-shadow: 6px 0 6px -4px rgba(239, 232, 216, .9); }
#grid-exp .tfp-sql { position: sticky; left: 0; justify-self: start; }
@media (max-width: 600px) {
  #grid-exp { grid-template-columns: 44px repeat(var(--n), minmax(42px, 1fr)); }
}
