:root {
  --bg: #12141a; --panel: #1b1e27; --panel2: #232733; --line: #2f3442;
  --text: #e8eaf0; --dim: #9aa1b2; --accent: #ffc531; --good: #4ade80; --bad: #f87171;
  --r1: #9aa1b2; --r2: #4ade80; --r3: #60a5fa; --r4: #c084fc; --r5: #fbbf24; --r6: #f87171;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 "Segoe UI", system-ui, sans-serif; display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }

#titlebar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: #0c0d11; cursor: move; user-select: none; flex: none; }
.brand { font-weight: 800; letter-spacing: .5px; }
.brand b { color: var(--accent); }
.brand small { font-weight: 400; color: var(--dim); margin-inline-start: 4px; }
.hint { margin-inline-start: auto; color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winbtns { display: flex; gap: 2px; }
.winbtns button { background: none; border: 0; width: 26px; height: 22px; border-radius: 4px; cursor: pointer; color: var(--dim); }
.winbtns button:hover { background: var(--panel2); color: var(--text); }
body.browser .winbtns { display: none; }

#tabs { display: flex; flex: none; background: var(--panel); border-bottom: 1px solid var(--line); }
#tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 2px; cursor: pointer; color: var(--dim); font-weight: 600; font-size: 12px; white-space: nowrap; }
#tabs button:hover { color: var(--text); }
#tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

main { flex: 1; overflow-y: auto; padding: 10px 12px; min-height: 0; }
.tab { display: none; }
.tab.on { display: block; }
footer { flex: none; padding: 4px 12px; color: var(--dim); font-size: 10.5px; border-top: 1px solid var(--line); background: var(--panel); }

.row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.row > input[type=search] { flex: 1; min-width: 0; }
input[type=text], input[type=number], input[type=search], select { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; min-width: 0; }
input:focus, select:focus, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 0; }
button.primary, .filebtn { background: var(--accent); color: #17130a; border: 0; border-radius: 5px; padding: 7px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.filebtn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); font-weight: 400; padding: 6px 10px; }
button.primary:disabled { opacity: .5; cursor: wait; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; color: var(--dim); font-size: 11.5px; justify-content: flex-end; }
.field input, .field select { color: var(--text); font-size: 13px; width: 100%; }
.checks { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.checks .chk { white-space: normal; }
.chk input { accent-color: var(--accent); }

.status { color: var(--dim); margin: 0 0 8px; }
.status.err { color: var(--bad); }
.note { color: var(--dim); font-size: 11.5px; margin: 10px 0 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-top: 10px; }
.box summary { cursor: pointer; color: var(--dim); }
.box .field { margin-top: 8px; }

.out { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
.out .line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.out .line:last-child { border-bottom: 0; }
.out .line span { color: var(--dim); }
.out .line b { text-align: end; font-variant-numeric: tabular-nums; }
.out .line.big b { color: var(--accent); font-size: 16px; }
.pos { color: var(--good); } .neg { color: var(--bad); }

.tbl { width: 100%; border-collapse: collapse; margin: 10px 0; font-variant-numeric: tabular-nums; }
.tbl th { text-align: start; color: var(--dim); font-weight: 600; font-size: 11px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td small { color: var(--dim); display: block; }
.tbl input { width: 62px; padding: 4px 6px; }
.tbl tr.done td { color: var(--good); }

.results { display: flex; flex-direction: column; gap: 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--r1); border-radius: 6px; padding: 8px 10px; }
.card[data-r="2"] { border-inline-start-color: var(--r2); } .card[data-r="3"] { border-inline-start-color: var(--r3); }
.card[data-r="4"] { border-inline-start-color: var(--r4); } .card[data-r="5"] { border-inline-start-color: var(--r5); }
.card[data-r="6"] { border-inline-start-color: var(--r6); }
.card .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card .name { font-weight: 700; }
.card .meta { color: var(--dim); font-size: 11.5px; }
.card .price { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .price small { font-weight: 400; font-size: 11px; color: var(--dim); margin-inline-end: 4px; }
.card.keep .price { color: var(--accent); }
.card .sub { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--dim); font-size: 11.5px; margin-top: 3px; }
.tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px; padding: 1px 6px; border-radius: 3px; background: var(--panel2); color: var(--dim); text-transform: uppercase; }
.tag.keep { background: var(--accent); color: #17130a; }
.tag.sell { background: #1f3a2a; color: var(--good); }
.tag.alarm { background: #40201f; color: var(--bad); }
.tag.clan { background: #2a2540; color: var(--r4); }
.total { display: flex; justify-content: space-between; padding: 6px 10px; background: var(--panel2); border-radius: 6px; font-weight: 700; }

.loc h3 { margin: 0; font-size: 14px; }
.loc .counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.loc .count { background: var(--panel2); border-radius: 5px; padding: 3px 8px; font-size: 12px; }
.loc .count b { color: var(--accent); font-size: 14px; margin-inline-end: 3px; }
.loc ul { margin: 4px 0 0; padding-inline-start: 18px; color: var(--dim); font-size: 12px; }
.loc ul li b { color: var(--text); font-weight: 600; }
.loc details { margin-top: 4px; }
.loc summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.loc .lootrow { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 2px 0; }
.loc .lootrow span:last-child { color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.devlog { height: 260px; overflow-y: auto; background: #0c0d11; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: 11px/1.45 Consolas, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; }
.devlog .lg span { color: var(--dim); }
.devlog .lg.warn { color: var(--r5); } .devlog .lg.error { color: var(--bad); }
.devapi { width: 100%; height: 220px; resize: vertical; background: #0c0d11; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: 11px/1.45 Consolas, monospace; }
#tabs button { padding-inline-start: 0; padding-inline-end: 0; }
.meta { color: var(--dim); font-size: 11.5px; }

.card:has(> .ico) { display: flex; gap: 10px; align-items: center; }
.card > .ico { width: 54px; height: 54px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px #0008); }
.card > .body { flex: 1; min-width: 0; }

/* ── Visual tabs ─────────────────────────────────────────────── */
[data-r="1"] { --rc: var(--r1); } [data-r="2"] { --rc: var(--r2); } [data-r="3"] { --rc: var(--r3); }
[data-r="4"] { --rc: var(--r4); } [data-r="5"] { --rc: var(--r5); } [data-r="6"] { --rc: var(--r6); }

.hero { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(120deg, var(--h1, #1d2a1c), var(--panel) 70%); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 12% 50%, var(--h2, #4ade8033), transparent 55%); pointer-events: none; }
.hero > img { width: 76px; height: 76px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 8px #000a); z-index: 1; }
.hero-txt { flex: 1; min-width: 0; z-index: 1; }
.hero h2 { margin: 0; font-size: 19px; letter-spacing: .3px; }
.hero p { margin: 2px 0 0; color: var(--dim); font-size: 12px; }
.hero-stat { text-align: end; z-index: 1; white-space: nowrap; }
.hero-stat b { display: block; font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-stat span { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.hero-grow { --h1: #1c2d1b; --h2: #4ade8038; } .hero-lab { --h1: #1b2733; --h2: #60a5fa38; }
.hero-clan { --h1: #2a1f33; --h2: #c084fc38; } .hero-jail { --h1: #33201f; --h2: #f8717138; }

h4.sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
h4.sec small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
h4.sec > img { width: 30px; height: 30px; object-fit: contain; }
h4.sec .spacer { flex: 1; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel2); }
.stepper button { width: 26px; border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--dim); }
.stepper button:hover { background: var(--line); color: var(--text); }
.stepper input { width: 40px; text-align: center; border: 0; border-radius: 0; background: none; padding: 5px 0; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.picks.two { grid-template-columns: repeat(2, 1fr); }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; background: linear-gradient(180deg, var(--panel) 30%, color-mix(in srgb, var(--rc) 22%, var(--panel))); border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line)); text-align: center; }
.pick img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 3px 5px #0009); }
.pick b { color: var(--rc); } .pick small { color: var(--dim); font-size: 11px; margin-bottom: 6px; }

.beds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bed { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 8px; background: #2a2118; border: 1px solid #4a3a28; }
.bed .pots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pot { aspect-ratio: 1; border-radius: 6px; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--rc) 45%, #1a140e), #1a140e 75%); display: flex; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.pot img { width: 86%; height: 86%; object-fit: contain; }
.pot.empty { background: #1a140e; border: 1px dashed #4a3a28; }
.bednote { grid-column: 1 / -1; color: var(--dim); font-size: 11.5px; text-align: center; }

.tcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tcards.three { grid-template-columns: repeat(3, 1fr); } .tcards.one { grid-template-columns: 1fr; margin-bottom: 10px; }
.tcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: center; opacity: .62; transition: opacity .12s, border-color .12s; }
.tcard:hover { opacity: .9; }
.tcard input { position: absolute; opacity: 0; pointer-events: none; }
.tcard img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(.8); }
.tcard b { font-size: 12px; } .tcard small { color: var(--dim); font-size: 10.5px; }
.tcard:has(input:checked) { opacity: 1; border-color: var(--accent); background: linear-gradient(180deg, var(--panel), #3a2f12); box-shadow: 0 0 0 1px var(--accent) inset; }
.tcard:has(input:checked) img { filter: none; }
.tcard:has(input:checked)::after { content: "ON"; position: absolute; top: 4px; inset-inline-end: 5px; font-size: 9px; font-weight: 800; color: var(--accent); }
.tcard.wide { flex-direction: row; gap: 10px; padding: 8px 12px; text-align: start; }
.tcard.wide b { font-size: 13px; flex: 1; }

.flow { display: flex; align-items: stretch; gap: 0; margin: 14px 0 10px; padding: 10px 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; }
.node { flex: 1 0 auto; min-width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1px; padding: 4px; border-radius: 8px; border: 1px solid transparent; }
.node img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 4px #0009); }
.node b { font-size: 11.5px; white-space: nowrap; } .node small { color: var(--dim); font-size: 10.5px; white-space: nowrap; }
.node.cash b { font-size: 16px; color: var(--accent); }
.node.machine img { width: 36px; height: 36px; opacity: .85; }
.node.product { cursor: pointer; border-color: var(--line); background: var(--panel2); }
.node.product:hover { border-color: var(--dim); }
.node.product.on { border-color: var(--accent); background: #3a2f12; }
.node.product.on small { color: var(--accent); font-weight: 700; }
.arrow { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 22px; padding: 0 2px; }
.arrow small { color: var(--dim); font-size: 10px; white-space: nowrap; }
.arrow i { width: 100%; min-width: 18px; height: 2px; background: var(--line); position: relative; margin-top: 3px; }
.arrow i::after { content: ""; position: absolute; inset-inline-end: -1px; top: -3px; border: 4px solid transparent; border-inline-start-color: var(--dim); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.tile span { color: var(--dim); font-size: 11px; }
.tile b { font-size: 17px; font-variant-numeric: tabular-nums; }
.tile b small { display: block; font-size: 11px; font-weight: 400; color: var(--dim); }
.tile.wide { grid-column: 1 / -1; } .tile.wide b { font-size: 22px; }
.tile.gold { border-color: #6b5518; background: linear-gradient(180deg, var(--panel), #2e2610); } .tile.gold b { color: var(--accent); }
.tile.good b { color: var(--good); } .tile.bad b { color: var(--bad); }
.tile.good.wide { border-color: #1f5a37; background: linear-gradient(180deg, var(--panel), #15281c); }
.tile.bad.wide { border-color: #6b2523; background: linear-gradient(180deg, var(--panel), #2a1615); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.mixbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.mixbar i { background: var(--rc); min-width: 3px; }
.mixrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.mixitem { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line)); }
.mixitem img { width: 34px; height: 34px; object-fit: contain; }
.mixitem b { font-size: 16px; } .mixitem small { color: var(--rc); font-size: 10.5px; margin-inline-start: auto; }

.clancards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.clancard { border-radius: 10px; border: 1px solid color-mix(in srgb, var(--rc) 45%, var(--line)); background: linear-gradient(110deg, color-mix(in srgb, var(--rc) 16%, var(--panel)), var(--panel) 60%); padding: 10px 12px; }
.chead { display: flex; align-items: baseline; gap: 8px; }
.chead b { font-size: 16px; color: var(--rc); } .chead span { color: var(--dim); font-size: 11.5px; }
.chead .reward { margin-inline-start: auto; color: var(--accent); font-weight: 800; font-size: 17px; }
.cwhat { color: var(--dim); font-size: 11.5px; margin: 2px 0 8px; }
.crow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.crow label { display: flex; flex-direction: column; gap: 3px; color: var(--dim); font-size: 11px; align-items: flex-start; }
.cbet { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--dim); font-size: 11.5px; }
.cbet input { width: 110px; }

.capbar { margin-bottom: 4px; }
.caplabel { display: flex; justify-content: space-between; font-size: 12px; } .caplabel.dim { color: var(--dim); font-size: 11px; margin-top: 3px; }
.capfill { height: 12px; border-radius: 6px; background: var(--panel2); overflow: hidden; margin-top: 4px; border: 1px solid var(--line); }
.capfill i { display: block; height: 100%; background: linear-gradient(90deg, #f87171, var(--accent)); border-radius: 6px; }
.track { display: flex; flex-direction: column; gap: 6px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.trow > img { width: 44px; height: 44px; object-fit: contain; flex: none; filter: grayscale(.9) brightness(.7); }
.trow.done { border-color: #1f5a37; } .trow.done > img { filter: drop-shadow(0 2px 4px #000a); }
.tbody { flex: 1; min-width: 0; }
.tname { display: flex; justify-content: space-between; gap: 8px; } .tname span { color: var(--dim); font-size: 11.5px; }
.tbar { display: flex; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin: 4px 0 2px; }
.tbar .had { background: var(--good); } .tbar .gain { background: var(--accent); }
.tbody small { color: var(--dim); font-size: 11px; } .trow.done .tbody small { color: var(--good); }

.loc .count { display: inline-flex; align-items: center; gap: 4px; }
.loc .count img { width: 22px; height: 22px; object-fit: contain; }
.loc .count.hot { background: #3a2f12; border: 1px solid #6b5518; }
.loc .lootrow { align-items: center; border-inline-start: 2px solid var(--rc); padding-inline-start: 6px; margin: 2px 0; }
.loc .lootrow span:first-child { display: flex; align-items: center; gap: 6px; }
.loc .lootrow img, .loc li.kit img { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.loc ul:has(li.kit) { list-style: none; padding-inline-start: 0; } .loc li.kit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 3px 0; }
.flow.big { padding: 8px 4px; }
.flow.big .node { flex: 1 1 0; min-width: 0; padding: 4px 1px; }
.flow.big .node img { width: 34px; height: 34px; }
.flow.big .node.machine img { width: 26px; height: 26px; }
.flow.big .node b { font-size: 10.5px; white-space: normal; line-height: 1.15; }
.flow.big .node small { font-size: 10px; }
.flow.big .arrow { min-width: 10px; padding: 0; }
.flow.big .arrow i { min-width: 8px; }
.lochead { display: flex; gap: 12px; align-items: center; }
.lochead .building { width: 104px; height: 86px; object-fit: contain; flex: none; border-radius: 8px; background: radial-gradient(circle at 50% 60%, #2c3140, #171a22 75%); padding: 4px; filter: drop-shadow(0 3px 6px #0008); }
.locinfo { flex: 1; min-width: 0; }
.locinfo .chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 3px; }
.lootstrip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.lootstrip img { width: 40px; height: 40px; object-fit: contain; padding: 3px; border-radius: 6px; background: var(--panel2); border-bottom: 2px solid var(--rc); }

.card .sub.warn { color: var(--r5); }
.rtxt { color: var(--rc); }

/* ── Scan panel and discovered list ─────────────────────────── */
.scanpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.scanbtns { display: flex; gap: 6px; }
.scanbtns .primary { flex: 1; padding: 9px 6px; }
button.primary.alt { background: #3a2f12; color: var(--accent); border: 1px solid var(--accent); }
.keys { margin-top: 8px; border-top: 1px solid var(--line); }
.keyrow { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.keyrow:last-child { border-bottom: 0; padding-bottom: 0; }
kbd { font: 700 11.5px Consolas, monospace; background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 9px; color: var(--text); min-width: 58px; text-align: center; }
.searchrow input { flex: 1; }
button.danger { background: #7a2320; color: #fff; border: 0; border-radius: 5px; padding: 7px 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
button.danger:hover { background: #a02c28; } button.danger:disabled { opacity: .35; cursor: default; }
.dlist { display: flex; flex-direction: column; gap: 5px; }
.drow { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto auto 26px; align-items: center; column-gap: 8px; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--rc, var(--r1)); border-radius: 7px; padding: 7px 8px; cursor: pointer; }
.drow:hover { border-color: var(--dim); border-inline-start-color: var(--rc, var(--r1)); }
.drow .chev { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 13px; padding: 0; transform: rotate(-90deg); transition: transform .12s; }
.drow.open .chev { transform: none; color: var(--text); }
.drow .ico { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 3px #0008); }
.dname { min-width: 0; }
.dname b { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.dname b i { color: var(--accent); font-style: normal; }
.dname small { color: var(--dim); font-size: 11px; }
.drow.keep .dname small { color: var(--accent); }
.dprice { text-align: center; min-width: 58px; }
.dprice b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--dim); white-space: nowrap; }
.dprice small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.dprice.main b { color: var(--accent); font-size: 14.5px; }
.dprice.main.sell b { color: var(--good); }
.drow .trash { background: none; border: 0; cursor: pointer; font-size: 14px; color: #c0504b; padding: 2px; border-radius: 4px; }
.drow .trash:hover { background: #40201f; }
.drow .trash[data-act="add"] { color: var(--good); font-size: 18px; font-weight: 800; }
.ddetail { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); cursor: default; }
.dline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; padding: 3px 0; color: var(--dim); }
.dline img { width: 24px; height: 24px; object-fit: contain; }
.dline span:first-of-type { color: var(--text); flex: 1 1 130px; }
.dnote { font-size: 11.5px; margin-top: 4px; } .dnote.dim { color: var(--dim); } .dnote.warn { color: var(--r5); }
.dbhead { margin: 10px 0 2px; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.empty { text-align: center; color: var(--dim); padding: 26px 16px; border: 1px dashed var(--line); border-radius: 10px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.total b { color: var(--accent); }

/* ── Timers ─────────────────────────────────────────────────── */
.hero-timer { --h1: #2e2610; --h2: #ffc53138; }
#tabs button { position: relative; }
#tabs button[data-badge]:not([data-badge=""])::after { content: attr(data-badge); position: absolute; top: 3px; inset-inline-end: 2px; min-width: 14px; height: 14px; line-height: 14px; border-radius: 7px; font-size: 9.5px; font-weight: 800; background: var(--line); color: var(--text); padding: 0 3px; }
#tabs button.alert::after { background: var(--good) !important; color: #0c1a10 !important; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.timer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.timer.running { border-color: #6b5518; }
.timer.ready { border-color: var(--good); background: linear-gradient(180deg, var(--panel), #15281c); box-shadow: 0 0 0 1px var(--good) inset; }
.thead { display: flex; align-items: center; gap: 10px; }
.thead img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 4px #0009); }
.tinfo { flex: 1; min-width: 0; } .tinfo b { display: block; font-size: 14px; } .tinfo small { color: var(--dim); font-size: 11.5px; }
.tclock { font: 800 24px Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--dim); }
.timer.running .tclock { color: var(--accent); } .timer.ready .tclock { color: var(--good); font-size: 20px; letter-spacing: 1px; }
.tprog { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin: 8px 0; }
.tprog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6b5518, var(--accent)); transition: width 1s linear; }
.timer.ready .tprog i { background: var(--good); }
.tbtns { display: flex; align-items: center; gap: 6px; } .tbtns .tdur { margin-inline-start: auto; color: var(--dim); font-size: 11.5px; }
.tset { margin-top: 8px; } .tset summary { cursor: pointer; color: var(--dim); font-size: 12px; } .tset .grid2 { margin-top: 8px; }
.tcards.two { grid-template-columns: repeat(2, 1fr); }
.tcard .pct { width: 44px; padding: 1px 3px; font-size: 11px; text-align: center; margin-inline-end: 3px; }
#toasts { position: fixed; top: 34px; inset-inline-start: 10px; inset-inline-end: 10px; z-index: 50; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #15281c; border: 1px solid var(--good); box-shadow: 0 6px 20px #000a; cursor: pointer; animation: drop .25s ease-out; }
.toast img { width: 38px; height: 38px; object-fit: contain; } .toast div { flex: 1; } .toast b { display: block; color: var(--good); } .toast small { color: var(--text); font-size: 11.5px; }
.toast button { background: none; border: 0; color: var(--dim); cursor: pointer; }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
#tabs button { font-size: 11.5px; }
#tabs button[data-badge]:not([data-badge=""])::after { top: 1px; inset-inline-end: -3px; z-index: 2; }

body.browser .winbtns { display: flex; } body.browser #btnMin, body.browser #btnClose { display: none; }
#appSettings { position: fixed; top: 34px; inset-inline-end: 8px; inset-inline-start: 8px; z-index: 60; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 12px; box-shadow: 0 10px 30px #000c; display: flex; flex-direction: column; gap: 8px; }
#appSettings[hidden] { display: none; }
#appSettings .opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
#appSettings .opt:has(input:checked) { border-color: var(--accent); background: #3a2f12; }
#appSettings .opt input { accent-color: var(--accent); margin-top: 3px; }
#appSettings .opt small { display: block; color: var(--dim); font-size: 11.5px; }

.tpreset { margin-top: 8px; }

/* ── Weapons & keys focus ───────────────────────────────────── */
.chipsrow { display: flex; gap: 5px; margin-bottom: 8px; flex-wrap: wrap; }
.chipsrow button { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 11px; cursor: pointer; color: var(--dim); font-size: 12px; font-weight: 600; }
.chipsrow button i { font-style: normal; opacity: .7; margin-inline-start: 2px; }
.chipsrow button.on { background: #3a2f12; border-color: var(--accent); color: var(--accent); }
.hiddennote { color: var(--dim); font-size: 11.5px; text-align: center; padding: 6px; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; padding: 0; font-size: inherit; }
.drow.iskey .dname small { color: var(--r3); font-weight: 600; }
.wstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.wstats div { background: var(--panel2); border-radius: 7px; padding: 6px 4px; text-align: center; }
.wstats b { display: block; font-size: 16px; color: var(--accent); } .wstats small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.keyloc { background: #151821; border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 8px; }
.keyloc h3 { margin: 0; font-size: 15px; }
.keyloc .counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.keyloc .count { background: var(--panel2); border-radius: 5px; padding: 3px 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.keyloc .count b { color: var(--accent); font-size: 14px; } .keyloc .count img { width: 22px; height: 22px; object-fit: contain; }
.keyloc .count.hot { background: #3a2f12; border: 1px solid #6b5518; }
.kbox { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 12px; }
.kbox > b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); }
.kbox.key { background: #16263a; border: 1px solid #2c4a6e; border-radius: 7px; padding: 7px 9px; } .kbox.key > b { color: var(--r3); } .kbox.key span { font-weight: 600; font-size: 13px; }
.kitem { display: flex; align-items: center; gap: 6px; } .kitem img { width: 24px; height: 24px; object-fit: contain; } .kitem b { color: var(--accent); } .kitem i { color: var(--dim); font-size: 11px; }
.keyloc .lootstrip { margin: 8px 0; } .keyloc .filebtn { margin-top: 2px; cursor: pointer; }

/* ── Stats ──────────────────────────────────────────────────── */
.hero-stats { --h1: #1b2733; --h2: #60a5fa38; }
.nowpill { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; padding: 3px 10px; border-radius: 12px; background: var(--panel2); font-size: 12px; }
.nowpill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.nowpill span:last-child { font: 700 12px Consolas, monospace; color: var(--dim); }
.nowpill.base .dot { background: var(--r2); } .nowpill.city .dot { background: var(--r5); } .nowpill.robbing .dot { background: var(--r6); animation: pulse 1s infinite; } .nowpill.menu .dot { background: var(--r1); }
.sbar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--panel2); }
.sbar i { min-width: 3px; } .sbar i.none { flex: 1; background: var(--panel2); }
.slegend { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.slegend > div { display: grid; grid-template-columns: 14px 1fr auto 38px; align-items: center; gap: 6px; padding: 4px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.slegend > div:last-child { border-bottom: 0; }
.slegend .dot { width: 10px; height: 10px; border-radius: 3px; }
.slegend b { font-variant-numeric: tabular-nums; } .slegend small { color: var(--dim); text-align: end; }
.runs { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.runrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--good); border-radius: 7px; }
.runrow.died, .runrow.arrested { border-inline-start-color: var(--bad); } .runrow.live { border-inline-start-color: var(--accent); }
.runrow b { display: block; font-size: 12.5px; } .runrow small { color: var(--dim); font-size: 11px; }
.rlen { font-weight: 700; font-variant-numeric: tabular-nums; }
code { font: 11px Consolas, monospace; background: var(--panel2); padding: 1px 4px; border-radius: 3px; word-break: break-all; }
#tabs button { font-size: 11px; }

.nowpill.cop .dot { background: var(--r3); }

/* ── Key rebinding and ad banner ────────────────────────────── */
.keys kbd[data-keyname] { cursor: pointer; }
.keys kbd[data-keyname]:hover { border-color: var(--accent); color: var(--accent); }
kbd.listening { background: #3a2f12; border-color: var(--accent); color: var(--accent); animation: pulse 1s infinite; }
.keynote { display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; font-size: 11px; color: var(--accent); min-height: 20px; }
.keynote .dim { color: var(--dim); margin-inline-start: auto; white-space: nowrap; }
.empty kbd { display: inline-block; min-width: 0; margin: 0 2px; }
#adbar { flex: none; display: flex; justify-content: center; padding: 4px 0; background: transparent; border-top: 1px solid var(--line); }
#adbar[hidden] { display: none; }
#adslot { width: 400px; height: 600px; min-width: 400px; min-height: 600px; }
#adslot2 { width: 300px; height: 250px; min-width: 300px; min-height: 250px; }
#adslot3 { width: 400px; height: 300px; min-width: 400px; min-height: 300px; }
#adslot4, #adgameslot2 { width: 400px; height: 60px; min-width: 400px; min-height: 60px; }
#adslot[hidden], #adslot2[hidden], #adslot3[hidden], #adslot4[hidden], #adgameslot[hidden], #adgameslot2[hidden] { display: none; }

kbd.unset { border-color: var(--bad); color: var(--bad); }
.keywarn { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: #40201f; color: #ffb4ae; font-size: 11.5px; }
.keywarn[hidden] { display: none; }

/* ── Per-table boosters ─────────────────────────────────────── */
.bedfoot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 6px; border-top: 1px solid #4a3a28; }
.bbtns { display: flex; gap: 5px; }
.bb { width: 32px; height: 32px; padding: 3px; border-radius: 8px; border: 1px solid #4a3a28; background: #1a140e; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .12s, background .12s; }
.bb img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(.6); transition: filter .12s; }
.bb:hover { border-color: var(--dim); } .bb:hover img { filter: grayscale(.4) brightness(.9); }
.bb.on { border-color: var(--accent); background: #3a2f12; box-shadow: 0 0 0 1px var(--accent) inset; }
.bb.on img { filter: none; }
.bspeed { font: 700 11px Consolas, monospace; color: var(--dim); white-space: nowrap; }
.bspeed.on { color: var(--accent); }
button.tcard { font: inherit; color: inherit; }
.tcard.on { opacity: 1; border-color: var(--accent); background: linear-gradient(180deg, var(--panel), #3a2f12); box-shadow: 0 0 0 1px var(--accent) inset; }
.tcard.on img, .tcard.some img { filter: none; }
.tcard.on::after { content: "ALL"; position: absolute; top: 4px; inset-inline-end: 5px; font-size: 9px; font-weight: 800; color: var(--accent); }
.tcard.some { opacity: 1; border-color: #6b5518; border-style: dashed; }
.tcard.some small, .tcard.on small { color: var(--accent); }

/* ── Grow timers, one per table ─────────────────────────────── */
.weedset { margin-bottom: 8px; }
.timer.weed { padding: 8px 12px; }
.timer.weed .thead img { width: 38px; height: 38px; }
.timer.weed .tclock { font-size: 20px; }
.timer.weed .tprog { margin: 6px 0; }
.timer.weed .tbtns .primary { padding: 5px 12px; } .timer.weed .tbtns .filebtn { padding: 4px 9px; }
.timer.weed .bbtns { margin-inline-start: 4px; } .timer.weed .bb { width: 28px; height: 28px; background: var(--panel2); border-color: var(--line); }
.timer.weed .bb.on { background: #3a2f12; border-color: var(--accent); }
h4.sec .filebtn { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 4px 10px; cursor: pointer; }

/* ═════════════ App shell: sidebar on the left, pages on the right ═════════════ */
:root { --side: 204px; --ink: #0a0b12; }
body { flex-direction: row; background: var(--bg); }
#side { flex: none; width: var(--side); display: flex; flex-direction: column; background: var(--ink); border-inline-end: 1px solid var(--line); }
#side .logo { padding: 12px 12px 10px; cursor: move; user-select: none; }
#side .logo .wordmark { display: block; width: 100%; height: auto; }
#side .logo .mark { display: none; width: 36px; height: 36px; margin: 0 auto; }
#side #tabs { display: flex; flex-direction: column; flex: 1; gap: 2px; padding: 6px 8px; background: none; border: 0; overflow-y: auto; }
#side #tabs button, .sidefoot button { flex: none; display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--dim); font-size: 13.5px; font-weight: 600; text-align: start; cursor: pointer; position: relative; white-space: nowrap; }
#side #tabs button:hover, .sidefoot button:hover { color: var(--text); background: #ffffff0a; }
#side #tabs button.on { color: var(--accent); background: #ffc53114; border-color: #ffc53140; }
#side svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#side #tabs button[data-badge]:not([data-badge=""])::after { content: attr(data-badge); position: absolute; top: 50%; inset-inline-end: 9px; transform: translateY(-50%); min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; font-size: 10.5px; font-weight: 800; text-align: center; background: var(--line); color: var(--text); padding: 0 4px; z-index: 1; animation: none; }
#side #tabs button.alert::after { background: var(--good) !important; color: #0c1a10 !important; }
.sidefoot { padding: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }

#shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#titlebar { padding: 0 6px 0 18px; height: 40px; background: var(--ink); border-bottom: 1px solid var(--line); }
.pagetitle { font-weight: 800; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; padding-inline-start: 10px; border-inline-start: 3px solid var(--accent); line-height: 1; }
#titlebar .hint { margin: 0 auto; font-size: 12px; }
.winbtns button { width: 34px; height: 28px; font-size: 13px; }
#btnClose:hover { background: #a02c28; color: #fff; }
.winbtns { margin-inline-start: auto; }
#titlebar .hint { margin: 0 12px 0 auto; }
#titlebar .hint + .winbtns { margin-inline-start: 0; }
body.browser #btnMax { display: none; }
/* App, not a document: text is not selectable and images are not draggable
   (Overwolf QA). Fields stay editable and selectable. */
body { -webkit-user-select: none; user-select: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
img, svg, a { -webkit-user-drag: none; }

#content { flex: 1; min-height: 0; display: flex; }
main { flex: 1; min-width: 0; padding: 18px 20px 24px; container: page / inline-size; }
main > .tab { max-width: 1500px; margin: 0 auto; }
#adbar { flex: none; width: 424px; border-top: 0; border-inline-start: 1px solid var(--line); padding: 18px 12px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; background: transparent; } /* the ad containers' parent stays transparent (Overwolf) */

/* Two columns once the page is wide enough */
@container page (min-width: 720px) {
  .tab.on.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .tab.split > .full { grid-column: 1 / -1; }
  #tab-scanner.on.split { grid-template-columns: 330px minmax(0, 1fr); }
  #tab-jail.on.split, #tab-timers.on.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #locList { display: grid; grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)); gap: 10px; align-items: start; }
  .col > :first-child { margin-top: 0; }
  .col > h4.sec:first-child { margin-top: 2px; }
}
@container page (min-width: 1150px) {
  .beds { grid-template-columns: repeat(3, 1fr); }
  #scanResults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-items: start; }
  #scanResults > .total, #scanResults > .hiddennote, #scanResults > .empty, #scanResults > .dbhead, #scanResults > .drow.open { grid-column: 1 / -1; }
  #statsRuns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
}

/* Popovers follow the new shell */
#appSettings { top: auto; inset-inline-end: auto; bottom: 12px; inset-inline-start: calc(var(--side) + 10px); width: 380px; }
#toasts { top: 50px; inset-inline-start: calc(var(--side) + 16px); inset-inline-end: auto; width: 380px; max-width: calc(100% - var(--side) - 32px); }

/* Frameless window: resize strips along the edges and corners */
.grip { position: fixed; z-index: 90; }
.grip[data-edge="Left"] { left: 0; top: 8px; bottom: 8px; width: 4px; cursor: ew-resize; }
.grip[data-edge="Right"] { right: 0; top: 8px; bottom: 8px; width: 4px; cursor: ew-resize; }
.grip[data-edge="Top"] { top: 0; left: 8px; right: 8px; height: 3px; cursor: ns-resize; }
.grip[data-edge="Bottom"] { bottom: 0; left: 8px; right: 8px; height: 4px; cursor: ns-resize; }
.grip[data-edge="TopLeft"] { top: 0; left: 0; width: 9px; height: 9px; cursor: nwse-resize; }
.grip[data-edge="BottomRight"] { bottom: 0; right: 0; width: 12px; height: 12px; cursor: nwse-resize; }
.grip[data-edge="TopRight"] { top: 0; right: 0; width: 9px; height: 9px; cursor: nesw-resize; }
.grip[data-edge="BottomLeft"] { bottom: 0; left: 0; width: 9px; height: 9px; cursor: nesw-resize; }
body.browser .grip, body.maxed .grip { display: none; }

/* Small window (the in-game overlay): icons only on the left, one column */
@media (max-width: 860px) {
  :root { --side: 56px; }
  #side .logo { padding: 10px 0 6px; }
  #side .logo .wordmark { display: none; } #side .logo .mark { display: block; }
  #side #tabs { padding: 6px; }
  #side #tabs button span, .sidefoot button span { display: none; }
  #side #tabs button, .sidefoot button { justify-content: center; padding: 10px 0; }
  .sidefoot { padding: 6px; }
  #side #tabs button[data-badge]:not([data-badge=""])::after { top: -3px; inset-inline-end: -4px; transform: none; min-width: 15px; height: 15px; line-height: 15px; font-size: 9.5px; box-shadow: 0 0 0 2px var(--ink); }
  main { padding: 12px 12px 18px; }
  #adbar { display: none !important; }
  #titlebar .hint { display: none; }
  #appSettings { width: auto; inset-inline-end: 10px; }
  #toasts { width: auto; inset-inline-end: 12px; }
}
@media (max-width: 860px) { #titlebar .winbtns { margin-inline-start: auto !important; } }

/* ── Raid planner ───────────────────────────────────────────── */
.hero-raid { --h1: #33201f; --h2: #f8717138; }
.rpalette { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.rtile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; cursor: pointer; text-align: center; transition: border-color .12s, transform .12s; }
.rtile:hover { border-color: var(--accent); transform: translateY(-1px); }
.rtile img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 4px #0009); }
.rtile b { font-size: 11.5px; line-height: 1.15; } .rtile small { color: var(--dim); font-size: 10px; }
.rbunker { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; margin-inline-end: 8px; } .rbunker b { color: var(--accent); }
.rbase { display: flex; flex-direction: column; gap: 8px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--bad); border-radius: 10px; padding: 10px 12px; }
.rcard.ok { border-inline-start-color: var(--good); }
.rhead { display: flex; align-items: center; gap: 10px; }
.rhead img { width: 50px; height: 50px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px #0009); }
.rname { flex: 1; min-width: 0; } .rname b { display: block; font-size: 14.5px; } .rname small { color: var(--dim); font-size: 11.5px; }
.rdef { text-align: end; } .rdef b { display: block; font: 800 26px Consolas, monospace; color: var(--accent); line-height: 1; } .rdef small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.rdel { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px 6px; border-radius: 5px; } .rdel:hover { background: #40201f; color: var(--bad); }
.rbar { display: flex; height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; margin-top: 9px; }
.rbar i { height: 100%; background: var(--rc); } .rbar i.base { background: #6b7385; }
.rrange { display: flex; justify-content: space-between; color: var(--dim); font-size: 10.5px; margin-top: 3px; }
.rslots { display: flex; flex-wrap: wrap; gap: 3px; margin: 9px 0; }
.rslots i { width: 15px; height: 15px; border-radius: 4px; background: var(--rc); box-shadow: 0 0 0 1px #0006 inset; }
.rslots i.empty { background: none; border: 1px dashed var(--line); box-shadow: none; }
.rfuses { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rfuse { display: inline-flex; align-items: center; gap: 5px; }
.rfuse img { width: 28px; height: 28px; object-fit: contain; }
.rfuse .stepper b { min-width: 26px; text-align: center; line-height: 26px; color: var(--rc); font-size: 13px; }
.rfuse .stepper button { width: 24px; }
.rquick { display: inline-flex; gap: 4px; margin-inline-start: auto; }
.rquick button { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; color: var(--dim); font-size: 11px; padding: 3px 9px; cursor: pointer; }
.rquick button:hover { color: var(--accent); border-color: var(--accent); }
.rneed { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.rmix { display: flex; gap: 8px; flex: 1; }
.rdec { display: inline-flex; align-items: center; gap: 3px; } .rdec img { width: 26px; height: 26px; object-fit: contain; } .rdec b { color: var(--rc); font-size: 14px; }
.rtime { color: var(--dim); font: 700 12px Consolas, monospace; }
.rverdict { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 2px; }
.rverdict b { font-size: 16px; } .rverdict span { color: var(--dim); font-size: 12px; }
.rverdict.ok { border-color: var(--good); background: linear-gradient(180deg, var(--panel), #15281c); } .rverdict.ok b { color: var(--good); }
.rverdict.no { border-color: var(--bad); background: linear-gradient(180deg, var(--panel), #2a1615); } .rverdict.no b { color: var(--bad); }
.rbills { display: flex; flex-direction: column; gap: 5px; }
.rbill { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--rc); }
.rbill img { width: 32px; height: 32px; object-fit: contain; } .rbill > div { flex: 1; } .rbill b { font-size: 13px; } .rbill small { display: block; color: var(--dim); font-size: 11px; }
.rhave { font-size: 12px; color: var(--dim); } .rhave b { font-size: 18px; margin-inline-end: 3px; }
.rhave.ok b { color: var(--good); } .rhave.no b { color: var(--bad); }
.rfacts { display: flex; flex-direction: column; gap: 6px; }
.rfact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.rfact img { width: 34px; height: 34px; object-fit: contain; flex: none; } .rfact b { display: block; font-size: 12.5px; } .rfact span { color: var(--dim); font-size: 11.5px; }
.dim { color: var(--dim); }

/* ── Stats, redesigned ──────────────────────────────────────── */
.splitcard { display: flex; align-items: center; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.donut { width: 168px; height: 168px; flex: none; }
.donut .dbig { fill: var(--text); font: 800 19px "Segoe UI", sans-serif; } .donut .dsub { fill: var(--dim); font: 600 9px "Segoe UI", sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.splitcard .slegend { flex: 1; margin: 0; }
.dayscard { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 190px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 10px; }
.dcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.dcol small { color: var(--dim); font-size: 10px; white-space: nowrap; }
.dcol b { font-size: 11px; color: var(--dim); font-weight: 600; }
.dcol.today b { color: var(--accent); }
.dstack { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 6px; overflow: hidden; min-height: 2px; background: var(--panel2); }
.dstack i { min-height: 2px; }
.keycards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kcard { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.kcard > div:last-child { min-width: 0; }
.kcard span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.kcard b { display: block; font-size: 14px; margin: 1px 0; } .kcard b .nw { font-style: normal; white-space: nowrap; } .kcard small { color: var(--dim); font-size: 11px; }
.gauge { width: 84px; height: 84px; flex: none; } .gauge .gbig { fill: var(--text); font: 800 21px "Segoe UI", sans-serif; }
.kbig { flex: none; min-width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #3a2f12, var(--panel2)); border: 2px solid #6b5518; color: var(--accent); font: 800 18px "Segoe UI", sans-serif; text-align: center; padding: 0 6px; }
.runchart { display: flex; align-items: flex-end; gap: 4px; height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.runchart i { flex: 1; max-width: 22px; border-radius: 4px 4px 2px 2px; opacity: .9; } .runchart i:hover { opacity: 1; outline: 1px solid #fff5; }
.chartkey { display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11px; }
.chartkey i { width: 9px; height: 9px; border-radius: 2px; margin-inline-start: 8px; }
.devset { border-top: 1px solid var(--line); padding-top: 8px; }
.devset summary { cursor: pointer; color: var(--dim); font-size: 12px; margin-bottom: 6px; }
#appSettings { max-height: calc(100vh - 30px); overflow-y: auto; }
@media (max-width: 860px) { .splitcard { flex-direction: column; align-items: stretch; } .donut { align-self: center; } .keycards { grid-template-columns: 1fr; } }

/* Bushes on a table can be clicked away */
.pot[data-r] { cursor: pointer; position: relative; transition: border-color .12s; }
.pot[data-r]::after { content: "\2715"; position: absolute; top: 3px; inset-inline-end: 4px; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; background: #a02c28; color: #fff; font-size: 9px; text-align: center; opacity: 0; transition: opacity .12s; }
.pot[data-r]:hover { border-color: var(--bad); }
.pot[data-r]:hover::after { opacity: 1; }
.pot[data-r]:hover img { opacity: .55; }

/* ── Location cards: everything visible, nothing to open ────── */
.locsec { margin: 10px 0 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
.bringrow { display: flex; flex-wrap: wrap; gap: 5px; }
.bringchip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px 3px 5px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; }
.bringchip img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.bringchip b { color: var(--accent); flex: none; }
.bringchip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bringchip i { font-style: normal; font-size: 10px; color: var(--dim); flex: none; }
.bringchip.opt { opacity: .7; border-style: dashed; }
.inlist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.inrow { display: grid; grid-template-columns: 30px minmax(0, 0.9fr) minmax(0, 1.5fr); align-items: center; gap: 8px; padding: 5px 9px; font-size: 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.inrow:last-child { border-bottom: 0; }
.inrow.hot { background: #2e2610; }
.incount { font: 800 15px Consolas, monospace; color: var(--accent); text-align: center; }
.inwhat { font-weight: 600; text-transform: capitalize; }
.inwhat .tag { text-transform: uppercase; margin-inline-start: 4px; }
.inhow { display: flex; align-items: center; gap: 6px; color: var(--dim); min-width: 0; }
.inhow img { width: 22px; height: 22px; object-fit: contain; flex: none; }

/* ── Right-to-left (Arabic) ───────────────────────────────── */
[lang="ja"] body { font-family: "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif; }
[dir="rtl"] kbd, [dir="rtl"] code, [dir="rtl"] input[type=number] { direction: ltr; unicode-bidi: isolate; }
.langpick select { width: 100%; }

/* ═════════════ First-time tour ═════════════ */
.ft-tour { position: fixed; inset: 0; z-index: 900; animation: tfade .25s ease both; contain: paint; } /* stops where the ads begin; the dimming never reaches them */
.ft-tour.ft-out { animation: tfade .25s ease reverse both; }
@keyframes tfade { from { opacity: 0; } to { opacity: 1; } }
body.touring #titlebar { position: relative; z-index: 901; } /* the window can still be moved and closed */

/* Welcome and final screens */
.ft-tour.ft-welcome { display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at 50% 35%, #3a2c0a 0%, #12141aee 55%, #0b0c10f5 100%); overflow: hidden; }
.ft-tw-bg img { position: absolute; bottom: -90px; inset-inline-start: var(--x); width: calc(64px * var(--s)); opacity: .22; filter: drop-shadow(0 6px 14px #000); animation: tfloat var(--d) linear var(--delay) infinite; }
@keyframes tfloat { from { transform: translateY(0) rotate(-12deg); } to { transform: translateY(calc(-100vh - 200px)) rotate(14deg); } }
.ft-tw-card { position: relative; width: min(660px, 100%); max-height: calc(100vh - 32px); overflow: auto; text-align: center; padding: 30px 30px 24px; border-radius: 18px; background: linear-gradient(180deg, #1e2230f2, #15171ff2); border: 1px solid #ffc53155; box-shadow: 0 30px 80px #000c, 0 0 0 1px #0006, 0 0 60px #ffc53122; animation: tpop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes tpop { from { transform: translateY(18px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.ft-tw-lang { position: absolute; top: 12px; inset-inline-end: 12px; }
.ft-tw-lang select { font-size: 12px; padding: 4px 6px; }
.ft-tw-mark { width: 74px; height: 74px; filter: drop-shadow(0 0 22px #ffc53188); animation: tglow 2.6s ease-in-out infinite; }
@keyframes tglow { 50% { transform: scale(1.06) rotate(-3deg); filter: drop-shadow(0 0 34px #ffc531cc); } }
.ft-tw-name { margin: 8px 0 12px; font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); } .ft-tw-name b { color: var(--accent); }
.ft-tw-card h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; background: linear-gradient(90deg, #fff, #ffc531, #fff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tshine 4s linear infinite; }
@keyframes tshine { to { background-position: -200% 0; } }
.ft-tw-card p { margin: 0 auto 16px; max-width: 440px; color: var(--dim); font-size: 14px; }
.ft-tw-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.ft-tw-pills span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-weight: 600; font-size: 12.5px; animation: tpop .4s ease both; }
.ft-tw-pills span:nth-child(2) { animation-delay: .08s; } .ft-tw-pills span:nth-child(3) { animation-delay: .16s; } .ft-tw-pills span:nth-child(4) { animation-delay: .24s; } .ft-tw-pills span:nth-child(5) { animation-delay: .32s; } .ft-tw-pills span:nth-child(6) { animation-delay: .4s; }
.ft-tw-pills img { width: 24px; height: 24px; object-fit: contain; }
.ft-tw-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; }
button.primary.big { font-size: 15px; padding: 11px 26px; border-radius: 10px; box-shadow: 0 8px 24px #ffc53140; transition: transform .12s, box-shadow .12s; }
button.primary.big:hover { transform: translateY(-1px); box-shadow: 0 12px 30px #ffc53166; }
.ft-tw-time { font-weight: 600; font-size: 11px; opacity: .65; margin-inline-start: 6px; }
.ft-tw-btns .linkbtn { color: var(--dim); font-size: 12.5px; }
.ft-tw-keys { display: grid; gap: 8px; margin: 4px auto 14px; max-width: 360px; }
.ft-tw-keys div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-weight: 600; animation: tpop .4s ease both; }
.ft-tw-keys div:nth-child(2) { animation-delay: .1s; } .ft-tw-keys div:nth-child(3) { animation-delay: .2s; }
.ft-tw-keys kbd { font-size: 13px; padding: 4px 12px; border-color: #ffc53177; color: var(--accent); }
.ft-tw-small { font-size: 12px !important; margin-bottom: 14px !important; }
.ft-tw-confetti i { position: absolute; top: -10px; inset-inline-start: var(--x); width: 7px; height: 12px; border-radius: 2px; background: var(--c); animation: tconf 1.6s ease-out var(--delay) both; }
@keyframes tconf { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(240px) rotate(540deg); opacity: 0; } }

/* Spotlight steps */
.ft-tour.ft-spot { background: transparent; }
.ft-tspot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px #07080bd0; border: 2px solid var(--accent); transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .2s; pointer-events: none; animation: tpulse 1.8s ease-in-out infinite; }
@keyframes tpulse { 50% { border-color: #ffe08a; box-shadow: 0 0 0 9999px #07080bd0, 0 0 26px 4px #ffc53166; } }
.ft-tcard { position: fixed; width: min(360px, calc(100vw - 24px)); padding: 14px 16px 12px; border-radius: 14px; background: linear-gradient(180deg, #20243a, #181b26); border: 1px solid #ffc53166; box-shadow: 0 20px 60px #000d; transition: left .35s ease, top .35s ease; animation: tpop .35s ease both; }
.ft-tcard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ft-tkick { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.ft-tcount { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ft-tcard h3 { margin: 10px 0 6px; font-size: 17px; line-height: 1.2; }
.ft-tcard p { margin: 0 0 12px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.ft-tcard p kbd { color: var(--accent); }
.ft-tdots { display: flex; gap: 5px; margin-bottom: 10px; }
.ft-tdots i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.ft-tdots i.ft-seen { background: #ffc53166; } .ft-tdots i.on { background: var(--accent); }
.ft-tcard-btns { display: flex; align-items: center; gap: 6px; }
.ft-tcard-btns .spacer { flex: 1; }
.ft-tcard-btns .linkbtn { color: var(--dim); font-size: 12px; }

/* Step scenes */
.ft-tdemo { position: relative; display: flex; align-items: center; gap: 14px; height: 86px; padding: 0 14px; border-radius: 10px; background: radial-gradient(ellipse at 30% 50%, #2c2f44, #14161f); border: 1px solid var(--line); overflow: hidden; }
.ft-tdemo img { object-fit: contain; }
.ft-tdemo-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ft-tscan-item { position: relative; width: 62px; height: 62px; border-radius: 9px; background: #2a2340; border: 2px solid var(--r4); flex: none; overflow: hidden; }
.ft-tscan-item img { width: 100%; height: 100%; }
.ft-tscan-item .ft-beam { position: absolute; inset-inline: 0; height: 3px; background: var(--accent); box-shadow: 0 0 12px 3px #ffc531aa; animation: tbeam 1.8s ease-in-out infinite; }
@keyframes tbeam { 0%, 100% { top: 4%; } 50% { top: 92%; } }
.ft-tscan-out { display: flex; flex-direction: column; gap: 4px; animation: tslide 1.8s ease infinite; }
@keyframes tslide { 0%, 20% { opacity: 0; transform: translateX(-10px); } 35%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.ft-tscan-tag { font-size: 11.5px; color: #60a5fa; } .ft-tscan-tag.ft-gold { color: var(--accent); font-weight: 700; }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.ft-tring { width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--accent) var(--p), var(--panel2) 0); animation: tring 3s linear infinite; }
.ft-tring img { width: 50px; height: 50px; border-radius: 50%; background: #181b26; padding: 4px; }
@keyframes tring { to { --p: 100%; } }
.ft-tclockfx { font: 800 24px Consolas, monospace; color: var(--accent); }
.ft-ttimer span { font-size: 12px; color: var(--dim); }
.ft-tgrow { gap: 8px; }
.ft-tpot { width: 46px; height: 46px; border-radius: 8px; border: 2px solid var(--rc, var(--r2)); background: #1c2a22; animation: tgrowin 2.4s ease infinite; }
.ft-tpot[data-r="2"] { --rc: var(--r2); } .ft-tpot[data-r="4"] { --rc: var(--r4); } .ft-tpot[data-r="5"] { --rc: var(--r5); }
.ft-tpot img { width: 100%; height: 100%; }
@keyframes tgrowin { 0% { transform: scale(.3); opacity: 0; } 20%, 85% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }
.ft-tboost { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 800; color: var(--good); }
.ft-tboost img { width: 30px; height: 30px; }
.ft-tmoney { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 18px; color: var(--accent); }
.ft-tmoney small { font-size: 10px; color: var(--dim); font-weight: 600; }
.ft-tbld { width: 76px; height: 76px; flex: none; filter: drop-shadow(0 6px 10px #000a); }
.ft-tchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; animation: tpop .5s ease both; }
.ft-tchip:nth-child(2) { animation-delay: .15s; } .ft-tchip:nth-child(3) { animation-delay: .3s; }
.ft-tchip img { width: 22px; height: 22px; } .ft-tchip b { color: var(--accent); } .ft-tchip.dim { color: var(--dim); }
.ft-traid { justify-content: center; gap: 18px; }
.ft-traid img { width: 56px; height: 56px; animation: tzap 2.2s ease infinite; }
@keyframes tzap { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(10px) rotate(8deg); } }
.ft-tshield { position: relative; width: 140px; height: 12px; border-radius: 6px; background: #3a1f24; overflow: hidden; }
.ft-tshield i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, var(--bad), var(--accent), var(--good)); animation: tbreak 2.2s ease infinite; }
@keyframes tbreak { from { width: 0; } 70%, to { width: 100%; } }
.ft-tok { font-size: 26px; color: var(--good); animation: tokpop 2.2s ease infinite; }
@keyframes tokpop { 0%, 65% { transform: scale(0); } 80% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ft-tdonut { width: 66px; height: 66px; transform: rotate(-90deg); flex: none; }
.ft-tdonut circle { fill: none; stroke: var(--c); stroke-width: 7; stroke-dasharray: 0 100; stroke-dashoffset: var(--o); animation: tdon 1.2s ease forwards; }
@keyframes tdon { to { stroke-dasharray: calc(var(--a) - 1.5) 100; } }
.ft-tbig { font: 800 28px Consolas, monospace; color: var(--good); }
.ft-tstats span { color: var(--dim); font-size: 12px; }
.ft-tlang { justify-content: center; }
.ft-thello { position: relative; width: 100%; height: 40px; }
.ft-thello i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 26px; font-weight: 800; color: var(--accent); opacity: 0; animation: thello 10.8s linear infinite; }
@keyframes thello { 0% { opacity: 0; transform: translateY(10px); } 3%, 9% { opacity: 1; transform: none; } 12%, 100% { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .ft-tour *, .ft-tour { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }

/* Tour: scanner step, a key unfolding into the place it opens */
.ft-tdemo.ft-tkey { height: auto; padding: 10px 12px; gap: 10px; align-items: center; }
.ft-tkey-scan { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.ft-tkey-scan .ft-tscan-item { border-color: var(--r5); background: #2e2610; }
.ft-tkey-arrow { color: var(--accent); font-size: 16px; animation: tnudge 1.2s ease-in-out infinite; }
[dir="rtl"] .ft-tkey-arrow { transform: scaleX(-1); }
@keyframes tnudge { 50% { opacity: .4; } }
.ft-tkey-card { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding: 8px 10px; border-radius: 9px; background: #12141bcc; border: 1px solid var(--line); border-inline-start: 3px solid var(--r5); animation: tkeyin .5s ease .9s both; }
@keyframes tkeyin { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .ft-tkey-card { animation-name: tkeyin-rtl; }
@keyframes tkeyin-rtl { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.ft-tkey-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ft-tkey-head img { width: 42px; height: 42px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 6px #000a); }
.ft-tkey-head div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ft-tkey-head small { color: var(--dim); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-tkey-head b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-tkey-head .ft-gold { color: var(--accent); font-size: 11px; font-weight: 700; }
.ft-kstats { display: flex; flex-wrap: wrap; gap: 5px; }
.ft-kstat { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 3px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); font-size: 11px; color: var(--dim); animation: tpop .4s ease both; }
.ft-kstat:nth-child(1) { animation-delay: 1.3s; } .ft-kstat:nth-child(2) { animation-delay: 1.5s; } .ft-kstat:nth-child(3) { animation-delay: 1.7s; }
.ft-kstat.hot { background: #2e2610; border-color: #5c4a14; }
.ft-kstat img { width: 18px; height: 18px; object-fit: contain; }
.ft-kstat b { color: var(--accent); font-size: 12px; }
.ft-kbrings { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); animation: tpop .4s ease 1.9s both; }
.ft-kbring { display: inline-flex; align-items: center; gap: 2px; text-transform: none; letter-spacing: 0; }
.ft-kbring img { width: 22px; height: 22px; object-fit: contain; }
.ft-kbring b { color: var(--text); font-size: 11.5px; }

/* Tour: raid scene, fuses up, decoders in, defense to zero */
.ft-tdemo.ft-traid2 { height: auto; flex-direction: column; align-items: stretch; gap: 7px; padding: 10px 12px; }
.ft-rhead { display: flex; align-items: center; gap: 9px; }
.ft-rbld { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 4px 6px #000a); transition: filter .3s, transform .3s; }
.ft-rinfo { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ft-rinfo b { font-size: 13px; } .ft-rinfo small { color: var(--dim); font-size: 10.5px; }
.ft-rdef { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.ft-rnum { font: 800 28px Consolas, monospace; color: var(--bad); font-variant-numeric: tabular-nums; transition: color .3s; }
.ft-rdef small { font-size: 9.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .6px; margin-top: 2px; }
.ft-fuses { display: flex; gap: 6px; }
.ft-fuse { --rc: var(--r2); flex: 1; display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border-radius: 7px; background: color-mix(in srgb, var(--rc) 14%, #14161f); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); animation: tpop .4s ease both; }
.ft-fuse[data-r="4"] { --rc: var(--r4); } .ft-fuse[data-r="5"] { --rc: var(--r5); }
.ft-fuse:nth-child(2) { animation-delay: .12s; } .ft-fuse:nth-child(3) { animation-delay: .24s; }
.ft-fuse img { width: 24px; height: 24px; object-fit: contain; }
.ft-fuse b { font-size: 12px; } .ft-fuse small { margin-inline-start: auto; font-size: 10.5px; font-weight: 800; color: var(--rc); }
.ft-rbar { height: 10px; border-radius: 5px; background: #2a1d22; overflow: hidden; box-shadow: inset 0 0 0 1px #0006; }
.ft-rfill { display: flex; height: 100%; width: 100%; }
.ft-rfill i { height: 100%; } .ft-rfill i + i { box-shadow: inset 1px 0 0 #0008; }
.ft-rdecs { display: flex; align-items: center; gap: 1px; min-height: 26px; }
.ft-dec { width: 24px; height: 24px; object-fit: contain; opacity: 0; transform: translateY(-8px) scale(.6); }
.ft-traid2.hacking .ft-dec { animation: tdec .3s ease calc(var(--k) * .36s) both; }
@keyframes tdec { to { opacity: 1; transform: none; } }
.ft-rbill { margin-inline-start: auto; font-size: 10.5px; color: var(--dim); white-space: nowrap; opacity: 0; transition: opacity .3s; }
.ft-rbill b { color: var(--text); }
.ft-traid2.hacking .ft-rbill { opacity: 1; transition-delay: 2.6s; }
.ft-rstamp { position: absolute; top: 50%; left: 50%; padding: 6px 14px; border-radius: 8px; border: 2px solid var(--good); background: #0f2a1bee; color: var(--good); font-weight: 800; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; transform: translate(-50%, -50%) rotate(-8deg) scale(2); opacity: 0; pointer-events: none; }
.ft-traid2.breached .ft-rstamp { animation: tstamp .35s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes tstamp { to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
.ft-traid2.breached .ft-rnum { color: var(--good); }
.ft-traid2.breached .ft-rbld { filter: drop-shadow(0 0 10px #4ade80aa); transform: scale(1.05); }
.ft-fuse b, .ft-fuse small, .ft-rbill { direction: ltr; unicode-bidi: isolate; }

/* Tour: Reef Hotel scene */
.ft-tdemo.ft-tloc2 { height: auto; padding: 10px 12px; align-items: center; }
.ft-tloc2 .ft-tbld { width: 70px; height: 70px; }
.ft-locname { display: flex; flex-direction: column; line-height: 1.25; }
.ft-locname b { font-size: 14px; } .ft-locname .ft-gold { color: var(--accent); font-size: 11px; font-weight: 700; }
.ft-locbring { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.ft-locbring .ft-tchip { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; color: var(--text); }
.ft-tloc2 .ft-kstat:nth-child(1) { animation-delay: .25s; } .ft-tloc2 .ft-kstat:nth-child(2) { animation-delay: .4s; }

/* In-game window: the 400x300 ad block under the page (parent stays transparent, as Overwolf asks) */
#adgame { flex: none; display: flex; flex-direction: column; gap: 8px; justify-content: center; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); background: transparent; }
#adgame[hidden] { display: none; }
#adgameslot { width: 400px; height: 300px; min-width: 400px; min-height: 300px; }

/* Support link (Discord) */
.supportbtn { display: flex; align-items: center; justify-content: center; gap: 8px; color: #c9cdfb; border-color: #5865f2aa; background: #5865f21f; }
.supportbtn:hover { background: #5865f238; }
.dcicon { width: 16px; height: 16px; flex: none; }
.ft-support { display: inline-flex; align-items: center; gap: 6px; color: #aab2ff !important; text-decoration: none !important; font-size: 12.5px; }
.ft-support:hover span { text-decoration: underline; }

/* Discord button next to Settings (support channel) */
.sidefoot { flex-direction: row; align-items: center; gap: 6px; }
.sidefoot #btnSettings { flex: 1; width: auto; min-width: 0; }
.sidefoot #btnDiscord { flex: none; width: 40px; justify-content: center; padding: 9px 0; color: #8e98f5; }
.sidefoot #btnDiscord:hover { color: #fff; background: #5865f2; }
#side svg.dcfill { fill: currentColor; stroke: none; width: 20px; height: 20px; }
@media (max-width: 860px) {
  .sidefoot { flex-direction: column-reverse; gap: 2px; }
  .sidefoot #btnSettings, .sidefoot #btnDiscord { width: 100%; flex: none; }
}
.owkeys { justify-content: flex-end; } .owkeys[hidden] { display: none; } .owkeys a { color: var(--accent); font-size: 11.5px; }
.offline { margin-inline-start: 12px; padding: 2px 9px; border-radius: 999px; background: #3a1f24; border: 1px solid #f8717166; color: #fca5a5; font-size: 11px; font-weight: 700; white-space: nowrap; } .offline[hidden] { display: none; }

/* Values read from the game's own files */
.gamenote { display: block; margin-top: 4px; color: var(--good, #4ade80); font-size: 12px; }
.gamenote b { color: inherit; }
.gamenote .linkbtn { margin-inline-start: 6px; font-size: 12px; }
/* "You used a grow table" suggestion */
.toast.hint { border-color: var(--accent); background: var(--panel); }
.toast.hint b { color: var(--accent); }
.toast.hint .hintgo { margin-top: 6px; background: var(--accent); color: #000; font-weight: 600; border-radius: 6px; padding: 4px 10px; }

/* Small desktop window (down to the 960 x 620 minimum, with the ad column):
   the menu shows icons only, so the page keeps room, and cards stack instead of
   squeezing their text (Overwolf QA: text mispositioned at minimum size). */
@media (max-width: 1240px) {
  :root { --side: 56px; }
  #side .logo { padding: 10px 0 6px; }
  #side .logo .wordmark { display: none; } #side .logo .mark { display: block; }
  #side #tabs { padding: 6px; }
  #side #tabs button span, .sidefoot button span { display: none; }
  #side #tabs button, .sidefoot button { justify-content: center; padding: 10px 0; }
  .sidefoot { padding: 6px; flex-direction: column-reverse; gap: 2px; }
  .sidefoot #btnSettings, .sidefoot #btnDiscord { width: 100%; flex: none; }
  #side #tabs button[data-badge]:not([data-badge=""])::after { top: -3px; inset-inline-end: -4px; transform: none; min-width: 15px; height: 15px; line-height: 15px; font-size: 9.5px; box-shadow: 0 0 0 2px var(--ink); }
  #appSettings { inset-inline-start: calc(var(--side) + 10px); }
}
.keycards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.splitcard { flex-wrap: wrap; justify-content: center; }
.splitcard .slegend { flex: 1 1 220px; min-width: 0; }
.slegend span { min-width: 0; }

/* Timers tab: the timers started from the game log */
.autobox { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.autobox > b { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); }
.autobox > small { color: var(--dim); font-size: 11.5px; margin-bottom: 4px; }

/* Timers tab: settings folded away under the timers */
.tsettings .weedset { margin: 10px 0 6px; }
.tsettings .checks { margin: 6px 0 2px; }
.tsettings .autobox { background: var(--panel2); }

/* Invite a friend: above Settings, opens the app's Overwolf store page */
.sideinvite { padding: 8px 8px 0; }
.sideinvite button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 9px 10px; border: 1px solid #ffc53159; border-radius: 8px; background: #ffc53114; color: var(--accent); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.sideinvite button:hover { background: var(--accent); color: #111; }
@media (max-width: 1240px) {
  .sideinvite { padding: 6px 6px 0; }
  .sideinvite button span { display: none; }
  .sideinvite button { padding: 9px 0; }
}

/* robruncompanion.com: page layout around the app's own tool styles (app.css). */
html, body { height: auto; }
body { display: block; overflow: visible; font: 15px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); }
a { color: var(--accent); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 40; background: #0c0d11ee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 58px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: .3px; }
.logo img { width: 30px; height: 30px; }
.logo b { color: var(--accent); }
.top nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.top nav a { color: var(--dim); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 11px; border-radius: 7px; }
.top nav a:hover, .top nav a.on { color: var(--text); background: var(--panel2); }
.top nav a.cta { background: var(--accent); color: #17130a; }
#navToggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; cursor: pointer; }

main { display: block; overflow: visible; padding: 26px 0 60px; flex: none; container: none; }
.crumbs { color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.crumbs a { color: var(--dim); }
h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.3px; }
.lead { font-size: 17px; color: #cfd3de; max-width: 820px; margin: 0 0 8px; }
.checked { color: var(--dim); font-size: 13px; margin: 0 0 22px; }

/* The tool itself: the app's markup, in a card. "page" is the container name app.css lays out against. */
.tool { container: page / inline-size; background: #0f1117; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 20px; margin: 18px 0 40px; font-size: 13px; line-height: 1.4; }
.tool h2 { font-size: 20px; margin: 0; }
.tool .tab { display: block; }
#toasts { top: 70px; inset-inline-start: auto; inset-inline-end: 16px; width: 360px; max-width: calc(100% - 32px); }

.prose { max-width: 820px; }
.prose h2 { font-size: 24px; margin: 38px 0 10px; line-height: 1.25; }
.prose h3 { font-size: 17px; margin: 24px 0 6px; }
.prose p, .prose li { color: #cfd3de; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0 18px; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--dim); font-weight: 600; font-size: 12.5px; text-transform: none; }
.prose td.n, .prose th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
.faq h3 { margin-top: 20px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.card { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.card b { display: block; font-size: 15.5px; margin-bottom: 2px; }
.card span { color: var(--dim); font-size: 13.5px; line-height: 1.45; display: block; }

.homehero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 34px; align-items: center; padding: 26px 0 10px; }
.homehero img.shot { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 20px 60px #000a; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-block; background: var(--accent); color: #17130a; font-weight: 700; text-decoration: none; padding: 11px 18px; border-radius: 9px; }
.btn.alt { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.appbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-top: 44px; }
.appbox h2 { margin: 0 0 8px; font-size: 22px; }
.appbox p { color: #cfd3de; margin: 0 0 6px; }
.appbox img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.shots figcaption { color: var(--dim); font-size: 13px; margin-top: 6px; }
.status { display: inline-block; background: #3a2f12; color: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 3px 12px; font-size: 13px; font-weight: 600; }

.foot { border-top: 1px solid var(--line); background: #0c0d11; padding: 26px 0 34px; color: var(--dim); font-size: 13.5px; }
.foot .wrap { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.foot a { color: var(--dim); display: block; text-decoration: none; padding: 2px 0; }
.foot a:hover { color: var(--text); }
.foot b { color: var(--text); display: block; margin-bottom: 6px; }
.foot p { max-width: 380px; margin: 0; }

@media (max-width: 860px) {
  #navToggle { display: block; }
  .top nav { display: none; position: absolute; top: 58px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #0c0d11; border-bottom: 1px solid var(--line); padding: 8px 14px 14px; }
  body.navopen .top nav { display: flex; }
  .homehero, .appbox { grid-template-columns: 1fr; }
  .tool { padding: 12px; margin-left: -8px; margin-right: -8px; }
}

/* Running timers, pinned to the top left of every page */
#sticky { position: fixed; top: 70px; left: 14px; z-index: 35; width: 292px; background: linear-gradient(180deg, #1c1f29f5, #14161df5); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px #000b, 0 0 0 1px #ffffff08 inset; font-size: 13px; overflow: hidden; backdrop-filter: blur(10px); }
#sticky::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), #ff8a3d); }
#sticky.ready::before { background: linear-gradient(90deg, var(--good), #22d3ee); }
#sticky:not(.open) { width: auto; max-width: 292px; border-radius: 99px; }
#sticky:not(.open)::before { display: none; }
#sticky.ready:not(.open) { border-color: var(--good); box-shadow: 0 16px 40px #000b, 0 0 0 3px #4ade8026; }

#sticky .shead { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 11px 12px 9px 14px; cursor: pointer; text-align: left; }
#sticky:not(.open) .shead { padding: 6px 10px 6px 8px; }
#sticky .stitle b { display: block; font-size: 14px; letter-spacing: .2px; }
#sticky .stitle small { color: var(--dim); font-size: 11.5px; }
#sticky.ready .stitle small { color: var(--good); }
#sticky:not(.open) .stitle { display: none; }
#sticky .snext { margin-left: auto; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--accent); }
#sticky.ready:not(.open) .snext { color: var(--good); }
#sticky .sfold { font-style: normal; color: var(--dim); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--panel2); }
#sticky .sstack { display: flex; }
#sticky .sstack .sring { margin-left: -8px; box-shadow: 0 0 0 2px #14161d; }
#sticky .sstack .sring:first-child { margin-left: 0; }
#sticky .smore { font-style: normal; font-size: 11px; color: var(--dim); align-self: center; margin-left: 4px; }

/* An icon inside a ring that fills as the timer runs (--p is the percentage done) */
.sring { --p: 0%; position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) var(--p), #2f3442 0%); }
.sring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #171a22; }
.sring img { position: relative; z-index: 1; width: 26px; height: 26px; object-fit: contain; }
.sring.soon { background: conic-gradient(#fb923c var(--p), #2f3442 0%); }
.sring.done { background: var(--good); animation: sglow 1.6s infinite; }
#sticky:not(.open) .sring { width: 32px; height: 32px; } #sticky:not(.open) .sring img { width: 20px; height: 20px; }

#sticky .slist { max-height: min(60vh, 440px); overflow-y: auto; padding: 0 6px 4px; }
#sticky .srow { position: relative; display: flex; align-items: center; border-radius: 10px; }
#sticky .srow:hover { background: #ffffff0a; }
#sticky .srow a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--text); text-decoration: none; }
#sticky .sname { flex: 1; min-width: 0; }
#sticky .sname b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
#sticky .sname small { color: var(--dim); font-size: 11.5px; }
#sticky .srow strong { font-size: 16px; font-variant-numeric: tabular-nums; color: var(--accent); }
#sticky .srow.soon strong { color: #fb923c; }
#sticky .srow.done { background: #4ade8012; }
#sticky .srow.done strong { color: var(--good); font-size: 13px; letter-spacing: .5px; }
#sticky .srow.done .sname small { color: var(--good); }
/* Start again / remove: over the countdown, shown on hover or keyboard focus (always on touch screens) */
#sticky .sbtns { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px; opacity: 0; pointer-events: none; background: #1c1f29; padding: 3px; border-radius: 9px; box-shadow: -10px 0 12px #1c1f29; transition: opacity .12s; }
#sticky .srow:hover .sbtns, #sticky .srow:focus-within .sbtns { opacity: 1; pointer-events: auto; }
#sticky .sbtns button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; }
#sticky .sbtns button:hover { border-color: var(--accent); color: var(--accent); }
#sticky .sbtns [data-stop]:hover { border-color: var(--bad); color: var(--bad); }
#sticky .srow.done .sbtns { opacity: 1; pointer-events: auto; position: static; transform: none; background: none; box-shadow: none; padding: 0 6px 0 0; }
#sticky .srow.done .sbtns [data-again] { border-color: var(--good); color: var(--good); }
#sticky .sall { display: block; text-align: center; padding: 8px; border-top: 1px solid var(--line); color: var(--dim); text-decoration: none; font-size: 12.5px; }
#sticky .sall:hover { color: var(--accent); }
@keyframes sglow { 0%, 100% { box-shadow: 0 0 0 0 #4ade8066; } 50% { box-shadow: 0 0 0 6px #4ade8000; } }
@media (hover: none) { #sticky .sbtns { opacity: 1; pointer-events: auto; position: static; transform: none; background: none; box-shadow: none; padding: 0 6px 0 0; } }
@media (max-width: 860px) { #sticky { top: auto; bottom: 12px; left: 12px; max-width: calc(100% - 24px); } }
@media (min-width: 861px) and (max-width: 1780px) { body.hassticky main { padding-top: 64px; } }
@media (prefers-reduced-motion: reduce) { .sring.done { animation: none; } }

/* Language menu (header) and list (footer) */
.langmenu { position: relative; margin-inline-start: 4px; }
.langmenu summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover, .langmenu[open] summary { color: var(--text); border-color: var(--accent); }
.langmenu div { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: #15171e; border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 150px; box-shadow: 0 14px 34px #000b; z-index: 50; display: grid; }
.top nav .langmenu a { display: block; padding: 6px 10px; font-weight: 500; }
.top nav .langmenu a.on { color: var(--accent); }
.langlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Right-to-left pages (Arabic) */
[dir="rtl"] .top nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] #navToggle { margin-left: 0; margin-right: auto; }
[dir="rtl"] .prose th, [dir="rtl"] .prose td, [dir="rtl"] .ttable th, [dir="rtl"] .ttable td { text-align: right; }
[dir="rtl"] .prose td.n, [dir="rtl"] .prose th.n, [dir="rtl"] .ttable .n, [dir="rtl"] .lane .time, [dir="rtl"] .rung .price { text-align: left; }
[dir="rtl"] #sticky .shead { text-align: right; }
[dir="rtl"] #sticky .snext, [dir="rtl"] #sticky .ssum { margin-left: 0; margin-right: auto; }
[dir="rtl"] .tctl output { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .racebar small { margin-left: 0; margin-right: auto; }
[dir="rtl"] .thead2 { background: linear-gradient(270deg, #3a2f12, transparent); }
/* Bars, tracks and charts read left to right in every language: time runs that way. */
[dir="rtl"] .track, [dir="rtl"] #ttkStrip, [dir="rtl"] #ttkChart, [dir="rtl"] .fall, [dir="rtl"] .taxchart, [dir="rtl"] .hpbar, [dir="rtl"] .tprog { direction: ltr; }
@media (max-width: 860px) { .langmenu div { position: static; box-shadow: none; grid-template-columns: 1fr 1fr; } }

/* Uninstall survey */
.survey { max-width: 640px; display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.survey fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; background: var(--panel); }
.survey legend { font-weight: 700; padding: 0 6px; }
.survey .checked { margin: 0 0 8px; }
.sopt { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; }
.sopt input { accent-color: var(--accent); width: 17px; height: 17px; }
.survey .scale { display: flex; gap: 8px; }
.survey .scale .sopt { flex: 1; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.survey .scalekey { display: flex; justify-content: space-between; margin: 6px 0 0; }
.survey textarea { width: 100%; box-sizing: border-box; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
.survey button { align-self: flex-start; }
.survey .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.surveystatus { max-width: 640px; margin: 16px 0; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--accent); background: #3a2f1240; }
.surveystatus p { margin: 0; }

/* Panel headings inside a tool: h3 on the site, styled like the app's h4. */
h3.sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); }
h3.sec small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
h3.sec > img { width: 30px; height: 30px; object-fit: contain; }
h3.sec .spacer { flex: 1; }
h3.sec .filebtn { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 4px 10px; cursor: pointer; }
.col > h3.sec:first-child { margin-top: 2px; }
/* Footer links are big enough to tap on a phone. */
@media (max-width: 760px) { .foot a { padding: 11px 0; } }

/* Collection Table pages */
.ctable td { vertical-align: middle; }
.ctable td:first-child { min-width: 250px; }
.cset { display: flex; gap: 6px; margin-bottom: 5px; }
.cset span { position: relative; width: 44px; height: 44px; border-radius: 6px; background: #1c1b1f; border-bottom: 3px solid var(--dim); display: grid; place-items: center; }
.cset img { width: 38px; height: 38px; object-fit: contain; }
.cset i { position: absolute; inset-inline-end: 2px; bottom: 1px; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .65); border-radius: 4px; padding: 0 3px; }
.cset.q2 span { border-color: #5bd24a; background: linear-gradient(#1c1b1f 55%, #2c5a25); }
.cset.q4 span { border-color: #c56be8; background: linear-gradient(#1c1b1f 55%, #5a2c6e); }
.cset.q5 span { border-color: #f0c020; background: linear-gradient(#1c1b1f 55%, #6b5410); }
.prose td.gain { color: var(--accent); font-weight: 800; white-space: nowrap; }

/* Collection item finder */
.finder .fsteps { margin: 0 0 14px; padding-inline-start: 20px; font-size: 14px; }
.finder .fbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.finder .fbar button, .finder .fbar .filebtn { font-size: 15px; padding: 10px 18px; }
.finder .fbar .filebtn { background: none; color: var(--text); border: 1px solid var(--line); display: inline-block; }
.finder .fbar .filebtn input { display: none; }
.finder .fbar select { padding: 8px; }
.finder #fStatus { margin: 12px 0 0; color: var(--dim); font-size: 13.5px; }
.finder #fStatus [data-s="live"] { color: #5bd24a; font-weight: 700; }
.finder #fStatus [data-s="none"], .finder #fStatus [data-s="denied"], .finder #fStatus [data-s="unsupported"], .finder #fStatus [data-s="failed"] { color: #ffb454; }
.finder .fmain { display: none; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 18px; margin-top: 16px; align-items: start; }
.finder.shown .fmain { display: grid; }
.finder canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #000; display: block; }
.finder .fcounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.finder .fcounts div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 76px; }
.finder .fcounts span { display: block; color: var(--dim); font-size: 11.5px; }
.finder .fcounts b { font-size: 22px; }
.finder .fcounts .k b { color: var(--accent); } .finder .fcounts .t2 b { color: #5bd24a; } .finder .fcounts .t4 b { color: #c56be8; } .finder .fcounts .t5 b { color: #f0c020; }
.finder .finv { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 13.5px; }
.finder #fKeepList { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--dim); border-radius: 8px; padding: 3px 9px 3px 5px; font-size: 12.5px; }
.fchip img { width: 24px; height: 24px; object-fit: contain; }
.fchip.q2, .fset.q2 { border-inline-start-color: #5bd24a; } .fchip.q4, .fset.q4 { border-inline-start-color: #c56be8; } .fchip.q5, .fset.q5 { border-inline-start-color: #f0c020; }
.finder h3 { margin: 4px 0 8px; font-size: 15px; }
.fset { background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--dim); border-radius: 10px; padding: 9px 11px; margin: 0 0 8px; }
.fset.full { box-shadow: 0 0 0 1px var(--accent) inset; }
.fset .fhead { display: flex; justify-content: space-between; margin-bottom: 6px; } .fset .fhead span { color: var(--accent); font-weight: 800; }
.fset .fitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.fset .fitems div { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.2; }
.fset .fitems span { position: relative; flex: none; width: 40px; height: 40px; background: #1c1b1f; border-radius: 6px; display: grid; place-items: center; }
.fset .fitems img { width: 34px; height: 34px; object-fit: contain; }
.fset .fitems i { position: absolute; inset-inline-end: 1px; bottom: 0; font-style: normal; font-size: 10px; font-weight: 800; background: rgba(0, 0, 0, .7); border-radius: 3px; padding: 0 3px; }
.fset .fitems em { font-style: normal; }
.fset .fitems .miss { opacity: .38; }
.fset .fitems .has em { font-weight: 700; }
.prose .ilist td:first-child { white-space: nowrap; }
.prose .ilist img { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; margin-inline-end: 8px; }
.tier { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 700; margin: 1px 4px 1px 0; border: 1px solid; white-space: nowrap; }
.tier.q2 { color: #5bd24a; } .tier.q4 { color: #c56be8; } .tier.q5 { color: #f0c020; }
@media (max-width: 860px) { .finder.shown .fmain { grid-template-columns: 1fr; } }

/* Crate cards at the top of the collections page, in the rarity colours of the game. */
.chero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 12px; }
.ccard { --c: #5bd24a; --g: rgba(91, 210, 74, .2); --b: #2c5a25; position: relative; overflow: hidden; border-radius: 16px; padding: 16px; border: 1px solid transparent;
  background: radial-gradient(130% 90% at 100% 0%, var(--g), transparent 60%) padding-box, linear-gradient(#12131b, #0f1016) padding-box, linear-gradient(160deg, var(--c), transparent 55%, var(--b)) border-box; transition: transform .18s, box-shadow .18s; }
.ccard.q4 { --c: #c56be8; --g: rgba(197, 107, 232, .22); --b: #5a2c6e; } .ccard.q5 { --c: #f0c020; --g: rgba(240, 192, 32, .22); --b: #6b5410; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 10px 30px -12px var(--c); }
/* A slow light passes over the card. */
.ccard::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .07), transparent); transform: translateX(-120%); animation: ccshine 6s infinite; pointer-events: none; }
.ccard.q4::after { animation-delay: .5s; } .ccard.q2::after { animation-delay: 1s; }
.cchead { display: flex; align-items: center; gap: 12px; }
.ccbox { flex: none; position: relative; width: 104px; height: 72px; filter: drop-shadow(0 0 14px var(--g)) drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); animation: ccfloat 3.6s ease-in-out infinite; }
.ccbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* The Collection Crate has two looks: slot 1 behind, slot 2 in front. */
.ccbox.n2 img { width: 78%; height: 78%; inset: 0 auto auto 0; } .ccbox.n2 img + img { inset: auto 0 0 auto; }
.cchead b { display: block; font-size: 14px; line-height: 1.25; } .cchead b a { color: var(--c); text-decoration: none; } .cchead b a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cchead strong { display: block; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 22px var(--c); }
.ccflow { display: flex; align-items: center; gap: 8px; margin: 14px 0 12px; }
.ccflow .cset { margin: 0; } .ccflow .cset > span { animation: ccdrop 4.5s calc(var(--k) * .18s) ease-in-out infinite; }
.ccarrow { flex: none; fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: ccnudge 1.5s ease-in-out infinite; }
.ccmult { font-size: 22px; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; }
.ccbars, .ccfacts { margin: 0; } .ccbars div { margin: 0 0 8px; }
.ccbars dt, .ccfacts dt { color: var(--dim); font-size: 11.5px; }
.ccbars dd { margin: 3px 0 0; position: relative; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.ccbars i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: 6px; background: #6b7080; transform-origin: left center; animation: ccgrow 1.1s .2s cubic-bezier(.2, .8, .2, 1) both; }
.ccbars .full i { background: linear-gradient(90deg, var(--b), var(--c)); animation-delay: .55s; }
.ccbars span { position: absolute; inset-inline-end: 8px; top: 0; line-height: 22px; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
.ccfacts { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ccfacts dd { margin: 0; font-size: 16px; font-weight: 800; } .ccfacts div:nth-child(2) dd { color: var(--c); }
[dir="rtl"] .ccbars i { transform-origin: right center; } [dir="rtl"] .ccarrow { transform: scaleX(-1); animation: none; }
@keyframes ccshine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(340%); } }
@keyframes ccfloat { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@keyframes ccdrop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px); } 90% { transform: translateY(2px); } }
@keyframes ccnudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }
@keyframes ccgrow { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ccard::after { display: none; } .ccard, .ccard * { animation: none !important; } }
@media (max-width: 900px) { .chero { grid-template-columns: 1fr; } }
/* The set tables and their headings in the colour of the crate. */
.prose h2.q2 { color: #5bd24a; } .prose h2.q4 { color: #c56be8; } .prose h2.q5 { color: #f0c020; }
.prose .ctable tbody td:first-child { border-inline-start: 3px solid transparent; }
.prose .ctable.q2 tbody td:first-child { border-inline-start-color: #5bd24a; } .prose .ctable.q4 tbody td:first-child { border-inline-start-color: #c56be8; } .prose .ctable.q5 tbody td:first-child { border-inline-start-color: #f0c020; }
.prose .ctable.q2 tbody tr:hover { background: rgba(91, 210, 74, .07); } .prose .ctable.q4 tbody tr:hover { background: rgba(197, 107, 232, .08); } .prose .ctable.q5 tbody tr:hover { background: rgba(240, 192, 32, .07); }

/* The three crates table: one colour per crate. */
.prose .crates tbody tr { --c: #5bd24a; --g: rgba(91, 210, 74, .1); background: linear-gradient(90deg, var(--g), transparent 55%); }
.prose .crates tbody tr.q4 { --c: #c56be8; --g: rgba(197, 107, 232, .12); } .prose .crates tbody tr.q5 { --c: #f0c020; --g: rgba(240, 192, 32, .1); }
.prose .crates tbody td:first-child { border-inline-start: 3px solid var(--c); font-weight: 700; color: var(--c); }
.prose .crates tbody td:first-child a { color: var(--c); }
.prose .crates td.price { color: var(--c); font-weight: 800; }
.prose .crates td.gain { color: var(--c); }
.prose .crates tbody td { vertical-align: middle; }
.cpic { display: inline-flex; vertical-align: middle; margin-inline-end: 10px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.cpic img { width: 54px; height: 36px; object-fit: contain; } .cpic img + img { margin-inline-start: -22px; }
.prose .crates tbody td:first-child { white-space: nowrap; }

/* Before and after demo on the item list tool. One 10 s loop: the plain bag, a scan, then the framed bag. */
.fdemo { --t: 10s; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; margin: 18px 0 8px; padding: 22px; border-radius: 18px; border: 1px solid #3a3350;
  background: radial-gradient(120% 140% at 0% 0%, rgba(91, 210, 74, .13), transparent 46%), radial-gradient(120% 140% at 100% 0%, rgba(197, 107, 232, .16), transparent 48%), radial-gradient(120% 120% at 60% 100%, rgba(240, 192, 32, .14), transparent 50%), #12131b; }
.fdbag { position: relative; overflow: hidden; padding-top: 14px; border-radius: 12px; padding: 10px; background: #0c0d12; border: 1px solid #262838; }
.fdgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.fdgrid span { position: relative; min-width: 0; aspect-ratio: 1; border-radius: 7px; background: #1b1d26; display: grid; place-items: center; }
.fdgrid span > img { position: absolute; inset: 12%; }
.fdgrid img { width: 76%; height: 76%; min-width: 0; object-fit: contain; }
.fdgrid i { position: absolute; inset-inline-end: 3px; bottom: 1px; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; }
/* Every item keeps its rarity colour, as in the game's bag. */
.fdgrid .q2 { --c: #5bd24a; --g: rgba(91, 210, 74, .16); --b: #2c5a25; } .fdgrid .q3 { --c: #4aa3f0; --b: #1f4468; } .fdgrid .q4 { --c: #c56be8; --g: rgba(197, 107, 232, .18); --b: #5a2c6e; } .fdgrid .q5 { --c: #f0c020; --g: rgba(240, 192, 32, .16); --b: #6b5410; } .fdgrid .q6 { --c: #e5484d; --b: #6e2326; }
.fdgrid span[class*=" q"] { background: linear-gradient(#1b1d26 50%, var(--b)); border-bottom: 3px solid var(--c); }
/* After: a collection badge on what a set needs. */
.fdgrid em { position: absolute; bottom: 2px; inset-inline-start: 3px; z-index: 1; width: 30%; max-width: 22px; line-height: 0; transform-origin: bottom left; animation: fdbadge var(--t) var(--d) infinite both; }
.fdgrid em svg { width: 100%; height: auto; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .9)); }
.fdgrid .keep::after { content: ""; position: absolute; inset: 0; border-radius: 7px; border: 2px solid var(--c); box-shadow: 0 0 14px var(--c), 0 0 5px var(--c) inset; background: var(--g); animation: fdframe var(--t) var(--d) infinite both; }
.fdgrid .junk { animation: fdjunk var(--t) infinite both; }
.fdscan { position: absolute; top: 0; bottom: 0; left: 0; width: 26%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), rgba(255, 197, 49, .5)); border-inline-end: 2px solid #ffc531; animation: fdscan var(--t) infinite both; }
.fdside h2 { margin: 0 0 12px; font-size: 24px; background: linear-gradient(90deg, #5bd24a, #f0c020 45%, #c56be8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fdtabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #0c0d12; border: 1px solid #262838; margin-bottom: 12px; font-weight: 800; font-size: 13px; }
.fdtabs span { padding: 5px 16px; border-radius: 999px; color: var(--dim); }
.fdtabs .b { animation: fdtabb var(--t) infinite both; } .fdtabs .a { animation: fdtaba var(--t) infinite both; }
.fdrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #262838; font-size: 15px; }
.fdrow b { font-size: 24px; font-variant-numeric: tabular-nums; }
.fdrow.before { animation: fdbefore var(--t) infinite both; }
.fdrow.after { animation: fdafter var(--t) infinite both; } .fdrow.after b { color: #ffc531; }
.fdgain { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 10px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(90deg, rgba(91, 210, 74, .22), rgba(91, 210, 74, .06)); border: 1px solid rgba(91, 210, 74, .5); transform-origin: left center; animation: fdgain var(--t) infinite both; }
.fdgain span { font-weight: 700; } .fdgain b { font-size: 32px; color: #6fe65c; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(91, 210, 74, .55); }
.fdside p { margin: 0; color: var(--dim); font-size: 13.5px; }
@keyframes fdframe { 0%, 36% { opacity: 0; transform: scale(1.35); } 41%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes fdjunk { 0%, 36% { opacity: 1; filter: none; } 42%, 94% { opacity: .3; filter: grayscale(1); } 100% { opacity: 1; filter: none; } }
@keyframes fdbadge { 0%, 38% { opacity: 0; transform: scale(0); } 43% { opacity: 1; transform: scale(1.3); } 46%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(0); } }
@keyframes fdscan { 0%, 24% { transform: translateX(-110%); opacity: 0; } 25% { transform: translateX(-110%); opacity: 1; } 38% { transform: translateX(400%); opacity: 1; } 39%, 100% { transform: translateX(400%); opacity: 0; } }
@keyframes fdtabb { 0%, 36% { background: #e5484d; color: #fff; } 40%, 96% { background: transparent; color: var(--dim); } 100% { background: #e5484d; color: #fff; } }
@keyframes fdtaba { 0%, 36% { background: transparent; color: var(--dim); } 40%, 96% { background: #5bd24a; color: #0c1a0a; } 100% { background: transparent; color: var(--dim); } }
@keyframes fdbefore { 0%, 38% { opacity: 1; text-decoration: none; } 39%, 96% { opacity: .45; text-decoration: line-through; } 97%, 100% { opacity: 1; text-decoration: none; } }
@keyframes fdafter { 0%, 38% { opacity: .18; } 44%, 96% { opacity: 1; } 100% { opacity: .18; } }
@keyframes fdgain { 0%, 42% { opacity: 0; transform: scale(.85); } 47% { opacity: 1; transform: scale(1.06); } 50%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.85); } }
[dir="rtl"] .fdscan { left: auto; right: 0; animation-name: fdscanr; } [dir="rtl"] .fdgain { transform-origin: right center; }
@keyframes fdscanr { 0%, 24% { transform: translateX(110%); opacity: 0; } 25% { transform: translateX(110%); opacity: 1; } 38% { transform: translateX(-400%); opacity: 1; } 39%, 100% { transform: translateX(-400%); opacity: 0; } }
/* With motion turned off the demo shows the "after" state. */
@media (prefers-reduced-motion: reduce) {
  .fdemo *, .fdemo *::after { animation: none !important; }
  .fdscan { display: none; } .fdgrid .junk { opacity: .3; filter: grayscale(1); } .fdrow.before { opacity: .45; text-decoration: line-through; } .fdtabs .a { background: #5bd24a; color: #0c1a0a; }
}
@media (max-width: 760px) { .fdemo { grid-template-columns: 1fr; padding: 14px; } .fdside h2 { font-size: 20px; } .fdgain b { font-size: 26px; } }

/* The tool sits right under the page title and stays short, so it is in view without scrolling.
   Once a picture shows, the steps go and the picture is never taller than the window. */
.tool.finder { margin-top: 12px; scroll-margin-top: 68px; }
.finder + .checked { margin: 10px 0 0; }
.finder .fsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 30px; margin-bottom: 12px; font-size: 13.5px; }
.finder.shown .fsteps { display: none; }
.finder #fStatus { margin-top: 8px; }
.finder.shown .fmain { margin-top: 10px; }
.finder canvas { max-height: calc(100vh - 215px); object-fit: contain; }
.finder.shown .fmain > div + div { max-height: calc(100vh - 215px); overflow-y: auto; }
@media (max-width: 860px) { .finder .fsteps { grid-template-columns: 1fr; } .finder canvas { max-height: 62vh; } .finder.shown .fmain > div + div { max-height: none; overflow: visible; } }
.fdemo { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }

/* The tool itself, in the three crate colours. */
.tool.finder { border: 1px solid transparent; background: linear-gradient(#0f1117, #0f1117) padding-box, linear-gradient(120deg, #5bd24a, #f0c020 50%, #c56be8) border-box; }
.finder .fsteps li::marker { color: #ffc531; font-weight: 800; }
.finder #fShare { background: linear-gradient(90deg, #ffc531, #ff9d2e); animation: fpulse 2.2s infinite; }
.finder.shown #fShare { animation: none; }
@keyframes fpulse { 0% { box-shadow: 0 0 0 0 rgba(255, 197, 49, .6); } 70% { box-shadow: 0 0 0 12px rgba(255, 197, 49, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 197, 49, 0); } }
.finder #fStop { background: #e5484d; color: #fff; border: 0; border-radius: 5px; font-weight: 700; cursor: pointer; }
.finder .fcounts .k { background: linear-gradient(160deg, rgba(255, 197, 49, .2), var(--panel)); border-color: rgba(255, 197, 49, .5); }
.finder .fcounts .t2 { background: linear-gradient(160deg, rgba(91, 210, 74, .2), var(--panel)); border-color: rgba(91, 210, 74, .45); }
.finder .fcounts .t4 { background: linear-gradient(160deg, rgba(197, 107, 232, .2), var(--panel)); border-color: rgba(197, 107, 232, .45); }
.finder .fcounts .t5 { background: linear-gradient(160deg, rgba(240, 192, 32, .2), var(--panel)); border-color: rgba(240, 192, 32, .45); }
.finder .fcounts .x { background: linear-gradient(160deg, rgba(229, 72, 77, .16), var(--panel)); border-color: rgba(229, 72, 77, .4); } .finder .fcounts .x b { color: #ff6b6f; }
.fset.q2 { background: linear-gradient(100deg, rgba(91, 210, 74, .12), var(--panel) 60%); } .fset.q4 { background: linear-gradient(100deg, rgba(197, 107, 232, .13), var(--panel) 60%); } .fset.q5 { background: linear-gradient(100deg, rgba(240, 192, 32, .13), var(--panel) 60%); }
.fset.full { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 16px rgba(255, 197, 49, .25); }
.finder .fvalue { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: linear-gradient(90deg, rgba(91, 210, 74, .22), rgba(91, 210, 74, .05)); border: 1px solid rgba(91, 210, 74, .5); font-size: 13.5px; }
.finder .fvalue b { font-size: 22px; color: #6fe65c; white-space: nowrap; }
.prose .ilist tbody td:first-child { border-inline-start: 3px solid transparent; }
.prose .ilist.q2 tbody td:first-child { border-inline-start-color: #5bd24a; } .prose .ilist.q4 tbody td:first-child { border-inline-start-color: #c56be8; } .prose .ilist.q5 tbody td:first-child { border-inline-start-color: #f0c020; }
.prose h3.q2 { color: #5bd24a; } .prose h3.q4 { color: #c56be8; } .prose h3.q5 { color: #f0c020; }
/* The item list is grouped by set: one heading row per set. */
.prose .ilist tr.sethead td { background: rgba(255, 255, 255, .05); font-weight: 800; border-top: 2px solid var(--line); }
.prose .ilist tr.sethead td.n { color: var(--accent); }
.prose .ilist.q2 tr.sethead td:first-child { color: #5bd24a; } .prose .ilist.q4 tr.sethead td:first-child { color: #c56be8; } .prose .ilist.q5 tr.sethead td:first-child { color: #f0c020; }
