/* Мини-панель stickscustom. Тот же язык, что у карточки детекта: тёмный
   фиолетовый, Exo 2 для цифр и заголовков, Golos Text для текста. */
:root {
  --bg: #0f0d14; --sf: #1a1624; --sf2: #221c30; --ln: #2c2540;
  --tx: #ece9f5; --mu: #9189a8; --faint: #6b6482;
  --ac: #a487f0; --ac2: #7b5fd6; --ac-soft: rgba(164, 135, 240, .14);
  --up: #4cc38a; --down: #ef7a6f; --warn: #e7a14a;
  --disp: "Exo 2", "Golos Text", sans-serif; --sans: "Golos Text", -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); color: var(--tx); font-family: var(--sans); }
body { min-height: 100dvh; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
       padding: 14px 0 12px; background: linear-gradient(var(--bg) 70%, transparent); }
.brand { font-family: var(--disp); font-weight: 800; font-size: 26px; letter-spacing: .01em; color: transparent;
         background: linear-gradient(90deg, #6a56a3, #b49cff); -webkit-background-clip: text; background-clip: text; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
        background: var(--sf); border: 1px solid var(--ln); font-size: 13px; color: var(--mu); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on i { background: var(--up); box-shadow: 0 0 0 3px rgba(76, 195, 138, .18); }
.pill.off i { background: var(--down); }

h2 { font-family: var(--disp); font-weight: 800; font-size: 17px; margin: 22px 0 10px; letter-spacing: .01em; }
.note { color: var(--faint); font-size: 13px; line-height: 1.45; margin-top: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.stat { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r); padding: 12px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--mu); }
.stat b { display: block; font-family: var(--disp); font-weight: 800; font-size: 20px; margin-top: 4px;
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.today div { background: var(--sf); border-radius: var(--r); padding: 10px 8px; text-align: center; border: 1px solid var(--ln); }
.today b { display: block; font-family: var(--disp); font-weight: 800; font-size: 22px; }
.today span { font-size: 11px; color: var(--mu); }
.today .hot b { color: var(--ac); }

.skins { display: grid; gap: 8px; }
.skin { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: var(--sf); border: 1px solid var(--ln);
        border-radius: var(--r); padding: 12px 14px; }
.skin b { font-weight: 700; }
.skin em { font-style: normal; font-family: var(--disp); font-weight: 800; color: var(--ac); text-align: right; }
.skin small { grid-column: 1 / -1; color: var(--mu); font-size: 12.5px; }

.filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; }
.filters button { flex: none; border: 1px solid var(--ln); background: var(--sf); border-radius: 999px;
                  padding: 7px 14px; font-size: 13.5px; color: var(--mu); cursor: pointer; }
.filters button.on { background: var(--ac-soft); border-color: var(--ac2); color: var(--tx); }

.list { display: grid; gap: 10px; }
.det { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r); padding: 12px 14px; cursor: pointer; }
.det:active { transform: scale(.99); }
.det-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.det-h b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-h time { color: var(--faint); font-size: 12px; flex: none; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-right: 8px;
        background: var(--sf2); color: var(--mu); flex: none; }
.chip.bought { background: rgba(76, 195, 138, .16); color: var(--up); }
.chip.signal { background: var(--ac-soft); color: var(--ac); }
.chip.lost, .chip.no_money { background: rgba(239, 122, 111, .14); color: var(--down); }
.st-row { display: flex; gap: 6px; margin: 10px 0 8px; }
.st-row img { width: 48px; height: 48px; object-fit: contain; background: var(--sf2); border-radius: 10px; padding: 3px; }
.det-f { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--mu); }
.det-f b { font-family: var(--disp); font-weight: 800; color: var(--tx); }
.det-f .up { color: var(--up); } .det-f .down { color: var(--down); }
.why { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.empty { text-align: center; color: var(--faint); padding: 40px 10px; font-size: 14px; }

.rival { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; background: var(--sf);
         border: 1px solid var(--ln); border-radius: var(--r); padding: 11px 14px; }
.rival i { font-style: normal; font-family: var(--disp); font-weight: 800; color: var(--faint); }
.rival b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rival em { font-style: normal; font-family: var(--disp); font-weight: 800; color: var(--ac); }

.mode { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--sf);
        border: 1px solid var(--ln); border-radius: var(--r); padding: 14px; margin-top: 4px; }
