[hidden] { display: none !important; }
:root {
  --bg: #12151b; --panel: #1a1f28; --panel2: #212734; --line: #2c3442; --text: #e6e8ec; --muted: #949cab;
  --gold: #e8b64c; --gold2: #f5d58a; --good: #5fcf8a; --bad: #ef6b6b; --warn: #f0a640; --blue: #6fa8ff;
  --r: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 14px; line-height: 1.45; }
a { color: var(--blue); }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); } .goldc { color: var(--gold2); }

button, .button {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 13px; cursor: pointer; display: inline-block;
}
button:hover, .button:hover { border-color: var(--gold); }
button.primary, .button.primary { background: var(--gold); color: #241a04; border-color: var(--gold); font-weight: 600; }
button.primary:hover, .button.primary:hover { background: var(--gold2); }
button.ghost { background: transparent; }
button.small { padding: 3px 8px; font-size: 12px; }
input, select {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 8px;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; border-bottom: 1px solid var(--line); background: #0f1217; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 9px; }
.brand small { font-weight: 400; color: var(--muted); font-size: 13px; }
.coin { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold2), var(--gold) 60%, #a77a1c); color: #2b1e04; display: grid; place-items: center; font-family: Georgia, serif; font-size: 16px; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.load { flex: 1; display: flex; justify-content: center; padding: 44px 22px 40px; }
.hero { max-width: 1080px; width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; margin-bottom: 26px; }
.eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.hero h1 { font-size: 36px; margin: 0 0 12px; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 18px; max-width: 520px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.how-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.how-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #241a04; font-size: 12px; }
.peek { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 8px; box-shadow: 0 18px 40px #0006; }
.peek figcaption { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.peek table { width: 100%; border-collapse: collapse; font-size: 13px; }
.peek th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 6px 6px; border-bottom: 1px solid var(--line); }
.peek td { padding: 7px 6px; border-bottom: 1px solid #252c38; white-space: nowrap; }
.peek tr:last-child td { border-bottom: 0; }
.peek .n { text-align: right; }
.peek .ico { width: 24px; height: 24px; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 28px 20px; text-align: center; background: var(--panel); transition: .15s; }
.drop.over { border-color: var(--gold); background: #231f15; }
.drop-ico { width: 34px; height: 34px; color: var(--gold); margin-bottom: 6px; }
.drop-title { font-size: 18px; font-weight: 600; }
.drop-sub { color: var(--muted); margin: 4px 0 16px; }
.drop-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.status { margin-top: 14px; min-height: 20px; color: var(--muted); }
.status.err { color: var(--bad); }
.where { margin: 16px 0 24px; color: var(--muted); font-size: 13px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.trust .card { display: flex; gap: 12px; align-items: flex-start; }
.t-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #2a2414; color: var(--gold); }
.t-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 600px) {
  .load { padding: 24px 14px; }
  .peek { padding: 12px 10px 6px; }
  .peek th:nth-child(4), .peek td:nth-child(4) { display: none; }
}
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.card p { margin: 0; color: var(--muted); }

.app { flex: 1; min-height: 0; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tabs button { background: transparent; border: 0; border-radius: 7px; padding: 7px 10px; color: var(--muted); white-space: nowrap; }
body:has(#appView:not([hidden])) .brand small { display: none; }
.tabs button:hover { background: var(--panel2); color: var(--text); }
.tabs button.on { background: var(--panel2); color: var(--gold2); font-weight: 600; }
.label { font-size: 12px; color: var(--muted); display: block; margin: 10px 0 4px; }
.label:first-child { margin-top: 0; }
.big { font-size: 17px; font-weight: 600; }
.gold-in { display: flex; align-items: center; gap: 6px; }
.gold-in input { width: 130px; }
.scan-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.scan-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.scan-pill.stale .dot { background: var(--warn); }
.scan-pill.stale { color: var(--warn); }
.purse { position: relative; }
.purse summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.purse summary::-webkit-details-marker { display: none; }
.purse summary:hover, .purse[open] summary { border-color: var(--gold); }
.purse-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: 0 10px 30px #0008; }
.src-info { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.content { padding: 20px 26px 40px; min-width: 0; max-width: 1400px; width: 100%; margin: 0 auto; }
.section { margin-bottom: 30px; }
.sub { color: var(--muted); margin: 0 0 12px; max-width: 820px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat .d { font-size: 12px; color: var(--muted); }
.warnbox { background: #2b2213; border: 1px solid #6b5220; color: #f5d59a; border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px; }
.infobox { background: #17202e; border: 1px solid #2b3d58; border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px; color: #c9d6ea; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--panel2); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1d232e; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.item { min-width: 170px; }
.item a.ext { color: var(--muted); text-decoration: none; font-size: 11px; margin-left: 4px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); margin: 1px 2px 1px 0; white-space: nowrap; }
.tag.dip { border-color: #3c7a55; color: var(--good); }
.tag.stock-drain { border-color: #3d5f8f; color: var(--blue); }
.tag.HOT, .tag.hot { border-color: #8a5a20; color: var(--warn); }
.tag.loss { border-color: #7a3434; color: var(--bad); }
.tag.Fast { color: var(--good); } .tag.Steady { color: var(--gold2); } .tag.Slow { color: var(--warn); }

.char { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.char-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prof { margin-top: 14px; }
.prof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prof-head input { width: 70px; padding: 3px 6px; }
.pill { font-size: 12px; background: var(--panel2); border-radius: 12px; padding: 2px 9px; color: var(--muted); }
.list { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; max-width: 900px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.form label span { color: var(--muted); font-size: 12px; }
.form .check { flex-direction: row; align-items: center; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bar { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }

.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 14px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--gold); padding: 8px 16px; border-radius: 8px; z-index: 9; }

@media (max-width: 1240px) { .top .tabs { order: 3; flex-basis: 100%; } }
@media (max-width: 600px) { .content { padding: 16px 14px 32px; } .stat .v { font-size: 19px; } .purse-pop { position: fixed; left: 12px; right: 12px; width: auto; top: 110px; } .hide-s { display: none; } }
td.learn { min-width: 210px; }

/* load screen: SavedVariables help (js/help.js) */
.where-help { margin: 18px 0 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.where-help { padding: 0; }
.where-help > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 10px; }
.where-help > summary::-webkit-details-marker { display: none; }
.where-help > summary::before { content: "›"; color: var(--gold); font-size: 20px; line-height: 1; transition: transform .15s; }
.where-help[open] > summary::before { transform: rotate(90deg); }
.where-help > summary:hover b { color: var(--gold2); }
.where-help[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.where-help > :not(summary) { margin-left: 18px; margin-right: 18px; }
.where-help > :last-child { margin-bottom: 16px; }
.wh-steps { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.wh-steps > li::marker { color: var(--gold); font-weight: 700; }
.wh-path { display: block; margin: 6px 0; padding: 7px 10px; font-size: 12.5px; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid var(--line); }
.wh-out { color: var(--gold2); font-size: 13px; user-select: all; }
.wh-more { margin: 6px 0; color: var(--muted); }
.wh-more summary { cursor: pointer; color: var(--text); }
.wh-more summary:hover { color: var(--gold2); }
.wh-more p { margin: 6px 0; }
.wh-games { width: auto; margin: 6px 0; font-size: 12.5px; }
.wh-games td { padding: 3px 12px 3px 0; border: 0; color: var(--muted); }
.wh-games tbody tr:hover { background: transparent; }
.wh-files { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.wh-files b { color: var(--text); }
.wh-builder { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.wh-title { font-weight: 600; margin-bottom: 8px; color: var(--gold2); }
.wh-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 6px; }
.wh-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.wh-form input, .wh-form select { background: var(--bg); min-width: 0; }
.wh-builder .wh-path { background: var(--bg); }
.wh-note { margin: 4px 0 8px; }
.wh-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.wh-tip { margin: 10px 0 4px; font-size: 13px; }
kbd { font: 12px/1 ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; }
.status code { font-size: 12px; }
@media (max-width: 600px) { .where-help { padding: 14px; } }

/* ---- money as coins, item icons, tooltips ---- */
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money i { display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin: 0 .3em 0 .1em; vertical-align: .05em; }
.money i:last-child { margin-right: 0; }
.money .cg { background: #e8b64c; } .money .cs { background: #c9ced6; } .money .cc { background: #c27a42; }
td.item { min-width: 200px; }
.it { display: inline-flex; align-items: center; gap: 9px; vertical-align: middle; }
.it a { text-decoration: none; color: inherit; }
.it a:hover { text-decoration: underline; }
.ico { width: 28px; height: 28px; border-radius: 5px; flex: none; border: 1px solid #000; box-shadow: 0 0 0 1px var(--qc, #555); background: var(--panel2) center/cover; }
.ico.sm { width: 20px; height: 20px; border-radius: 4px; }
.q0 { --qc: #9d9d9d; color: #9d9d9d; } .q1 { --qc: #6b6f76; color: #f2f2f2; } .q2 { --qc: #1eff00; color: #1eff00; }
.q3 { --qc: #0070dd; color: #3d9bff; } .q4 { --qc: #a335ee; color: #b866ff; } .q5 { --qc: #ff8000; color: #ff8000; }
.ico.q1 { box-shadow: 0 0 0 1px #6b6f76; }
td .tag { vertical-align: middle; }
.profit { color: var(--good); font-weight: 600; }
.roi { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.act { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.act.now { color: var(--good); } .act.bag { color: var(--gold2); }
.sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sec-head h2, .sec-head h3 { margin: 0; }
.sec-head .muted { font-size: 13px; }
details.how { margin: 0 0 12px; color: var(--muted); max-width: 860px; }
details.how summary { cursor: pointer; font-size: 13px; color: var(--muted); }
details.how summary:hover { color: var(--gold2); }
details.how p { margin: 6px 0; }
.stat.hi { border-color: #3d6b4c; background: #16231b; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chiprow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 13px; }
.tip { position: fixed; z-index: 50; pointer-events: none; max-width: 320px; background: #070b1c; border: 1px solid #4d5b78; border-radius: 6px; padding: 9px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 6px 20px #000b; }
.tip .tn { font-weight: 600; font-size: 14px; display: flex; gap: 9px; align-items: center; }
.tip .tl { color: #9aa3b5; } .tip hr { border: 0; border-top: 1px solid #253150; margin: 7px 0; }
.tip .row2 { display: flex; justify-content: space-between; gap: 16px; } .tip .row2 span:first-child { color: #9aa3b5; }
.tip .hint { color: #6f7a90; font-size: 11.5px; margin-top: 6px; }
#budgetTop.bump { animation: bump .9s ease-out; }
@keyframes bump { 0% { color: #fff; text-shadow: 0 0 10px var(--gold); } 100% { color: inherit; text-shadow: none; } }
