: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; }
#adslot[hidden], #adslot2[hidden], #adslot3[hidden], #adgameslot[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; }

#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; }
.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; 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; }