.mode b { display: block; }
.mode span { display: block; font-size: 12.5px; color: var(--mu); margin-top: 3px; }
.mode.live { border-color: rgba(239, 122, 111, .5); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--sf2); border: 1px solid var(--ln); transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
                   background: var(--mu); transition: .2s; }
.switch input:checked + i { background: rgba(239, 122, 111, .3); border-color: var(--down); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--down); }

.cfg { display: grid; gap: 8px; margin-top: 14px; }
.row { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 12px; background: var(--sf);
       border: 1px solid var(--ln); border-radius: var(--r); padding: 10px 12px 10px 14px; }
.row label { font-size: 14px; }
.row label small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.row input, .row select { width: 100%; background: var(--sf2); border: 1px solid var(--ln); border-radius: 10px;
                          padding: 9px 10px; text-align: right; font-family: var(--disp); font-weight: 800; }
.row input:focus, .row select:focus { outline: 2px solid var(--ac2); outline-offset: 1px; }
.save { width: 100%; margin-top: 14px; border: 0; border-radius: var(--r); padding: 14px; cursor: pointer;
        background: linear-gradient(90deg, var(--ac2), var(--ac)); color: #140f22; font-weight: 800; font-size: 15px; }
.save:active { transform: translateY(1px); }
.toast { margin-top: 10px; text-align: center; font-size: 13.5px; color: var(--up); }
.toast.err { color: var(--down); }

.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(8, 6, 12, .86); display: grid; place-items: center; padding: 16px; }
.sheet-in { width: 100%; max-width: 640px; }
.sheet img { width: 100%; border-radius: 14px; display: block; }
.sheet button { display: block; margin: 12px auto 0; background: var(--sf); border: 1px solid var(--ln);
                border-radius: 999px; padding: 9px 22px; cursor: pointer; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
        background: rgba(20, 17, 28, .96); border-top: 1px solid var(--ln); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.tabs button { background: none; border: 0; padding: 8px 2px; border-radius: 10px; color: var(--faint); cursor: pointer; }
.tabs button b { font-size: 13px; font-weight: 600; }
.tabs button.on { color: var(--tx); background: var(--ac-soft); }

.switch.on-green input:checked + i { background: rgba(76, 195, 138, .28); border-color: var(--up); }
.switch.on-green input:checked + i::after { background: var(--up); }

/* свои лоты и покупки */
.item { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r); padding: 12px 14px; }
.item-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.item-h b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-h em { font-style: normal; font-family: var(--disp); font-weight: 800; color: var(--ac); flex: none; }
.item-m { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12.5px; color: var(--mu); }
.item-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.item .st-row { margin: 0; }
.btn3d { flex: none; border: 1px solid var(--ac2); background: var(--ac-soft); color: var(--tx); border-radius: 999px;
         padding: 8px 16px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.btn3d:active { transform: translateY(1px); }
.nost { font-size: 12.5px; color: var(--faint); }

.v3d { position: fixed; inset: 0; z-index: 30; background: #0f0d14; display: flex; flex-direction: column; }
.v3d-h { display: flex; align-items: center; justify-content: space-between; gap: 10px;
         padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
.v3d-h b { font-family: var(--disp); font-weight: 800; font-size: 18px; }
.v3d-h button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ln); background: var(--sf);
                cursor: pointer; font-size: 16px; }
.v3d iframe { flex: 1; width: 100%; border: 0; min-height: 0; }
.v3d-st { display: flex; justify-content: center; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.v3d-st div { text-align: center; font-size: 11.5px; color: var(--mu); width: 76px; }
.v3d-st img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.item-m .up { color: var(--up); } .item-m .down { color: var(--down); }

/* план покупки: до какой цены брать скин с наклейкой */
.plan-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: var(--sf);
            border: 1px solid var(--ln); border-radius: var(--r); padding: 8px 12px 8px 8px; }
.plan-row img { width: 44px; height: 44px; object-fit: contain; }
.plan-row b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-row small { color: var(--faint); font-size: 12px; }
.plan-row .cap { text-align: right; font-size: 12px; color: var(--mu); line-height: 1.5; }
.plan-row .cap em { font-style: normal; font-family: var(--disp); font-weight: 800; color: var(--up); }
